rnd-20140819-1-src
authorHolger Schemel <info@artsoft.org>
Mon, 18 Aug 2014 22:02:36 +0000 (00:02 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 09:01:37 +0000 (11:01 +0200)
* fixed bug causing wrong screen updates while playing (whole screen
  update from backbuffer instead of playfield buffer if REDRAW_ALL set)

ChangeLog
src/conftime.h
src/game.c
src/tools.c

index 3ca360d24c72f2bf78afb65a3ad05cf622745136..57b72711879c73e591e35cababa488f7dc3eb1fc 100644 (file)
--- 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
index 770e8208a5f97268bf4ded797117598ee3e3a42e..0f6c266f59924cfffe0a618abfed7f1057c19872 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2014-08-18 00:37"
+#define COMPILE_DATE_STRING "2014-08-19 00:00"
index d6a773850673969f6a1e871f10ec87b9c8017d88..2e951c1761a96476b13fa9436cb5d6e0d254a2dc 100644 (file)
@@ -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)
index 66796da98780e401a25d3c90a10a152e2f5a70a9..2c3fb9cde5e622989b23541e2df7b083fb90839d 100644 (file)
@@ -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 ||