X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fmonster2.c;h=d4227f12da89b3f8b8345c881f8ba618b1e1aa84;hb=1ce8d94d38fb9c8d61fab5ce313e5522498f5cbf;hp=3ee224ac1c50c302e2d069141b4c3f490cf36f90;hpb=7b751286e93b77553bc694fdb4861af6944aa948;p=hengband%2Fhengband.git diff --git a/src/monster2.c b/src/monster2.c index 3ee224ac1..d4227f12d 100644 --- a/src/monster2.c +++ b/src/monster2.c @@ -13,6 +13,7 @@ #include "angband.h" #include "cmd-pet.h" #include "monster-hook.h" +#include "monster-status.h" #define HORDE_NOGOOD 0x01 /*!< (未実装フラグ)HORDE生成でGOODなモンスターの生成を禁止する? */ #define HORDE_NOEVIL 0x02 /*!< (未実装フラグ)HORDE生成でEVILなモンスターの生成を禁止する? */ @@ -171,7 +172,7 @@ cptr funny_comments[MAX_SAN_COMMENT] = * @param x 目標x座標 * @return なし */ -void set_target(monster_type *m_ptr, int y, int x) +void set_target(monster_type *m_ptr, POSITION y, POSITION x) { m_ptr->target_y = y; m_ptr->target_x = x; @@ -223,20 +224,15 @@ monster_race *real_r_ptr(monster_type *m_ptr) */ void delete_monster_idx(MONSTER_IDX i) { - int x, y; - + POSITION x, y; monster_type *m_ptr = &m_list[i]; - monster_race *r_ptr = &r_info[m_ptr->r_idx]; - - s16b this_o_idx, next_o_idx = 0; - + OBJECT_IDX this_o_idx, next_o_idx = 0; /* Get location */ y = m_ptr->fy; x = m_ptr->fx; - /* Hack -- Reduce the racial counter */ real_r_ptr(m_ptr)->cur_num--; @@ -2812,7 +2808,7 @@ void choose_new_monster(MONSTER_IDX m_idx, bool born, MONRACE_IDX r_idx) if (!r_idx) { - int level; + DEPTH level; chameleon_change_m_idx = m_idx; if (old_unique) @@ -3862,10 +3858,10 @@ bool alloc_guardian(bool def_val) * Use "slp" to choose the initial "sleep" status * Use "monster_level" for the monster level */ -bool alloc_monster(int dis, BIT_FLAGS mode) +bool alloc_monster(POSITION dis, BIT_FLAGS mode) { - int y = 0, x = 0; - int attempts_left = 10000; + int y = 0, x = 0; + int attempts_left = 10000; /* Put the Guardian */ if (alloc_guardian(FALSE)) return TRUE;