From: Holger Schemel Date: Sun, 29 May 2016 23:19:03 +0000 (+0200) Subject: fixed redrawing playfield and doors when drawing playfield is deactivated X-Git-Tag: 4.0.0.0-rc3~50 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=4ddda51cd71310a5fd0ce874bd6a0d60e88788d8;p=rocksndiamonds.git fixed redrawing playfield and doors when drawing playfield is deactivated --- 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;