OSDN Git Service

[Refactor] #40392 Extracted birth_help_option() from get_player_race()
authorHourier <hourier@users.sourceforge.jp>
Tue, 19 May 2020 10:58:09 +0000 (19:58 +0900)
committerHourier <hourier@users.sourceforge.jp>
Tue, 19 May 2020 10:58:09 +0000 (19:58 +0900)
src/birth/birth-select-race.c
src/birth/birth-util.c

index f23faf8..535bebf 100644 (file)
@@ -121,14 +121,7 @@ bool get_player_race(player_type *creature_ptr)
         } else
             k = -1;
 
-        if (c == '?') {
-            show_help(creature_ptr, _("jraceclas.txt#TheRaces", "raceclas.txt#TheRaces"));
-        } else if (c == '=') {
-            screen_save();
-            do_cmd_options_aux(OPT_PAGE_BIRTH, _("初期オプション((*)はスコアに影響)", "Birth Option((*)s effect score)"));
-            screen_load();
-        } else if (c != '2' && c != '4' && c != '6' && c != '8')
-            bell();
+        birth_help_option(creature_ptr, c, BK_RACE);
     }
 
     creature_ptr->prace = (byte)k;
index 350f612..bf9b3fc 100644 (file)
@@ -28,6 +28,9 @@ void birth_help_option(player_type *creature_ptr, char c, birth_kind bk)
 {
     concptr help_file;
     switch (bk) {
+    case BK_RACE:
+        help_file = _("jraceclas.txt#TheRaces", "raceclas.txt#TheRaces");
+        break;
     case BK_REALM:
         help_file = _("jmagic.txt#MagicRealms", "magic.txt#MagicRealms");
         break;