fixed default screen fading for the first title screen
authorHolger Schemel <info@artsoft.org>
Mon, 9 May 2016 21:10:32 +0000 (23:10 +0200)
committerHolger Schemel <info@artsoft.org>
Mon, 9 May 2016 21:10:32 +0000 (23:10 +0200)
build-scripts/create_element_defs.pl
src/files.c
src/main.c
src/main.h

index c1da1da..db4d42a 100755 (executable)
@@ -2428,7 +2428,9 @@ sub print_image_config_vars
 
            print_image_config_var_entry("\"$token\"", "&$var");
 
-           if ($var =~ /^(titlescreen.*)\[\d\]/ ||
+           if ($var =~ /^(title)_default/ ||
+               $var =~ /^(title_initial)_default/ ||
+               $var =~ /^(titlescreen.*)\[\d\]/ ||
                $var =~ /^(titlemessage.*)\[\d\]/)
            {
                my $prefix = $1;
index ebf045c..edc1358 100644 (file)
@@ -8764,6 +8764,31 @@ static void InitMenuDesignSettings_SpecialPreProcessing()
 
   /* special case: initialize "ARG_DEFAULT" values in static default config */
   /* (e.g., initialize "[titlemessage].fade_mode" from "[title].fade_mode") */
+  titlescreen_initial_first_default.fade_mode  =
+    title_initial_first_default.fade_mode;
+  titlescreen_initial_first_default.fade_delay =
+    title_initial_first_default.fade_delay;
+  titlescreen_initial_first_default.post_delay =
+    title_initial_first_default.post_delay;
+  titlescreen_initial_first_default.auto_delay =
+    title_initial_first_default.auto_delay;
+  titlescreen_first_default.fade_mode  = title_first_default.fade_mode;
+  titlescreen_first_default.fade_delay = title_first_default.fade_delay;
+  titlescreen_first_default.post_delay = title_first_default.post_delay;
+  titlescreen_first_default.auto_delay = title_first_default.auto_delay;
+  titlemessage_initial_first_default.fade_mode  =
+    title_initial_first_default.fade_mode;
+  titlemessage_initial_first_default.fade_delay =
+    title_initial_first_default.fade_delay;
+  titlemessage_initial_first_default.post_delay =
+    title_initial_first_default.post_delay;
+  titlemessage_initial_first_default.auto_delay =
+    title_initial_first_default.auto_delay;
+  titlemessage_first_default.fade_mode  = title_first_default.fade_mode;
+  titlemessage_first_default.fade_delay = title_first_default.fade_delay;
+  titlemessage_first_default.post_delay = title_first_default.post_delay;
+  titlemessage_first_default.auto_delay = title_first_default.auto_delay;
+
   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;
@@ -8785,6 +8810,11 @@ static void InitMenuDesignSettings_SpecialPreProcessing()
   /* (e.g., init "titlemessage_1.fade_mode" from "[titlemessage].fade_mode") */
   for (i = 0; i < MAX_NUM_TITLE_MESSAGES; i++)
   {
+    titlescreen_initial_first[i] = titlescreen_initial_first_default;
+    titlescreen_first[i] = titlescreen_first_default;
+    titlemessage_initial_first[i] = titlemessage_initial_first_default;
+    titlemessage_first[i] = titlemessage_first_default;
+
     titlescreen_initial[i] = titlescreen_initial_default;
     titlescreen[i] = titlescreen_default;
     titlemessage_initial[i] = titlemessage_initial_default;
@@ -8894,6 +8924,10 @@ static void LoadMenuDesignSettingsFromFilename(char *filename)
   }
   title_info[] =
   {
+    /* initialize first titles from "enter screen" definitions, if defined */
+    { &title_initial_first_default,    "menu.enter_screen.TITLE"       },
+    { &title_first_default,            "menu.enter_screen.TITLE"       },
+
     /* initialize title screens from "next screen" definitions, if defined */
     { &title_initial_default,          "menu.next_screen.TITLE"        },
     { &title_default,                  "menu.next_screen.TITLE"        },
index 6d76bbc..4d2707e 100644 (file)
@@ -143,19 +143,25 @@ struct GlobalInfo global;
 struct BorderInfo      border;
 struct ViewportInfo    viewport;
 struct TitleFadingInfo fading;
+struct TitleFadingInfo title_initial_first_default;
 struct TitleFadingInfo title_initial_default;
+struct TitleFadingInfo title_first_default;
 struct TitleFadingInfo title_default;
-struct TitleMessageInfo        titlescreen_initial_default;
+struct TitleMessageInfo        titlescreen_initial_first_default;
 struct TitleMessageInfo        titlescreen_initial_first[MAX_NUM_TITLE_IMAGES];
+struct TitleMessageInfo        titlescreen_initial_default;
 struct TitleMessageInfo        titlescreen_initial[MAX_NUM_TITLE_IMAGES];
-struct TitleMessageInfo        titlescreen_default;
+struct TitleMessageInfo        titlescreen_first_default;
 struct TitleMessageInfo        titlescreen_first[MAX_NUM_TITLE_IMAGES];
+struct TitleMessageInfo        titlescreen_default;
 struct TitleMessageInfo        titlescreen[MAX_NUM_TITLE_IMAGES];
-struct TitleMessageInfo        titlemessage_initial_default;
+struct TitleMessageInfo        titlemessage_initial_first_default;
 struct TitleMessageInfo        titlemessage_initial_first[MAX_NUM_TITLE_MESSAGES];
+struct TitleMessageInfo        titlemessage_initial_default;
 struct TitleMessageInfo        titlemessage_initial[MAX_NUM_TITLE_MESSAGES];
-struct TitleMessageInfo        titlemessage_default;
+struct TitleMessageInfo        titlemessage_first_default;
 struct TitleMessageInfo        titlemessage_first[MAX_NUM_TITLE_MESSAGES];
+struct TitleMessageInfo        titlemessage_default;
 struct TitleMessageInfo        titlemessage[MAX_NUM_TITLE_MESSAGES];
 struct TitleMessageInfo        readme;
 struct InitInfo                init, init_last;
index 6dfbd90..2478a9d 100644 (file)
@@ -3082,19 +3082,25 @@ extern struct BorderInfo        border;
 extern struct ViewportInfo     viewport;
 extern struct TitleFadingInfo  fading;
 extern struct TitleFadingInfo  fading_none;
+extern struct TitleFadingInfo  title_initial_first_default;
 extern struct TitleFadingInfo  title_initial_default;
+extern struct TitleFadingInfo  title_first_default;
 extern struct TitleFadingInfo  title_default;
-extern struct TitleMessageInfo titlescreen_initial_default;
+extern struct TitleMessageInfo titlescreen_initial_first_default;
 extern struct TitleMessageInfo titlescreen_initial_first[];
+extern struct TitleMessageInfo titlescreen_initial_default;
 extern struct TitleMessageInfo titlescreen_initial[];
-extern struct TitleMessageInfo titlescreen_default;
+extern struct TitleMessageInfo titlescreen_first_default;
 extern struct TitleMessageInfo titlescreen_first[];
+extern struct TitleMessageInfo titlescreen_default;
 extern struct TitleMessageInfo titlescreen[];
-extern struct TitleMessageInfo titlemessage_initial_default;
+extern struct TitleMessageInfo titlemessage_initial_first_default;
 extern struct TitleMessageInfo titlemessage_initial_first[];
+extern struct TitleMessageInfo titlemessage_initial_default;
 extern struct TitleMessageInfo titlemessage_initial[];
-extern struct TitleMessageInfo titlemessage_default;
+extern struct TitleMessageInfo titlemessage_first_default;
 extern struct TitleMessageInfo titlemessage_first[];
+extern struct TitleMessageInfo titlemessage_default;
 extern struct TitleMessageInfo titlemessage[];
 extern struct TitleMessageInfo readme;
 extern struct InitInfo         init, init_last;