/* Hack -- Process the counters of monsters if needed */
for (i = 0; i < MAX_MTIMED; i++)
{
- if (mproc_max[i] > 0) process_monsters_mtimed(i);
+ if (current_floor_ptr->mproc_max[i] > 0) process_monsters_mtimed(i);
}
}
extern saved_floor_type saved_floors[MAX_SAVED_FLOORS];
extern FLOOR_IDX max_floor_id;
extern u32b saved_floor_file_sign;
-extern s16b *mproc_list[MAX_MTIMED];
-extern s16b mproc_max[MAX_MTIMED];
extern TOWN_IDX max_towns;
extern town_type *town_info;
extern object_type *inventory;
(void)C_WIPE(current_floor_ptr->m_list, m_max, monster_type);
m_max = 1;
m_cnt = 0;
- for (i = 0; i < MAX_MTIMED; i++) mproc_max[i] = 0;
+ for (i = 0; i < MAX_MTIMED; i++) current_floor_ptr->mproc_max[i] = 0;
/* Pre-calc cur_num of pets in party_mon[] */
precalc_cur_num_of_pet();
/* Allocate and Wipe the monster process list */
for (i = 0; i < MAX_MTIMED; i++)
{
- C_MAKE(mproc_list[i], current_floor_ptr->max_m_idx, s16b);
+ C_MAKE(current_floor_ptr->mproc_list[i], current_floor_ptr->max_m_idx, s16b);
}
/* Allocate and Wipe the max dungeon level */
*/
int get_mproc_idx(MONSTER_IDX m_idx, int mproc_type)
{
- s16b *cur_mproc_list = mproc_list[mproc_type];
+ s16b *cur_mproc_list = current_floor_ptr->mproc_list[mproc_type];
int i;
- for (i = mproc_max[mproc_type] - 1; i >= 0; i--)
+ for (i = current_floor_ptr->mproc_max[mproc_type] - 1; i >= 0; i--)
{
if (cur_mproc_list[i] == m_idx) return i;
}
*/
static void mproc_add(MONSTER_IDX m_idx, int mproc_type)
{
- if (mproc_max[mproc_type] < current_floor_ptr->max_m_idx) mproc_list[mproc_type][mproc_max[mproc_type]++] = (s16b)m_idx;
+ if (current_floor_ptr->mproc_max[mproc_type] < current_floor_ptr->max_m_idx) current_floor_ptr->mproc_list[mproc_type][current_floor_ptr->mproc_max[mproc_type]++] = (s16b)m_idx;
}
static void mproc_remove(MONSTER_IDX m_idx, int mproc_type)
{
int mproc_idx = get_mproc_idx(m_idx, mproc_type);
- if (mproc_idx >= 0) mproc_list[mproc_type][mproc_idx] = mproc_list[mproc_type][--mproc_max[mproc_type]];
+ if (mproc_idx >= 0) current_floor_ptr->mproc_list[mproc_type][mproc_idx] = current_floor_ptr->mproc_list[mproc_type][--current_floor_ptr->mproc_max[mproc_type]];
}
MONSTER_IDX i;
int cmi;
- /* Reset "mproc_max[]" */
- for (cmi = 0; cmi < MAX_MTIMED; cmi++) mproc_max[cmi] = 0;
+ /* Reset "current_floor_ptr->mproc_max[]" */
+ for (cmi = 0; cmi < MAX_MTIMED; cmi++) current_floor_ptr->mproc_max[cmi] = 0;
/* Process the monsters (backwards) */
for (i = m_max - 1; i >= 1; i--)
void process_monsters_mtimed(int mtimed_idx)
{
int i;
- s16b *cur_mproc_list = mproc_list[mtimed_idx];
+ s16b *cur_mproc_list = current_floor_ptr->mproc_list[mtimed_idx];
/* Hack -- calculate the "player noise" */
if (mtimed_idx == MTIMED_CSLEEP) csleep_noise = (1L << (30 - p_ptr->skill_stl));
/* Process the monsters (backwards) */
- for (i = mproc_max[mtimed_idx] - 1; i >= 0; i--)
+ for (i = current_floor_ptr->mproc_max[mtimed_idx] - 1; i >= 0; i--)
{
/* Access the monster */
process_monsters_mtimed_aux(cur_mproc_list[i], mtimed_idx);
for (i = 0; i < MAX_MTIMED; i++)
{
int mproc_idx = get_mproc_idx(i1, i);
- if (mproc_idx >= 0) mproc_list[i][mproc_idx] = i2;
+ if (mproc_idx >= 0) current_floor_ptr->mproc_list[i][mproc_idx] = i2;
}
}
/* Reset "m_cnt" */
m_cnt = 0;
- /* Reset "mproc_max[]" */
- for (i = 0; i < MAX_MTIMED; i++) mproc_max[i] = 0;
+ /* Reset "current_floor_ptr->mproc_max[]" */
+ for (i = 0; i < MAX_MTIMED; i++) current_floor_ptr->mproc_max[i] = 0;
/* Hack -- reset "reproducer" count */
current_floor_ptr->num_repro = 0;
monster_type *m_list; /*!< The array of dungeon monsters [current_floor_ptr->max_m_idx] */
MONSTER_IDX max_m_idx; /*!< Maximum number of monsters in the level */
+ s16b *mproc_list[MAX_MTIMED]; /*!< The array to process dungeon monsters[max_m_idx] */
+ s16b mproc_max[MAX_MTIMED]; /*!< Number of monsters to be processed */
} floor_type;
u32b saved_floor_file_sign;
-
-/*
- * The array to process dungeon monsters [current_floor_ptr->max_m_idx]
- */
-s16b *mproc_list[MAX_MTIMED];
-s16b mproc_max[MAX_MTIMED]; /* Number of monsters to be processed */
-
-
/*
* Maximum number of towns
*/