DrawBuffer *drawto_field;
int game_status = -1;
+boolean game_status_last_screen = -1;
boolean level_editor_test_game = FALSE;
boolean network_playing = FALSE;
#define BUTTON_ACTIVE(b) (ActiveButton[b])
#define FONT_ACTIVE(f) (ActiveFont[f])
-
/* fundamental game speed values */
#define MICROLEVEL_SCROLL_DELAY 50 /* delay for scrolling micro level */
#define MICROLEVEL_LABEL_DELAY 250 /* delay for micro level label */
extern DrawBuffer *drawto_field;
extern int game_status;
+extern boolean game_status_last_screen;
extern boolean level_editor_test_game;
extern boolean network_playing;
if (CheckTitleScreen(levelset_has_changed))
{
+ game_status_last_screen = GAME_MODE_MAIN;
game_status = GAME_MODE_TITLE;
DrawTitleScreen();
last_sound = SND_UNDEFINED;
last_music = MUS_UNDEFINED;
- if (game_status == GAME_MODE_INFO)
+ if (game_status_last_screen == GAME_MODE_INFO)
{
if (num_title_screens == 0)
{
FadeSoundsAndMusic();
FadeOut(REDRAW_ALL);
+
+ /* only required to update logic for redrawing global border */
+ ClearField();
}
if (tci->is_image)
}
else if (button == MB_MENU_CHOICE)
{
- if (game_status == GAME_MODE_INFO && num_title_screens == 0)
+ if (game_status_last_screen == GAME_MODE_INFO && num_title_screens == 0)
{
FadeSetEnterScreen();
+ game_status = GAME_MODE_INFO;
info_mode = INFO_MODE_MAIN;
+
DrawInfoScreen();
return;
/* force full menu screen redraw after displaying title screens */
redraw_mask = REDRAW_ALL;
- if (game_status == GAME_MODE_INFO)
+ if (game_status_last_screen == GAME_MODE_INFO)
{
+ game_status = GAME_MODE_INFO;
info_mode = INFO_MODE_MAIN;
DrawInfoScreen();
void DrawInfoScreen_TitleScreen()
{
+ game_status_last_screen = GAME_MODE_INFO;
+ game_status = GAME_MODE_TITLE;
+
DrawTitleScreen();
}
if (game_status == game_status_last)
return FALSE;
+ // redraw if last screen was title screen
+ if (game_status_last == GAME_MODE_TITLE)
+ return TRUE;
+
// redraw if global screen border has changed
if (CheckIfGlobalBorderHasChanged())
return TRUE;