/* screens on the info screen */
#define INFO_MODE_MAIN 0
-#define INFO_MODE_TITLESCREEN 1
+#define INFO_MODE_TITLE 1
#define INFO_MODE_ELEMENTS 2
#define INFO_MODE_MUSIC 3
#define INFO_MODE_CREDITS 4
static void DrawSetupScreen(void);
static void DrawInfoScreenExt(int);
+static void DrawInfoScreen_NotAvailable(char *, char *);
static void DrawInfoScreen_HelpAnim(int, int, boolean);
static void DrawInfoScreen_HelpText(int, int, int, int);
static void HandleInfoScreen_Main(int, int, int, int, int);
SetMainBackgroundImage(IMG_BACKGROUND_TITLE);
- PlayMenuSound();
- PlayMenuMusic();
-
HandleTitleScreen(0, 0, 0, 0, MB_MENU_INITIALIZE);
StopAnimation();
if (button == MB_MENU_INITIALIZE)
{
+ int last_game_status = game_status; /* save current game status */
title_nr = 0;
if (game_status == GAME_MODE_INFO)
{
+ if (graphic_info[IMG_TITLESCREEN_1].bitmap == NULL)
+ {
+ DrawInfoScreen_NotAvailable("Title screen information:",
+ "No title screen for this level set.");
+
+ return;
+ }
+
FadeSoundsAndMusic();
FadeOut(fade_delay, post_delay);
}
+ /* force TITLE music on title info screen */
+ game_status = GAME_MODE_TITLE;
+
+ PlayMenuSound();
+ PlayMenuMusic();
+
+ game_status = last_game_status; /* restore current game status */
+
DrawTitleScreenImage(title_nr);
FadeIn(fade_delay);
}
else if (button == MB_MENU_CHOICE)
{
+ if (game_status == GAME_MODE_INFO &&
+ graphic_info[IMG_TITLESCREEN_1].bitmap == NULL)
+ {
+ info_mode = INFO_MODE_MAIN;
+ DrawInfoScreen();
+
+ return;
+ }
+
title_nr++;
if (!use_cross_fading)
static void execInfoTitleScreen()
{
- info_mode = INFO_MODE_TITLESCREEN;
+ info_mode = INFO_MODE_TITLE;
DrawInfoScreen();
}
}
}
+void DrawInfoScreen_NotAvailable(char *text_title, char *text_error)
+{
+ int ystart = 150;
+ int ybottom = SYSIZE - 20;
+
+ SetMainBackgroundImageIfDefined(IMG_BACKGROUND_INFO_LEVELSET);
+
+ ClearWindow();
+ DrawHeadline();
+
+ DrawTextSCentered(100, FONT_TEXT_1, text_title);
+
+ DrawTextSCentered(ybottom, FONT_TEXT_4,
+ "Press any key or button for info menu");
+
+ DrawTextSCentered(ystart, FONT_TEXT_2, text_error);
+}
+
void DrawInfoScreen_HelpAnim(int start, int max_anims, boolean init)
{
static int infoscreen_step[MAX_INFO_ELEMENTS_ON_SCREEN];
{
SetMainBackgroundImage(IMG_BACKGROUND_INFO);
- if (info_mode == INFO_MODE_TITLESCREEN)
+ if (info_mode == INFO_MODE_TITLE)
DrawInfoScreen_TitleScreen();
else if (info_mode == INFO_MODE_ELEMENTS)
DrawInfoScreen_Elements();
else
DrawInfoScreen_Main(fade_delay);
- if (info_mode != INFO_MODE_MUSIC)
+ if (info_mode != INFO_MODE_MAIN &&
+ info_mode != INFO_MODE_TITLE &&
+ info_mode != INFO_MODE_MUSIC)
{
PlayMenuSound();
PlayMenuMusic();
void HandleInfoScreen(int mx, int my, int dx, int dy, int button)
{
- if (info_mode == INFO_MODE_TITLESCREEN)
+ if (info_mode == INFO_MODE_TITLE)
HandleInfoScreen_TitleScreen(button);
else if (info_mode == INFO_MODE_ELEMENTS)
HandleInfoScreen_Elements(button);