OSDN Git Service

[Refactor] #37287 #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Tue, 6 Nov 2018 13:08:24 +0000 (22:08 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Tue, 6 Nov 2018 13:08:24 +0000 (22:08 +0900)
src/cave.c
src/grid.c
src/grid.h
src/rooms-vault.c

index 9371c30..3a30d0b 100644 (file)
@@ -4417,8 +4417,8 @@ void wiz_lite(bool ninja)
                                /* Scan all neighbors */
                                for (i = 0; i < 9; i++)
                                {
-                                       int yy = y + ddy_ddd[i];
-                                       int xx = x + ddx_ddd[i];
+                                       POSITION yy = y + ddy_ddd[i];
+                                       POSITION xx = x + ddx_ddd[i];
 
                                        /* Get the grid */
                                        c_ptr = &cave[yy][xx];
index 8fe356d..301457a 100644 (file)
@@ -400,9 +400,10 @@ void add_door(POSITION x, POSITION y)
 * grids which are not in rooms.  We might want to also count stairs,\n
 * open doors, closed doors, etc.
 */
-static int next_to_corr(int y1, int x1)
+static int next_to_corr(POSITION y1, POSITION x1)
 {
-       int i, y, x, k = 0;
+       int i, k = 0;
+       POSITION y, x;
 
        cave_type *c_ptr;
 
@@ -728,7 +729,7 @@ void vault_monsters(POSITION y1, POSITION x1, int num)
  * @param x2 終点X座標
  * @return なし
  */
-void correct_dir(int *rdir, int *cdir, int y1, int x1, int y2, int x2)
+void correct_dir(int *rdir, int *cdir, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 {
        /* Extract vertical and horizontal directions */
        *rdir = (y1 == y2) ? 0 : (y1 < y2) ? 1 : -1;
index d856c0e..08b7365 100644 (file)
@@ -279,7 +279,7 @@ extern void vault_objects(POSITION y, POSITION x, int num);
 extern void vault_trap_aux(POSITION y, POSITION x, POSITION yd, POSITION xd);
 extern void vault_traps(POSITION y, POSITION x, POSITION yd, POSITION xd, int num);
 
-extern void correct_dir(int *rdir, int *cdir, int y1, int x1, int y2, int x2);
+extern void correct_dir(int *rdir, int *cdir, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 
 extern void rand_dir(int *rdir, int *cdir);
 
index 0ee727a..2827765 100644 (file)
@@ -197,10 +197,11 @@ static void build_room_vault(POSITION x0, POSITION y0, POSITION xsize, POSITION
 \r
 \r
 /* Create a random vault out of a fractal cave */\r
-static void build_cave_vault(int x0, int y0, int xsiz, int ysiz)\r
+static void build_cave_vault(POSITION x0, POSITION y0, POSITION xsiz, POSITION ysiz)\r
 {\r
-       int grd, roug, cutoff, xhsize, yhsize, xsize, ysize, x, y;\r
+       int grd, roug, cutoff;\r
        bool done, light, room;\r
+       POSITION xhsize, yhsize, xsize, ysize, x, y;\r
 \r
        /* round to make sizes even */\r
        xhsize = xsiz / 2;\r
@@ -667,7 +668,7 @@ bool build_type8(void)
        POSITION xval, yval;\r
        POSITION x, y;\r
        int transno;\r
-       int xoffset, yoffset;\r
+       POSITION xoffset, yoffset;\r
 \r
        /* Pick a greater vault */\r
        for (dummy = 0; dummy < SAFE_MAX_ATTEMPTS; dummy++)\r
@@ -748,12 +749,12 @@ bool build_type8(void)
 * This is made by two concentric "crypts" with perpendicular\r
 * walls creating the cross-hairs.\r
 */\r
-static void build_target_vault(int x0, int y0, int xsize, int ysize)\r
+static void build_target_vault(POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)\r
 {\r
-       int rad, x, y;\r
+       POSITION rad, x, y;\r
 \r
        /* Make a random metric */\r
-       int h1, h2, h3, h4;\r
+       POSITION h1, h2, h3, h4;\r
        h1 = randint1(32) - 16;\r
        h2 = randint1(16);\r
        h3 = randint1(32);\r