OSDN Git Service

350f612447ddd40b0a4b41db81dd9be74a4e58b0
[hengband/hengband.git] / src / birth / birth-util.c
1 #include "system/angband.h"
2 #include "birth/birth-util.h"
3 #include "core/show-file.h"
4
5 /*!
6  * @brief プレイヤー作成を中断して変愚蛮怒を終了する
7  * @return なし
8  */
9 void birth_quit(void)
10 {
11     quit(NULL);
12 }
13
14 /*!
15  * @brief 指定されたヘルプファイルを表示する / Show specific help file
16  * @param creature_ptr プレーヤーへの参照ポインタ
17  * @param helpfile ファイル名
18  * @return なし
19  */
20 void show_help(player_type* creature_ptr, concptr helpfile)
21 {
22     screen_save();
23     (void)show_file(creature_ptr, TRUE, helpfile, NULL, 0, 0);
24     screen_load();
25 }
26
27 void birth_help_option(player_type *creature_ptr, char c, birth_kind bk)
28 {
29     concptr help_file;
30     switch (bk) {
31     case BK_REALM:
32         help_file = _("jmagic.txt#MagicRealms", "magic.txt#MagicRealms");
33         break;
34     case BK_AUTO_ROLLER:
35         help_file = _("jbirth.txt#AutoRoller", "birth.txt#AutoRoller");
36     default:
37         help_file = "";
38         break;
39     }
40
41     if (c == '?') {
42         show_help(creature_ptr, help_file);
43     } else if (c == '=') {
44         screen_save();
45         do_cmd_options_aux(OPT_PAGE_BIRTH, _("初期オプション((*)はスコアに影響)", "Birth option((*)s effect score)"));
46         screen_load();
47     } else if (c != '2' && c != '4' && c != '6' && c != '8')
48         bell();
49 }