Before, the global border was only redrawn if its graphics had changed
or if any of the viewport areas (playfield or doors) had changed their
position or size.
Now, it is always redrawn if the playfield area is cleared (to redraw
its content). This has the advantage that accidentally damaged global
border areas (caused by buggy graphics definitions from custom artwork
sets) are redrawn much earlier than before (where it could require
loading a different level set with different graphics to "repair" the
damaged global border).
redraw_mask = REDRAW_ALL;
}
redraw_mask = REDRAW_ALL;
}
+#define ONLY_REDRAW_GLOBAL_BORDER_IF_NEEDED 0
+
static void RedrawGlobalBorderIfNeeded()
{
static void RedrawGlobalBorderIfNeeded()
{
+#if ONLY_REDRAW_GLOBAL_BORDER_IF_NEEDED
if (game_status == game_status_last)
return;
if (game_status == game_status_last)
return;
// copy current draw buffer to later copy back areas that have not changed
if (game_status_last != GAME_MODE_TITLE)
BlitBitmap(backbuffer, bitmap_db_store_1, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
// copy current draw buffer to later copy back areas that have not changed
if (game_status_last != GAME_MODE_TITLE)
BlitBitmap(backbuffer, bitmap_db_store_1, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
+#if ONLY_REDRAW_GLOBAL_BORDER_IF_NEEDED
if (CheckIfGlobalBorderRedrawIsNeeded())
if (CheckIfGlobalBorderRedrawIsNeeded())
{
// redraw global screen border (or clear, if defined to be empty)
RedrawGlobalBorderFromBitmap(global_border_bitmap);
{
// redraw global screen border (or clear, if defined to be empty)
RedrawGlobalBorderFromBitmap(global_border_bitmap);