$var =~ s/^\[player\]\./game.player_/;
$var =~ s/^\[title_initial\]/title_initial_default/;
$var =~ s/^\[title\]/title_default/;
+ $var =~ s/^\[titlescreen_initial\]/titlescreen_initial_default/;
+ $var =~ s/^\[titlescreen\]/titlescreen_default/;
$var =~ s/^\[titlemessage_initial\]/titlemessage_initial_default/;
$var =~ s/^\[titlemessage\]/titlemessage_default/;
- if ($var =~ /^titlemessage.*(\d)/ ||
+ if ($var =~ /^titlescreen.*(\d)/ ||
+ $var =~ /^titlemessage.*(\d)/ ||
$var =~ /^game.panel.key_(\d)/ ||
$var =~ /^game.panel.inventory_first_(\d)/ ||
$var =~ /^game.panel.inventory_last_(\d)/ ||
}
print_image_config_var_entry("\"$token\"", "&$var");
+
+ if ($var =~ /^(titlescreen.*)\[\d\]/ ||
+ $var =~ /^(titlemessage.*)\[\d\]/)
+ {
+ my $prefix = $1;
+ $var =~ s/^$prefix/${prefix}_first/;
+
+ print_image_config_var_entry("\"$token\"", "&$var");
+ }
}
}
{ "[title].post_delay", "250" },
{ "[title].auto_delay", "-1" },
+ { "[titlescreen_initial].sort_priority", "0" },
+ { "[titlescreen_initial].fade_mode", ARG_DEFAULT },
+ { "[titlescreen_initial].fade_delay", ARG_DEFAULT },
+ { "[titlescreen_initial].post_delay", ARG_DEFAULT },
+ { "[titlescreen_initial].auto_delay", ARG_DEFAULT },
+ { "[titlescreen].sort_priority", "0" },
+ { "[titlescreen].fade_mode", ARG_DEFAULT },
+ { "[titlescreen].fade_delay", ARG_DEFAULT },
+ { "[titlescreen].post_delay", ARG_DEFAULT },
+ { "[titlescreen].auto_delay", ARG_DEFAULT },
+
+ { "titlescreen_initial_1.sort_priority", ARG_DEFAULT },
+ { "titlescreen_initial_1.fade_mode", ARG_DEFAULT },
+ { "titlescreen_initial_1.fade_delay", ARG_DEFAULT },
+ { "titlescreen_initial_1.post_delay", ARG_DEFAULT },
+ { "titlescreen_initial_1.auto_delay", ARG_DEFAULT },
+ { "titlescreen_initial_2.sort_priority", ARG_DEFAULT },
+ { "titlescreen_initial_2.fade_mode", ARG_DEFAULT },
+ { "titlescreen_initial_2.fade_delay", ARG_DEFAULT },
+ { "titlescreen_initial_2.post_delay", ARG_DEFAULT },
+ { "titlescreen_initial_2.auto_delay", ARG_DEFAULT },
+ { "titlescreen_initial_3.sort_priority", ARG_DEFAULT },
+ { "titlescreen_initial_3.fade_mode", ARG_DEFAULT },
+ { "titlescreen_initial_3.fade_delay", ARG_DEFAULT },
+ { "titlescreen_initial_3.post_delay", ARG_DEFAULT },
+ { "titlescreen_initial_3.auto_delay", ARG_DEFAULT },
+ { "titlescreen_initial_4.sort_priority", ARG_DEFAULT },
+ { "titlescreen_initial_4.fade_mode", ARG_DEFAULT },
+ { "titlescreen_initial_4.fade_delay", ARG_DEFAULT },
+ { "titlescreen_initial_4.post_delay", ARG_DEFAULT },
+ { "titlescreen_initial_4.auto_delay", ARG_DEFAULT },
+ { "titlescreen_initial_5.sort_priority", ARG_DEFAULT },
+ { "titlescreen_initial_5.fade_mode", ARG_DEFAULT },
+ { "titlescreen_initial_5.fade_delay", ARG_DEFAULT },
+ { "titlescreen_initial_5.post_delay", ARG_DEFAULT },
+ { "titlescreen_initial_5.auto_delay", ARG_DEFAULT },
+ { "titlescreen_1.sort_priority", ARG_DEFAULT },
+ { "titlescreen_1.fade_mode", ARG_DEFAULT },
+ { "titlescreen_1.fade_delay", ARG_DEFAULT },
+ { "titlescreen_1.post_delay", ARG_DEFAULT },
+ { "titlescreen_1.auto_delay", ARG_DEFAULT },
+ { "titlescreen_2.sort_priority", ARG_DEFAULT },
+ { "titlescreen_2.fade_mode", ARG_DEFAULT },
+ { "titlescreen_2.fade_delay", ARG_DEFAULT },
+ { "titlescreen_2.post_delay", ARG_DEFAULT },
+ { "titlescreen_2.auto_delay", ARG_DEFAULT },
+ { "titlescreen_3.sort_priority", ARG_DEFAULT },
+ { "titlescreen_3.fade_mode", ARG_DEFAULT },
+ { "titlescreen_3.fade_delay", ARG_DEFAULT },
+ { "titlescreen_3.post_delay", ARG_DEFAULT },
+ { "titlescreen_3.auto_delay", ARG_DEFAULT },
+ { "titlescreen_4.sort_priority", ARG_DEFAULT },
+ { "titlescreen_4.fade_mode", ARG_DEFAULT },
+ { "titlescreen_4.fade_delay", ARG_DEFAULT },
+ { "titlescreen_4.post_delay", ARG_DEFAULT },
+ { "titlescreen_4.auto_delay", ARG_DEFAULT },
+ { "titlescreen_5.sort_priority", ARG_DEFAULT },
+ { "titlescreen_5.fade_mode", ARG_DEFAULT },
+ { "titlescreen_5.fade_delay", ARG_DEFAULT },
+ { "titlescreen_5.post_delay", ARG_DEFAULT },
+ { "titlescreen_5.auto_delay", ARG_DEFAULT },
+
{ "[titlemessage_initial].x", "-1" },
{ "[titlemessage_initial].y", "-1" },
{ "[titlemessage_initial].width", "-1" },
{ "menu.enter_screen.TITLE.fade_mode", "fade" },
{ "menu.enter_screen.TITLE.fade_delay", "500" },
{ "menu.enter_screen.TITLE.post_delay", "250" },
+ { "menu.enter_screen.TITLE.auto_delay", "-1" },
{ "menu.enter_screen.SCORES.fade_mode", ARG_DEFAULT },
{ "menu.enter_screen.SCORES.fade_delay", ARG_DEFAULT },
{ "menu.enter_screen.SCORES.post_delay", ARG_DEFAULT },
{ "menu.leave_screen.TITLE.fade_mode", "fade" },
{ "menu.leave_screen.TITLE.fade_delay", "500" },
{ "menu.leave_screen.TITLE.post_delay", "250" },
+ { "menu.leave_screen.TITLE.auto_delay", "-1" },
{ "menu.leave_screen.SCORES.fade_mode", ARG_DEFAULT },
{ "menu.leave_screen.SCORES.fade_delay", ARG_DEFAULT },
{ "menu.leave_screen.SCORES.post_delay", ARG_DEFAULT },
{ "menu.next_screen.TITLE.fade_mode", "fade" },
{ "menu.next_screen.TITLE.fade_delay", "500" },
{ "menu.next_screen.TITLE.post_delay", "250" },
+ { "menu.next_screen.TITLE.auto_delay", "-1" },
{ "menu.next_screen.INFO.fade_mode", ARG_DEFAULT },
{ "menu.next_screen.INFO.fade_delay", ARG_DEFAULT },
{ "menu.next_screen.INFO.post_delay", ARG_DEFAULT },
/* special case: initialize "ARG_DEFAULT" values in static default config */
/* (e.g., initialize "[titlemessage].fade_mode" from "[title].fade_mode") */
+ titlescreen_initial_default.fade_mode = title_initial_default.fade_mode;
+ titlescreen_initial_default.fade_delay = title_initial_default.fade_delay;
+ titlescreen_initial_default.post_delay = title_initial_default.post_delay;
+ titlescreen_initial_default.auto_delay = title_initial_default.auto_delay;
+ titlescreen_default.fade_mode = title_default.fade_mode;
+ titlescreen_default.fade_delay = title_default.fade_delay;
+ titlescreen_default.post_delay = title_default.post_delay;
+ titlescreen_default.auto_delay = title_default.auto_delay;
titlemessage_initial_default.fade_mode = title_initial_default.fade_mode;
titlemessage_initial_default.fade_delay = title_initial_default.fade_delay;
titlemessage_initial_default.post_delay = title_initial_default.post_delay;
/* (e.g., init "titlemessage_1.fade_mode" from "[titlemessage].fade_mode") */
for (i = 0; i < MAX_NUM_TITLE_MESSAGES; i++)
{
+ titlescreen_initial[i] = titlescreen_initial_default;
+ titlescreen[i] = titlescreen_default;
titlemessage_initial[i] = titlemessage_initial_default;
titlemessage[i] = titlemessage_default;
}
}
titlemessage_arrays[] =
{
- /* initialize title messages from "next screen" definitions, if defined */
+ /* initialize first titles from "enter screen" definitions, if defined */
+ { titlescreen_initial_first, "menu.enter_screen.TITLE" },
+ { titlescreen_first, "menu.enter_screen.TITLE" },
+ { titlemessage_initial_first, "menu.enter_screen.TITLE" },
+ { titlemessage_first, "menu.enter_screen.TITLE" },
+
+ /* initialize titles from "next screen" definitions, if defined */
+ { titlescreen_initial, "menu.next_screen.TITLE" },
+ { titlescreen, "menu.next_screen.TITLE" },
{ titlemessage_initial, "menu.next_screen.TITLE" },
{ titlemessage, "menu.next_screen.TITLE" },
- /* overwrite title messages with title definitions, if defined */
+ /* overwrite titles with title definitions, if defined */
+ { titlescreen_initial_first, "[title_initial]" },
+ { titlescreen_first, "[title]" },
+ { titlemessage_initial_first, "[title_initial]" },
+ { titlemessage_first, "[title]" },
+
+ { titlescreen_initial, "[title_initial]" },
+ { titlescreen, "[title]" },
{ titlemessage_initial, "[title_initial]" },
{ titlemessage, "[title]" },
- /* overwrite title messages with title message definitions, if defined */
+ /* overwrite titles with title screen/message definitions, if defined */
+ { titlescreen_initial_first, "[titlescreen_initial]" },
+ { titlescreen_first, "[titlescreen]" },
+ { titlemessage_initial_first, "[titlemessage_initial]" },
+ { titlemessage_first, "[titlemessage]" },
+
+ { titlescreen_initial, "[titlescreen_initial]" },
+ { titlescreen, "[titlescreen]" },
{ titlemessage_initial, "[titlemessage_initial]" },
{ titlemessage, "[titlemessage]" },
tfi = *info;
- *(boolean *)title_tokens[j].value = (boolean)parameter_value;
+ *(int *)title_tokens[j].value = (int)parameter_value;
*info = tfi;
}
tmi = array[k];
if (titlemessage_tokens[j].type == TYPE_INTEGER)
- *(boolean *)titlemessage_tokens[j].value = (boolean)parameter_value;
- else
*(int *)titlemessage_tokens[j].value = (int)parameter_value;
+ else
+ *(boolean *)titlemessage_tokens[j].value = (boolean)parameter_value;
array[k] = tmi;
}
struct TitleFadingInfo fading;
struct TitleFadingInfo title_initial_default;
struct TitleFadingInfo title_default;
+struct TitleMessageInfo titlescreen_initial_default;
+struct TitleMessageInfo titlescreen_initial_first[MAX_NUM_TITLE_IMAGES];
+struct TitleMessageInfo titlescreen_initial[MAX_NUM_TITLE_IMAGES];
+struct TitleMessageInfo titlescreen_default;
+struct TitleMessageInfo titlescreen_first[MAX_NUM_TITLE_IMAGES];
+struct TitleMessageInfo titlescreen[MAX_NUM_TITLE_IMAGES];
struct TitleMessageInfo titlemessage_initial_default;
+struct TitleMessageInfo titlemessage_initial_first[MAX_NUM_TITLE_MESSAGES];
struct TitleMessageInfo titlemessage_initial[MAX_NUM_TITLE_MESSAGES];
struct TitleMessageInfo titlemessage_default;
+struct TitleMessageInfo titlemessage_first[MAX_NUM_TITLE_MESSAGES];
struct TitleMessageInfo titlemessage[MAX_NUM_TITLE_MESSAGES];
struct TitleMessageInfo readme;
struct InitInfo init, init_last;
extern struct TitleFadingInfo fading_none;
extern struct TitleFadingInfo title_initial_default;
extern struct TitleFadingInfo title_default;
+extern struct TitleMessageInfo titlescreen_initial_default;
+extern struct TitleMessageInfo titlescreen_initial_first[];
+extern struct TitleMessageInfo titlescreen_initial[];
+extern struct TitleMessageInfo titlescreen_default;
+extern struct TitleMessageInfo titlescreen_first[];
+extern struct TitleMessageInfo titlescreen[];
extern struct TitleMessageInfo titlemessage_initial_default;
+extern struct TitleMessageInfo titlemessage_initial_first[];
extern struct TitleMessageInfo titlemessage_initial[];
extern struct TitleMessageInfo titlemessage_default;
+extern struct TitleMessageInfo titlemessage_first[];
extern struct TitleMessageInfo titlemessage[];
extern struct TitleMessageInfo readme;
extern struct InitInfo init, init_last;
{
boolean is_image;
boolean initial;
+ boolean first;
int local_nr;
int sort_priority;
};
static struct TitleFadingInfo getTitleFading(struct TitleControlInfo *tci)
{
boolean is_image = tci->is_image;
- int initial = tci->initial;
+ boolean initial = tci->initial;
+ boolean first = tci->first;
int nr = tci->local_nr;
+ struct TitleMessageInfo tmi;
struct TitleFadingInfo ti;
- if (is_image)
- {
- int graphic = getTitleScreenGraphic(nr, initial);
-
- /* initialize fading control values to default title config settings */
- ti = (initial ? title_initial_default : title_default);
-
- /* override default settings with image config settings, if defined */
- if (graphic_info[graphic].fade_mode != FADE_MODE_DEFAULT)
- ti.fade_mode = graphic_info[graphic].fade_mode;
- if (graphic_info[graphic].fade_delay > -1)
- ti.fade_delay = graphic_info[graphic].fade_delay;
- if (graphic_info[graphic].post_delay > -1)
- ti.post_delay = graphic_info[graphic].post_delay;
- if (graphic_info[graphic].auto_delay > -1)
- ti.auto_delay = graphic_info[graphic].auto_delay;
- }
- else
- {
- if (initial)
- {
- ti.fade_mode = titlemessage_initial[nr].fade_mode;
- ti.fade_delay = titlemessage_initial[nr].fade_delay;
- ti.post_delay = titlemessage_initial[nr].post_delay;
- ti.auto_delay = titlemessage_initial[nr].auto_delay;
- }
- else
- {
- ti.fade_mode = titlemessage[nr].fade_mode;
- ti.fade_delay = titlemessage[nr].fade_delay;
- ti.post_delay = titlemessage[nr].post_delay;
- ti.auto_delay = titlemessage[nr].auto_delay;
- }
- }
+ tmi = (is_image ? (initial ? (first ?
+ titlescreen_initial_first[nr] :
+ titlescreen_initial[nr])
+ : (first ?
+ titlescreen_first[nr] :
+ titlescreen[nr]))
+ : (initial ? (first ?
+ titlemessage_initial_first[nr] :
+ titlemessage_initial[nr])
+ : (first ?
+ titlemessage_first[nr] :
+ titlemessage[nr])));
+
+ ti.fade_mode = tmi.fade_mode;
+ ti.fade_delay = tmi.fade_delay;
+ ti.post_delay = tmi.post_delay;
+ ti.auto_delay = tmi.auto_delay;
return ti;
}
title_controls[num_title_screens].local_nr = nr;
title_controls[num_title_screens].sort_priority = sort_priority;
+ title_controls[num_title_screens].first = FALSE; /* will be set later */
+
num_title_screens++;
}
/* sort title screens according to sort_priority and title number */
qsort(title_controls, num_title_screens, sizeof(struct TitleControlInfo),
compareTitleControlInfo);
+
+ /* mark first title screen */
+ title_controls[0].first = TRUE;
}
static boolean visibleMenuPos(struct MenuPosInfo *pos)
last_sound = SND_UNDEFINED;
last_music = MUS_UNDEFINED;
- FadeSetEnterScreen();
+ if (num_title_screens != 0)
+ {
+ FadeSetEnterScreen();
+
+ /* use individual title fading instead of global "enter screen" fading */
+ fading = getTitleFading(tci);
+ }
if (game_status_last_screen == GAME_MODE_INFO)
{
{
if (game_status_last_screen == GAME_MODE_INFO && num_title_screens == 0)
{
- FadeSetEnterScreen();
-
game_status = GAME_MODE_INFO;
info_mode = INFO_MODE_MAIN;