{
int full_lev_fieldx = lev_fieldx + (BorderElement != EL_EMPTY ? 2 : 0);
int full_lev_fieldy = lev_fieldy + (BorderElement != EL_EMPTY ? 2 : 0);
+ int fade_mask = REDRAW_FIELD;
boolean emulate_bd = TRUE; /* unless non-BOULDERDASH elements found */
boolean emulate_sb = TRUE; /* unless non-SOKOBAN elements found */
if (!game.restart_level)
CloseDoor(DOOR_CLOSE_1);
+#if 1
+ /* needed if different viewport properties defined for playing */
+ ChangeViewportPropertiesIfNeeded();
+#endif
+
if (level_editor_test_game)
FadeSkipNextFadeIn();
else
FadeSetEnterScreen();
- FadeOut(REDRAW_FIELD);
+ if (CheckIfRedrawGlobalBorderIsNeeded())
+ fade_mask = REDRAW_ALL;
+#if 0
+ printf("::: %d\n", (fade_mask == REDRAW_ALL ? 1 : 0));
+#endif
+
+ FadeOut(fade_mask);
+
+#if 0
/* needed if different viewport properties defined for playing */
ChangeViewportPropertiesIfNeeded();
+#endif
+
+#if 1
+ ClearField();
+#endif
DrawCompleteVideoDisplay();
BlitScreenToBitmap(backbuffer);
/* !!! FIX THIS (END) !!! */
- FadeIn(REDRAW_FIELD);
+ FadeIn(fade_mask);
#if 1
// full screen redraw is required at this point in the following cases:
{
game_status = GAME_MODE_MAIN;
- DrawAndFadeInMainMenu(REDRAW_FIELD);
+ DrawMainMenu();
return;
}
game_status = GAME_MODE_MAIN;
- DrawAndFadeInMainMenu(REDRAW_FIELD);
+ DrawMainMenu();
return;
}
{
game_status = GAME_MODE_SCORES;
- /* needed if different viewport properties defined for scores */
- ChangeViewportPropertiesIfNeeded();
-
DrawHallOfFame(hi_pos);
if (raise_level)
TapeErase();
}
- DrawAndFadeInMainMenu(REDRAW_FIELD);
+ DrawMainMenu();
}
}
if (tape.playing && tape.warp_forward && !tape.pausing)
game_frame_delay_value = 0;
+#if 0
+ /* ---------- main game synchronization point ---------- */
+
+ int skip = WaitUntilDelayReached(&game_frame_delay, game_frame_delay_value);
+
+ printf("::: skip == %d\n", skip);
+
+#else
/* ---------- main game synchronization point ---------- */
WaitUntilDelayReached(&game_frame_delay, game_frame_delay_value);
+#endif
if (network_playing && !network_player_action_received)
{
game_status = GAME_MODE_MAIN;
- DrawAndFadeInMainMenu(REDRAW_FIELD);
+ DrawMainMenu();
}
else
{
game_status = GAME_MODE_MAIN;
- DrawAndFadeInMainMenu(REDRAW_FIELD);
+ DrawMainMenu();
}
}
}