OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / monster-process.c
index 1ceb5a3..cd664e8 100644 (file)
@@ -338,7 +338,7 @@ void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note, I
                        /* Hack -- note fear */
                        (*fear) = TRUE;
 
-                       /* XXX XXX XXX Hack -- Add some timed fear */
+                       /* Hack -- Add some timed fear */
                        (void)set_monster_monfear(m_idx, (randint1(10) +
                                (((dam >= m_ptr->hp) && (percentage > 7)) ?
                                20 : ((11 - percentage) * 5))));
@@ -707,7 +707,7 @@ static bool get_fear_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
        /* Check nearby grids, diagonals first */
        for (i = 7; i >= 0; i--)
        {
-               int dis, s;
+               POSITION dis, s;
 
                /* Get the location */
                y = fy + ddy_ddd[i];
@@ -764,13 +764,13 @@ static bool get_fear_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
  * It is probably better to replace these arrays with code to compute
  * the relevant arrays, even if the storage is pre-allocated in hard
  * coded sizes.  At the very least, code should be included which is
- * able to generate and dump these arrays (ala "los()").  XXX XXX XXX
+ * able to generate and dump these arrays (ala "los()").  
  *
- * Also, the storage needs could be halved by using bytes.  XXX XXX XXX
+ * Also, the storage needs could be halved by using bytes.  
  *
  * These arrays could be combined into two big arrays, using sub-arrays
  * to hold the offsets and lengths of each portion of the sub-arrays, and
- * this could perhaps also be used somehow in the "look" code.  XXX XXX XXX
+ * this could perhaps also be used somehow in the "look" code.  
  */
 
 
@@ -1181,7 +1181,6 @@ static bool get_moves(MONSTER_IDX m_idx, int *mm)
                        y = m_ptr->fy - y2;
                        x = m_ptr->fx - x2;
 
-                       /* Done */
                        done = TRUE;
                }
        }
@@ -1715,7 +1714,6 @@ static bool monst_attack_monst(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
                                }
                        }
 
-                       /* Message */
                        if (act && see_either)
                        {
 #ifdef JP
@@ -1993,7 +1991,6 @@ static bool monst_attack_monst(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
                                        /* Visible monsters */
                                        if (see_m)
                                        {
-                                               /* Message */
 #ifdef JP
                                                msg_format("%sは%^sの攻撃をかわした。", t_name,m_name);
 #else
@@ -2094,7 +2091,7 @@ static bool check_hp_for_feat_destruction(feature_type *f_ptr, monster_type *m_p
  * fixate on opening a door even if they cannot open it.  Actually,\n
  * the same thing happens to normal monsters when they hit a door\n
  *\n
- * XXX XXX XXX In addition, monsters which *cannot* open or bash\n
+ * In addition, monsters which *cannot* open or bash\n
  * down a door will still stand there trying to open it...\n
  *\n
  * XXX Technically, need to check for monster in the way\n
@@ -2220,7 +2217,6 @@ void process_monster(MONSTER_IDX m_idx)
                                /* Acquire the monster name */
                                monster_desc(m_name, m_ptr, 0);
 
-                               /* Oops */
                                msg_format(_("%sは消え去った!", "%^s disappears!"), m_name);
                        }
 
@@ -2607,7 +2603,7 @@ void process_monster(MONSTER_IDX m_idx)
                        if (avoid || lonely || distant)
                        {
                                /* Remember the leash length */
-                               int dis = p_ptr->pet_follow_distance;
+                               POSITION dis = p_ptr->pet_follow_distance;
 
                                /* Hack -- adjust follow distance temporarily */
                                if (p_ptr->pet_follow_distance > PET_SEEK_DIST)
@@ -2742,14 +2738,13 @@ void process_monster(MONSTER_IDX m_idx)
                                        /* Do not bash the door */
                                        may_bash = FALSE;
 
-                                       /* Take a turn */
                                        do_turn = TRUE;
                                }
 
                                /* Locked doors (not jammed) */
                                else
                                {
-                                       /* Try to unlock it XXX XXX XXX */
+                                       /* Try to unlock it */
                                        if (randint0(m_ptr->hp / 10) > f_ptr->power)
                                        {
                                                /* Unlock the door */
@@ -2758,7 +2753,6 @@ void process_monster(MONSTER_IDX m_idx)
                                                /* Do not bash the door */
                                                may_bash = FALSE;
 
-                                               /* Take a turn */
                                                do_turn = TRUE;
                                        }
                                }
@@ -2768,10 +2762,9 @@ void process_monster(MONSTER_IDX m_idx)
                        if (may_bash && (r_ptr->flags2 & RF2_BASH_DOOR) && have_flag(f_ptr->flags, FF_BASH) &&
                                (!is_pet(m_ptr) || (p_ptr->pet_extra_flags & PF_OPEN_DOORS)))
                        {
-                               /* Attempt to Bash XXX XXX XXX */
+                               /* Attempt to Bash */
                                if (check_hp_for_feat_destruction(f_ptr, m_ptr) && (randint0(m_ptr->hp / 10) > f_ptr->power))
                                {
-                                       /* Message */
                                        if (have_flag(f_ptr->flags, FF_GLASS))
                                                msg_print(_("ガラスが砕ける音がした!", "You hear a glass was crashed!"));
                                        else
@@ -2990,7 +2983,7 @@ void process_monster(MONSTER_IDX m_idx)
                                /* Wake up the moved monster */
                                (void)set_monster_csleep(c_ptr->m_idx, 0);
 
-                               /* XXX XXX XXX Message */
+                               /* Message */
                        }
                }
 
@@ -3026,7 +3019,6 @@ void process_monster(MONSTER_IDX m_idx)
                        /* Note changes to viewable region */
                        do_view = TRUE;
 
-                       /* Take a turn */
                        do_turn = TRUE;
                }
 
@@ -3064,7 +3056,6 @@ void process_monster(MONSTER_IDX m_idx)
                /* Creature has been allowed move */
                if (do_move)
                {
-                       /* Take a turn */
                        do_turn = TRUE;
 
                        if (have_flag(f_ptr->flags, FF_TREE))
@@ -3292,7 +3283,6 @@ void process_monster(MONSTER_IDX m_idx)
                /* Update some things */
                p_ptr->update |= (PU_FLOW);
 
-               /* Window stuff */
                p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
        }
 
@@ -3350,7 +3340,7 @@ void process_monster(MONSTER_IDX m_idx)
 
                if (m_ptr->ml) chg_virtue(V_COMPASSION, -1);
 
-               /* XXX XXX XXX Actually do something now (?) */
+               /* Actually do something now (?) */
        }
 }
 
@@ -3592,7 +3582,6 @@ void process_monsters(void)
                        (old_r_blows3 != r_ptr->r_blows[3]) ||
                        (old_r_cast_spell != r_ptr->r_cast_spell))
                {
-                       /* Window stuff */
                        p_ptr->window |= (PW_MONSTER);
                }
        }