OSDN Git Service

[Refactor] #37287 #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Sun, 4 Nov 2018 14:39:24 +0000 (23:39 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 4 Nov 2018 14:39:24 +0000 (23:39 +0900)
src/mind.c
src/monster-process.c
src/monster2.c
src/object2.c
src/realm-hex.c
src/realm-hissatsu.c
src/realm-trump.c
src/rooms-vault.c
src/z-term.c

index 1e7f880..871d6bf 100644 (file)
@@ -1377,16 +1377,16 @@ static bool cast_force_spell(int spell)
  * @brief 現在フロアに存在している鏡の数を数える / calculate mirrors
  * @return 鏡の枚数
  */
-static int number_of_mirrors( void )
+static int number_of_mirrors(void)
 {
-  int x,y;
-  int val=0;
-  for( x=0 ; x < cur_wid ; x++ ){
-    for( y=0 ; y < cur_hgt ; y++ ){
-      if (is_mirror_grid(&cave[y][x])) val++;
-    }
-  }
-  return val;
+       POSITION x, y;
+       int val = 0;
+       for (x = 0; x < cur_wid; x++) {
+               for (y = 0; y < cur_hgt; y++) {
+                       if (is_mirror_grid(&cave[y][x])) val++;
+               }
+       }
+       return val;
 }
 
 /*!
index 64b87de..2e11222 100644 (file)
@@ -27,7 +27,7 @@
 static bool get_enemy_dir(MONSTER_IDX m_idx, int *mm)
 {
        int i;
-       int x = 0, y = 0;
+       POSITION x = 0, y = 0;
        IDX t_idx;
        int start;
        int plus = 1;
index 58786bf..53e69cf 100644 (file)
@@ -224,20 +224,15 @@ monster_race *real_r_ptr(monster_type *m_ptr)
  */
 void delete_monster_idx(MONSTER_IDX i)
 {
-       int x, y;
-
+       POSITION x, y;
        monster_type *m_ptr = &m_list[i];
-
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
-
-       s16b this_o_idx, next_o_idx = 0;
-
+       OBJECT_IDX this_o_idx, next_o_idx = 0;
 
        /* Get location */
        y = m_ptr->fy;
        x = m_ptr->fx;
 
-
        /* Hack -- Reduce the racial counter */
        real_r_ptr(m_ptr)->cur_num--;
 
index 64f9a0a..9bd03ec 100644 (file)
@@ -128,8 +128,8 @@ void excise_object_idx(OBJECT_IDX o_idx)
        {
                cave_type *c_ptr;
 
-               int y = j_ptr->iy;
-               int x = j_ptr->ix;
+               POSITION y = j_ptr->iy;
+               POSITION x = j_ptr->ix;
 
                /* Grid */
                c_ptr = &cave[y][x];
@@ -521,8 +521,8 @@ void wipe_o_list(void)
                        cave_type *c_ptr;
 
                        /* Access location */
-                       int y = o_ptr->iy;
-                       int x = o_ptr->ix;
+                       POSITION y = o_ptr->iy;
+                       POSITION x = o_ptr->ix;
 
                        /* Access grid */
                        c_ptr = &cave[y][x];
index c7f3f98..340e78d 100644 (file)
@@ -58,17 +58,13 @@ bool stop_hex_spell(void)
        char choice;
        char out_val[160];
        bool flag = FALSE;
-       int y = 1;
-       int x = 20;
+       TERM_POSITION y = 1;
+       TERM_POSITION x = 20;
        int sp[MAX_KEEP];
 
        if (!hex_spelling_any())
        {
-#ifdef JP
-               msg_print("呪文を詠唱していません。");
-#else
-               msg_print("You are casting no spell.");
-#endif
+               msg_print(_("呪文を詠唱していません。", "You are casting no spell."));
                return FALSE;
        }
 
index 18df0f9..8eb3865 100644 (file)
@@ -808,7 +808,7 @@ cptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                if (cast)
                {
-                       int x, y;
+                       POSITION x, y;
 
                        if (!get_rep_dir(&dir, FALSE)) return NULL;
 
index 303e3d2..2a5ffb3 100644 (file)
@@ -179,7 +179,7 @@ cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast || fail)
                        {
-                               int x, y;
+                               POSITION x, y;
                                int type;
 
                                if (cast)
index 446e52b..dc5bd36 100644 (file)
@@ -147,9 +147,10 @@ static void build_bubble_vault(int x0, int y0, int xsize, int ysize)
 }\r
 \r
 /* Create a random vault that looks like a collection of overlapping rooms */\r
-static void build_room_vault(int x0, int y0, int xsize, int ysize)\r
+static void build_room_vault(POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)\r
 {\r
-       int i, x1, x2, y1, y2, xhsize, yhsize;\r
+       POSITION x1, x2, y1, y2, xhsize, yhsize;\r
+       int i;\r
 \r
        /* get offset from center */\r
        xhsize = xsize / 2;\r
@@ -160,11 +161,11 @@ static void build_room_vault(int x0, int y0, int xsize, int ysize)
        /* fill area so don't get problems with arena levels */\r
        for (x1 = 0; x1 < xsize; x1++)\r
        {\r
-               int x = x0 - xhsize + x1;\r
+               POSITION x = x0 - xhsize + x1;\r
 \r
                for (y1 = 0; y1 < ysize; y1++)\r
                {\r
-                       int y = y0 - yhsize + y1;\r
+                       POSITION y = y0 - yhsize + y1;\r
 \r
                        place_extra_bold(y, x);\r
                        cave[y][x].info &= (~CAVE_ICKY);\r
index 05b1711..d18075d 100644 (file)
@@ -52,7 +52,8 @@
  * computers, and to check for "keypresses" from the user.  The major
  * concerns were thus portability and efficiency, so Angband could be
  * easily ported to many different systems, with minimal effort, and
- * yet would run quickly on each of these systems, no matter what kind
+ * yet would run quickly on each of these sys
+ tems, no matter what kind
  * of underlying hardware/software support was being used.
  *
  * It is important to understand the differences between the older