From: Holger Schemel Date: Thu, 15 Mar 2018 22:08:55 +0000 (+0100) Subject: fixed two bugs with broken sniksnak graphics in SP engine after warp mode X-Git-Tag: 4.0.1.4~2 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7f40f3e4e3ae0818a91083952fd1710841735152;p=rocksndiamonds.git fixed two bugs with broken sniksnak graphics in SP engine after warp mode - the more serious of the two bugs was introduced with commit 727d3b5f * lots of non-existing sniksnaks may have been displayed after warp mode - the second bug existed for a long time (maybe this was never done right) * some sniksnaks may have been displayed incompletely after warp mode - this bug was fixed by forcing a complete playfield redraw after warp mode --- diff --git a/src/game_sp/DDScrollBuffer.c b/src/game_sp/DDScrollBuffer.c index 0992e0be..f580d399 100644 --- a/src/game_sp/DDScrollBuffer.c +++ b/src/game_sp/DDScrollBuffer.c @@ -168,6 +168,17 @@ void UpdatePlayfield(boolean force_redraw) int num_redrawn = 0; #endif + if (force_redraw) + { + // force re-initialization of graphics status variables + for (y = DisplayMinY; y <= DisplayMaxY; y++) + for (x = DisplayMinX; x <= DisplayMaxX; x++) + GfxGraphic[x][y] = -1; + + // force complete playfield redraw + DisplayLevel(); + } + for (y = DisplayMinY; y <= DisplayMaxY; y++) { for (x = DisplayMinX; x <= DisplayMaxX; x++)