OSDN Git Service

[Refactor] #37353 player-item.c/hにref_item()を追加。
[hengband/hengband.git] / src / cmd2.c
index 794cd2a..3f6da28 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);
 }
 
@@ -900,8 +883,6 @@ static bool do_cmd_close_aux(POSITION y, POSITION x)
                        }
                }
        }
-
-       /* Result */
        return (more);
 }
 
@@ -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;
 }
 
@@ -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);
 }
 
@@ -1498,8 +1473,6 @@ bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
                /* Move the player onto the trap */
                move_player(dir, easy_disarm, FALSE);
        }
-
-       /* Result */
        return (more);
 }
 
@@ -1696,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);
 }