rnd-20070318-2-src
authorHolger Schemel <info@artsoft.org>
Sun, 18 Mar 2007 19:14:57 +0000 (20:14 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:54:58 +0000 (10:54 +0200)
* added configurability of graphics, sounds and music for title screens

16 files changed:
ChangeLog
src/conf_g2m.c
src/conf_g2s.c
src/conf_gfx.c
src/conf_gfx.h
src/conf_mus.c
src/conf_mus.h
src/conf_snd.c
src/conf_snd.h
src/conf_var.c
src/conftime.h
src/files.c
src/init.c
src/main.c
src/main.h
src/screens.c

index 5b5d26561085ccc49d44c2676098f995b52dee7f..5a20b4ec7f345aaf7feb1b68ac2379fd45ce4cd6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2007-03-18
+       * added configurability of graphics, sounds and music for title screens
+
 2007-03-14
        * added full configurability of "readme.txt" screen appearance:
          - readme.x:             <left position used with alignment>
index 754145b8a348df73fdd351ecb50c641aef7d9fd1..0286002bda599bedd0a7add30b995524adc08d51 100644 (file)
@@ -38,14 +38,6 @@ gamemode_to_music[] =
     GFX_SPECIAL_ARG_TITLE,
     MUS_BACKGROUND_TITLE
   },
-  {
-    GFX_SPECIAL_ARG_MESSAGE_INITIAL,
-    MUS_BACKGROUND_MESSAGE_INITIAL
-  },
-  {
-    GFX_SPECIAL_ARG_MESSAGE,
-    MUS_BACKGROUND_MESSAGE
-  },
   {
     GFX_SPECIAL_ARG_MAIN,
     MUS_BACKGROUND_MAIN
@@ -70,6 +62,86 @@ gamemode_to_music[] =
     GFX_SPECIAL_ARG_SETUP,
     MUS_BACKGROUND_SETUP
   },
+  {
+    -1,
+    MUS_BACKGROUND_TITLESCREEN_INITIAL_1
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLESCREEN_INITIAL_2
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLESCREEN_INITIAL_3
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLESCREEN_INITIAL_4
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLESCREEN_INITIAL_5
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLESCREEN_1
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLESCREEN_2
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLESCREEN_3
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLESCREEN_4
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLESCREEN_5
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLEMESSAGE_INITIAL_1
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLEMESSAGE_INITIAL_2
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLEMESSAGE_INITIAL_3
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLEMESSAGE_INITIAL_4
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLEMESSAGE_INITIAL_5
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLEMESSAGE_1
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLEMESSAGE_2
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLEMESSAGE_3
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLEMESSAGE_4
+  },
+  {
+    -1,
+    MUS_BACKGROUND_TITLEMESSAGE_5
+  },
   {
     -1,
     -1
index 6f9ba392690ae308da1d91e684ea58beadf84a0f..41b7296fd22bfe84efe247e30c937febec86e8ad 100644 (file)
@@ -34,14 +34,6 @@ gamemode_to_sound[] =
     GFX_SPECIAL_ARG_TITLE,
     SND_BACKGROUND_TITLE
   },
-  {
-    GFX_SPECIAL_ARG_MESSAGE_INITIAL,
-    SND_BACKGROUND_MESSAGE_INITIAL
-  },
-  {
-    GFX_SPECIAL_ARG_MESSAGE,
-    SND_BACKGROUND_MESSAGE
-  },
   {
     GFX_SPECIAL_ARG_MAIN,
     SND_BACKGROUND_MAIN
@@ -68,83 +60,83 @@ gamemode_to_sound[] =
   },
   {
     -1,
-    SND_TITLESCREEN_INITIAL_1
+    SND_BACKGROUND_TITLESCREEN_INITIAL_1
   },
   {
     -1,
-    SND_TITLESCREEN_INITIAL_2
+    SND_BACKGROUND_TITLESCREEN_INITIAL_2
   },
   {
     -1,
-    SND_TITLESCREEN_INITIAL_3
+    SND_BACKGROUND_TITLESCREEN_INITIAL_3
   },
   {
     -1,
-    SND_TITLESCREEN_INITIAL_4
+    SND_BACKGROUND_TITLESCREEN_INITIAL_4
   },
   {
     -1,
-    SND_TITLESCREEN_INITIAL_5
+    SND_BACKGROUND_TITLESCREEN_INITIAL_5
   },
   {
     -1,
-    SND_TITLESCREEN_1
+    SND_BACKGROUND_TITLESCREEN_1
   },
   {
     -1,
-    SND_TITLESCREEN_2
+    SND_BACKGROUND_TITLESCREEN_2
   },
   {
     -1,
-    SND_TITLESCREEN_3
+    SND_BACKGROUND_TITLESCREEN_3
   },
   {
     -1,
-    SND_TITLESCREEN_4
+    SND_BACKGROUND_TITLESCREEN_4
   },
   {
     -1,
-    SND_TITLESCREEN_5
+    SND_BACKGROUND_TITLESCREEN_5
   },
   {
     -1,
-    SND_TITLEMESSAGE_INITIAL_1
+    SND_BACKGROUND_TITLEMESSAGE_INITIAL_1
   },
   {
     -1,
-    SND_TITLEMESSAGE_INITIAL_2
+    SND_BACKGROUND_TITLEMESSAGE_INITIAL_2
   },
   {
     -1,
-    SND_TITLEMESSAGE_INITIAL_3
+    SND_BACKGROUND_TITLEMESSAGE_INITIAL_3
   },
   {
     -1,
-    SND_TITLEMESSAGE_INITIAL_4
+    SND_BACKGROUND_TITLEMESSAGE_INITIAL_4
   },
   {
     -1,
-    SND_TITLEMESSAGE_INITIAL_5
+    SND_BACKGROUND_TITLEMESSAGE_INITIAL_5
   },
   {
     -1,
-    SND_TITLEMESSAGE_1
+    SND_BACKGROUND_TITLEMESSAGE_1
   },
   {
     -1,
-    SND_TITLEMESSAGE_2
+    SND_BACKGROUND_TITLEMESSAGE_2
   },
   {
     -1,
-    SND_TITLEMESSAGE_3
+    SND_BACKGROUND_TITLEMESSAGE_3
   },
   {
     -1,
-    SND_TITLEMESSAGE_4
+    SND_BACKGROUND_TITLEMESSAGE_4
   },
   {
     -1,
-    SND_TITLEMESSAGE_5
+    SND_BACKGROUND_TITLEMESSAGE_5
   },
   {
     -1,
index 7b2b91909485847af84453c8b328e311fd35a9a8..2782ed7dd69b084d0540383ca89afae308655542 100644 (file)
@@ -4897,6 +4897,44 @@ struct ConfigInfo image_config[] =
   { "editor.cascade_list.active.y",            "80"                    },
   { "editor.cascade_list.active.frames",       "1"                     },
 
+  { "background",                              UNDEFINED_FILENAME      },
+  { "background.TITLE_INITIAL",                        UNDEFINED_FILENAME      },
+  { "background.TITLE",                                UNDEFINED_FILENAME      },
+  { "background.MAIN",                         UNDEFINED_FILENAME      },
+  { "background.LEVELS",                       UNDEFINED_FILENAME      },
+  { "background.SCORES",                       UNDEFINED_FILENAME      },
+  { "background.EDITOR",                       UNDEFINED_FILENAME      },
+  { "background.INFO",                         UNDEFINED_FILENAME      },
+  { "background.INFO[ELEMENTS]",               UNDEFINED_FILENAME      },
+  { "background.INFO[MUSIC]",                  UNDEFINED_FILENAME      },
+  { "background.INFO[CREDITS]",                        UNDEFINED_FILENAME      },
+  { "background.INFO[PROGRAM]",                        UNDEFINED_FILENAME      },
+  { "background.INFO[VERSION]",                        UNDEFINED_FILENAME      },
+  { "background.INFO[LEVELSET]",               UNDEFINED_FILENAME      },
+  { "background.SETUP",                                UNDEFINED_FILENAME      },
+  { "background.DOOR",                         UNDEFINED_FILENAME      },
+
+  { "background.titlescreen_initial_1",                UNDEFINED_FILENAME      },
+  { "background.titlescreen_initial_2",                UNDEFINED_FILENAME      },
+  { "background.titlescreen_initial_3",                UNDEFINED_FILENAME      },
+  { "background.titlescreen_initial_4",                UNDEFINED_FILENAME      },
+  { "background.titlescreen_initial_5",                UNDEFINED_FILENAME      },
+  { "background.titlescreen_1",                        UNDEFINED_FILENAME      },
+  { "background.titlescreen_2",                        UNDEFINED_FILENAME      },
+  { "background.titlescreen_3",                        UNDEFINED_FILENAME      },
+  { "background.titlescreen_4",                        UNDEFINED_FILENAME      },
+  { "background.titlescreen_5",                        UNDEFINED_FILENAME      },
+  { "background.titlemessage_initial_1",       UNDEFINED_FILENAME      },
+  { "background.titlemessage_initial_2",       UNDEFINED_FILENAME      },
+  { "background.titlemessage_initial_3",       UNDEFINED_FILENAME      },
+  { "background.titlemessage_initial_4",       UNDEFINED_FILENAME      },
+  { "background.titlemessage_initial_5",       UNDEFINED_FILENAME      },
+  { "background.titlemessage_1",               UNDEFINED_FILENAME      },
+  { "background.titlemessage_2",               UNDEFINED_FILENAME      },
+  { "background.titlemessage_3",               UNDEFINED_FILENAME      },
+  { "background.titlemessage_4",               UNDEFINED_FILENAME      },
+  { "background.titlemessage_5",               UNDEFINED_FILENAME      },
+
   { "background.envelope_1",                   "RocksScreen.pcx"       },
   { "background.envelope_1.x",                 "0"                     },
   { "background.envelope_1.y",                 "0"                     },
@@ -4926,25 +4964,6 @@ struct ConfigInfo image_config[] =
   { "background.envelope_4.anim_mode",         "default"               },
   { "background.envelope_4.draw_masked",       "false"                 },
 
-  { "background",                              UNDEFINED_FILENAME      },
-  { "background.TITLE_INITIAL",                        UNDEFINED_FILENAME      },
-  { "background.TITLE",                                UNDEFINED_FILENAME      },
-  { "background.MESSAGE_INITIAL",              UNDEFINED_FILENAME      },
-  { "background.MESSAGE",                      UNDEFINED_FILENAME      },
-  { "background.MAIN",                         UNDEFINED_FILENAME      },
-  { "background.LEVELS",                       UNDEFINED_FILENAME      },
-  { "background.SCORES",                       UNDEFINED_FILENAME      },
-  { "background.EDITOR",                       UNDEFINED_FILENAME      },
-  { "background.INFO",                         UNDEFINED_FILENAME      },
-  { "background.INFO[ELEMENTS]",               UNDEFINED_FILENAME      },
-  { "background.INFO[MUSIC]",                  UNDEFINED_FILENAME      },
-  { "background.INFO[CREDITS]",                        UNDEFINED_FILENAME      },
-  { "background.INFO[PROGRAM]",                        UNDEFINED_FILENAME      },
-  { "background.INFO[VERSION]",                        UNDEFINED_FILENAME      },
-  { "background.INFO[LEVELSET]",               UNDEFINED_FILENAME      },
-  { "background.SETUP",                                UNDEFINED_FILENAME      },
-  { "background.DOOR",                         UNDEFINED_FILENAME      },
-
   { "titlescreen_initial_1",                   UNDEFINED_FILENAME      },
   { "titlescreen_initial_2",                   UNDEFINED_FILENAME      },
   { "titlescreen_initial_3",                   UNDEFINED_FILENAME      },
@@ -4961,6 +4980,33 @@ struct ConfigInfo image_config[] =
 
   /* keyword to start parser: "CONFIG_VARS_START" <-- do not change! */
 
+  { "[titlemessage_initial].x",                        "336"                   },
+  { "[titlemessage_initial].y",                        "280"                   },
+  { "[titlemessage_initial].width",            "640"                   },
+  { "[titlemessage_initial].height",           "512"                   },
+  { "[titlemessage_initial].chars",            "-1"                    },
+  { "[titlemessage_initial].lines",            "-1"                    },
+  { "[titlemessage_initial].align",            "center"                },
+  { "[titlemessage_initial].valign",           "middle"                },
+  { "[titlemessage_initial].font",             "font.text_1"           },
+  { "[titlemessage_initial].autowrap",         "false"                 },
+  { "[titlemessage_initial].centered",         "false"                 },
+  { "[titlemessage_initial].skip_comments",    "false"                 },
+  { "[titlemessage_initial].sort_priority",    "0"                     },
+  { "[titlemessage].x",                                "336"                   },
+  { "[titlemessage].y",                                "280"                   },
+  { "[titlemessage].width",                    "640"                   },
+  { "[titlemessage].height",                   "512"                   },
+  { "[titlemessage].chars",                    "-1"                    },
+  { "[titlemessage].lines",                    "-1"                    },
+  { "[titlemessage].align",                    "center"                },
+  { "[titlemessage].valign",                   "middle"                },
+  { "[titlemessage].font",                     "font.text_1"           },
+  { "[titlemessage].autowrap",                 "false"                 },
+  { "[titlemessage].centered",                 "false"                 },
+  { "[titlemessage].skip_comments",            "false"                 },
+  { "[titlemessage].sort_priority",            "0"                     },
+
   { "titlemessage_initial_1.x",                        "336"                   },
   { "titlemessage_initial_1.y",                        "280"                   },
   { "titlemessage_initial_1.width",            "640"                   },
index 271c38f0140dbd0a1d0f3762b79be469060becfd..fe72c69f7c1025c0a0d2b6a2d1f1b1706f138fac 100644 (file)
 #define IMG_EDITOR_ELEMENT_BORDER_INPUT                        1709
 #define IMG_EDITOR_CASCADE_LIST                                1710
 #define IMG_EDITOR_CASCADE_LIST_ACTIVE                 1711
-#define IMG_BACKGROUND_ENVELOPE_1                      1712
-#define IMG_BACKGROUND_ENVELOPE_2                      1713
-#define IMG_BACKGROUND_ENVELOPE_3                      1714
-#define IMG_BACKGROUND_ENVELOPE_4                      1715
-#define IMG_BACKGROUND                                 1716
-#define IMG_BACKGROUND_TITLE_INITIAL                   1717
-#define IMG_BACKGROUND_TITLE                           1718
-#define IMG_BACKGROUND_MESSAGE_INITIAL                 1719
-#define IMG_BACKGROUND_MESSAGE                         1720
-#define IMG_BACKGROUND_MAIN                            1721
-#define IMG_BACKGROUND_LEVELS                          1722
-#define IMG_BACKGROUND_SCORES                          1723
-#define IMG_BACKGROUND_EDITOR                          1724
-#define IMG_BACKGROUND_INFO                            1725
-#define IMG_BACKGROUND_INFO_ELEMENTS                   1726
-#define IMG_BACKGROUND_INFO_MUSIC                      1727
-#define IMG_BACKGROUND_INFO_CREDITS                    1728
-#define IMG_BACKGROUND_INFO_PROGRAM                    1729
-#define IMG_BACKGROUND_INFO_VERSION                    1730
-#define IMG_BACKGROUND_INFO_LEVELSET                   1731
-#define IMG_BACKGROUND_SETUP                           1732
-#define IMG_BACKGROUND_DOOR                            1733
-#define IMG_TITLESCREEN_INITIAL_1                      1734
-#define IMG_TITLESCREEN_INITIAL_2                      1735
-#define IMG_TITLESCREEN_INITIAL_3                      1736
-#define IMG_TITLESCREEN_INITIAL_4                      1737
-#define IMG_TITLESCREEN_INITIAL_5                      1738
-#define IMG_TITLESCREEN_1                              1739
-#define IMG_TITLESCREEN_2                              1740
-#define IMG_TITLESCREEN_3                              1741
-#define IMG_TITLESCREEN_4                              1742
-#define IMG_TITLESCREEN_5                              1743
+#define IMG_BACKGROUND                                 1712
+#define IMG_BACKGROUND_TITLE_INITIAL                   1713
+#define IMG_BACKGROUND_TITLE                           1714
+#define IMG_BACKGROUND_MAIN                            1715
+#define IMG_BACKGROUND_LEVELS                          1716
+#define IMG_BACKGROUND_SCORES                          1717
+#define IMG_BACKGROUND_EDITOR                          1718
+#define IMG_BACKGROUND_INFO                            1719
+#define IMG_BACKGROUND_INFO_ELEMENTS                   1720
+#define IMG_BACKGROUND_INFO_MUSIC                      1721
+#define IMG_BACKGROUND_INFO_CREDITS                    1722
+#define IMG_BACKGROUND_INFO_PROGRAM                    1723
+#define IMG_BACKGROUND_INFO_VERSION                    1724
+#define IMG_BACKGROUND_INFO_LEVELSET                   1725
+#define IMG_BACKGROUND_SETUP                           1726
+#define IMG_BACKGROUND_DOOR                            1727
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_1           1728
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_2           1729
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_3           1730
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_4           1731
+#define IMG_BACKGROUND_TITLESCREEN_INITIAL_5           1732
+#define IMG_BACKGROUND_TITLESCREEN_1                   1733
+#define IMG_BACKGROUND_TITLESCREEN_2                   1734
+#define IMG_BACKGROUND_TITLESCREEN_3                   1735
+#define IMG_BACKGROUND_TITLESCREEN_4                   1736
+#define IMG_BACKGROUND_TITLESCREEN_5                   1737
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1          1738
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_2          1739
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_3          1740
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_4          1741
+#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_5          1742
+#define IMG_BACKGROUND_TITLEMESSAGE_1                  1743
+#define IMG_BACKGROUND_TITLEMESSAGE_2                  1744
+#define IMG_BACKGROUND_TITLEMESSAGE_3                  1745
+#define IMG_BACKGROUND_TITLEMESSAGE_4                  1746
+#define IMG_BACKGROUND_TITLEMESSAGE_5                  1747
+#define IMG_BACKGROUND_ENVELOPE_1                      1748
+#define IMG_BACKGROUND_ENVELOPE_2                      1749
+#define IMG_BACKGROUND_ENVELOPE_3                      1750
+#define IMG_BACKGROUND_ENVELOPE_4                      1751
+#define IMG_TITLESCREEN_INITIAL_1                      1752
+#define IMG_TITLESCREEN_INITIAL_2                      1753
+#define IMG_TITLESCREEN_INITIAL_3                      1754
+#define IMG_TITLESCREEN_INITIAL_4                      1755
+#define IMG_TITLESCREEN_INITIAL_5                      1756
+#define IMG_TITLESCREEN_1                              1757
+#define IMG_TITLESCREEN_2                              1758
+#define IMG_TITLESCREEN_3                              1759
+#define IMG_TITLESCREEN_4                              1760
+#define IMG_TITLESCREEN_5                              1761
 
-#define NUM_IMAGE_FILES                                        1744
+#define NUM_IMAGE_FILES                                        1762
 
 #endif /* CONF_GFX_H */
index ac4fa911345d8a8432672f2e4d87c4d0a7643e88..934fd82525101ec17e2247dbacc94226a5293066 100644 (file)
@@ -31,8 +31,6 @@ struct ConfigInfo music_config[] =
   { "background",                      UNDEFINED_FILENAME              },
   { "background.TITLE_INITIAL",                UNDEFINED_FILENAME              },
   { "background.TITLE",                        UNDEFINED_FILENAME              },
-  { "background.MESSAGE_INITIAL",      UNDEFINED_FILENAME              },
-  { "background.MESSAGE",              UNDEFINED_FILENAME              },
   { "background.MAIN",                 UNDEFINED_FILENAME              },
   { "background.LEVELS",               UNDEFINED_FILENAME              },
   { "background.SCORES",               UNDEFINED_FILENAME              },
@@ -40,26 +38,26 @@ struct ConfigInfo music_config[] =
   { "background.INFO",                 "rhythmloop.wav"                },
   { "background.SETUP",                        UNDEFINED_FILENAME              },
 
-  { "titlescreen_initial_1",           UNDEFINED_FILENAME              },
-  { "titlescreen_initial_2",           UNDEFINED_FILENAME              },
-  { "titlescreen_initial_3",           UNDEFINED_FILENAME              },
-  { "titlescreen_initial_4",           UNDEFINED_FILENAME              },
-  { "titlescreen_initial_5",           UNDEFINED_FILENAME              },
-  { "titlescreen_1",                   UNDEFINED_FILENAME              },
-  { "titlescreen_2",                   UNDEFINED_FILENAME              },
-  { "titlescreen_3",                   UNDEFINED_FILENAME              },
-  { "titlescreen_4",                   UNDEFINED_FILENAME              },
-  { "titlescreen_5",                   UNDEFINED_FILENAME              },
-  { "titlemessage_initial_1",          UNDEFINED_FILENAME              },
-  { "titlemessage_initial_2",          UNDEFINED_FILENAME              },
-  { "titlemessage_initial_3",          UNDEFINED_FILENAME              },
-  { "titlemessage_initial_4",          UNDEFINED_FILENAME              },
-  { "titlemessage_initial_5",          UNDEFINED_FILENAME              },
-  { "titlemessage_1",                  UNDEFINED_FILENAME              },
-  { "titlemessage_2",                  UNDEFINED_FILENAME              },
-  { "titlemessage_3",                  UNDEFINED_FILENAME              },
-  { "titlemessage_4",                  UNDEFINED_FILENAME              },
-  { "titlemessage_5",                  UNDEFINED_FILENAME              },
+  { "background.titlescreen_initial_1",        UNDEFINED_FILENAME              },
+  { "background.titlescreen_initial_2",        UNDEFINED_FILENAME              },
+  { "background.titlescreen_initial_3",        UNDEFINED_FILENAME              },
+  { "background.titlescreen_initial_4",        UNDEFINED_FILENAME              },
+  { "background.titlescreen_initial_5",        UNDEFINED_FILENAME              },
+  { "background.titlescreen_1",                UNDEFINED_FILENAME              },
+  { "background.titlescreen_2",                UNDEFINED_FILENAME              },
+  { "background.titlescreen_3",                UNDEFINED_FILENAME              },
+  { "background.titlescreen_4",                UNDEFINED_FILENAME              },
+  { "background.titlescreen_5",                UNDEFINED_FILENAME              },
+  { "background.titlemessage_initial_1",UNDEFINED_FILENAME             },
+  { "background.titlemessage_initial_2",UNDEFINED_FILENAME             },
+  { "background.titlemessage_initial_3",UNDEFINED_FILENAME             },
+  { "background.titlemessage_initial_4",UNDEFINED_FILENAME             },
+  { "background.titlemessage_initial_5",UNDEFINED_FILENAME             },
+  { "background.titlemessage_1",       UNDEFINED_FILENAME              },
+  { "background.titlemessage_2",       UNDEFINED_FILENAME              },
+  { "background.titlemessage_3",       UNDEFINED_FILENAME              },
+  { "background.titlemessage_4",       UNDEFINED_FILENAME              },
+  { "background.titlemessage_5",       UNDEFINED_FILENAME              },
 
   /* there is no definition for "background.PLAYING", because this would
      prevent selecting music from music directory that is not defined in
index 2ab1461e013cb843cd3167e39ea9c92a55f573cd..1c3c5531fec7882eb16259c6c4e0fa47fcb04ef9 100644 (file)
 #define MUS_BACKGROUND                                 0
 #define MUS_BACKGROUND_TITLE_INITIAL                   1
 #define MUS_BACKGROUND_TITLE                           2
-#define MUS_BACKGROUND_MESSAGE_INITIAL                 3
-#define MUS_BACKGROUND_MESSAGE                         4
-#define MUS_BACKGROUND_MAIN                            5
-#define MUS_BACKGROUND_LEVELS                          6
-#define MUS_BACKGROUND_SCORES                          7
-#define MUS_BACKGROUND_EDITOR                          8
-#define MUS_BACKGROUND_INFO                            9
-#define MUS_BACKGROUND_SETUP                           10
-#define MUS_TITLESCREEN_INITIAL_1                      11
-#define MUS_TITLESCREEN_INITIAL_2                      12
-#define MUS_TITLESCREEN_INITIAL_3                      13
-#define MUS_TITLESCREEN_INITIAL_4                      14
-#define MUS_TITLESCREEN_INITIAL_5                      15
-#define MUS_TITLESCREEN_1                              16
-#define MUS_TITLESCREEN_2                              17
-#define MUS_TITLESCREEN_3                              18
-#define MUS_TITLESCREEN_4                              19
-#define MUS_TITLESCREEN_5                              20
-#define MUS_TITLEMESSAGE_INITIAL_1                     21
-#define MUS_TITLEMESSAGE_INITIAL_2                     22
-#define MUS_TITLEMESSAGE_INITIAL_3                     23
-#define MUS_TITLEMESSAGE_INITIAL_4                     24
-#define MUS_TITLEMESSAGE_INITIAL_5                     25
-#define MUS_TITLEMESSAGE_1                             26
-#define MUS_TITLEMESSAGE_2                             27
-#define MUS_TITLEMESSAGE_3                             28
-#define MUS_TITLEMESSAGE_4                             29
-#define MUS_TITLEMESSAGE_5                             30
+#define MUS_BACKGROUND_MAIN                            3
+#define MUS_BACKGROUND_LEVELS                          4
+#define MUS_BACKGROUND_SCORES                          5
+#define MUS_BACKGROUND_EDITOR                          6
+#define MUS_BACKGROUND_INFO                            7
+#define MUS_BACKGROUND_SETUP                           8
+#define MUS_BACKGROUND_TITLESCREEN_INITIAL_1           9
+#define MUS_BACKGROUND_TITLESCREEN_INITIAL_2           10
+#define MUS_BACKGROUND_TITLESCREEN_INITIAL_3           11
+#define MUS_BACKGROUND_TITLESCREEN_INITIAL_4           12
+#define MUS_BACKGROUND_TITLESCREEN_INITIAL_5           13
+#define MUS_BACKGROUND_TITLESCREEN_1                   14
+#define MUS_BACKGROUND_TITLESCREEN_2                   15
+#define MUS_BACKGROUND_TITLESCREEN_3                   16
+#define MUS_BACKGROUND_TITLESCREEN_4                   17
+#define MUS_BACKGROUND_TITLESCREEN_5                   18
+#define MUS_BACKGROUND_TITLEMESSAGE_INITIAL_1          19
+#define MUS_BACKGROUND_TITLEMESSAGE_INITIAL_2          20
+#define MUS_BACKGROUND_TITLEMESSAGE_INITIAL_3          21
+#define MUS_BACKGROUND_TITLEMESSAGE_INITIAL_4          22
+#define MUS_BACKGROUND_TITLEMESSAGE_INITIAL_5          23
+#define MUS_BACKGROUND_TITLEMESSAGE_1                  24
+#define MUS_BACKGROUND_TITLEMESSAGE_2                  25
+#define MUS_BACKGROUND_TITLEMESSAGE_3                  26
+#define MUS_BACKGROUND_TITLEMESSAGE_4                  27
+#define MUS_BACKGROUND_TITLEMESSAGE_5                  28
 
-#define NUM_MUSIC_FILES                                        31
+#define NUM_MUSIC_FILES                                        29
 
 #endif /* CONF_MUS_H */
index ea26f961361b437685ebf5509eb6e46f08704912..763f31d96f92a3f003ce6e5bd5b83cf4248c3aeb 100644 (file)
@@ -258,8 +258,6 @@ struct ConfigInfo sound_config[] =
 
   { "background.TITLE_INITIAL",                UNDEFINED_FILENAME              },
   { "background.TITLE",                        UNDEFINED_FILENAME              },
-  { "background.MESSAGE_INITIAL",      UNDEFINED_FILENAME              },
-  { "background.MESSAGE",              UNDEFINED_FILENAME              },
   { "background.MAIN",                 UNDEFINED_FILENAME              },
   { "background.LEVELS",               UNDEFINED_FILENAME              },
   { "background.SCORES",               "halloffame.wav"                },
@@ -268,26 +266,26 @@ struct ConfigInfo sound_config[] =
   { "background.INFO",                 UNDEFINED_FILENAME              },
   { "background.SETUP",                        UNDEFINED_FILENAME              },
 
-  { "titlescreen_initial_1",           UNDEFINED_FILENAME              },
-  { "titlescreen_initial_2",           UNDEFINED_FILENAME              },
-  { "titlescreen_initial_3",           UNDEFINED_FILENAME              },
-  { "titlescreen_initial_4",           UNDEFINED_FILENAME              },
-  { "titlescreen_initial_5",           UNDEFINED_FILENAME              },
-  { "titlescreen_1",                   UNDEFINED_FILENAME              },
-  { "titlescreen_2",                   UNDEFINED_FILENAME              },
-  { "titlescreen_3",                   UNDEFINED_FILENAME              },
-  { "titlescreen_4",                   UNDEFINED_FILENAME              },
-  { "titlescreen_5",                   UNDEFINED_FILENAME              },
-  { "titlemessage_initial_1",          UNDEFINED_FILENAME              },
-  { "titlemessage_initial_2",          UNDEFINED_FILENAME              },
-  { "titlemessage_initial_3",          UNDEFINED_FILENAME              },
-  { "titlemessage_initial_4",          UNDEFINED_FILENAME              },
-  { "titlemessage_initial_5",          UNDEFINED_FILENAME              },
-  { "titlemessage_1",                  UNDEFINED_FILENAME              },
-  { "titlemessage_2",                  UNDEFINED_FILENAME              },
-  { "titlemessage_3",                  UNDEFINED_FILENAME              },
-  { "titlemessage_4",                  UNDEFINED_FILENAME              },
-  { "titlemessage_5",                  UNDEFINED_FILENAME              },
+  { "background.titlescreen_initial_1",        UNDEFINED_FILENAME              },
+  { "background.titlescreen_initial_2",        UNDEFINED_FILENAME              },
+  { "background.titlescreen_initial_3",        UNDEFINED_FILENAME              },
+  { "background.titlescreen_initial_4",        UNDEFINED_FILENAME              },
+  { "background.titlescreen_initial_5",        UNDEFINED_FILENAME              },
+  { "background.titlescreen_1",                UNDEFINED_FILENAME              },
+  { "background.titlescreen_2",                UNDEFINED_FILENAME              },
+  { "background.titlescreen_3",                UNDEFINED_FILENAME              },
+  { "background.titlescreen_4",                UNDEFINED_FILENAME              },
+  { "background.titlescreen_5",                UNDEFINED_FILENAME              },
+  { "background.titlemessage_initial_1",UNDEFINED_FILENAME             },
+  { "background.titlemessage_initial_2",UNDEFINED_FILENAME             },
+  { "background.titlemessage_initial_3",UNDEFINED_FILENAME             },
+  { "background.titlemessage_initial_4",UNDEFINED_FILENAME             },
+  { "background.titlemessage_initial_5",UNDEFINED_FILENAME             },
+  { "background.titlemessage_1",       UNDEFINED_FILENAME              },
+  { "background.titlemessage_2",       UNDEFINED_FILENAME              },
+  { "background.titlemessage_3",       UNDEFINED_FILENAME              },
+  { "background.titlemessage_4",       UNDEFINED_FILENAME              },
+  { "background.titlemessage_5",       UNDEFINED_FILENAME              },
 
 #if 0
   { "[not used]",                      "antigrav.wav"                  },
index f6059d73e4a1c4f8e7277adcb429074fad47078a..08fe1a95735a586af88e99e9b44f84bfe2f6e808 100644 (file)
 #define SND_MENU_ITEM_SELECTING                                195
 #define SND_BACKGROUND_TITLE_INITIAL                   196
 #define SND_BACKGROUND_TITLE                           197
-#define SND_BACKGROUND_MESSAGE_INITIAL                 198
-#define SND_BACKGROUND_MESSAGE                         199
-#define SND_BACKGROUND_MAIN                            200
-#define SND_BACKGROUND_LEVELS                          201
-#define SND_BACKGROUND_SCORES                          202
-#define SND_BACKGROUND_EDITOR                          203
-#define SND_BACKGROUND_INFO                            204
-#define SND_BACKGROUND_SETUP                           205
-#define SND_TITLESCREEN_INITIAL_1                      206
-#define SND_TITLESCREEN_INITIAL_2                      207
-#define SND_TITLESCREEN_INITIAL_3                      208
-#define SND_TITLESCREEN_INITIAL_4                      209
-#define SND_TITLESCREEN_INITIAL_5                      210
-#define SND_TITLESCREEN_1                              211
-#define SND_TITLESCREEN_2                              212
-#define SND_TITLESCREEN_3                              213
-#define SND_TITLESCREEN_4                              214
-#define SND_TITLESCREEN_5                              215
-#define SND_TITLEMESSAGE_INITIAL_1                     216
-#define SND_TITLEMESSAGE_INITIAL_2                     217
-#define SND_TITLEMESSAGE_INITIAL_3                     218
-#define SND_TITLEMESSAGE_INITIAL_4                     219
-#define SND_TITLEMESSAGE_INITIAL_5                     220
-#define SND_TITLEMESSAGE_1                             221
-#define SND_TITLEMESSAGE_2                             222
-#define SND_TITLEMESSAGE_3                             223
-#define SND_TITLEMESSAGE_4                             224
-#define SND_TITLEMESSAGE_5                             225
+#define SND_BACKGROUND_MAIN                            198
+#define SND_BACKGROUND_LEVELS                          199
+#define SND_BACKGROUND_SCORES                          200
+#define SND_BACKGROUND_EDITOR                          201
+#define SND_BACKGROUND_INFO                            202
+#define SND_BACKGROUND_SETUP                           203
+#define SND_BACKGROUND_TITLESCREEN_INITIAL_1           204
+#define SND_BACKGROUND_TITLESCREEN_INITIAL_2           205
+#define SND_BACKGROUND_TITLESCREEN_INITIAL_3           206
+#define SND_BACKGROUND_TITLESCREEN_INITIAL_4           207
+#define SND_BACKGROUND_TITLESCREEN_INITIAL_5           208
+#define SND_BACKGROUND_TITLESCREEN_1                   209
+#define SND_BACKGROUND_TITLESCREEN_2                   210
+#define SND_BACKGROUND_TITLESCREEN_3                   211
+#define SND_BACKGROUND_TITLESCREEN_4                   212
+#define SND_BACKGROUND_TITLESCREEN_5                   213
+#define SND_BACKGROUND_TITLEMESSAGE_INITIAL_1          214
+#define SND_BACKGROUND_TITLEMESSAGE_INITIAL_2          215
+#define SND_BACKGROUND_TITLEMESSAGE_INITIAL_3          216
+#define SND_BACKGROUND_TITLEMESSAGE_INITIAL_4          217
+#define SND_BACKGROUND_TITLEMESSAGE_INITIAL_5          218
+#define SND_BACKGROUND_TITLEMESSAGE_1                  219
+#define SND_BACKGROUND_TITLEMESSAGE_2                  220
+#define SND_BACKGROUND_TITLEMESSAGE_3                  221
+#define SND_BACKGROUND_TITLEMESSAGE_4                  222
+#define SND_BACKGROUND_TITLEMESSAGE_5                  223
 
-#define NUM_SOUND_FILES                                        226
+#define NUM_SOUND_FILES                                        224
 
 #endif /* CONF_SND_H */
index f8ddce17d3355211218715f80ee90b7ba288db24..ed053adf921a61b9ee875b667f51c35072b95f5c 100644 (file)
 
 struct TokenIntPtrInfo image_config_vars[] =
 {
+  {
+    "[titlemessage_initial].x",
+    &titlemessage_initial_default.x
+  },
+  {
+    "[titlemessage_initial].y",
+    &titlemessage_initial_default.y
+  },
+  {
+    "[titlemessage_initial].width",
+    &titlemessage_initial_default.width
+  },
+  {
+    "[titlemessage_initial].height",
+    &titlemessage_initial_default.height
+  },
+  {
+    "[titlemessage_initial].chars",
+    &titlemessage_initial_default.chars
+  },
+  {
+    "[titlemessage_initial].lines",
+    &titlemessage_initial_default.lines
+  },
+  {
+    "[titlemessage_initial].align",
+    &titlemessage_initial_default.align
+  },
+  {
+    "[titlemessage_initial].valign",
+    &titlemessage_initial_default.valign
+  },
+  {
+    "[titlemessage_initial].font",
+    &titlemessage_initial_default.font
+  },
+  {
+    "[titlemessage_initial].autowrap",
+    &titlemessage_initial_default.autowrap
+  },
+  {
+    "[titlemessage_initial].centered",
+    &titlemessage_initial_default.centered
+  },
+  {
+    "[titlemessage_initial].skip_comments",
+    &titlemessage_initial_default.skip_comments
+  },
+  {
+    "[titlemessage_initial].sort_priority",
+    &titlemessage_initial_default.sort_priority
+  },
+  {
+    "[titlemessage].x",
+    &titlemessage_default.x
+  },
+  {
+    "[titlemessage].y",
+    &titlemessage_default.y
+  },
+  {
+    "[titlemessage].width",
+    &titlemessage_default.width
+  },
+  {
+    "[titlemessage].height",
+    &titlemessage_default.height
+  },
+  {
+    "[titlemessage].chars",
+    &titlemessage_default.chars
+  },
+  {
+    "[titlemessage].lines",
+    &titlemessage_default.lines
+  },
+  {
+    "[titlemessage].align",
+    &titlemessage_default.align
+  },
+  {
+    "[titlemessage].valign",
+    &titlemessage_default.valign
+  },
+  {
+    "[titlemessage].font",
+    &titlemessage_default.font
+  },
+  {
+    "[titlemessage].autowrap",
+    &titlemessage_default.autowrap
+  },
+  {
+    "[titlemessage].centered",
+    &titlemessage_default.centered
+  },
+  {
+    "[titlemessage].skip_comments",
+    &titlemessage_default.skip_comments
+  },
+  {
+    "[titlemessage].sort_priority",
+    &titlemessage_default.sort_priority
+  },
   {
     "titlemessage_initial_1.x",
     &titlemessage_initial[0].x
index cdb199ce4f9c06b844a59b837c53d550a64bd423..ad38c00e6c564ee49ac8cf86af45fa6a32a6c0ce 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2007-03-17 21:32"
+#define COMPILE_DATE_STRING "2007-03-18 20:13"
index 979bd4f63620fb537568585205cda1fb597920ac..a0389f4353bec975aedd718cb059a7f718bca2e5 100644 (file)
@@ -8350,8 +8350,39 @@ static int get_token_parameter_value(char *token, char *value_raw)
 
 static void LoadSpecialMenuDesignSettingsFromFilename(char *filename)
 {
+  static struct TitleMessageInfo tmi;
+  static struct TokenInfo titlemessage_tokens[] =
+  {
+    { TYPE_INTEGER,    &tmi.x,                 ".x"                    },
+    { TYPE_INTEGER,    &tmi.y,                 ".y"                    },
+    { TYPE_INTEGER,    &tmi.width,             ".width"                },
+    { TYPE_INTEGER,    &tmi.height,            ".height"               },
+    { TYPE_INTEGER,    &tmi.chars,             ".chars"                },
+    { TYPE_INTEGER,    &tmi.lines,             ".lines"                },
+    { TYPE_INTEGER,    &tmi.align,             ".align"                },
+    { TYPE_INTEGER,    &tmi.valign,            ".valign"               },
+    { TYPE_INTEGER,    &tmi.font,              ".font"                 },
+    { TYPE_BOOLEAN,    &tmi.autowrap,          ".autowrap"             },
+    { TYPE_BOOLEAN,    &tmi.centered,          ".centered"             },
+    { TYPE_BOOLEAN,    &tmi.skip_comments,     ".skip_comments"        },
+    { TYPE_INTEGER,    &tmi.sort_priority,     ".sort_priority"        },
+
+    { -1,              NULL,                   NULL                    }
+  };
+  static struct
+  {
+    struct TitleMessageInfo *array;
+    char *text;
+  }
+  titlemessage_arrays[] =
+  {
+    { titlemessage_initial,            "[titlemessage_initial]"        },
+    { titlemessage,                    "[titlemessage]"                },
+
+    { NULL,                            NULL                            }
+  };
   SetupFileHash *setup_file_hash;
-  int i;
+  int i, j, k;
 
 #if 0
   printf("LoadSpecialMenuDesignSettings from file '%s' ...\n", filename);
@@ -8363,28 +8394,60 @@ static void LoadSpecialMenuDesignSettingsFromFilename(char *filename)
   /* special case: initialize with default values that may be overwritten */
   for (i = 0; i < NUM_SPECIAL_GFX_ARGS; i++)
   {
-    char *value_x = getHashEntry(setup_file_hash, "menu.draw_xoffset");
-    char *value_y = getHashEntry(setup_file_hash, "menu.draw_yoffset");
-    char *list_size = getHashEntry(setup_file_hash, "menu.list_size");
+    char *value_1 = getHashEntry(setup_file_hash, "menu.draw_xoffset");
+    char *value_2 = getHashEntry(setup_file_hash, "menu.draw_yoffset");
+    char *value_3 = getHashEntry(setup_file_hash, "menu.list_size");
 
-    if (value_x != NULL)
-      menu.draw_xoffset[i] = get_integer_from_string(value_x);
-    if (value_y != NULL)
-      menu.draw_yoffset[i] = get_integer_from_string(value_y);
-    if (list_size != NULL)
-      menu.list_size[i] = get_integer_from_string(list_size);
+    if (value_1 != NULL)
+      menu.draw_xoffset[i] = get_integer_from_string(value_1);
+    if (value_2 != NULL)
+      menu.draw_yoffset[i] = get_integer_from_string(value_2);
+    if (value_3 != NULL)
+      menu.list_size[i] = get_integer_from_string(value_3);
   }
 
   /* special case: initialize with default values that may be overwritten */
   for (i = 0; i < NUM_SPECIAL_GFX_INFO_ARGS; i++)
   {
-    char *value_x = getHashEntry(setup_file_hash, "menu.draw_xoffset.INFO");
-    char *value_y = getHashEntry(setup_file_hash, "menu.draw_yoffset.INFO");
+    char *value_1 = getHashEntry(setup_file_hash, "menu.draw_xoffset.INFO");
+    char *value_2 = getHashEntry(setup_file_hash, "menu.draw_yoffset.INFO");
+
+    if (value_1 != NULL)
+      menu.draw_xoffset_info[i] = get_integer_from_string(value_1);
+    if (value_2 != NULL)
+      menu.draw_yoffset_info[i] = get_integer_from_string(value_2);
+  }
+
+  /* special case: initialize with default values that may be overwritten */
+  for (i = 0; titlemessage_arrays[i].array != NULL; i++)
+  {
+    struct TitleMessageInfo *array = titlemessage_arrays[i].array;
+    char *base_token = titlemessage_arrays[i].text;
 
-    if (value_x != NULL)
-      menu.draw_xoffset_info[i] = get_integer_from_string(value_x);
-    if (value_y != NULL)
-      menu.draw_yoffset_info[i] = get_integer_from_string(value_y);
+    for (j = 0; titlemessage_tokens[j].type != -1; j++)
+    {
+      char *token = getStringCat2(base_token, titlemessage_tokens[j].text);
+      char *value = getHashEntry(setup_file_hash, token);
+
+      if (value != NULL)
+      {
+       int parameter_value = get_token_parameter_value(token, value);
+
+       for (k = 0; k < MAX_NUM_TITLE_MESSAGES; k++)
+       {
+         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;
+
+         array[k] = tmi;
+       }
+      }
+
+      free(token);
+    }
   }
 
   /* read (and overwrite with) values that may be specified in config file */
index 7ec7446a70f767802e4cfd2c7ee51ecc72948443..cb5e0661f67ca81ba7436e657e8b7ef9d2c3f4bd 100644 (file)
@@ -1290,8 +1290,6 @@ static void InitGraphicInfo()
     IMG_BACKGROUND,
     IMG_BACKGROUND_TITLE_INITIAL,
     IMG_BACKGROUND_TITLE,
-    IMG_BACKGROUND_MESSAGE_INITIAL,
-    IMG_BACKGROUND_MESSAGE,
     IMG_BACKGROUND_MAIN,
     IMG_BACKGROUND_LEVELS,
     IMG_BACKGROUND_SCORES,
index f49c8c6b776b602443fb303504a422ce96c34995..4640ac833e6bb6ec87ab9bf3c42cf35210d456ed 100644 (file)
@@ -107,7 +107,9 @@ struct GameInfo             game;
 struct GlobalInfo      global;
 struct BorderInfo      border;
 struct TitleInfo       title;
+struct TitleMessageInfo        titlemessage_initial_default;
 struct TitleMessageInfo        titlemessage_initial[MAX_NUM_TITLE_MESSAGES];
+struct TitleMessageInfo        titlemessage_default;
 struct TitleMessageInfo        titlemessage[MAX_NUM_TITLE_MESSAGES];
 struct TitleMessageInfo        readme;
 struct MenuInfo                menu;
@@ -5364,8 +5366,6 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
   { ".[DEFAULT]",              GFX_SPECIAL_ARG_DEFAULT,                },
   { ".TITLE_INITIAL",          GFX_SPECIAL_ARG_TITLE_INITIAL,          },
   { ".TITLE",                  GFX_SPECIAL_ARG_TITLE,                  },
-  { ".MESSAGE_INITIAL",                GFX_SPECIAL_ARG_MESSAGE_INITIAL,        },
-  { ".MESSAGE",                        GFX_SPECIAL_ARG_MESSAGE,                },
   { ".MAIN",                   GFX_SPECIAL_ARG_MAIN,                   },
   { ".LEVELS",                 GFX_SPECIAL_ARG_LEVELS                  },
   { ".SCORES",                 GFX_SPECIAL_ARG_SCORES,                 },
index 29858c32dcef67d2f7b7d42f2ecd0e4efb874158..a0aec463f55aa7f2b4f6bf8114562811a859b113 100644 (file)
 #define GFX_SPECIAL_ARG_DEFAULT                0
 #define GFX_SPECIAL_ARG_TITLE_INITIAL  1
 #define GFX_SPECIAL_ARG_TITLE          2
-#define GFX_SPECIAL_ARG_MESSAGE_INITIAL        3
-#define GFX_SPECIAL_ARG_MESSAGE                4
-#define GFX_SPECIAL_ARG_MAIN           5
-#define GFX_SPECIAL_ARG_LEVELS         6
-#define GFX_SPECIAL_ARG_SCORES         7
-#define GFX_SPECIAL_ARG_EDITOR         8
-#define GFX_SPECIAL_ARG_INFO           9
-#define GFX_SPECIAL_ARG_SETUP          10
-#define GFX_SPECIAL_ARG_PLAYING                11
-#define GFX_SPECIAL_ARG_DOOR           12
-#define GFX_SPECIAL_ARG_PREVIEW                13
-#define GFX_SPECIAL_ARG_CRUMBLED       14
-
-#define NUM_SPECIAL_GFX_ARGS           15
+#define GFX_SPECIAL_ARG_MAIN           3
+#define GFX_SPECIAL_ARG_LEVELS         4
+#define GFX_SPECIAL_ARG_SCORES         5
+#define GFX_SPECIAL_ARG_EDITOR         6
+#define GFX_SPECIAL_ARG_INFO           7
+#define GFX_SPECIAL_ARG_SETUP          8
+#define GFX_SPECIAL_ARG_PLAYING                9
+#define GFX_SPECIAL_ARG_DOOR           10
+#define GFX_SPECIAL_ARG_PREVIEW                11
+#define GFX_SPECIAL_ARG_CRUMBLED       12
+
+#define NUM_SPECIAL_GFX_ARGS           13
 
 /* these additional definitions are currently only used for draw offsets */
 #define GFX_SPECIAL_ARG_INFO_MAIN      0
 #define GAME_MODE_DEFAULT              0
 #define GAME_MODE_TITLE_INITIAL                1
 #define GAME_MODE_TITLE                        2
-#define GAME_MODE_MESSAGE_INITIAL      3
-#define GAME_MODE_MESSAGE              4
-#define GAME_MODE_MAIN                 5
-#define GAME_MODE_LEVELS               6
-#define GAME_MODE_SCORES               7
-#define GAME_MODE_EDITOR               8
-#define GAME_MODE_INFO                 9
-#define GAME_MODE_SETUP                        10
-#define GAME_MODE_PLAYING              11
-#define GAME_MODE_PSEUDO_DOOR          12
-#define GAME_MODE_PSEUDO_PREVIEW       13
-#define GAME_MODE_PSEUDO_CRUMBLED      14
+#define GAME_MODE_MAIN                 3
+#define GAME_MODE_LEVELS               4
+#define GAME_MODE_SCORES               5
+#define GAME_MODE_EDITOR               6
+#define GAME_MODE_INFO                 7
+#define GAME_MODE_SETUP                        8
+#define GAME_MODE_PLAYING              9
+#define GAME_MODE_PSEUDO_DOOR          10
+#define GAME_MODE_PSEUDO_PREVIEW       11
+#define GAME_MODE_PSEUDO_CRUMBLED      12
 
 /* there are no special config file suffixes for these modes */
-#define GAME_MODE_PSEUDO_TYPENAME      15
-#define GAME_MODE_QUIT                 16
+#define GAME_MODE_PSEUDO_TYPENAME      13
+#define GAME_MODE_QUIT                 14
 
 /* special definitions currently only used for custom artwork configuration */
 #define MUSIC_PREFIX_BACKGROUND                0
@@ -2689,7 +2685,9 @@ extern struct TapeInfo            tape;
 extern struct GlobalInfo       global;
 extern struct BorderInfo       border;
 extern struct TitleInfo                title;
+extern struct TitleMessageInfo titlemessage_initial_default;
 extern struct TitleMessageInfo titlemessage_initial[];
+extern struct TitleMessageInfo titlemessage_default;
 extern struct TitleMessageInfo titlemessage[];
 extern struct TitleMessageInfo readme;
 extern struct MenuInfo         menu;
index 5ae63dadb26b462a20d6526db4e8dfe3f04dd793..5c8baa818d64dc46dadc2dff2881631266a40bc2 100644 (file)
@@ -503,28 +503,51 @@ static int getTitleScreenGameMode(boolean initial)
 
 static int getTitleMessageGameMode(boolean initial)
 {
-  return (initial ? GAME_MODE_MESSAGE_INITIAL : GAME_MODE_MESSAGE);
+  return (initial ? GAME_MODE_TITLE_INITIAL : GAME_MODE_TITLE);
 }
 
+#if 0
 static int getTitleScreenBackground(boolean initial)
 {
   return (initial ? IMG_BACKGROUND_TITLE_INITIAL : IMG_BACKGROUND_TITLE);
 }
+#endif
 
-static int getTitleMessageBackground(boolean initial)
+#if 0
+static int getTitleMessageBackground(int nr, boolean initial)
 {
-  return (initial ? IMG_BACKGROUND_MESSAGE_INITIAL : IMG_BACKGROUND_MESSAGE);
+  return (initial ? IMG_BACKGROUND_TITLE_INITIAL : IMG_BACKGROUND_TITLE);
 }
+#endif
 
-static int getTitleSound(int nr, boolean initial, boolean is_image)
+static int getTitleBackground(int nr, boolean initial, boolean is_image)
 {
-  int mode = (is_image ?
-             (initial ? GAME_MODE_TITLE_INITIAL   : GAME_MODE_TITLE) :
-             (initial ? GAME_MODE_MESSAGE_INITIAL : GAME_MODE_MESSAGE));
   int base = (is_image ?
-             (initial ? SND_TITLESCREEN_INITIAL_1  : SND_TITLESCREEN_1) :
-             (initial ? SND_TITLEMESSAGE_INITIAL_1 : SND_TITLEMESSAGE_1));
+             (initial ? IMG_BACKGROUND_TITLESCREEN_INITIAL_1 :
+                        IMG_BACKGROUND_TITLESCREEN_1) :
+             (initial ? IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1 :
+                        IMG_BACKGROUND_TITLEMESSAGE_1));
+  int graphic_global = (initial ? IMG_BACKGROUND_TITLE_INITIAL :
+                                 IMG_BACKGROUND_TITLE);
+  int graphic_local = base + nr;
+
+  if (graphic_info[graphic_local].bitmap != NULL)
+    return graphic_local;
 
+  if (graphic_info[graphic_global].bitmap != NULL)
+    return graphic_global;
+
+  return IMG_UNDEFINED;
+}
+
+static int getTitleSound(int nr, boolean initial, boolean is_image)
+{
+  int mode = (initial ? GAME_MODE_TITLE_INITIAL : GAME_MODE_TITLE);
+  int base = (is_image ?
+             (initial ? SND_BACKGROUND_TITLESCREEN_INITIAL_1 :
+                        SND_BACKGROUND_TITLESCREEN_1) :
+             (initial ? SND_BACKGROUND_TITLEMESSAGE_INITIAL_1 :
+                        SND_BACKGROUND_TITLEMESSAGE_1));
   int sound_global = menu.sound[mode];
   int sound_local = base + nr;
 
@@ -546,13 +569,12 @@ static int getTitleSound(int nr, boolean initial, boolean is_image)
 
 static int getTitleMusic(int nr, boolean initial, boolean is_image)
 {
-  int mode = (is_image ?
-             (initial ? GAME_MODE_TITLE_INITIAL   : GAME_MODE_TITLE) :
-             (initial ? GAME_MODE_MESSAGE_INITIAL : GAME_MODE_MESSAGE));
+  int mode = (initial ? GAME_MODE_TITLE_INITIAL : GAME_MODE_TITLE);
   int base = (is_image ?
-             (initial ? MUS_TITLESCREEN_INITIAL_1  : MUS_TITLESCREEN_1) :
-             (initial ? MUS_TITLEMESSAGE_INITIAL_1 : MUS_TITLEMESSAGE_1));
-
+             (initial ? MUS_BACKGROUND_TITLESCREEN_INITIAL_1 :
+                        MUS_BACKGROUND_TITLESCREEN_1) :
+             (initial ? MUS_BACKGROUND_TITLEMESSAGE_INITIAL_1 :
+                        MUS_BACKGROUND_TITLEMESSAGE_1));
   int music_global = menu.music[mode];
   int music_local = base + nr;
 
@@ -1009,7 +1031,7 @@ void DrawTitleScreenImage(int nr, boolean initial)
   dst_y = (WIN_YSIZE - height) / 2;
 
   SetDrawBackgroundMask(REDRAW_ALL);
-  SetWindowBackgroundImage(getTitleScreenBackground(initial));
+  SetWindowBackgroundImage(getTitleBackground(nr, initial, TRUE));
 
   ClearRectangleOnBackground(drawto, 0, 0, WIN_XSIZE, WIN_YSIZE);
 
@@ -1054,7 +1076,7 @@ void DrawTitleScreenMessage(int nr, boolean initial)
   if (filename == NULL)
     return;
 
-  /* force MESSAGE font on title message screen */
+  /* force TITLE font on title message screen */
   game_status = getTitleMessageGameMode(initial);
 
   /* if chars set to "-1", automatically determine by text and font width */
@@ -1070,7 +1092,7 @@ void DrawTitleScreenMessage(int nr, boolean initial)
     tmi->height = tmi->lines * getFontHeight(tmi->font);
 
   SetDrawBackgroundMask(REDRAW_ALL);
-  SetWindowBackgroundImage(getTitleMessageBackground(initial));
+  SetWindowBackgroundImage(getTitleBackground(nr, initial, FALSE));
 
   ClearRectangleOnBackground(drawto, 0, 0, WIN_XSIZE, WIN_YSIZE);