fixed redrawing playfield and doors when drawing playfield is deactivated
authorHolger Schemel <info@artsoft.org>
Sun, 29 May 2016 23:19:03 +0000 (01:19 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 29 May 2016 23:19:03 +0000 (01:19 +0200)
src/libgame/system.h
src/tools.c

index f155c2127148fd8d4d9898d6af7c59fb7eaf2335..109cca0eaaad3b84192d0d1a34bf6dc53c9f6737 100644 (file)
@@ -1395,6 +1395,7 @@ void FillRectangle(Bitmap *, int, int, int, int, Pixel);
 void ClearRectangle(Bitmap *, int, int, int, int);
 void ClearRectangleOnBackground(Bitmap *, int, int, int, int);
 void BlitBitmapMasked(Bitmap *, Bitmap *, int, int, int, int, int, int);
+boolean DrawingDeactivated(int, int, int, int);
 boolean DrawingOnBackground(int, int);
 boolean DrawingAreaChanged();
 void BlitBitmapOnBackground(Bitmap *, Bitmap *, int, int, int, int, int, int);
index 6dc9129afa775e788a8f9bbefc36dafef01f8fd5..ab79bcda697ba58494dc76f053567c2b9120067d 100644 (file)
@@ -550,6 +550,10 @@ void BackToFront()
   if (redraw_mask & REDRAW_FPS)
     DrawFramesPerSecond();
 
+  // remove playfield redraw before potentially merging with doors redraw
+  if (DrawingDeactivated(REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE))
+    redraw_mask &= ~REDRAW_FIELD;
+
   // redraw complete window if both playfield and (some) doors need redraw
   if (redraw_mask & REDRAW_FIELD && redraw_mask & REDRAW_DOORS)
     redraw_mask = REDRAW_ALL;