OSDN Git Service

[Refactor] #37353 monster1~monster-hook間整理。 / Refactor between monster1 and monster...
[hengband/hengband.git] / src / spells2.c
index 97a9847..354d56b 100644 (file)
@@ -14,6 +14,7 @@
 #include "angband.h"
 #include "grid.h"
 #include "trap.h"
+#include "monster-hook.h"
 
 
 /*!
@@ -25,7 +26,7 @@
  */
 static bool detect_feat_flag(POSITION range, int flag, bool known)
 {
-       int x, y;
+       POSITION x, y;
        bool detect = FALSE;
        cave_type *c_ptr;
 
@@ -155,7 +156,8 @@ bool detect_treasure(POSITION range)
  */
 bool detect_objects_gold(POSITION range)
 {
-       int i, y, x;
+       OBJECT_IDX i;
+       POSITION y, x;
        POSITION range2 = range;
 
        bool detect = FALSE;
@@ -209,7 +211,8 @@ bool detect_objects_gold(POSITION range)
  */
 bool detect_objects_normal(POSITION range)
 {
-       int i, y, x;
+       OBJECT_IDX i;
+       POSITION y, x;
        POSITION range2 = range;
 
        bool detect = FALSE;
@@ -271,7 +274,9 @@ bool detect_objects_normal(POSITION range)
  */
 bool detect_objects_magic(POSITION range)
 {
-       int i, y, x, tv;
+       OBJECT_TYPE_VALUE tv;
+       OBJECT_IDX i;
+       POSITION y, x;
 
        bool detect = FALSE;
 
@@ -570,7 +575,7 @@ bool detect_monsters_mind(POSITION range)
 {
        MONSTER_IDX i;
        POSITION y, x;
-       bool    flag = FALSE;
+       bool flag = FALSE;
 
        if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
 
@@ -960,8 +965,7 @@ void aggravate_monsters(MONSTER_IDX who)
        /* Aggravate everyone nearby */
        for (i = 1; i < m_max; i++)
        {
-               monster_type    *m_ptr = &m_list[i];
-/*             monster_race    *r_ptr = &r_info[m_ptr->r_idx]; */
+               monster_type *m_ptr = &m_list[i];
 
                /* Paranoia -- Skip dead monsters */
                if (!m_ptr->r_idx) continue;
@@ -1473,8 +1477,6 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
                                for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
                                {
                                        object_type *o_ptr;
-
-                                       /* Acquire object */
                                        o_ptr = &o_list[this_o_idx];
 
                                        /* Acquire next object */