1 #include "dungeon/dungeon.h"
2 #include "game-option/birth-options.h"
3 #include "io/input-key-acceptor.h"
4 #include "main/sound-of-music.h"
5 #include "monster-race/monster-race.h"
6 #include "term/screen-processor.h"
7 #include "util/int-char-converter.h"
8 #include "view/display-messages.h"
9 #include "world/world.h"
19 * Maximum number of dungeon in d_info.txt
25 * @brief これまでに入ったダンジョンの一覧を表示し、選択させる。
26 * @param note ダンジョンに施す処理記述
29 * @return 選択されたダンジョンID
31 DUNGEON_IDX choose_dungeon(concptr note, POSITION y, POSITION x)
33 DUNGEON_IDX select_dungeon;
38 /* Hack -- No need to choose dungeon in some case */
39 if (lite_town || vanilla_town || ironman_downward)
41 if (max_dlv[DUNGEON_ANGBAND]) return DUNGEON_ANGBAND;
44 msg_format(_("まだ%sに入ったことはない。", "You haven't entered %s yet."), d_name + d_info[DUNGEON_ANGBAND].name);
50 /* Allocate the "dun" array */
51 C_MAKE(dun, current_world_ptr->max_d_idx, DUNGEON_IDX);
54 for (i = 1; i < current_world_ptr->max_d_idx; i++)
59 if (!d_info[i].maxdepth) continue;
60 if (!max_dlv[i]) continue;
61 if (d_info[i].final_guardian)
63 if (!r_info[d_info[i].final_guardian].max_num) seiha = TRUE;
65 else if (max_dlv[i] == d_info[i].maxdepth) seiha = TRUE;
67 sprintf(buf, _(" %c) %c%-12s : 最大 %d 階", " %c) %c%-16s : Max level %d"),
68 'a' + num, seiha ? '!' : ' ', d_name + d_info[i].name, (int)max_dlv[i]);
75 prt(_(" 選べるダンジョンがない。", " No dungeon is available."), y, x);
78 prt(format(_("どのダンジョン%sしますか:", "Which dungeon do you %s?: "), note), 0, 0);
82 if ((i == ESCAPE) || !num)
84 /* Free the "dun" array */
85 C_KILL(dun, current_world_ptr->max_d_idx, DUNGEON_IDX);
90 if (i >= 'a' && i < ('a' + num))
92 select_dungeon = dun[i - 'a'];
99 /* Free the "dun" array */
100 C_KILL(dun, current_world_ptr->max_d_idx, DUNGEON_IDX);
102 return select_dungeon;