From eb77160f56aee5fac857cc5eb5b9a957d44a562e Mon Sep 17 00:00:00 2001 From: Ivan Mogilko Date: Mon, 9 Oct 2023 21:36:19 +0300 Subject: [PATCH] Engine: removed version check from textwindow edge clipping This adjusts changes done by 11fecdaaf125cf94018af5a9c2ff63748bee49ae 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. --- Engine/ac/display.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Engine/ac/display.cpp b/Engine/ac/display.cpp index 7318c8b0852..ce5d0494d8e 100644 --- a/Engine/ac/display.cpp +++ b/Engine/ac/display.cpp @@ -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) { { @@ -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