OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / cmd2.c
index cd464de..a1e7fa4 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);
                }
        }
@@ -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;
@@ -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;
+               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)
                {
@@ -4618,7 +4617,8 @@ static void travel_flow(int ty, int tx)
  */
 void do_cmd_travel(void)
 {
-       int x, y, i;
+       POSITION x, y;
+       int i;
        int dx, dy, sx, sy;
        feature_type *f_ptr;