OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Sat, 17 Nov 2018 15:16:26 +0000 (00:16 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sat, 17 Nov 2018 15:16:26 +0000 (00:16 +0900)
src/birth.c
src/bldg.c
src/cave.c
src/floor-generate.c
src/types.h

index 0a3b9e3..0bc4c12 100644 (file)
@@ -3874,7 +3874,7 @@ static bool do_cmd_histpref(void)
 static void edit_history(void)
 {
        char old_history[4][60];
-       int y = 0, x = 0;
+       TERM_LEN y = 0, x = 0;
        int i, j;
 
        /* Edit character background */
index d73adb0..4049667 100644 (file)
@@ -1744,7 +1744,7 @@ static void tsuchinoko(void)
 static void shoukinkubi(void)
 {
        int i;
-       int y = 0;
+       TERM_LEN y = 0;
 
        clear_bldg(4,18);
        prt(_("死体を持ち帰れば報酬を差し上げます。", "Offer a prize when you bring a wanted monster's corpse"),4 ,10);
index 11ae836..16a01b3 100644 (file)
@@ -5088,7 +5088,8 @@ void disturb(int stop_search, int stop_travel)
  */
 void glow_deep_lava_and_bldg(void)
 {
-       int y, x, i, yy, xx;
+       POSITION y, x, yy, xx;
+       DIRECTION i;
        cave_type *c_ptr;
 
        /* Not in the darkness dungeon */
index b140aa7..c60da9f 100644 (file)
@@ -212,7 +212,7 @@ static bool alloc_stairs(IDX feat, int num, int walls)
        {
                while (TRUE)
                {
-                       int y = 0, x = 0;
+                       POSITION y, x = 0;
                        cave_type *c_ptr;
 
                        int candidates = 0;
@@ -288,7 +288,8 @@ static bool alloc_stairs(IDX feat, int num, int walls)
  */
 static void alloc_object(int set, EFFECT_ID typ, int num)
 {
-       int y = 0, x = 0, k;
+       POSITION y = 0, x = 0;
+       int k;
        int dummy = 0;
        cave_type *c_ptr;
 
@@ -1038,9 +1039,9 @@ static void build_arena(void)
  */
 static void arena_gen(void)
 {
-       int y, x;
-       int qy = 0;
-       int qx = 0;
+       POSITION y, x;
+       POSITION qy = 0;
+       POSITION qx = 0;
 
        /* Smallest area */
        cur_hgt = SCREEN_HGT;
@@ -1149,10 +1150,10 @@ static void build_battle(void)
  */
 static void battle_gen(void)
 {
-       int y, x;
+       POSITION y, x;
        MONSTER_IDX i;
-       int qy = 0;
-       int qx = 0;
+       POSITION qy = 0;
+       POSITION qx = 0;
 
        /* Start with solid walls */
        for (y = 0; y < MAX_HGT; y++)
@@ -1550,10 +1551,10 @@ if (why) msg_format("生成やり直し(%s)", why);
 */
 bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2)
 {
-       int y, x;
+       POSITION y, x;
        POSITION tmp_row, tmp_col;
-       int row_dir, col_dir;
-       int start_row, start_col;
+       DIRECTION row_dir, col_dir;
+       POSITION start_row, start_col;
        int main_loop_count = 0;
 
        bool door_flag = FALSE;
index d1fe31c..d41dd9c 100644 (file)
@@ -1694,7 +1694,7 @@ typedef struct
 {
        BIT_FLAGS info;
        FEAT_IDX feat;
-       s16b mimic;
+       FEAT_IDX mimic;
        s16b special;
        u16b occurrence;
 } cave_template_type;
@@ -1735,7 +1735,7 @@ typedef struct {
        int run; /* Remaining grid number */
        int cost[MAX_HGT][MAX_WID];
        POSITION x; /* Target X */
-       int y; /* Target Y */
+       POSITION y; /* Target Y */
        DIRECTION dir; /* Running direction */
 } travel_type;
 #endif