From cd628ec4f23b855185844dd165e7b7248a7785dd Mon Sep 17 00:00:00 2001 From: Flugente Date: Sun, 29 Jan 2017 14:38:12 +0000 Subject: [PATCH] Fix: animated explosion warnings were drawn over turn bar git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8383 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Interface Control.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tactical/Interface Control.cpp b/Tactical/Interface Control.cpp index 906475e1..77a22286 100644 --- a/Tactical/Interface Control.cpp +++ b/Tactical/Interface Control.cpp @@ -618,7 +618,7 @@ void DrawExplosionWarning( INT32 sGridno, INT8 usLevel, INT8 usDelay ) pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES ); // make sure to check for these boundaries later on, and only draw inside them - SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, gsVIEWPORT_END_X, gsVIEWPORT_WINDOW_END_Y ); + SetClippingRegionAndImageWidth( uiDestPitchBYTES, gsVIEWPORT_START_X, gsVIEWPORT_WINDOW_START_Y, gsVIEWPORT_END_X, gsVIEWPORT_WINDOW_END_Y ); INT16 numcircles = max( 1, 4 - usDelay); @@ -640,9 +640,9 @@ void DrawExplosionWarning( INT32 sGridno, INT8 usLevel, INT8 usDelay ) usLineColor = Get16BPPColor( FROMRGB( min( 255, 50 + 2 * radiusvar ), 0, 0 ) ); // determine area of where the circle will be drawn in, take into account what part of the sector we actually see - INT32 xl = max( 0, sScreenX - radius_outer ); + INT32 xl = max( gsVIEWPORT_START_X, sScreenX - radius_outer ); INT32 xr = min( gsVIEWPORT_END_X, sScreenX + radius_outer ); - INT32 yl = max( 0, sScreenY - radius_outer ); + INT32 yl = max( gsVIEWPORT_WINDOW_START_Y, sScreenY - radius_outer ); INT32 yr = min( gsVIEWPORT_WINDOW_END_Y, sScreenY + radius_outer ); best_xl = min( best_xl, xl );