Skip to content

Commit

Permalink
Engine: removed version check from textwindow edge clipping
Browse files Browse the repository at this point in the history
This adjusts changes done by 11fecda

It's suggested that this non-clipping effect was unlikely to be utilized in practice. In the worst case such game is found, we might re-add the dataver condition.
  • Loading branch information
ivan-mogilko committed Oct 9, 2023
1 parent 9434605 commit eb77160
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Engine/ac/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,6 @@ void draw_button_background(Bitmap *ds, int xx1,int yy1,int xx2,int yy2,GUIMain*

const int leftRightWidth = game.SpriteInfos[get_but_pic(iep,4)].Width;
const int topBottomHeight = game.SpriteInfos[get_but_pic(iep,6)].Height;
const bool clip_borders = loaded_game_file_version >= kGameVersion_361;
// GUI middle space
if (iep->BgImage>0) {
{
Expand Down Expand Up @@ -695,15 +694,13 @@ void draw_button_background(Bitmap *ds, int xx1,int yy1,int xx2,int yy2,GUIMain*
}
}
// Vertical borders
if (clip_borders)
ds->SetClip(Rect(xx1 - leftRightWidth, yy1, xx2 + 1 + leftRightWidth, yy2));
ds->SetClip(Rect(xx1 - leftRightWidth, yy1, xx2 + 1 + leftRightWidth, yy2));
for (int uu=yy1;uu <= yy2;uu+= game.SpriteInfos[get_but_pic(iep,4)].Height) {
do_corner(ds, get_but_pic(iep,4),xx1,uu,-1,0); // left side
do_corner(ds, get_but_pic(iep,5),xx2+1,uu,0,0); // right side
}
// Horizontal borders
if (clip_borders)
ds->SetClip(Rect(xx1, yy1 - topBottomHeight, xx2, yy2 + 1 + topBottomHeight));
ds->SetClip(Rect(xx1, yy1 - topBottomHeight, xx2, yy2 + 1 + topBottomHeight));
for (int uu=xx1;uu <= xx2;uu+=game.SpriteInfos[get_but_pic(iep,6)].Width) {
do_corner(ds, get_but_pic(iep,6),uu,yy1,0,-1); // top side
do_corner(ds, get_but_pic(iep,7),uu,yy2+1,0,0); // bottom side
Expand Down

0 comments on commit eb77160

Please sign in to comment.