From 4ddda51cd71310a5fd0ce874bd6a0d60e88788d8 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 30 May 2016 01:19:03 +0200 Subject: [PATCH] fixed redrawing playfield and doors when drawing playfield is deactivated --- src/libgame/system.h | 1 + src/tools.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/libgame/system.h b/src/libgame/system.h index f155c212..109cca0e 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -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); diff --git a/src/tools.c b/src/tools.c index 6dc9129a..ab79bcda 100644 --- a/src/tools.c +++ b/src/tools.c @@ -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; -- 2.34.1