summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2018-03-25 20:07:31 +0200
committerBardur Arantsson <bardur@scientician.net>2018-03-25 20:07:31 +0200
commit6712920f2549cb205e9efa0e68bc61240b4867e1 (patch)
tree09c575322cb07d5667f8fc9b10e8f3a5da201757 /src
parent42ee1b48930e037b825e9e2a3ef3e5989e041870 (diff)
Rename get_mon_num{,2}_hook
Diffstat (limited to 'src')
-rw-r--r--src/birth.cc2
-rw-r--r--src/generate.cc52
-rw-r--r--src/lua_bind.cc2
-rw-r--r--src/monster1.cc32
-rw-r--r--src/monster2.cc48
-rw-r--r--src/monster2.hpp4
-rw-r--r--src/q_betwen.cc2
-rw-r--r--src/q_bounty.cc4
-rw-r--r--src/q_dragons.cc2
-rw-r--r--src/q_evil.cc2
-rw-r--r--src/q_haunted.cc2
-rw-r--r--src/q_invas.cc2
-rw-r--r--src/q_nirna.cc2
-rw-r--r--src/q_poison.cc8
-rw-r--r--src/q_rand.cc2
-rw-r--r--src/q_spider.cc2
-rw-r--r--src/q_thief.cc2
-rw-r--r--src/q_thrain.cc2
-rw-r--r--src/q_troll.cc2
-rw-r--r--src/q_wight.cc2
-rw-r--r--src/q_wolves.cc2
-rw-r--r--src/variable.cc4
-rw-r--r--src/variable.hpp4
-rw-r--r--src/wild.cc18
24 files changed, 102 insertions, 102 deletions
diff --git a/src/birth.cc b/src/birth.cc
index e108985b..09e0374e 100644
--- a/src/birth.cc
+++ b/src/birth.cc
@@ -2025,7 +2025,7 @@ static bool_ player_birth_aux_ask()
}
/* Set the quest monster hook */
- get_mon_num_hook = monster_quest;
+ get_monster_hook = monster_quest;
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/generate.cc b/src/generate.cc
index 2152c772..cad78fe5 100644
--- a/src/generate.cc
+++ b/src/generate.cc
@@ -2733,7 +2733,7 @@ static bool vault_aux_demon(monster_race const *r_ptr)
* races, to allow the nest creation to fail instead of having "holes".
*
* Note the use of the "get_mon_num_prep()" function, and the special
- * "get_mon_num_hook()" restriction function, to prepare the "monster
+ * "get_monster_hook()" restriction function, to prepare the "monster
* allocation table" in such a way as to optimize the selection of
* "appropriate" non-unique monsters for the nest.
*
@@ -2755,7 +2755,7 @@ static void build_type5(int by0, int bx0)
int tmp, i;
const char *name;
bool_ empty = FALSE;
- bool (*old_get_mon_num_hook)(monster_race const *);
+ bool (*old_get_monster_hook)(monster_race const *);
s16b what[64];
/* Try to allocate space for room. If fails, exit */
@@ -2809,7 +2809,7 @@ static void build_type5(int by0, int bx0)
/* Hack -- Choose a nest type */
tmp = randint(dun_level);
- old_get_mon_num_hook = get_mon_num_hook;
+ old_get_monster_hook = get_monster_hook;
if ((tmp < 25) && (rand_int(2) != 0))
{
@@ -2831,12 +2831,12 @@ static void build_type5(int by0, int bx0)
if ((dun_level >= (25 + randint(15))) && (rand_int(2) != 0))
{
name = "symbol clone";
- get_mon_num_hook = vault_aux_symbol;
+ get_monster_hook = vault_aux_symbol;
}
else
{
name = "clone";
- get_mon_num_hook = vault_aux_clone;
+ get_monster_hook = vault_aux_clone;
}
}
else if (tmp < 25)
@@ -2846,13 +2846,13 @@ static void build_type5(int by0, int bx0)
name = "jelly";
/* Restrict to jelly */
- get_mon_num_hook = vault_aux_jelly;
+ get_monster_hook = vault_aux_jelly;
}
else if (tmp < 50)
{
name = "treasure";
- get_mon_num_hook = vault_aux_treasure;
+ get_monster_hook = vault_aux_treasure;
}
/* Monster nest (animal) */
@@ -2861,7 +2861,7 @@ static void build_type5(int by0, int bx0)
if (rand_int(3) == 0)
{
name = "kennel";
- get_mon_num_hook = vault_aux_kennel;
+ get_monster_hook = vault_aux_kennel;
}
else
{
@@ -2869,7 +2869,7 @@ static void build_type5(int by0, int bx0)
name = "animal";
/* Restrict to animal */
- get_mon_num_hook = vault_aux_animal;
+ get_monster_hook = vault_aux_animal;
}
}
@@ -2879,7 +2879,7 @@ static void build_type5(int by0, int bx0)
if (rand_int(3) == 0)
{
name = "chapel";
- get_mon_num_hook = vault_aux_chapel;
+ get_monster_hook = vault_aux_chapel;
}
else
{
@@ -2887,7 +2887,7 @@ static void build_type5(int by0, int bx0)
name = "undead";
/* Restrict to undead */
- get_mon_num_hook = vault_aux_undead;
+ get_monster_hook = vault_aux_undead;
}
}
@@ -2905,7 +2905,7 @@ static void build_type5(int by0, int bx0)
}
/* Remove restriction */
- get_mon_num_hook = old_get_mon_num_hook;
+ get_monster_hook = old_get_monster_hook;
/* Prepare allocation table */
get_mon_num_prep();
@@ -2978,7 +2978,7 @@ static void build_type5(int by0, int bx0)
* be present in many of the dragon pits, if they have the proper breath.
*
* Note the use of the "get_mon_num_prep()" function, and the special
- * "get_mon_num_hook()" restriction function, to prepare the "monster
+ * "get_monster_hook()" restriction function, to prepare the "monster
* allocation table" in such a way as to optimize the selection of
* "appropriate" non-unique monsters for the pit.
*
@@ -2995,7 +2995,7 @@ static void build_type6(int by0, int bx0)
int i, j, y, x, y1, x1, y2, x2, xval, yval;
bool_ empty = FALSE;
const char *name;
- bool (*old_get_mon_num_hook)(monster_race const *);
+ bool (*old_get_monster_hook)(monster_race const *);
/* Try to allocate space for room. If fails, exit */
if (!room_alloc(25, 11, TRUE, by0, bx0, &xval, &yval)) return;
@@ -3048,7 +3048,7 @@ static void build_type6(int by0, int bx0)
/* Choose a pit type */
tmp = randint(dun_level);
- old_get_mon_num_hook = get_mon_num_hook;
+ old_get_monster_hook = get_monster_hook;
/* Orc pit */
if (tmp < 20)
@@ -3057,7 +3057,7 @@ static void build_type6(int by0, int bx0)
name = "orc";
/* Restrict monster selection */
- get_mon_num_hook = vault_aux_orc;
+ get_monster_hook = vault_aux_orc;
}
/* Troll pit */
@@ -3067,7 +3067,7 @@ static void build_type6(int by0, int bx0)
name = "troll";
/* Restrict monster selection */
- get_mon_num_hook = vault_aux_troll;
+ get_monster_hook = vault_aux_troll;
}
/* Giant pit */
@@ -3077,7 +3077,7 @@ static void build_type6(int by0, int bx0)
name = "giant";
/* Restrict monster selection */
- get_mon_num_hook = vault_aux_giant;
+ get_monster_hook = vault_aux_giant;
}
else if (tmp < 70)
@@ -3096,12 +3096,12 @@ static void build_type6(int by0, int bx0)
(dun_level + randint(5))));
/* Restrict selection */
- get_mon_num_hook = vault_aux_symbol;
+ get_monster_hook = vault_aux_symbol;
}
else
{
name = "ordered chapel";
- get_mon_num_hook = vault_aux_chapel;
+ get_monster_hook = vault_aux_chapel;
}
}
@@ -3109,7 +3109,7 @@ static void build_type6(int by0, int bx0)
/* Dragon pit */
else if (tmp < 80)
{
- /* Hack - get_mon_num_hook needs a plain function */
+ /* Hack - get_monster_hook needs a plain function */
static monster_spell_flag_set mask;
/* Pick dragon type */
@@ -3159,7 +3159,7 @@ static void build_type6(int by0, int bx0)
}
/* Restrict monster selection */
- get_mon_num_hook = [](monster_race const *r_ptr) -> bool {
+ get_monster_hook = [](monster_race const *r_ptr) -> bool {
/* Decline unique monsters */
if (r_ptr->flags & RF_UNIQUE) return false;
@@ -3181,7 +3181,7 @@ static void build_type6(int by0, int bx0)
name = "demon";
/* Restrict monster selection */
- get_mon_num_hook = vault_aux_demon;
+ get_monster_hook = vault_aux_demon;
}
/* Prepare allocation table */
@@ -3198,7 +3198,7 @@ static void build_type6(int by0, int bx0)
}
/* Remove restriction */
- get_mon_num_hook = old_get_mon_num_hook;
+ get_monster_hook = old_get_monster_hook;
/* Prepare allocation table */
get_mon_num_prep();
@@ -7489,7 +7489,7 @@ static bool_ cave_gen()
init_feat_info();
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
@@ -8017,7 +8017,7 @@ bool_ build_special_level()
}
}
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/lua_bind.cc b/src/lua_bind.cc
index 3ca43716..cc7476d3 100644
--- a/src/lua_bind.cc
+++ b/src/lua_bind.cc
@@ -221,7 +221,7 @@ void get_map_size(const char *name, int *ysize, int *xsize)
void load_map(const char *name, int *y, int *x)
{
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/monster1.cc b/src/monster1.cc
index de731e03..1a2cdb14 100644
--- a/src/monster1.cc
+++ b/src/monster1.cc
@@ -1469,7 +1469,7 @@ static bool monster_lava(monster_race const *r_ptr)
}
-void set_mon_num_hook()
+void reset_get_monster_hook()
{
auto const &wf_info = game->edit_data.wf_info;
@@ -1479,38 +1479,38 @@ void set_mon_num_hook()
switch (wf_info[wilderness(p_ptr->wilderness_x, p_ptr->wilderness_y).feat].terrain_idx)
{
case TERRAIN_TOWN:
- get_mon_num_hook = monster_town;
+ get_monster_hook = monster_town;
break;
case TERRAIN_DEEP_WATER:
- get_mon_num_hook = monster_ocean;
+ get_monster_hook = monster_ocean;
break;
case TERRAIN_SHALLOW_WATER:
- get_mon_num_hook = monster_shore;
+ get_monster_hook = monster_shore;
break;
case TERRAIN_DIRT:
- get_mon_num_hook = monster_waste;
+ get_monster_hook = monster_waste;
break;
case TERRAIN_GRASS:
- get_mon_num_hook = monster_grass;
+ get_monster_hook = monster_grass;
break;
case TERRAIN_TREES:
- get_mon_num_hook = monster_wood;
+ get_monster_hook = monster_wood;
break;
case TERRAIN_SHALLOW_LAVA:
case TERRAIN_DEEP_LAVA:
- get_mon_num_hook = monster_volcano;
+ get_monster_hook = monster_volcano;
break;
case TERRAIN_MOUNTAIN:
- get_mon_num_hook = monster_mountain;
+ get_monster_hook = monster_mountain;
break;
default:
- get_mon_num_hook = monster_dungeon;
+ get_monster_hook = monster_dungeon;
break;
}
}
else
{
- get_mon_num_hook = monster_dungeon;
+ get_monster_hook = monster_dungeon;
}
}
@@ -1559,23 +1559,23 @@ bool_ monster_can_cross_terrain(byte feat, std::shared_ptr<monster_race> r_ptr)
}
-void set_mon_num2_hook(int y, int x)
+void set_monster_aux_hook(int y, int x)
{
/* Set the monster list */
switch (cave[y][x].feat)
{
case FEAT_SHAL_WATER:
- get_mon_num2_hook = monster_shallow_water;
+ get_monster_aux_hook = monster_shallow_water;
break;
case FEAT_DEEP_WATER:
- get_mon_num2_hook = monster_deep_water;
+ get_monster_aux_hook = monster_deep_water;
break;
case FEAT_DEEP_LAVA:
case FEAT_SHAL_LAVA:
- get_mon_num2_hook = monster_lava;
+ get_monster_aux_hook = monster_lava;
break;
default:
- get_mon_num2_hook = NULL;
+ get_monster_aux_hook = NULL;
break;
}
}
diff --git a/src/monster2.cc b/src/monster2.cc
index 0afea2d4..7d794d03 100644
--- a/src/monster2.cc
+++ b/src/monster2.cc
@@ -804,8 +804,8 @@ errr get_mon_num_prep()
for (auto &&entry: alloc.race_table)
{
/* Accept monsters which pass the restriction, if any */
- if ((!get_mon_num_hook || (*get_mon_num_hook)(&r_info[entry.index])) &&
- (!get_mon_num2_hook || (*get_mon_num2_hook)(&r_info[entry.index])))
+ if ((!get_monster_hook || (*get_monster_hook)(&r_info[entry.index])) &&
+ (!get_monster_aux_hook || (*get_monster_aux_hook)(&r_info[entry.index])))
{
/* Accept this monster */
entry.prob2 = entry.prob1;
@@ -2650,7 +2650,7 @@ bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int statu
int i;
auto r_ptr = &r_info[r_idx];
- bool (*old_get_mon_num_hook)(monster_race const *);
+ bool (*old_get_monster_hook)(monster_race const *);
/* Place one monster, or fail */
@@ -2672,13 +2672,13 @@ bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int statu
/* Escorts for certain monsters */
if (r_ptr->flags & RF_ESCORT)
{
- old_get_mon_num_hook = get_mon_num_hook;
+ old_get_monster_hook = get_monster_hook;
/* Set the escort index */
place_monster_ptr = &r_info[r_idx];
/* Set the escort hook */
- get_mon_num_hook = place_monster_okay;
+ get_monster_hook = place_monster_okay;
/* Prepare allocation table */
get_mon_num_prep();
@@ -2694,7 +2694,7 @@ bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int statu
/* Require empty grids */
if (!cave_empty_bold(ny, nx)) continue;
- set_mon_num2_hook(ny, nx);
+ set_monster_aux_hook(ny, nx);
/* Prepare allocation table */
get_mon_num_prep();
@@ -2703,7 +2703,7 @@ bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int statu
z = get_mon_num(r_ptr->level);
/* Reset restriction */
- get_mon_num2_hook = NULL;
+ get_monster_aux_hook = NULL;
/* Prepare allocation table */
get_mon_num_prep();
@@ -2724,7 +2724,7 @@ bool_ place_monster_aux(int y, int x, int r_idx, bool_ slp, bool_ grp, int statu
}
/* Reset restriction */
- get_mon_num_hook = old_get_mon_num_hook;
+ get_monster_hook = old_get_monster_hook;
/* Prepare allocation table */
get_mon_num_prep();
@@ -2745,7 +2745,7 @@ bool_ place_monster(int y, int x, bool_ slp, bool_ grp)
int r_idx;
/* Set monster restriction */
- set_mon_num2_hook(y, x);
+ set_monster_aux_hook(y, x);
/* Prepare allocation table */
get_mon_num_prep();
@@ -2754,7 +2754,7 @@ bool_ place_monster(int y, int x, bool_ slp, bool_ grp)
r_idx = get_mon_num(monster_level);
/* Reset restriction */
- get_mon_num2_hook = NULL;
+ get_monster_aux_hook = NULL;
/* Prepare allocation table */
get_mon_num_prep();
@@ -2779,7 +2779,7 @@ bool_ alloc_horde(int y, int x)
monster_type *m_ptr;
int attempts = 1000;
- set_mon_num2_hook(y, x);
+ set_monster_aux_hook(y, x);
/* Prepare allocation table */
get_mon_num_prep();
@@ -2799,7 +2799,7 @@ bool_ alloc_horde(int y, int x)
break;
}
- get_mon_num2_hook = NULL;
+ get_monster_aux_hook = NULL;
/* Prepare allocation table */
get_mon_num_prep();
@@ -3176,7 +3176,7 @@ bool_ summon_specific(int y1, int x1, int lev, int type)
{
int i, x, y, r_idx;
bool_ Group_ok = TRUE;
- bool (*old_get_mon_num_hook)(monster_race const *);
+ bool (*old_get_monster_hook)(monster_race const *);
/* Look for a location */
for (i = 0; i < 20; ++i)
@@ -3213,10 +3213,10 @@ bool_ summon_specific(int y1, int x1, int lev, int type)
summon_specific_type = type;
/* Backup the old hook */
- old_get_mon_num_hook = get_mon_num_hook;
+ old_get_monster_hook = get_monster_hook;
/* Require "okay" monsters */
- get_mon_num_hook = summon_specific_okay;
+ get_monster_hook = summon_specific_okay;
/* Prepare allocation table */
get_mon_num_prep();
@@ -3228,7 +3228,7 @@ bool_ summon_specific(int y1, int x1, int lev, int type)
summon_hack = FALSE;
/* Reset restriction */
- get_mon_num_hook = old_get_mon_num_hook;
+ get_monster_hook = old_get_monster_hook;
/* Prepare allocation table */
get_mon_num_prep();
@@ -3260,7 +3260,7 @@ bool_ summon_specific(int y1, int x1, int lev, int type)
bool_ summon_specific_friendly(int y1, int x1, int lev, int type, bool_ Group_ok)
{
int i, x, y, r_idx;
- bool (*old_get_mon_num_hook)(monster_race const *);
+ bool (*old_get_monster_hook)(monster_race const *);
/* Look for a location */
for (i = 0; i < 20; ++i)
@@ -3293,13 +3293,13 @@ bool_ summon_specific_friendly(int y1, int x1, int lev, int type, bool_ Group_ok
/* Failure */
if (i == 20) return (FALSE);
- old_get_mon_num_hook = get_mon_num_hook;
+ old_get_monster_hook = get_monster_hook;
/* Save the "summon" type */
summon_specific_type = type;
/* Require "okay" monsters */
- get_mon_num_hook = summon_specific_okay;
+ get_monster_hook = summon_specific_okay;
/* Prepare allocation table */
get_mon_num_prep();
@@ -3308,7 +3308,7 @@ bool_ summon_specific_friendly(int y1, int x1, int lev, int type, bool_ Group_ok
r_idx = get_mon_num((dun_level + lev) / 2 + 5);
/* Reset restriction */
- get_mon_num_hook = old_get_mon_num_hook;
+ get_monster_hook = old_get_monster_hook;
/* Prepare allocation table */
get_mon_num_prep();
@@ -3480,13 +3480,13 @@ bool_ multiply_monster(int m_idx, bool_ charm, bool_ clone)
/* It can mutate into a nastier monster */
if ((rand_int(100) < 3) && (!clone))
{
- bool (*old_get_mon_num_hook)(monster_race const *);
+ bool (*old_get_monster_hook)(monster_race const *);
/* Backup the old hook */
- old_get_mon_num_hook = get_mon_num_hook;
+ old_get_monster_hook = get_monster_hook;
/* Require "okay" monsters */
- get_mon_num_hook = mutate_monster_okay;
+ get_monster_hook = mutate_monster_okay;
/* Prepare allocation table */
get_mon_num_prep();
@@ -3497,7 +3497,7 @@ bool_ multiply_monster(int m_idx, bool_ charm, bool_ clone)
new_race = get_mon_num(dun_level + 5);
/* Reset restriction */
- get_mon_num_hook = old_get_mon_num_hook;
+ get_monster_hook = old_get_monster_hook;
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/monster2.hpp b/src/monster2.hpp
index 2108c825..dca9baee 100644
--- a/src/monster2.hpp
+++ b/src/monster2.hpp
@@ -45,6 +45,6 @@ s16b player_place(int y, int x);
void monster_drop_carried_objects(monster_type *m_ptr);
bool monster_dungeon(monster_race const *r_ptr);
bool monster_quest(monster_race const *r_ptr);
-void set_mon_num_hook();
-void set_mon_num2_hook(int y, int x);
+void reset_get_monster_hook();
+void set_monster_aux_hook(int y, int x);
bool_ monster_can_cross_terrain(byte feat, std::shared_ptr<monster_race> r_ptr);
diff --git a/src/q_betwen.cc b/src/q_betwen.cc
index ab744c12..75fd13a0 100644
--- a/src/q_betwen.cc
+++ b/src/q_betwen.cc
@@ -110,7 +110,7 @@ static bool quest_between_gen_hook(void *, void *, void *)
dun_level = quest[p_ptr->inside_quest].level;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_bounty.cc b/src/q_bounty.cc
index fe52fe05..ca90bfc6 100644
--- a/src/q_bounty.cc
+++ b/src/q_bounty.cc
@@ -59,14 +59,14 @@ static int get_new_bounty_monster(int lev)
* Set up the hooks -- no bounties on uniques or monsters
* with no corpses
*/
- get_mon_num_hook = lua_mon_hook_bounty;
+ get_monster_hook = lua_mon_hook_bounty;
get_mon_num_prep();
/* Set up the quest monster. */
r_idx = get_mon_num(lev);
/* Undo the filters */
- get_mon_num_hook = NULL;
+ get_monster_hook = NULL;
get_mon_num_prep();
return r_idx;
diff --git a/src/q_dragons.cc b/src/q_dragons.cc
index 9f89089c..696dba4a 100644
--- a/src/q_dragons.cc
+++ b/src/q_dragons.cc
@@ -45,7 +45,7 @@ static bool quest_dragons_gen_hook(void *, void *, void *)
dun_level = quest[p_ptr->inside_quest].level;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_evil.cc b/src/q_evil.cc
index 4636356a..d6b6a331 100644
--- a/src/q_evil.cc
+++ b/src/q_evil.cc
@@ -50,7 +50,7 @@ static bool quest_evil_gen_hook(void *, void *, void *)
dun_level = quest[p_ptr->inside_quest].level;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_haunted.cc b/src/q_haunted.cc
index f460ee80..1e76a492 100644
--- a/src/q_haunted.cc
+++ b/src/q_haunted.cc
@@ -48,7 +48,7 @@ static bool quest_haunted_gen_hook(void *, void *, void *)
dun_level = quest[p_ptr->inside_quest].level;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_invas.cc b/src/q_invas.cc
index 60ca0b65..f64e097f 100644
--- a/src/q_invas.cc
+++ b/src/q_invas.cc
@@ -41,7 +41,7 @@ static bool quest_invasion_gen_hook(void *, void *, void *)
dun_level = quest[p_ptr->inside_quest].level;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_nirna.cc b/src/q_nirna.cc
index 822d8b6c..daaed114 100644
--- a/src/q_nirna.cc
+++ b/src/q_nirna.cc
@@ -35,7 +35,7 @@ static bool quest_nirnaeth_gen_hook(void *, void *, void *)
dun_level = quest[p_ptr->inside_quest].level;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_poison.cc b/src/q_poison.cc
index fec7e54c..5dda2e48 100644
--- a/src/q_poison.cc
+++ b/src/q_poison.cc
@@ -45,7 +45,7 @@ static bool create_molds_hook(monster_race const *r_ptr)
static bool quest_poison_gen_hook(void *, void *, void *)
{
int cy = 1, cx = 1, x, y, tries = 10000, r_idx;
- bool (*old_get_mon_num_hook)(monster_race const *);
+ bool (*old_get_monster_hook)(monster_race const *);
if (cquest.status != QUEST_STATUS_TAKEN)
{
@@ -84,10 +84,10 @@ static bool quest_poison_gen_hook(void *, void *, void *)
/* Place the baddies */
/* Backup the old hook */
- old_get_mon_num_hook = get_mon_num_hook;
+ old_get_monster_hook = get_monster_hook;
/* Require "okay" monsters */
- get_mon_num_hook = create_molds_hook;
+ get_monster_hook = create_molds_hook;
/* Prepare allocation table */
get_mon_num_prep();
@@ -141,7 +141,7 @@ static bool quest_poison_gen_hook(void *, void *, void *)
}
/* Reset restriction */
- get_mon_num_hook = old_get_mon_num_hook;
+ get_monster_hook = old_get_monster_hook;
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_rand.cc b/src/q_rand.cc
index d1948bc2..62d16741 100644
--- a/src/q_rand.cc
+++ b/src/q_rand.cc
@@ -552,7 +552,7 @@ static bool quest_random_gen_hook(void *, void *in_, void *)
build_rectangle(y1 - 1, x1 - 1, y2 + 1, x2 + 1, feat_wall_outer, CAVE_ROOM | CAVE_GLOW);
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_spider.cc b/src/q_spider.cc
index 336d6056..bfe8980a 100644
--- a/src/q_spider.cc
+++ b/src/q_spider.cc
@@ -38,7 +38,7 @@ static bool quest_spider_gen_hook(void *, void *, void *)
dun_level = quest[p_ptr->inside_quest].level;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_thief.cc b/src/q_thief.cc
index 6e89a622..293eebb7 100644
--- a/src/q_thief.cc
+++ b/src/q_thief.cc
@@ -52,7 +52,7 @@ static bool quest_thieves_gen_hook(void *, void *, void *)
dun_level = quest[p_ptr->inside_quest].level;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_thrain.cc b/src/q_thrain.cc
index 7b895695..08c0ce2c 100644
--- a/src/q_thrain.cc
+++ b/src/q_thrain.cc
@@ -180,7 +180,7 @@ static bool quest_thrain_gen_hook(void *, void *in_, void *)
build_rectangle(y1 - 1, x1 - 1, y2 + 1, x2 + 1, feat_wall_outer, CAVE_ROOM | CAVE_GLOW);
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_troll.cc b/src/q_troll.cc
index 54eb3406..c7a9b17c 100644
--- a/src/q_troll.cc
+++ b/src/q_troll.cc
@@ -50,7 +50,7 @@ static bool quest_troll_gen_hook(void *, void *, void *)
dun_level = quest[p_ptr->inside_quest].level;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_wight.cc b/src/q_wight.cc
index 619e0903..975f1ff6 100644
--- a/src/q_wight.cc
+++ b/src/q_wight.cc
@@ -44,7 +44,7 @@ static bool quest_wight_gen_hook(void *, void *, void *)
dun_level = quest[p_ptr->inside_quest].level;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/q_wolves.cc b/src/q_wolves.cc
index 0e811ce6..921ebf76 100644
--- a/src/q_wolves.cc
+++ b/src/q_wolves.cc
@@ -51,7 +51,7 @@ static bool quest_wolves_gen_hook(void *, void *, void *)
dun_level = quest[p_ptr->inside_quest].level;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
diff --git a/src/variable.cc b/src/variable.cc
index 1490918e..bd21c351 100644
--- a/src/variable.cc
+++ b/src/variable.cc
@@ -483,8 +483,8 @@ char *ANGBAND_DIR_XTRA;
/*
* Hack -- function hooks to restrict "get_mon_num_prep()" function
*/
-bool (*get_mon_num_hook)(monster_race const *);
-bool (*get_mon_num2_hook)(monster_race const *);
+bool (*get_monster_hook)(monster_race const *);
+bool (*get_monster_aux_hook)(monster_race const *);
/*
diff --git a/src/variable.hpp b/src/variable.hpp
index 33c0c42c..7a1dc5cc 100644
--- a/src/variable.hpp
+++ b/src/variable.hpp
@@ -145,8 +145,8 @@ extern char *ANGBAND_DIR;
extern char *ANGBAND_DIR_MODULES;
extern char *ANGBAND_DIR_CORE;
extern char *ANGBAND_DIR_DNGN;
-extern bool (*get_mon_num_hook)(monster_race const *);
-extern bool (*get_mon_num2_hook)(monster_race const *);
+extern bool (*get_monster_hook)(monster_race const *);
+extern bool (*get_monster_aux_hook)(monster_race const *);
extern bool_ (*get_obj_num_hook)(int k_idx);
extern u16b max_o_idx;
extern u16b max_m_idx;
diff --git a/src/wild.cc b/src/wild.cc
index f7e1c1e8..75d8bad7 100644
--- a/src/wild.cc
+++ b/src/wild.cc
@@ -391,7 +391,7 @@ void wilderness_gen()
y = p_ptr->wilderness_y;
/* Set the correct monster hook */
- set_mon_num_hook();
+ reset_get_monster_hook();
/* Prepare allocation table */
get_mon_num_prep();
@@ -1020,7 +1020,7 @@ static bool create_townpeople_hook(monster_race const *r_ptr)
static void town_gen_hack(int qy, int qx)
{
int y, x, floor;
- bool (*old_get_mon_num_hook)(monster_race const *);
+ bool (*old_get_monster_hook)(monster_race const *);
/* Do we use dungeon floor or normal one */
if (magik(TOWN_NORMAL_FLOOR)) floor = FEAT_FLOOR;
@@ -1065,10 +1065,10 @@ static void town_gen_hack(int qy, int qx)
/* Some inhabitants(leveled .. hehe :) */
/* Backup the old hook */
- old_get_mon_num_hook = get_mon_num_hook;
+ old_get_monster_hook = get_monster_hook;
/* Require "okay" monsters */
- get_mon_num_hook = create_townpeople_hook;
+ get_monster_hook = create_townpeople_hook;
/* Prepare allocation table */
get_mon_num_prep();
@@ -1102,7 +1102,7 @@ static void town_gen_hack(int qy, int qx)
}
/* Reset restriction */
- get_mon_num_hook = old_get_mon_num_hook;
+ get_monster_hook = old_get_monster_hook;
/* Prepare allocation table */
get_mon_num_prep();
@@ -1111,7 +1111,7 @@ static void town_gen_hack(int qy, int qx)
static void town_gen_circle(int qy, int qx)
{
int y, x, cy, cx, rad, floor;
- bool (*old_get_mon_num_hook)(monster_race const *);
+ bool (*old_get_monster_hook)(monster_race const *);
/* Do we use dungeon floor or normal one */
if (magik(TOWN_NORMAL_FLOOR)) floor = FEAT_FLOOR;
@@ -1197,10 +1197,10 @@ static void town_gen_circle(int qy, int qx)
/* Some inhabitants(leveled .. hehe :) */
/* Backup the old hook */
- old_get_mon_num_hook = get_mon_num_hook;
+ old_get_monster_hook = get_monster_hook;
/* Require "okay" monsters */
- get_mon_num_hook = create_townpeople_hook;
+ get_monster_hook = create_townpeople_hook;
/* Prepare allocation table */
get_mon_num_prep();
@@ -1233,7 +1233,7 @@ static void town_gen_circle(int qy, int qx)
}
/* Reset restriction */
- get_mon_num_hook = old_get_mon_num_hook;
+ get_monster_hook = old_get_monster_hook;
/* Prepare allocation table */
get_mon_num_prep();