OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / cmd2.c
index 42adb5a..bbd673c 100644 (file)
@@ -874,7 +874,7 @@ static bool do_cmd_open_chest(int y, int x, s16b o_idx)
  * @param feat 地形ID
  * @return 開いた地形である場合TRUEを返す /  Return TRUE if the given feature is an open door
  */
-static bool is_open(int feat)
+static bool is_open(IDX feat)
 {
        return have_flag(f_info[feat].flags, FF_CLOSE) && (feat != feat_state(feat, FF_CLOSE));
 }
@@ -891,7 +891,7 @@ static bool is_open(int feat)
  * @details Return the number of features around (or under) the character.
  * Usually look for doors and floor traps.
  */
-static int count_dt(POSITION *y, POSITION *x, bool (*test)(int feat), bool under)
+static int count_dt(POSITION *y, POSITION *x, bool (*test)(IDX feat), bool under)
 {
        int d, count, xx, yy;
 
@@ -1985,8 +1985,7 @@ void do_cmd_disarm(void)
                /* See if only one target */
                if (num_traps || num_chests)
                {
-                       bool too_many = (num_traps && num_chests) || (num_traps > 1) ||
-                           (num_chests > 1);
+                       bool too_many = (num_traps && num_chests) || (num_traps > 1) || (num_chests > 1);
                        if (!too_many) command_dir = coords_to_dir(y, x);
                }
        }
@@ -2676,7 +2675,7 @@ void do_cmd_rest(void)
                /* Rest some */
                else
                {
-                       command_arg = atoi(out_val);
+                       command_arg = (COMMAND_ARG)atoi(out_val);
                        if (command_arg <= 0) return;
                }
        }
@@ -3488,7 +3487,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                                int now_exp = p_ptr->weapon_exp[0][j_ptr->sval];
                                if (now_exp < s_info[p_ptr->pclass].w_max[0][j_ptr->sval])
                                {
-                                       int amount = 0;
+                                       SUB_EXP amount = 0;
                                        if (now_exp < WEAPON_EXP_BEGINNER) amount = 80;
                                        else if (now_exp < WEAPON_EXP_SKILLED) amount = 25;
                                        else if ((now_exp < WEAPON_EXP_EXPERT) && (p_ptr->lev > 19)) amount = 10;
@@ -3648,7 +3647,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                                        if (snipe_type == SP_RUSH)
                                        {
                                                int n = randint1(5) + 3;
-                                               IDX m_idx = c_mon_ptr->m_idx;
+                                               MONSTER_IDX m_idx = c_mon_ptr->m_idx;
 
                                                for ( ; cur_dis <= tdis; )
                                                {
@@ -3711,9 +3710,9 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
 
        if (stick_to)
        {
-               int m_idx = cave[y][x].m_idx;
+               MONSTER_IDX m_idx = cave[y][x].m_idx;
                monster_type *m_ptr = &m_list[m_idx];
-               int o_idx = o_pop();
+               IDX o_idx = o_pop();
 
                if (!o_idx)
                {
@@ -3767,7 +3766,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
  */
 void do_cmd_fire(void)
 {
-       int item;
+       OBJECT_IDX item;
        object_type *j_ptr;
        cptr q, s;
 
@@ -3864,9 +3863,10 @@ static bool item_tester_hook_boomerang(object_type *o_ptr)
  * the item to be destroyed?  Should it do any damage at all?
  * </pre>
  */
-bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
+bool do_cmd_throw_aux(int mult, bool boomerang, OBJECT_IDX shuriken)
 {
-       int dir, item;
+       DIRECTION dir;
+       OBJECT_IDX item;
        int i, j, y, x, ty, tx, prev_y, prev_x;
        int ny[19], nx[19];
        int chance, tdam, tdis;
@@ -4442,8 +4442,8 @@ void do_cmd_throw(void)
 
 static int flow_head = 0;
 static int flow_tail = 0;
-static s16b temp2_x[MAX_SHORT];
-static s16b temp2_y[MAX_SHORT];
+static POSITION temp2_x[MAX_SHORT];
+static POSITION temp2_y[MAX_SHORT];
 
 /*!
  * @brief トラベル処理の記憶配列を初期化する Hack: forget the "flow" information 
@@ -4515,7 +4515,7 @@ static int travel_flow_cost(int y, int x)
  * @param wall プレイヤーが壁の中にいるならばTRUE
  * @return なし
  */
-static void travel_flow_aux(int y, int x, int n, bool wall)
+static void travel_flow_aux(POSITION y, POSITION x, int n, bool wall)
 {
        cave_type *c_ptr = &cave[y][x];
        feature_type *f_ptr = &f_info[c_ptr->feat];