OSDN Git Service

[Refactor] #37353 mon_take_hit() のコメントアウト済落馬処理を削除。 / Delete comment outed process...
[hengband/hengband.git] / src / cmd2.c
index 15a2032..79cf6db 100644 (file)
@@ -401,19 +401,14 @@ void do_cmd_search(void)
 static OBJECT_IDX chest_check(POSITION y, POSITION x, bool trapped)
 {
        cave_type *c_ptr = &cave[y][x];
-
        OBJECT_IDX this_o_idx, next_o_idx = 0;
 
-
        /* Scan all objects in the grid */
        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 */
                next_o_idx = o_ptr->next_o_idx;
 
                /* Skip unknown chests XXX XXX */
@@ -427,8 +422,6 @@ static OBJECT_IDX chest_check(POSITION y, POSITION x, bool trapped)
                        return (this_o_idx);
                }
        }
-
-       /* No chest */
        return (0);
 }
 
@@ -498,14 +491,9 @@ static bool do_cmd_open_chest(POSITION y, POSITION x, OBJECT_IDX o_idx)
                /* Let the Chest drop items */
                chest_death(FALSE, y, x, o_idx);
        }
-
-       /* Result */
        return (more);
 }
 
-
-#if defined(ALLOW_EASY_DISARM) /* TNB */
-
 /*!
  * @brief 地形は開くものであって、かつ開かれているかを返す /
  * Attempt to open the given chest at the given location
@@ -648,9 +636,6 @@ static DIRECTION coords_to_dir(POSITION y, POSITION x)
        return d[dx + 1][dy + 1];
 }
 
-#endif /* defined(ALLOW_EASY_DISARM) -- TNB */
-
-
 /*!
  * @brief 「開ける」動作コマンドのサブルーチン /
  * Perform the basic "open" command on doors
@@ -736,8 +721,6 @@ static bool do_cmd_open_aux(POSITION y, POSITION x)
 
                sound(SOUND_OPENDOOR);
        }
-
-       /* Result */
        return (more);
 }
 
@@ -846,7 +829,7 @@ void do_cmd_open(void)
        }
 
        /* Cancel repeat unless we may continue */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -900,8 +883,6 @@ static bool do_cmd_close_aux(POSITION y, POSITION x)
                        }
                }
        }
-
-       /* Result */
        return (more);
 }
 
@@ -990,7 +971,7 @@ void do_cmd_close(void)
        }
 
        /* Cancel repeat unless we may continue */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -1147,8 +1128,6 @@ static bool do_cmd_tunnel_aux(POSITION y, POSITION x)
                /* Occasional Search XXX XXX */
                if (randint0(100) < 25) search();
        }
-
-       /* Result */
        return more;
 }
 
@@ -1239,7 +1218,7 @@ void do_cmd_tunnel(void)
        }
 
        /* Cancel repetition unless we can continue */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 /*!
@@ -1329,8 +1308,6 @@ bool easy_open_door(POSITION y, POSITION x)
 
                sound(SOUND_OPENDOOR);
        }
-
-       /* Result */
        return (TRUE);
 }
 
@@ -1412,8 +1389,6 @@ static bool do_cmd_disarm_chest(POSITION y, POSITION x, OBJECT_IDX o_idx)
                sound(SOUND_FAIL);
                chest_trap(y, x, o_idx);
        }
-
-       /* Result */
        return (more);
 }
 
@@ -1432,15 +1407,8 @@ static bool do_cmd_disarm_chest(POSITION y, POSITION x, OBJECT_IDX o_idx)
  * Returns TRUE if repeated commands may continue
  * </pre>
  */
-#ifdef ALLOW_EASY_DISARM /* TNB */
 
 bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
-
-#else /* ALLOW_EASY_DISARM -- TNB */
-
-static bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
-
-#endif /* ALLOW_EASY_DISARM -- TNB */
 {
        /* Get grid and contents */
        cave_type *c_ptr = &cave[y][x];
@@ -1482,17 +1450,8 @@ static bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
                /* Remove the trap */
                cave_alter_feat(y, x, FF_DISARM);
 
-#ifdef ALLOW_EASY_DISARM /* TNB */
-
                /* Move the player onto the trap */
                move_player(dir, easy_disarm, FALSE);
-
-#else /* ALLOW_EASY_DISARM -- TNB */
-
-               /* move the player onto the trap grid */
-               move_player(dir, FALSE, FALSE);
-
-#endif /* ALLOW_EASY_DISARM -- TNB */
        }
 
        /* Failure -- Keep trying */
@@ -1511,21 +1470,9 @@ static bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
        else
        {
                msg_format(_("%sを作動させてしまった!", "You set off the %s!"), name);
-
-#ifdef ALLOW_EASY_DISARM /* TNB */
-
                /* Move the player onto the trap */
                move_player(dir, easy_disarm, FALSE);
-
-#else /* ALLOW_EASY_DISARM -- TNB */
-
-               /* Move the player onto the trap */
-               move_player(dir, FALSE, FALSE);
-
-#endif /* ALLOW_EASY_DISARM -- TNB */
        }
-
-       /* Result */
        return (more);
 }
 
@@ -1548,7 +1495,6 @@ void do_cmd_disarm(void)
                set_action(ACTION_NONE);
        }
 
-#ifdef ALLOW_EASY_DISARM /* TNB */
 
        /* Option: Pick a direction */
        if (easy_disarm)
@@ -1569,7 +1515,6 @@ void do_cmd_disarm(void)
                }
        }
 
-#endif /* ALLOW_EASY_DISARM -- TNB */
 
        /* Allow repeated command */
        if (command_arg)
@@ -1634,7 +1579,7 @@ void do_cmd_disarm(void)
        }
 
        /* Cancel repeat unless told not to */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -1724,8 +1669,6 @@ static bool do_cmd_bash_aux(POSITION y, POSITION x, DIRECTION dir)
                /* Hack -- Lose balance ala paralysis */
                (void)set_paralyzed(p_ptr->paralyzed + 2 + randint0(2));
        }
-
-       /* Result */
        return (more);
 }
 
@@ -1816,7 +1759,7 @@ void do_cmd_bash(void)
        }
 
        /* Unless valid action taken, cancel bash */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -1925,7 +1868,7 @@ void do_cmd_alter(void)
        }
 
        /* Cancel repetition unless we can continue */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -2117,7 +2060,7 @@ void do_cmd_walk(bool pickup)
        }
 
        /* Cancel repeat unless we may continue */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -2786,7 +2729,6 @@ void do_cmd_fire_aux(INVENTORY_IDX item, object_type *j_ptr)
        /* Sniper - Cannot shot a single arrow twice */
        if ((snipe_type == SP_DOUBLE) && (o_ptr->number < 2)) snipe_type = SP_NONE;
 
-       /* Describe the object */
        object_desc(o_name, o_ptr, OD_OMIT_PREFIX);
 
        /* Use the proper number of shots */
@@ -2966,7 +2908,6 @@ void do_cmd_fire_aux(INVENTORY_IDX item, object_type *j_ptr)
 
                        note_spot(ny, nx);
 
-                       /* Redraw */
                        lite_spot(ny, nx);
                }
 
@@ -3006,7 +2947,6 @@ void do_cmd_fire_aux(INVENTORY_IDX item, object_type *j_ptr)
 
                        note_spot(ny, nx);
 
-                       /* Redraw */
                        lite_spot(ny, nx);
                }
 
@@ -3150,7 +3090,6 @@ void do_cmd_fire_aux(INVENTORY_IDX item, object_type *j_ptr)
 
                                        note_spot(ny, nx);
 
-                                       /* Redraw */
                                        lite_spot(ny, nx);
                                }
 
@@ -3227,7 +3166,7 @@ void do_cmd_fire_aux(INVENTORY_IDX item, object_type *j_ptr)
                                                        m_ptr->fy = ny;
 
                                                        /* Update the monster (new location) */
-                                                       update_mon(c_mon_ptr->m_idx, TRUE);
+                                                       update_monster(c_mon_ptr->m_idx, TRUE);
 
                                                        lite_spot(ny, nx);
                                                        lite_spot(oy, ox);