added definitions for upcoming new name selection screen
authorHolger Schemel <info@artsoft.org>
Wed, 30 Sep 2020 21:45:42 +0000 (23:45 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 13 Dec 2020 23:57:56 +0000 (00:57 +0100)
src/anim.c
src/conf_gfx.c
src/conf_mus.c
src/conf_snd.c
src/events.c
src/init.c
src/main.c
src/main.h
src/screens.c
src/tools.c

index 01434554fc94a36b62ba966044442355baef48ee..f109b874f39b75b0109e8d18af437e2f995a6e86 100644 (file)
@@ -178,10 +178,13 @@ struct GameModeAnimClass
   { GAME_MODE_TITLE_3,                 ANIM_CLASS_TITLE                },
   { GAME_MODE_TITLE_4,                 ANIM_CLASS_TITLE                },
   { GAME_MODE_TITLE_5,                 ANIM_CLASS_TITLE                },
+  { GAME_MODE_NAMES,                   ANIM_CLASS_TOONS_MENU_SUBMENU   },
   { GAME_MODE_LEVELS,                  ANIM_CLASS_TOONS_MENU_SUBMENU   },
   { GAME_MODE_LEVELNR,                 ANIM_CLASS_TOONS_MENU_SUBMENU   },
   { GAME_MODE_INFO,                    ANIM_CLASS_TOONS_MENU_SUBMENU   },
   { GAME_MODE_SETUP,                   ANIM_CLASS_TOONS_MENU_SUBMENU   },
+  { GAME_MODE_PSEUDO_NAMESONLY,                ANIM_CLASS_TOONS_MENU_SUBMENU   },
+  { GAME_MODE_PSEUDO_TYPENAMES,                ANIM_CLASS_TOONS_MENU_SUBMENU   },
   { GAME_MODE_PSEUDO_MAINONLY,         ANIM_CLASS_TOONS_MENU_MAIN      },
   { GAME_MODE_PSEUDO_TYPENAME,         ANIM_CLASS_TOONS_MENU_MAIN      },
   { GAME_MODE_PSEUDO_SCORESOLD,                ANIM_CLASS_TOONS_SCORES         },
@@ -642,9 +645,11 @@ static void DrawGlobalAnimationsExt(int drawing_target, int drawing_stage)
     if (drawing_target == DRAW_TO_FADE_TARGET)
       after_fading = TRUE;
 
-    // special case: changing from/to this screen is done without fading
-    if (global.anim_status == GAME_MODE_PSEUDO_TYPENAME ||
-       anim_status_last   == GAME_MODE_PSEUDO_TYPENAME)
+    // special case: changing from/to these screens is done without fading
+    if (global.anim_status == GAME_MODE_PSEUDO_TYPENAME  ||
+       global.anim_status == GAME_MODE_PSEUDO_TYPENAMES ||
+       anim_status_last   == GAME_MODE_PSEUDO_TYPENAME  ||
+       anim_status_last   == GAME_MODE_PSEUDO_TYPENAMES)
       after_fading = TRUE;
 
     // ---------- part 1 ------------------------------------------------------
index 20f3f1cb265ea42ddfc4d14d0e6c5a15026f1134..b46c8c5a0857fe8d5a5b013d78b3422465126ecd 100644 (file)
@@ -6457,6 +6457,8 @@ struct ConfigInfo image_config[] =
   { "font.text_1.LEVELNR.clone_from",          "font.text_1.LEVELS"    },
   { "font.text_1.SETUP",                       UNDEFINED_FILENAME      },
   { "font.text_1.SETUP.clone_from",            "font.text_1.LEVELS"    },
+  { "font.text_1.NAMES",                       UNDEFINED_FILENAME      },
+  { "font.text_1.NAMES.clone_from",            "font.input_1.MAIN"     },
   { "font.text_1.PREVIEW",                     "RocksFontEM.png"       },
   { "font.text_1.PREVIEW.x",                   "0"                     },
   { "font.text_1.PREVIEW.y",                   "160"                   },
@@ -6492,6 +6494,8 @@ struct ConfigInfo image_config[] =
   { "font.text_2.LEVELNR.clone_from",          "font.text_2.LEVELS"    },
   { "font.text_2.SETUP",                       UNDEFINED_FILENAME      },
   { "font.text_2.SETUP.clone_from",            "font.text_2.LEVELS"    },
+  { "font.text_2.NAMES",                       UNDEFINED_FILENAME      },
+  { "font.text_2.NAMES.clone_from",            "font.option_off"       },
   { "font.text_2.PREVIEW",                     "RocksFontEM.png"       },
   { "font.text_2.PREVIEW.x",                   "0"                     },
   { "font.text_2.PREVIEW.y",                   "160"                   },
@@ -6521,6 +6525,8 @@ struct ConfigInfo image_config[] =
   { "font.text_3.LEVELNR.clone_from",          "font.text_3.LEVELS"    },
   { "font.text_3.SETUP",                       UNDEFINED_FILENAME      },
   { "font.text_3.SETUP.clone_from",            "font.text_3.LEVELS"    },
+  { "font.text_3.NAMES",                       UNDEFINED_FILENAME      },
+  { "font.text_3.NAMES.clone_from",            "font.menu_1"           },
   { "font.text_3.PREVIEW",                     "RocksFontEM.png"       },
   { "font.text_3.PREVIEW.x",                   "0"                     },
   { "font.text_3.PREVIEW.y",                   "160"                   },
@@ -6552,6 +6558,8 @@ struct ConfigInfo image_config[] =
   { "font.text_4.LEVELNR.clone_from",          "font.text_4.LEVELS"    },
   { "font.text_4.SETUP",                       UNDEFINED_FILENAME      },
   { "font.text_4.SETUP.clone_from",            "font.text_4.LEVELS"    },
+  { "font.text_4.NAMES",                       UNDEFINED_FILENAME      },
+  { "font.text_4.NAMES.clone_from",            "font.menu_1.active"    },
   { "font.text_4.SCORES",                      "RocksFontMedium.png"   },
   { "font.text_4.SCORES.x",                    "0"                     },
   { "font.text_4.SCORES.y",                    "480"                   },
@@ -6600,6 +6608,8 @@ struct ConfigInfo image_config[] =
   { "font.input_1.MAIN.y",                     "0"                     },
   { "font.input_1.MAIN.width",                 "32"                    },
   { "font.input_1.MAIN.height",                        "32"                    },
+  { "font.input_1.NAMES",                      UNDEFINED_FILENAME      },
+  { "font.input_1.NAMES.clone_from",           "font.input_1.MAIN"     },
   { "font.input_1.active",                     "RocksFontSmall.png"    },
   { "font.input_1.active.x",                   "0"                     },
   { "font.input_1.active.y",                   "210"                   },
@@ -6610,6 +6620,8 @@ struct ConfigInfo image_config[] =
   { "font.input_1.active.MAIN.y",              "480"                   },
   { "font.input_1.active.MAIN.width",          "32"                    },
   { "font.input_1.active.MAIN.height",         "32"                    },
+  { "font.input_1.active.NAMES",               UNDEFINED_FILENAME      },
+  { "font.input_1.active.NAMES.clone_from",    "font.input_1.MAIN"     },
   { "font.input_1.active.SETUP",               "RocksFontBig.png"      },
   { "font.input_1.active.SETUP.x",             "0"                     },
   { "font.input_1.active.SETUP.y",             "0"                     },
@@ -7178,6 +7190,7 @@ struct ConfigInfo image_config[] =
   { "background.TITLE_INITIAL",                        UNDEFINED_FILENAME      },
   { "background.TITLE",                                UNDEFINED_FILENAME      },
   { "background.MAIN",                         UNDEFINED_FILENAME      },
+  { "background.NAMES",                                UNDEFINED_FILENAME      },
   { "background.LEVELS",                       UNDEFINED_FILENAME      },
   { "background.LEVELNR",                      UNDEFINED_FILENAME      },
   { "background.SCORES",                       UNDEFINED_FILENAME      },
@@ -7701,6 +7714,7 @@ struct ConfigInfo image_config[] =
 
   { "border.draw_masked.TITLE",                        "false"                 },
   { "border.draw_masked.MAIN",                 "false"                 },
+  { "border.draw_masked.NAMES",                        "false"                 },
   { "border.draw_masked.LEVELS",               "false"                 },
   { "border.draw_masked.LEVELNR",              "false"                 },
   { "border.draw_masked.SCORES",               "false"                 },
@@ -7779,6 +7793,8 @@ struct ConfigInfo image_config[] =
   { "menu.draw_yoffset",                       "0"                     },
   { "menu.draw_xoffset.MAIN",                  "0"                     },
   { "menu.draw_yoffset.MAIN",                  "0"                     },
+  { "menu.draw_xoffset.NAMES",                 "0"                     },
+  { "menu.draw_yoffset.NAMES",                 "0"                     },
   { "menu.draw_xoffset.LEVELS",                        "0"                     },
   { "menu.draw_yoffset.LEVELS",                        "0"                     },
   { "menu.draw_xoffset.LEVELNR",               "0"                     },
@@ -7844,6 +7860,7 @@ struct ConfigInfo image_config[] =
   { "menu.list.SETUP[CHOOSE_OTHER].valign",    "top"                   },
 
   { "menu.list_size",                          "-1"                    },
+  { "menu.list_size.NAMES",                    "-1"                    },
   { "menu.list_size.LEVELS",                   "-1"                    },
   { "menu.list_size.LEVELNR",                  "-1"                    },
   { "menu.list_size.SCORES",                   "-1"                    },
index 08ccd659b0f9d0280a91b007bf01f02f0c94c792..d11a5bff1b4a402e5a7f9e545547fbbcaadac3b3 100644 (file)
@@ -30,6 +30,7 @@ struct ConfigInfo music_config[] =
   { "background.TITLE_INITIAL",                UNDEFINED_FILENAME              },
   { "background.TITLE",                        UNDEFINED_FILENAME              },
   { "background.MAIN",                 UNDEFINED_FILENAME              },
+  { "background.NAMES",                        UNDEFINED_FILENAME              },
   { "background.LEVELS",               UNDEFINED_FILENAME              },
   { "background.LEVELNR",              UNDEFINED_FILENAME              },
   { "background.SCORES",               UNDEFINED_FILENAME              },
index 83867110c0120d98d7fb94e6e2d20a16a7af9c7c..eacaf778e52e2fff8bdc97946fdf0970fae12917 100644 (file)
@@ -315,6 +315,7 @@ struct ConfigInfo sound_config[] =
   { "background.TITLE_INITIAL",                UNDEFINED_FILENAME              },
   { "background.TITLE",                        UNDEFINED_FILENAME              },
   { "background.MAIN",                 UNDEFINED_FILENAME              },
+  { "background.NAMES",                        UNDEFINED_FILENAME              },
   { "background.LEVELS",               UNDEFINED_FILENAME              },
   { "background.LEVELNR",              UNDEFINED_FILENAME              },
   { "background.SCORES",               "halloffame.wav"                },
index f2f645933e6be727a2e8bb39a4637fffe4740e59..b4f7594837de7fedf1a1cb8b93260437e4605962 100644 (file)
@@ -2547,6 +2547,7 @@ void HandleJoystick(void)
   }
 
   if (newbutton && (game_status == GAME_MODE_PSEUDO_TYPENAME ||
+                   game_status == GAME_MODE_PSEUDO_TYPENAMES ||
                    anyTextGadgetActive()))
   {
     // leave name input in main menu or text input gadget
index 44b0a5cbb10da6c37d001c37d0818bad679d1abe..008db40cde459a4aba01585457d4ebd8187d4055 100644 (file)
@@ -333,6 +333,8 @@ static int getFontBitmapID(int font_nr)
     special = game_status;
   else if (game_status == GAME_MODE_PSEUDO_TYPENAME)
     special = GFX_SPECIAL_ARG_MAIN;
+  else if (game_status == GAME_MODE_PSEUDO_TYPENAMES)
+    special = GFX_SPECIAL_ARG_NAMES;
 
   if (special != -1)
     return font_info[font_nr].special_bitmap_id[special];
@@ -1695,6 +1697,7 @@ static void InitGraphicInfo(void)
     IMG_BACKGROUND_TITLE_INITIAL,
     IMG_BACKGROUND_TITLE,
     IMG_BACKGROUND_MAIN,
+    IMG_BACKGROUND_NAMES,
     IMG_BACKGROUND_LEVELS,
     IMG_BACKGROUND_LEVELNR,
     IMG_BACKGROUND_SCORES,
index 1a4243f98dae958e5ddf865d0e50399c01a7a229..650d626d14c4a34aa8285cde08d1d1d17389328b 100644 (file)
@@ -7416,6 +7416,7 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
   { ".TITLE_4",                        GFX_SPECIAL_ARG_TITLE_4,                },
   { ".TITLE_5",                        GFX_SPECIAL_ARG_TITLE_5,                },
   { ".MAIN",                   GFX_SPECIAL_ARG_MAIN,                   },
+  { ".NAMES",                  GFX_SPECIAL_ARG_NAMES,                  },
   { ".LEVELS",                 GFX_SPECIAL_ARG_LEVELS                  },
   { ".LEVELNR",                        GFX_SPECIAL_ARG_LEVELNR                 },
   { ".SCORES",                 GFX_SPECIAL_ARG_SCORES,                 },
@@ -7429,7 +7430,9 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
   { ".PREVIEW",                        GFX_SPECIAL_ARG_PREVIEW,                },
   { ".CRUMBLED",               GFX_SPECIAL_ARG_CRUMBLED,               },
   { ".MAINONLY",               GFX_SPECIAL_ARG_MAINONLY,               },
+  { ".NAMESONLY",              GFX_SPECIAL_ARG_NAMESONLY,              },
   { ".TYPENAME",               GFX_SPECIAL_ARG_TYPENAME,               },
+  { ".TYPENAMES",              GFX_SPECIAL_ARG_TYPENAMES,              },
   { ".SUBMENU",                        GFX_SPECIAL_ARG_SUBMENU,                },
   { ".MENU",                   GFX_SPECIAL_ARG_MENU,                   },
   { ".TOONS",                  GFX_SPECIAL_ARG_TOONS,                  },
index 4452a9bdc0f7bf2996f26156b7f06741b02e883f..f0e559a5f280c1d652daf6aa7df12b6825bfc5e3 100644 (file)
@@ -2279,6 +2279,7 @@ enum
   GFX_SPECIAL_ARG_TITLE_4,
   GFX_SPECIAL_ARG_TITLE_5,
   GFX_SPECIAL_ARG_MAIN,
+  GFX_SPECIAL_ARG_NAMES,
   GFX_SPECIAL_ARG_LEVELS,
   GFX_SPECIAL_ARG_LEVELNR,
   GFX_SPECIAL_ARG_SCORES,
@@ -2292,7 +2293,9 @@ enum
   GFX_SPECIAL_ARG_PREVIEW,
   GFX_SPECIAL_ARG_CRUMBLED,
   GFX_SPECIAL_ARG_MAINONLY,
+  GFX_SPECIAL_ARG_NAMESONLY,
   GFX_SPECIAL_ARG_TYPENAME,
+  GFX_SPECIAL_ARG_TYPENAMES,
   GFX_SPECIAL_ARG_SUBMENU,
   GFX_SPECIAL_ARG_MENU,
   GFX_SPECIAL_ARG_TOONS,
@@ -2527,6 +2530,7 @@ enum
 #define GAME_MODE_TITLE_4              GFX_SPECIAL_ARG_TITLE_4
 #define GAME_MODE_TITLE_5              GFX_SPECIAL_ARG_TITLE_5
 #define GAME_MODE_MAIN                 GFX_SPECIAL_ARG_MAIN
+#define GAME_MODE_NAMES                        GFX_SPECIAL_ARG_NAMES
 #define GAME_MODE_LEVELS               GFX_SPECIAL_ARG_LEVELS
 #define GAME_MODE_LEVELNR              GFX_SPECIAL_ARG_LEVELNR
 #define GAME_MODE_SCORES               GFX_SPECIAL_ARG_SCORES
@@ -2540,7 +2544,9 @@ enum
 #define GAME_MODE_PSEUDO_PREVIEW       GFX_SPECIAL_ARG_PREVIEW
 #define GAME_MODE_PSEUDO_CRUMBLED      GFX_SPECIAL_ARG_CRUMBLED
 #define GAME_MODE_PSEUDO_MAINONLY      GFX_SPECIAL_ARG_MAINONLY
+#define GAME_MODE_PSEUDO_NAMESONLY     GFX_SPECIAL_ARG_NAMESONLY
 #define GAME_MODE_PSEUDO_TYPENAME      GFX_SPECIAL_ARG_TYPENAME
+#define GAME_MODE_PSEUDO_TYPENAMES     GFX_SPECIAL_ARG_TYPENAMES
 #define GAME_MODE_PSEUDO_SUBMENU       GFX_SPECIAL_ARG_SUBMENU
 #define GAME_MODE_PSEUDO_MENU          GFX_SPECIAL_ARG_MENU
 #define GAME_MODE_PSEUDO_TOONS         GFX_SPECIAL_ARG_TOONS
index 16a3fc1b77b8e2e57758487aa5bd2258935eaba5..f0fca35b2ee9cf9c38feb9a2cf458b321fa068b5 100644 (file)
@@ -541,7 +541,9 @@ static int align_yoffset = 0;
 #define DRAW_MODE(s)           ((s) >= GAME_MODE_MAIN &&               \
                                 (s) <= GAME_MODE_SETUP ? (s) :         \
                                 (s) == GAME_MODE_PSEUDO_TYPENAME ?     \
-                                GAME_MODE_MAIN : GAME_MODE_DEFAULT)
+                                GAME_MODE_MAIN :                       \
+                                (s) == GAME_MODE_PSEUDO_TYPENAMES ?    \
+                                GAME_MODE_NAMES : GAME_MODE_DEFAULT)
 
 // (there are no draw offset definitions needed for INFO_MODE_TITLE)
 #define DRAW_MODE_INFO(i)      ((i) >= INFO_MODE_TITLE &&              \
index 27469503dd8eb31ace36c48776bfd56b7934429f..de19e464567463177202220a0734e57367be1607 100644 (file)
@@ -9351,6 +9351,8 @@ void SetAnimStatus(int anim_status_new)
 {
   if (anim_status_new == GAME_MODE_MAIN)
     anim_status_new = GAME_MODE_PSEUDO_MAINONLY;
+  else if (anim_status_new == GAME_MODE_NAMES)
+    anim_status_new = GAME_MODE_PSEUDO_NAMESONLY;
   else if (anim_status_new == GAME_MODE_SCORES)
     anim_status_new = GAME_MODE_PSEUDO_SCORESOLD;
 
@@ -9360,7 +9362,11 @@ void SetAnimStatus(int anim_status_new)
   if ((global.anim_status      == GAME_MODE_PSEUDO_MAINONLY &&
        global.anim_status_next == GAME_MODE_PSEUDO_TYPENAME) ||
       (global.anim_status      == GAME_MODE_PSEUDO_TYPENAME &&
-       global.anim_status_next == GAME_MODE_PSEUDO_MAINONLY))
+       global.anim_status_next == GAME_MODE_PSEUDO_MAINONLY) ||
+      (global.anim_status      == GAME_MODE_PSEUDO_NAMESONLY &&
+       global.anim_status_next == GAME_MODE_PSEUDO_TYPENAMES) ||
+      (global.anim_status      == GAME_MODE_PSEUDO_TYPENAMES &&
+       global.anim_status_next == GAME_MODE_PSEUDO_NAMESONLY))
     global.anim_status = global.anim_status_next;
 }