From: Holger Schemel Date: Tue, 19 May 2015 07:46:47 +0000 (+0200) Subject: cleanup of redraw masks X-Git-Tag: 4.0.0.0-rc1~190 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=4efce7813f9315cda970e7f48be030c8c108d9f0;p=rocksndiamonds.git cleanup of redraw masks --- diff --git a/src/game.c b/src/game.c index 2be5985f..6a896768 100644 --- a/src/game.c +++ b/src/game.c @@ -3916,8 +3916,6 @@ void InitGame() /* blit playfield from scroll buffer to normal back buffer for fading in */ BlitScreenToBitmap(backbuffer); - - redraw_mask |= REDRAW_FROM_BACKBUFFER; /* !!! FIX THIS (END) !!! */ FadeIn(REDRAW_FIELD); diff --git a/src/libgame/system.h b/src/libgame/system.h index a6e9b9f3..85ab383f 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -291,25 +291,14 @@ #define REDRAW_NONE (0) #define REDRAW_ALL (1 << 0) #define REDRAW_FIELD (1 << 1) -#define REDRAW_TILES (1 << 2) -#define REDRAW_DOOR_1 (1 << 3) -#define REDRAW_VIDEO_1 (1 << 4) -#define REDRAW_VIDEO_2 (1 << 5) -#define REDRAW_VIDEO_3 (1 << 6) -#define REDRAW_MICROLEVEL (1 << 7) -#define REDRAW_MICROLABEL (1 << 8) -#define REDRAW_FROM_BACKBUFFER (1 << 9) -#define REDRAW_DOOR_2 (REDRAW_VIDEO_1 | \ - REDRAW_VIDEO_2 | \ - REDRAW_VIDEO_3) -#define REDRAW_DOOR_3 (1 << 10) +#define REDRAW_DOOR_1 (1 << 2) +#define REDRAW_DOOR_2 (1 << 3) +#define REDRAW_DOOR_3 (1 << 4) +#define REDRAW_FPS (1 << 5) + #define REDRAW_DOORS (REDRAW_DOOR_1 | \ REDRAW_DOOR_2 | \ REDRAW_DOOR_3) -#define REDRAW_MAIN (REDRAW_FIELD | \ - REDRAW_TILES | \ - REDRAW_MICROLEVEL) -#define REDRAW_FPS (1 << 11) #define IN_GFX_FIELD_PLAY(x, y) (x >= gfx.sx && x < gfx.sx + gfx.sxsize && \ y >= gfx.sy && y < gfx.sy + gfx.sysize) diff --git a/src/libgame/toons.c b/src/libgame/toons.c index c9bf81cc..b41b9386 100644 --- a/src/libgame/toons.c +++ b/src/libgame/toons.c @@ -352,7 +352,7 @@ void HandleAnimation(int mode) case ANIM_STOP: if (anim_running) { - redraw_mask |= (REDRAW_FIELD | REDRAW_FROM_BACKBUFFER); + redraw_mask |= REDRAW_FIELD; screen_info.update_function(); diff --git a/src/tools.c b/src/tools.c index 0813343d..16985341 100644 --- a/src/tools.c +++ b/src/tools.c @@ -436,10 +436,6 @@ void BackToFront() if (redraw_mask == REDRAW_NONE) return; - // redraw playfield if anything inside main playfield area needs redraw - if (redraw_mask & REDRAW_MAIN) - redraw_mask |= REDRAW_FIELD; - // draw masked border to all viewports, if defined DrawMaskedBorder(redraw_mask); @@ -1975,7 +1971,7 @@ void AnimateEnvelope(int envelope_nr, int anim_mode, int action) level.envelope[envelope_nr].autowrap, level.envelope[envelope_nr].centered, FALSE); - redraw_mask |= REDRAW_FIELD | REDRAW_FROM_BACKBUFFER; + redraw_mask |= REDRAW_FIELD; BackToFront(); SkipUntilDelayReached(&anim_delay, anim_delay_value, &i, last_frame); @@ -2221,7 +2217,7 @@ void AnimateEnvelopeRequest(int anim_mode, int action) } } - redraw_mask |= REDRAW_FIELD | REDRAW_FROM_BACKBUFFER; + redraw_mask |= REDRAW_FIELD; DoAnimation(); BackToFront(); @@ -2413,7 +2409,7 @@ static void DrawPreviewLevelPlayfieldExt(int from_x, int from_y) } } - redraw_mask |= REDRAW_MICROLEVEL; + redraw_mask |= REDRAW_FIELD; } #define MICROLABEL_EMPTY 0 @@ -2482,7 +2478,7 @@ static void DrawPreviewLevelLabelExt(int mode) if (strlen(label_text) > 0) DrawTextSAligned(pos->x, pos->y, label_text, font_nr, pos->align); - redraw_mask |= REDRAW_MICROLEVEL; + redraw_mask |= REDRAW_FIELD; } static void DrawPreviewLevelExt(boolean restart)