mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user