OSDN Git Service

Make Balrog plural to match "are resistant".
[hengband/hengband.git] / src / birth / birth-util.c
1 #include "birth/birth-util.h"
2 #include "cmd-io/cmd-gameoption.h"
3 #include "core/show-file.h"
4 #include "main/sound-of-music.h"
5 #include "system/game-option-types.h"
6 #include "term/screen-processor.h"
7
8 /*!
9  * @brief プレイヤー作成を中断して変愚蛮怒を終了する
10  * @return なし
11  */
12 void birth_quit(void)
13 {
14     quit(NULL);
15 }
16
17 /*!
18  * @brief 指定されたヘルプファイルを表示する / Show specific help file
19  * @param creature_ptr プレーヤーへの参照ポインタ
20  * @param helpfile ファイル名
21  * @return なし
22  */
23 void show_help(player_type* creature_ptr, concptr helpfile)
24 {
25     screen_save();
26     (void)show_file(creature_ptr, TRUE, helpfile, NULL, 0, 0);
27     screen_load();
28 }
29
30 void birth_help_option(player_type *creature_ptr, char c, birth_kind bk)
31 {
32     concptr help_file;
33     switch (bk) {
34     case BK_RACE:
35         help_file = _("jraceclas.txt#TheRaces", "raceclas.txt#TheRaces");
36         break;
37     case BK_CLASS:
38         help_file = _("jraceclas.txt#TheClasses", "raceclas.txt#TheClasses");
39         break;
40     case BK_REALM:
41         help_file = _("jmagic.txt#MagicRealms", "magic.txt#MagicRealms");
42         break;
43     case BK_PERSONALITY:
44         help_file = _("jraceclas.txt#ThePersonalities", "raceclas.txt#ThePersonalities");
45         break;
46     case BK_AUTO_ROLLER:
47         help_file = _("jbirth.txt#AutoRoller", "birth.txt#AutoRoller");
48         break;
49     default:
50         help_file = "";
51         break;
52     }
53
54     if (c == '?') {
55         show_help(creature_ptr, help_file);
56     } else if (c == '=') {
57         screen_save();
58         do_cmd_options_aux(creature_ptr, OPT_PAGE_BIRTH, _("初期オプション((*)はスコアに影響)", "Birth Options ((*)) affect score"));
59         screen_load();
60     } else if (c != '2' && c != '4' && c != '6' && c != '8')
61         bell();
62 }