quit("Already dead.");
}
+static void generate_wilderness(player_type *player_ptr)
+{
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
+ if ((floor_ptr->dun_level == 0) || floor_ptr->inside_quest)
+ return;
+
+ parse_fixed_map(player_ptr, "w_info.txt", 0, 0, current_world_ptr->max_wild_y, current_world_ptr->max_wild_x);
+ init_flags = INIT_ONLY_BUILDINGS;
+ parse_fixed_map(player_ptr, "t_info.txt", 0, 0, MAX_HGT, MAX_WID);
+ select_floor_music(player_ptr);
+}
+
/*!
* @brief 1ゲームプレイの主要ルーチン / Actually play a game
* @param player_ptr プレーヤーへの参照ポインタ
prt(_("お待ち下さい...", "Please wait..."), 0, 0);
term_fresh();
set_wizard_mode_by_argument(player_ptr);
- if (!floor_ptr->dun_level && !floor_ptr->inside_quest) {
- parse_fixed_map(player_ptr, "w_info.txt", 0, 0, current_world_ptr->max_wild_y, current_world_ptr->max_wild_x);
- init_flags = INIT_ONLY_BUILDINGS;
- parse_fixed_map(player_ptr, "t_info.txt", 0, 0, MAX_HGT, MAX_WID);
- select_floor_music(player_ptr);
- }
-
+ generate_wilderness(player_ptr);
if (!current_world_ptr->character_dungeon) {
change_floor(player_ptr);
} else {
{
char buf[1024];
path_build(buf, sizeof(buf), ANGBAND_DIR_EDIT, name);
- FILE *fp;
- fp = angband_fopen(buf, "r");
+ FILE *fp = angband_fopen(buf, "r");
if (fp == NULL)
return -1;
int num = -1;
parse_error_type err = PARSE_ERROR_NONE;
bool bypass = FALSE;
- int x = xmin, y = ymin;
+ int x = xmin;
+ int y = ymin;
qtwg_type tmp_qg;
qtwg_type *qg_ptr = initialize_quest_generator_type(&tmp_qg, buf, ymin, xmin, ymax, xmax, &y, &x);
while (angband_fgets(fp, buf, sizeof(buf)) == 0) {
num++;
- if (!buf[0])
- continue;
- if (iswspace(buf[0]))
- continue;
- if (buf[0] == '#')
+ if (!buf[0] || iswspace(buf[0]) || buf[0] == '#')
continue;
+
if ((buf[0] == '?') && (buf[1] == ':')) {
char f;
char *s;
continue;
err = generate_fixed_map_floor(player_ptr, qg_ptr, parse_fixed_map);
- if (err)
+ if (err != PARSE_ERROR_NONE)
break;
}