From 786d4ea93b159a7f4cc09c4f05ec75939d8928d4 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 14 May 2014 23:08:07 +0200 Subject: [PATCH] rnd-20140514-3-src --- src/conftime.h | 2 +- src/events.c | 4 ++++ src/game.c | 2 +- src/tools.c | 15 ++++++++++----- src/tools.h | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/conftime.h b/src/conftime.h index ee495261..59f9a2a2 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2014-05-14 21:52" +#define COMPILE_DATE_STRING "2014-05-14 23:07" diff --git a/src/events.c b/src/events.c index 4d70027d..62d146fa 100644 --- a/src/events.c +++ b/src/events.c @@ -364,7 +364,11 @@ void SleepWhileUnmapped() void HandleExposeEvent(ExposeEvent *event) { #if !defined(TARGET_SDL) +#if 1 + RedrawPlayfield(); +#else RedrawPlayfield(FALSE, event->x, event->y, event->width, event->height); +#endif FlushDisplay(); #endif } diff --git a/src/game.c b/src/game.c index 9e6ecbd9..d6a77385 100644 --- a/src/game.c +++ b/src/game.c @@ -4523,7 +4523,7 @@ void InitGame() } else { - DrawLevel(); + DrawLevel(REDRAW_FIELD); DrawAllPlayers(); /* after drawing the level, correct some elements */ diff --git a/src/tools.c b/src/tools.c index 62cd26a8..0eb8ab14 100644 --- a/src/tools.c +++ b/src/tools.c @@ -300,17 +300,17 @@ void SetDrawtoField(int mode) static void RedrawPlayfield_RND() { - int x, y; - if (game.envelope_active) return; -#if 0 - DrawLevel(); +#if 1 + DrawLevel(REDRAW_ALL); #else + int x, y; SetMainBackgroundImage(IMG_BACKGROUND_PLAYING); // SetDrawBackgroundMask(REDRAW_FIELD); // !!! CHECK THIS !!! + SetDrawBackgroundMask(REDRAW_ALL); // !!! CHECK THIS !!! for (x = BX1; x <= BX2; x++) for (y = BY1; y <= BY2; y++) @@ -3513,15 +3513,20 @@ void DrawPreviewElement(int dst_x, int dst_y, int element, int tilesize) BlitBitmap(src_bitmap, drawto, src_x, src_y, tilesize, tilesize, dst_x,dst_y); } -void DrawLevel() +void DrawLevel(int draw_background_mask) { int x,y; +#if 1 + SetMainBackgroundImage(IMG_BACKGROUND_PLAYING); + SetDrawBackgroundMask(draw_background_mask); +#else #if 1 SetMainBackgroundImage(IMG_BACKGROUND_PLAYING); SetDrawBackgroundMask(REDRAW_FIELD); #else SetDrawBackgroundMask(REDRAW_NONE); +#endif #endif ClearField(); diff --git a/src/tools.h b/src/tools.h index e042fa66..b73b10d1 100644 --- a/src/tools.h +++ b/src/tools.h @@ -180,7 +180,7 @@ void DrawMiniElementOrWall(int, int, int, int); void ShowEnvelope(int); void ShowEnvelopeDoor(char *text, int); -void DrawLevel(void); +void DrawLevel(int); void DrawMiniLevel(int, int, int, int); void DrawPreviewLevelInitial(void); void DrawPreviewLevelAnimation(void); -- 2.34.1