From 7f40f3e4e3ae0818a91083952fd1710841735152 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 15 Mar 2018 23:08:55 +0100 Subject: [PATCH] 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 --- src/game_sp/DDScrollBuffer.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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++) -- 2.34.1