BlitBitmap(bitmap, drawto, src_x, src_y, width, height, dst_x, dst_y);
redraw_mask = REDRAW_ALL;
+
+ /* reset fading control values to default config settings */
+ title.fade_delay_final = title.fade_delay;
+ title.post_delay_final = title.post_delay;
+ title.auto_delay_final = title.auto_delay;
+
+ /* override default settings with image config settings, if defined */
+ if (graphic_info[graphic].fade_delay > -1)
+ title.fade_delay_final = graphic_info[graphic].fade_delay;
+ if (graphic_info[graphic].post_delay > -1)
+ title.post_delay_final = graphic_info[graphic].post_delay;
+ if (graphic_info[graphic].auto_delay > -1)
+ title.auto_delay_final = graphic_info[graphic].auto_delay;
}
void DrawTitleScreen()
boolean return_to_main_menu = FALSE;
boolean use_fading_main_menu = TRUE;
boolean use_cross_fading = !show_titlescreen_initial; /* default */
- int auto_delay = menu.auto_delay;
if (button == MB_MENU_INITIALIZE)
{
title_delay = 0;
title_nr = 0;
+ if (show_titlescreen_initial &&
+ graphic_info[IMG_TITLESCREEN_INITIAL_1].bitmap == NULL)
+ show_titlescreen_initial = FALSE;
+
if (game_status == GAME_MODE_INFO)
{
if (graphic_info[IMG_TITLESCREEN_1].bitmap == NULL)
return;
}
- int anim_delay = graphic_info[getTitleScreenGraphic() + title_nr].anim_delay;
- if (anim_delay > 1)
- auto_delay = anim_delay;
-
- if (auto_delay > 0 && DelayReached(&title_delay, auto_delay))
+ if (title.auto_delay_final > -1 &&
+ DelayReached(&title_delay, title.auto_delay_final))
button = MB_MENU_CHOICE;
if (button == MB_MENU_LEAVE)
}
else if (button == MB_MENU_CHOICE)
{
+ int anim_mode;
+
if (game_status == GAME_MODE_INFO &&
graphic_info[IMG_TITLESCREEN_1].bitmap == NULL)
{
title_nr = 0; /* restart with title screens for current level set */
}
- int anim_mode = graphic_info[getTitleScreenGraphic() + title_nr].anim_mode;
+ anim_mode = graphic_info[getTitleScreenGraphic() + title_nr].anim_mode;
use_cross_fading = (anim_mode == ANIM_FADE ? FALSE :
anim_mode == ANIM_CROSSFADE ? TRUE :
if (return_to_main_menu)
{
+ show_titlescreen_initial = FALSE;
+
RedrawBackground();
if (game_status == GAME_MODE_INFO)
static int num_pages;
static int page;
int anims_per_page = MAX_INFO_ELEMENTS_ON_SCREEN;
- int button_released = !button;
int i;
if (button == MB_MENU_INITIALIZE)
boolean new_element = TRUE;
num_anims = 0;
+
for (i = 0; helpanim_info[i].element != HELPANIM_LIST_END; i++)
{
if (helpanim_info[i].element == HELPANIM_LIST_NEXT)
num_pages = (num_anims + anims_per_page - 1) / anims_per_page;
page = 0;
}
- else if (button == MB_MENU_LEAVE)
+
+ if (button == MB_MENU_LEAVE)
{
info_mode = INFO_MODE_MAIN;
DrawInfoScreen();
return;
}
-
- if (button_released || button == MB_MENU_INITIALIZE)
+ else if (button == MB_MENU_CHOICE || button == MB_MENU_INITIALIZE)
{
if (button != MB_MENU_INITIALIZE)
page++;
static struct MusicFileInfo *list = NULL;
int ystart = 150, dy = 30;
int ybottom = SYSIZE - 20;
- int button_released = !button;
if (button == MB_MENU_INITIALIZE)
{
return;
}
}
- else if (button == MB_MENU_LEAVE)
+
+ if (button == MB_MENU_LEAVE)
{
info_mode = INFO_MODE_MAIN;
DrawInfoScreen();
return;
}
-
- if (button_released || button == MB_MENU_INITIALIZE)
+ else if (button == MB_MENU_CHOICE || button == MB_MENU_INITIALIZE)
{
int y = 0;
void HandleInfoScreen_Program(int button)
{
- int button_released = !button;
-
if (button == MB_MENU_LEAVE)
{
info_mode = INFO_MODE_MAIN;
return;
}
-
- if (button_released)
+ else if (button == MB_MENU_CHOICE)
{
FadeSoundsAndMusic();
FadeOut(REDRAW_FIELD);
void HandleInfoScreen_LevelSet(int button)
{
- int button_released = !button;
-
if (button == MB_MENU_LEAVE)
{
info_mode = INFO_MODE_MAIN;
return;
}
-
- if (button_released)
+ else if (button == MB_MENU_CHOICE)
{
FadeSoundsAndMusic();
FadeOut(REDRAW_FIELD);