#include "files.h"
#include "view-mainwindow.h"
#include "world.h"
+#include "monsterrace.h"
#define HORDE_NOGOOD 0x01 /*!< (未実装フラグ)HORDE生成でGOODなモンスターの生成を禁止する? */
#define HORDE_NOEVIL 0x02 /*!< (未実装フラグ)HORDE生成でEVILなモンスターの生成を禁止する? */
(void)WIPE(m_ptr, monster_type);
/* Count monsters */
- m_cnt--;
+ current_floor_ptr->m_cnt--;
lite_spot(y, x);
if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
/* Hack -- Update parent index */
if (is_pet(m_ptr))
{
- for (i = 1; i < m_max; i++)
+ for (i = 1; i < current_floor_ptr->m_max; i++)
{
monster_type *m2_ptr = ¤t_floor_ptr->m_list[i];
cur_dis = 5 * (20 - cnt);
/* Check all the monsters */
- for (i = 1; i < m_max; i++)
+ for (i = 1; i < current_floor_ptr->m_max; i++)
{
monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
/* Excise dead monsters (backwards!) */
- for (i = m_max - 1; i >= 1; i--)
+ for (i = current_floor_ptr->m_max - 1; i >= 1; i--)
{
/* Get the i'th monster */
monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
if (m_ptr->r_idx) continue;
/* Move last monster into open hole */
- compact_monsters_aux(m_max - 1, i);
+ compact_monsters_aux(current_floor_ptr->m_max - 1, i);
- /* Compress "m_max" */
- m_max--;
+ /* Compress "current_floor_ptr->m_max" */
+ current_floor_ptr->m_max--;
}
}
}
/* Delete all the monsters */
- for (i = m_max - 1; i >= 1; i--)
+ for (i = current_floor_ptr->m_max - 1; i >= 1; i--)
{
monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
if (!monster_is_valid(m_ptr)) continue;
/* Hack -- Wipe the racial counter of all monster races */
for (i = 1; i < max_r_idx; i++) r_info[i].cur_num = 0;
- /* Reset "m_max" */
- m_max = 1;
+ /* Reset "current_floor_ptr->m_max" */
+ current_floor_ptr->m_max = 1;
- /* Reset "m_cnt" */
- m_cnt = 0;
+ /* Reset "current_floor_ptr->m_cnt" */
+ current_floor_ptr->m_cnt = 0;
/* Reset "current_floor_ptr->mproc_max[]" */
for (i = 0; i < MAX_MTIMED; i++) current_floor_ptr->mproc_max[i] = 0;
MONSTER_IDX i;
/* Normal allocation */
- if (m_max < current_floor_ptr->max_m_idx)
+ if (current_floor_ptr->m_max < current_floor_ptr->max_m_idx)
{
/* Access the next hole */
- i = m_max;
+ i = current_floor_ptr->m_max;
/* Expand the array */
- m_max++;
+ current_floor_ptr->m_max++;
/* Count monsters */
- m_cnt++;
+ current_floor_ptr->m_cnt++;
/* Return the index */
return (i);
}
/* Recycle dead monsters */
- for (i = 1; i < m_max; i++)
+ for (i = 1; i < current_floor_ptr->m_max; i++)
{
monster_type *m_ptr;
if (m_ptr->r_idx) continue;
/* Count monsters */
- m_cnt++;
+ current_floor_ptr->m_cnt++;
/* Use this monster */
return (i);
MONSTER_IDX i;
/* Update each (live) monster */
- for (i = 1; i < m_max; i++)
+ for (i = 1; i < current_floor_ptr->m_max; i++)
{
monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
if (!monster_is_valid(m_ptr)) continue;