game_status = last_game_status; /* restore current game status */
}
-static void PlayMenuSound()
-{
- int sound = menu.sound[game_status];
-
- if (sound == SND_UNDEFINED)
- return;
-
- if (sound_info[sound].loop)
- PlaySoundLoop(sound);
- else
- PlaySound(sound);
-}
-
-static void PlayMenuSoundIfLoop()
-{
- int sound = menu.sound[game_status];
-
- if (sound == SND_UNDEFINED)
- return;
-
- if (sound_info[sound].loop)
- PlaySoundLoop(sound);
-}
-
-static void PlayMenuMusic()
-{
- int music = menu.music[game_status];
-
- if (music == MUS_UNDEFINED)
- return;
-
- PlayMusic(music);
-}
-
void DrawHeadline()
{
DrawTextSCentered(MENU_TITLE1_YPOS, FONT_TITLE_1, PROGRAM_TITLE_STRING);
dst_x = (WIN_XSIZE - width) / 2;
dst_y = (WIN_YSIZE - height) / 2;
-#if 1
ClearRectangleOnBackground(drawto, 0, 0, WIN_XSIZE, WIN_YSIZE);
-#else
- DrawBackground(0, 0, WIN_XSIZE, WIN_YSIZE);
-#endif
if (DrawingOnBackground(dst_x, dst_y))
BlitBitmapMasked(bitmap, drawto, src_x, src_y, width, height, dst_x, dst_y);
SetMainBackgroundImage(IMG_BACKGROUND_TITLE);
-#if 0
- CloseDoor(DOOR_CLOSE_1);
-#endif
-
- HandleTitleScreen(0, 0, 0, 0, MB_MENU_INITIALIZE);
-
PlayMenuSound();
PlayMenuMusic();
-#if 1
- FadeIn(1000);
-#else
- FadeToFront();
-#endif
+ HandleTitleScreen(0, 0, 0, 0, MB_MENU_INITIALIZE);
+
StopAnimation();
}
-void DrawMainMenu()
+static void DrawMainMenuExt(int fade_delay)
{
static LevelDirTree *leveldir_last_valid = NULL;
boolean levelset_has_changed = FALSE;
audio.sound_deactivated = FALSE;
+#if 1
+ GetPlayerConfig();
+#endif
+
/* needed if last screen was the playing screen, invoked from level editor */
if (level_editor_test_game)
{
SetDrawtoField(DRAW_BACKBUFFER);
#endif
- if (levelset_has_changed && graphic_info[IMG_TITLESCREEN_1].bitmap != NULL)
+ if (setup.show_titlescreen &&
+ levelset_has_changed &&
+ graphic_info[IMG_TITLESCREEN_1].bitmap != NULL)
{
game_status = GAME_MODE_TITLE;
DrawTitleScreen();
if (setup.handicap && level_nr > leveldir_current->handicap_level)
level_nr = leveldir_current->handicap_level;
+#if 0
GetPlayerConfig();
+#endif
LoadLevel(level_nr);
SetMainBackgroundImage(IMG_BACKGROUND_MAIN);
DrawTextSCentered(326, FONT_TITLE_2, "A Game by Artsoft Entertainment");
+#if 0
FadeToFront();
InitAnimation();
+#endif
HandleMainMenu(0, 0, 0, 0, MB_MENU_INITIALIZE);
PlayMenuSound();
PlayMenuMusic();
+#if 1
OpenDoor(DOOR_CLOSE_1 | DOOR_OPEN_2);
+#else
+ if (fade_delay > 0)
+ OpenDoor(DOOR_CLOSE_1 | DOOR_OPEN_2 | DOOR_NO_DELAY | DOOR_FORCE_REDRAW);
+ else
+ OpenDoor(DOOR_CLOSE_1 | DOOR_OPEN_2);
+#endif
#if 1
/* map gadgets for main menu screen */
MapTapeButtons();
#endif
+
+#if 1
+ FadeIn(fade_delay);
+
+ InitAnimation();
+#endif
+}
+
+void DrawMainMenu()
+{
+ DrawMainMenuExt(FALSE);
}
#if 0
{
static int title_nr = 0;
boolean return_to_main_menu = FALSE;
+ boolean use_fading_main_menu = TRUE;
boolean use_cross_fading = TRUE;
int fade_delay = 1000;
int post_delay = 500;
DrawTitleScreenImage(title_nr);
+ FadeIn(fade_delay);
+
return;
}
else if (button == MB_MENU_LEAVE)
{
return_to_main_menu = TRUE;
+ use_fading_main_menu = FALSE;
}
else if (button == MB_MENU_CHOICE)
{
title_nr++;
if (!use_cross_fading)
- {
- FadeOut(fade_delay);
- Delay(post_delay);
- }
+ FadeOut(fade_delay, post_delay);
if (title_nr < MAX_NUM_TITLE_SCREENS &&
graphic_info[IMG_TITLESCREEN_1 + title_nr].bitmap != NULL)
drawto = drawto_last;
if (use_cross_fading)
- FadeCross(bitmap_db_title, fade_delay);
+ FadeCross(fade_delay);
else
FadeIn(fade_delay);
}
else
{
- FadeOut(fade_delay);
- Delay(post_delay);
+ FadeOut(fade_delay, post_delay);
return_to_main_menu = TRUE;
}
{
RedrawBackground();
+#if 1
+ OpenDoor(DOOR_CLOSE_1 | DOOR_OPEN_2 | DOOR_NO_DELAY | DOOR_FORCE_REDRAW);
+#endif
+
game_status = GAME_MODE_MAIN;
- DrawMainMenu();
+ DrawMainMenuExt(use_fading_main_menu ? fade_delay : 0);
}
}
#endif
{ TYPE_SWITCH, &setup.quick_switch, "Quick Player Focus Switch:" },
{ TYPE_SWITCH, &setup.quick_doors, "Quick Menu Doors:" },
- { TYPE_SWITCH, &setup.toons, "Toons:" },
+ { TYPE_SWITCH, &setup.show_titlescreen,"Show Title Screens:" },
+ { TYPE_SWITCH, &setup.toons, "Show Toons:" },
{ TYPE_ECS_AGA, &setup.prefer_aga_graphics,"EMC graphics preference:" },
{ TYPE_EMPTY, NULL, "" },
{ TYPE_LEAVE_MENU, execSetupMain, "Back" },