From: Holger Schemel Date: Mon, 18 Aug 2014 22:02:36 +0000 (+0200) Subject: rnd-20140819-1-src X-Git-Tag: 4.0.0.0-rc1~361 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=50a54138;hp=7b61c9f3ee0fb13b190dba016923ebcd547c4f27;p=rocksndiamonds.git rnd-20140819-1-src * fixed bug causing wrong screen updates while playing (whole screen update from backbuffer instead of playfield buffer if REDRAW_ALL set) --- diff --git a/ChangeLog b/ChangeLog index 3ca360d2..57b72711 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-08-19 + * fixed bug causing wrong screen updates while playing (whole screen + update from backbuffer instead of playfield buffer if REDRAW_ALL set) + 2014-08-18 * fixed bug causing EM/EMC graphics sets containing original 16x16 tiles to be displayed incorrectly (with broken scaling) when switching diff --git a/src/conftime.h b/src/conftime.h index 770e8208..0f6c266f 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2014-08-18 00:37" +#define COMPILE_DATE_STRING "2014-08-19 00:00" diff --git a/src/game.c b/src/game.c index d6a77385..2e951c17 100644 --- a/src/game.c +++ b/src/game.c @@ -17078,6 +17078,9 @@ void RedrawGameButtons() for (i = 0; i < NUM_GAME_BUTTONS; i++) RedrawGadget(game_gadget[i]); + + // RedrawGadget() may have set REDRAW_ALL if buttons are defined off-area + redraw_mask &= ~REDRAW_ALL; } static void HandleGameButtonsExt(int id) diff --git a/src/tools.c b/src/tools.c index 66796da9..2c3fb9cd 100644 --- a/src/tools.c +++ b/src/tools.c @@ -713,15 +713,37 @@ void BackToFront() if (redraw_mask & REDRAW_ALL) { +#if 0 + if (game_status != GAME_MODE_PLAYING || + redraw_mask & REDRAW_FROM_BACKBUFFER) + { +#if 0 + printf("::: REDRAW_ALL [%d]\n", FrameCounter); +#endif + + BlitBitmap(backbuffer, window, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0); + + redraw_mask = REDRAW_NONE; + } + else + { + redraw_mask &= ~REDRAW_ALL; + } +#else +#if 0 + printf("::: REDRAW_ALL [%d]\n", FrameCounter); +#endif + BlitBitmap(backbuffer, window, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0); redraw_mask = REDRAW_NONE; +#endif } if (redraw_mask & REDRAW_FIELD) { #if 0 - printf("::: REDRAW_FIELD\n"); + printf("::: REDRAW_FIELD [%d]\n", FrameCounter); #endif if (game_status != GAME_MODE_PLAYING ||