From 4ef2299603f9ebdfea34830f9fe5a6a565d68d42 Mon Sep 17 00:00:00 2001 From: Deskull Date: Wed, 16 Jan 2019 08:18:37 +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=E3=80=82=20/=20Refactor=20c?= =?utf8?q?omments,=20(Duplicated=20meaning=20"Prepare=20allocation=20table?= =?utf8?q?"=20with=20function=20name.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/birth.c | 4 +--- src/floor-generate.c | 4 ---- src/monster2.c | 8 -------- src/rooms-pitnest.c | 6 ------ src/rooms-special.c | 6 ------ src/wild.c | 2 -- 6 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/birth.c b/src/birth.c index 41609c239..d47613591 100644 --- a/src/birth.c +++ b/src/birth.c @@ -1839,7 +1839,7 @@ void determine_random_questor(quest_type *q_ptr) MONRACE_IDX r_idx; monster_race *r_ptr; - /* Prepare allocation table */ + get_mon_num_prep(mon_hook_quest, NULL); while (1) @@ -2252,8 +2252,6 @@ void player_outfit(void) case RACE_DEMON: /* Demon can drain vitality from humanoid corpse */ - - /* Prepare allocation table */ get_mon_num_prep(monster_hook_human, NULL); for (i = rand_range(3,4); i > 0; i--) diff --git a/src/floor-generate.c b/src/floor-generate.c index 7c14f8329..10c06e8f3 100644 --- a/src/floor-generate.c +++ b/src/floor-generate.c @@ -597,8 +597,6 @@ static bool cave_gen(void) /* Fill the arrays of floors and walls in the good proportions */ set_floor_and_wall(dungeon_type); - - /* Prepare allocation table */ get_mon_num_prep(get_monster_hook(), NULL); /* Randomize the dungeon creation values */ @@ -1231,8 +1229,6 @@ static void quest_gen(void) monster_level = base_level; if (record_stair) do_cmd_write_nikki(NIKKI_TO_QUEST, p_ptr->inside_quest, NULL); - - /* Prepare allocation table */ get_mon_num_prep(get_monster_hook(), NULL); init_flags = INIT_CREATE_DUNGEON; diff --git a/src/monster2.c b/src/monster2.c index 7b6acb00d..cb297401e 100644 --- a/src/monster2.c +++ b/src/monster2.c @@ -3622,8 +3622,6 @@ bool place_monster_aux(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_id /* Require empty grids */ if (!cave_empty_bold2(ny, nx)) continue; - - /* Prepare allocation table */ get_mon_num_prep(place_monster_can_escort, get_monster_hook2(ny, nx)); /* Pick a random race */ @@ -3659,8 +3657,6 @@ bool place_monster_aux(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_id bool place_monster(POSITION y, POSITION x, BIT_FLAGS mode) { MONRACE_IDX r_idx; - - /* Prepare allocation table */ get_mon_num_prep(get_monster_hook(), get_monster_hook2(y, x)); /* Pick a monster */ @@ -3689,8 +3685,6 @@ bool alloc_horde(POSITION y, POSITION x) int attempts = 1000; POSITION cy = y; POSITION cx = x; - - /* Prepare allocation table */ get_mon_num_prep(get_monster_hook(), get_monster_hook2(y, x)); while (--attempts) @@ -3942,8 +3936,6 @@ bool summon_specific(MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int t summon_kin_type = symbol; summon_unique_okay = (mode & PM_ALLOW_UNIQUE) ? TRUE : FALSE; - - /* Prepare allocation table */ get_mon_num_prep(summon_specific_okay, get_monster_hook2(y, x)); /* Pick a monster, using the level calculation */ diff --git a/src/rooms-pitnest.c b/src/rooms-pitnest.c index f1ff05dbf..cca13f81a 100644 --- a/src/rooms-pitnest.c +++ b/src/rooms-pitnest.c @@ -295,8 +295,6 @@ bool build_type5(void) /* Process a preparation function if necessary */ if (n_ptr->prep_func) (*(n_ptr->prep_func))(); - - /* Prepare allocation table */ get_mon_num_prep(n_ptr->hook_func, NULL); align.sub_align = SUB_ALIGN_NEUTRAL; @@ -508,8 +506,6 @@ bool build_type6(void) /* Process a preparation function if necessary */ if (n_ptr->prep_func) (*(n_ptr->prep_func))(); - - /* Prepare allocation table */ get_mon_num_prep(n_ptr->hook_func, NULL); align.sub_align = SUB_ALIGN_NEUTRAL; @@ -818,8 +814,6 @@ bool build_type13(void) /* Process a preparation function if necessary */ if (n_ptr->prep_func) (*(n_ptr->prep_func))(); - - /* Prepare allocation table */ get_mon_num_prep(n_ptr->hook_func, vault_aux_trapped_pit); align.sub_align = SUB_ALIGN_NEUTRAL; diff --git a/src/rooms-special.c b/src/rooms-special.c index 8cfb12f32..8667231e9 100644 --- a/src/rooms-special.c +++ b/src/rooms-special.c @@ -72,8 +72,6 @@ bool build_type15(void) case 1: /* 4 lite breathers + potion */ { int dir1, dir2; - - /* Prepare allocation table */ get_mon_num_prep(vault_aux_lite, NULL); /* Place fixed lite berathers */ @@ -141,8 +139,6 @@ bool build_type15(void) c_ptr = &cave[y2 - 1][x2 - 1]; place_inner_grid(c_ptr); c_ptr->feat = feat_glass_wall; - - /* Prepare allocation table */ get_mon_num_prep(vault_aux_lite, NULL); r_idx = get_mon_num(dun_level); @@ -203,8 +199,6 @@ bool build_type15(void) place_inner_grid(c_ptr); c_ptr->feat = feat_glass_wall; } - - /* Prepare allocation table */ get_mon_num_prep(vault_aux_shards, NULL); /* Place shard berathers */ diff --git a/src/wild.c b/src/wild.c index 90f82c9d5..cc8344465 100644 --- a/src/wild.c +++ b/src/wild.c @@ -464,8 +464,6 @@ void wilderness_gen(void) x = p_ptr->wilderness_x; y = p_ptr->wilderness_y; - - /* Prepare allocation table */ get_mon_num_prep(get_monster_hook(), NULL); /* North border */ -- 2.11.0