OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Sat, 23 Sep 2017 00:59:52 +0000 (09:59 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sat, 23 Sep 2017 00:59:52 +0000 (09:59 +0900)
src/birth.c
src/cmd1.c
src/cmd2.c
src/object2.c
src/types.h

index 0e8c579..67f4e60 100644 (file)
@@ -2708,7 +2708,7 @@ static void get_stats(void)
                        val = 5 + 3;
                        val += tmp % 3; tmp /= 3;
                        val += tmp % 4; tmp /= 4;
-                       val += tmp;
+                       val += (base_status)tmp;
 
                        /* Save that value */
                        sum += val;
index c34a937..fe3ff77 100644 (file)
@@ -2833,7 +2833,7 @@ bool move_player_effect(position ny, position nx, u32b mpe_mode)
                position oy = p_ptr->y;
                position ox = p_ptr->x;
                cave_type *oc_ptr = &cave[oy][ox];
-               int om_idx = oc_ptr->m_idx;
+               idx om_idx = oc_ptr->m_idx;
                idx nm_idx = c_ptr->m_idx;
 
                /* Move the player */
@@ -3633,12 +3633,12 @@ static byte chome[] =
 /*
  * The direction we are running
  */
-static byte find_current;
+static direction find_current;
 
 /*
  * The direction we came from
  */
-static byte find_prevdir;
+static direction find_prevdir;
 
 /*
  * We are looking for open area
index 0bb1503..7cbe03c 100644 (file)
@@ -995,7 +995,7 @@ static int count_chests(int *y, int *x, bool trapped)
  * @param x 方角を確認したX座標
  * @return 方向ID
  */
-static int coords_to_dir(int y, int x)
+static direction coords_to_dir(position y, position x)
 {
        int d[3][3] = { {7, 4, 1}, {8, 5, 2}, {9, 6, 3} };
        int dy, dx;
@@ -1119,9 +1119,9 @@ static bool do_cmd_open_aux(int y, int x)
  */
 void do_cmd_open(void)
 {
-       int y, x, dir;
-
-       s16b o_idx;
+       int y, x;
+       direction dir;
+       idx o_idx;
 
        bool more = FALSE;
 
index 3d525ee..ad72d30 100644 (file)
@@ -250,15 +250,12 @@ void delete_object(int y, int x)
  * @param i2 整理したい配列の終点
  * @return なし
  */
-static void compact_objects_aux(int i1, int i2)
+static void compact_objects_aux(idx i1, idx i2)
 {
-       int i;
-
+       idx i;
        cave_type *c_ptr;
-
        object_type *o_ptr;
 
-
        /* Do nothing */
        if (i1 == i2) return;
 
index 0a14da4..c645462 100644 (file)
@@ -564,8 +564,7 @@ struct object_type
 
        u32b curse_flags;        /* Flags for curse */
 
-       s16b next_o_idx;        /* Next object in stack (if any) */
-
+       idx next_o_idx; /* Next object in stack (if any) */
        idx held_m_idx; /* Monster holding us (if any) */
 };