static void DrawChooseLevelSet(void);
static void DrawChooseLevelNr(void);
static void DrawInfoScreen(void);
-static void DrawAndFadeInInfoScreen(int);
static void DrawSetupScreen(void);
-static void DrawInfoScreenExt(int, int);
static void DrawInfoScreen_NotAvailable(char *, char *);
static void DrawInfoScreen_HelpAnim(int, int, boolean);
static void DrawInfoScreen_HelpText(int, int, int, int);
return (show_titlescreen && num_title_screens > 0);
}
-void DrawMainMenuExt(int fade_mask, boolean do_fading)
+void DrawMainMenu()
{
static LevelDirTree *leveldir_last_valid = NULL;
boolean levelset_has_changed = FALSE;
+ int fade_mask = REDRAW_FIELD;
LimitScreenUpdates(FALSE);
SetDrawtoField(DRAW_BACKBUFFER);
- /* reset drawing area change flag */
- DrawingAreaChanged();
-
if (CheckTitleScreen(levelset_has_changed))
{
game_status = GAME_MODE_TITLE;
OpenDoor(DOOR_CLOSE_1 | DOOR_OPEN_2);
}
-void DrawAndFadeInMainMenu(int fade_mask)
-{
- DrawMainMenuExt(fade_mask, TRUE);
-}
-
-void DrawMainMenu()
-{
- DrawMainMenuExt(REDRAW_ALL, FALSE);
-}
-
static void gotoTopLevelDir()
{
/* move upwards until inside (but not above) top level directory */
static int title_screen_nr = 0;
static int last_sound = -1, last_music = -1;
boolean return_to_main_menu = FALSE;
- boolean use_fading_main_menu = TRUE;
struct TitleControlInfo *tci;
struct TitleFadingInfo fading_default;
struct TitleFadingInfo fading_last = fading;
if (button == MB_MENU_LEAVE)
{
return_to_main_menu = TRUE;
- use_fading_main_menu = FALSE;
}
else if (button == MB_MENU_CHOICE)
{
FadeSetEnterScreen();
info_mode = INFO_MODE_MAIN;
- DrawAndFadeInInfoScreen(REDRAW_FIELD);
+ DrawInfoScreen();
return;
}
{
SetMouseCursor(CURSOR_DEFAULT);
+ /* force full menu screen redraw after displaying title screens */
+ redraw_mask = REDRAW_ALL;
+
if (game_status == GAME_MODE_INFO)
{
- int fade_mask = (num_title_screens == 0 ? REDRAW_FIELD : REDRAW_ALL);
-
info_mode = INFO_MODE_MAIN;
- DrawInfoScreenExt(fade_mask, use_fading_main_menu);
+ DrawInfoScreen();
}
else /* default: return to main menu */
{
game_status = GAME_MODE_MAIN;
- DrawMainMenuExt(REDRAW_ALL, use_fading_main_menu);
+ DrawMainMenu();
}
}
}
{
game_status = GAME_MODE_SCORES;
-#if 1
- /* required before door position may be changed in next step */
- CloseDoor(DOOR_CLOSE_ALL);
-#endif
-
- ChangeViewportPropertiesIfNeeded();
-
DrawHallOfFame(-1);
}
else if (pos == MAIN_CONTROL_EDITOR)
{
game_status = GAME_MODE_MAIN;
- DrawMainMenuExt(REDRAW_FIELD, FALSE);
+ DrawMainMenu();
}
static struct TokenInfo info_info_main[] =
}
}
-static void DrawInfoScreen_Main(int fade_mask, boolean do_fading)
+static void DrawInfoScreen_Main()
{
+ int fade_mask = REDRAW_FIELD;
int i;
+ if (redraw_mask & REDRAW_ALL)
+ fade_mask = REDRAW_ALL;
+
if (CheckIfRedrawGlobalBorderIsNeeded())
fade_mask = REDRAW_ALL;
FadeSoundsAndMusic();
info_mode = INFO_MODE_MAIN;
- DrawAndFadeInInfoScreen(REDRAW_FIELD);
+ DrawInfoScreen();
return;
}
FadeSoundsAndMusic();
info_mode = INFO_MODE_MAIN;
- DrawAndFadeInInfoScreen(REDRAW_FIELD);
+ DrawInfoScreen();
return;
}
FadeSoundsAndMusic();
info_mode = INFO_MODE_MAIN;
- DrawAndFadeInInfoScreen(REDRAW_FIELD);
+ DrawInfoScreen();
return;
}
FadeSoundsAndMusic();
info_mode = INFO_MODE_MAIN;
- DrawAndFadeInInfoScreen(REDRAW_FIELD);
+ DrawInfoScreen();
}
else
{
FadeSoundsAndMusic();
info_mode = INFO_MODE_MAIN;
- DrawAndFadeInInfoScreen(REDRAW_FIELD);
+ DrawInfoScreen();
}
else
{
FadeSoundsAndMusic();
info_mode = INFO_MODE_MAIN;
- DrawAndFadeInInfoScreen(REDRAW_FIELD);
+ DrawInfoScreen();
}
else
{
}
}
-static void DrawInfoScreenExt(int fade_mask, boolean do_fading)
+static void DrawInfoScreen()
{
SetMainBackgroundImage(IMG_BACKGROUND_INFO);
else if (info_mode == INFO_MODE_LEVELSET)
DrawInfoScreen_LevelSet();
else
- DrawInfoScreen_Main(fade_mask, do_fading);
+ DrawInfoScreen_Main();
if (info_mode != INFO_MODE_MAIN &&
info_mode != INFO_MODE_TITLE &&
}
}
-void DrawAndFadeInInfoScreen(int fade_mask)
-{
- DrawInfoScreenExt(fade_mask, TRUE);
-}
-
-void DrawInfoScreen()
-{
- DrawInfoScreenExt(REDRAW_FIELD, FALSE);
-}
-
void HandleInfoScreen(int mx, int my, int dx, int dy, int button)
{
if (info_mode == INFO_MODE_TITLE)
static void DrawChooseTree(TreeInfo **ti_ptr)
{
- int fade_mask = (DrawingAreaChanged() ? REDRAW_ALL : REDRAW_FIELD);
+ int fade_mask = REDRAW_FIELD;
+
+ if (CheckIfRedrawGlobalBorderIsNeeded())
+ fade_mask = REDRAW_ALL;
if (strEqual((*ti_ptr)->subdir, STRING_TOP_DIRECTORY))
{
game_status = GAME_MODE_MAIN;
- DrawMainMenuExt(REDRAW_FIELD, FALSE);
+ DrawMainMenu();
return;
}
game_status = GAME_MODE_MAIN;
- DrawMainMenuExt(REDRAW_FIELD, FALSE);
+ DrawMainMenu();
}
return;
void DrawHallOfFame(int highlight_position)
{
- int fade_mask = (DrawingAreaChanged() ? REDRAW_ALL : REDRAW_FIELD);
+ int fade_mask = REDRAW_FIELD;
+
+ /* required before door position may be changed in next step */
+ CloseDoor(DOOR_CLOSE_ALL);
+
+ /* needed if different viewport properties defined for scores */
+ ChangeViewportPropertiesIfNeeded();
+
+ if (CheckIfRedrawGlobalBorderIsNeeded())
+ fade_mask = REDRAW_ALL;
UnmapAllGadgets();
FadeSoundsAndMusic();
SetDrawDeactivationMask(REDRAW_NONE);
SetDrawBackgroundMask(REDRAW_FIELD);
- CloseDoor(DOOR_CLOSE_ALL);
-
if (highlight_position < 0)
LoadScore(level_nr);
game_status = GAME_MODE_MAIN;
- DrawAndFadeInMainMenu(REDRAW_FIELD);
+ DrawMainMenu();
}
if (game_status == GAME_MODE_SCORES)
{
game_status = GAME_MODE_MAIN;
- DrawMainMenuExt(REDRAW_FIELD, FALSE);
+ DrawMainMenu();
}
static void execSaveAndExitSetup()
static void DrawSetupScreen_Generic()
{
- int fade_mask = (DrawingAreaChanged() ? REDRAW_ALL : REDRAW_FIELD);
+ int fade_mask = REDRAW_FIELD;
boolean redraw_all = FALSE;
char *title_string = NULL;
int i;