From 42fb15a9d8b029a915321ff72f1bb010f181eae8 Mon Sep 17 00:00:00 2001 From: Deskull Date: Tue, 4 Dec 2018 19:09:39 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20=E3=82=B3=E3=83=A1?= =?utf8?q?=E3=83=B3=E3=83=88=E6=95=B4=E7=90=86=20/=20Refactor=20comments.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/floor-generate.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/src/floor-generate.c b/src/floor-generate.c index 778d8e992..77b11d308 100644 --- a/src/floor-generate.c +++ b/src/floor-generate.c @@ -1170,8 +1170,7 @@ static void battle_gen(void) for(i = 0; i < 4; i++) { - place_monster_aux(0, p_ptr->y + 8 + (i/2)*4, p_ptr->x - 2 + (i%2)*4, battle_mon[i], - (PM_NO_KAGE | PM_NO_PET)); + place_monster_aux(0, p_ptr->y + 8 + (i/2)*4, p_ptr->x - 2 + (i%2)*4, battle_mon[i], (PM_NO_KAGE | PM_NO_PET)); set_friendly(&m_list[cave[p_ptr->y+8+(i/2)*4][p_ptr->x-2+(i%2)*4].m_idx]); } for(i = 1; i < m_max; i++) @@ -1194,7 +1193,6 @@ static void quest_gen(void) { POSITION x, y; - /* Start with perm walls */ for (y = 0; y < cur_hgt; y++) { @@ -1251,8 +1249,7 @@ static bool level_gen(cptr *why) level_height = randint1(MAX_HGT/SCREEN_HGT); level_width = randint1(MAX_WID/SCREEN_WID); } - while ((level_height == MAX_HGT/SCREEN_HGT) && - (level_width == MAX_WID/SCREEN_WID)); + while ((level_height == MAX_HGT/SCREEN_HGT) && (level_width == MAX_WID/SCREEN_WID)); } cur_hgt = level_height * SCREEN_HGT; @@ -1280,12 +1277,7 @@ static bool level_gen(cptr *why) /* Make a dungeon */ if (!cave_gen()) { -#ifdef JP -*why = "ダンジョン生成に失敗"; -#else - *why = "could not place player"; -#endif - + *why = _("ダンジョン生成に失敗", "could not place player"); return FALSE; } else return TRUE; @@ -1353,26 +1345,12 @@ void clear_cave(void) for (x = 0; x < MAX_WID; x++) { cave_type *c_ptr = &cave[y][x]; - - /* No flags */ c_ptr->info = 0; - - /* No features */ c_ptr->feat = 0; - - /* No objects */ c_ptr->o_idx = 0; - - /* No monsters */ c_ptr->m_idx = 0; - - /* No special */ c_ptr->special = 0; - - /* No mimic */ c_ptr->mimic = 0; - - /* No flow */ c_ptr->cost = 0; c_ptr->dist = 0; c_ptr->when = 0; @@ -1467,10 +1445,7 @@ void generate_cave(void) if (why) msg_format(_("生成やり直し(%s)", "Generation restarted (%s)"), why); - /* Wipe the objects */ wipe_o_list(); - - /* Wipe the monsters */ wipe_m_list(); } -- 2.11.0