OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Mon, 3 Dec 2018 22:59:21 +0000 (07:59 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Mon, 3 Dec 2018 22:59:21 +0000 (07:59 +0900)
src/floor-generate.c
src/grid.c
src/grid.h
src/object1.c
src/xtra2.c

index 809f977..0f7db3a 100644 (file)
@@ -1539,7 +1539,7 @@ bool build_tunnel(POSITION row1, POSITION col1, POSITION row2, POSITION col2)
 {
        POSITION y, x;
        POSITION tmp_row, tmp_col;
-       DIRECTION row_dir, col_dir;
+       POSITION row_dir, col_dir;
        POSITION start_row, start_col;
        int main_loop_count = 0;
 
index 81aadab..46b10b5 100644 (file)
@@ -572,24 +572,19 @@ void vault_objects(POSITION y, POSITION x, int num)
                                break;
                        }
 
-
                        if (dummy >= SAFE_MAX_ATTEMPTS && cheat_room)
                        {
                                msg_print(_("警告!地下室のアイテムを配置できません!", "Warning! Could not place vault object!"));
                        }
 
-
                        /* Require "clean" floor space */
                        c_ptr = &cave[j][k];
                        if (!is_floor_grid(c_ptr) || c_ptr->o_idx) continue;
 
-                       /* Place an item */
                        if (randint0(100) < 75)
                        {
                                place_object(j, k, 0L);
                        }
-
-                       /* Place gold */
                        else
                        {
                                place_gold(j, k);
@@ -717,7 +712,7 @@ void vault_monsters(POSITION y1, POSITION x1, int num)
  * @param x2 終点X座標
  * @return なし
  */
-void correct_dir(int *rdir, int *cdir, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
+void correct_dir(POSITION *rdir, POSITION *cdir, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 {
        /* Extract vertical and horizontal directions */
        *rdir = (y1 == y2) ? 0 : (y1 < y2) ? 1 : -1;
@@ -739,7 +734,7 @@ void correct_dir(int *rdir, int *cdir, POSITION y1, POSITION x1, POSITION y2, PO
  * @param cdir X方向に取るべきベクトル値を返す参照ポインタ
  * @return なし
  */
-void rand_dir(int *rdir, int *cdir)
+void rand_dir(POSITION *rdir, POSITION *cdir)
 {
        /* Pick a random direction */
        int i = randint0(4);
index 08b7365..3268555 100644 (file)
@@ -279,9 +279,9 @@ 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, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
+extern void correct_dir(POSITION *rdir, POSITION *cdir, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 
-extern void rand_dir(int *rdir, int *cdir);
+extern void rand_dir(POSITION *rdir, POSITION *cdir);
 
 extern bool get_is_floor(POSITION x, POSITION y);
 extern void set_floor(POSITION x, POSITION y);
index dca9f71..35f1c31 100644 (file)
@@ -2566,9 +2566,7 @@ static bool verify(cptr prompt, INVENTORY_IDX item)
 static bool get_item_allow(INVENTORY_IDX item)
 {
        cptr s;
-
        object_type *o_ptr;
-
        if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
 
        /* Inventory */
index e1d6856..11c0fbc 100644 (file)
@@ -3166,11 +3166,9 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
                        {
                                /* Display rough information about items */
 #ifdef JP
-                               sprintf(out_val, "%s %d個のアイテム%s%s ['x'で一覧, %s]",
-                                       s1, (int)floor_num, s2, s3, info);
+                               sprintf(out_val, "%s %d個のアイテム%s%s ['x'で一覧, %s]", s1, (int)floor_num, s2, s3, info);
 #else
-                               sprintf(out_val, "%s%s%sa pile of %d items [x,%s]",
-                                       s1, s2, s3, (int)floor_num, info);
+                               sprintf(out_val, "%s%s%sa pile of %d items [x,%s]", s1, s2, s3, (int)floor_num, info);
 #endif
 
                                prt(out_val, 0, 0);
@@ -3200,16 +3198,12 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
 
                                /* Prompt */
 #ifdef JP
-                               sprintf(out_val, "%s %d個のアイテム%s%s [Enterで次へ, %s]",
-                                       s1, (int)floor_num, s2, s3, info);
+                               sprintf(out_val, "%s %d個のアイテム%s%s [Enterで次へ, %s]", s1, (int)floor_num, s2, s3, info);
 #else
-                               sprintf(out_val, "%s%s%sa pile of %d items [Enter,%s]",
-                                       s1, s2, s3, (int)floor_num, info);
+                               sprintf(out_val, "%s%s%sa pile of %d items [Enter,%s]", s1, s2, s3, (int)floor_num, info);
 #endif
                                prt(out_val, 0, 0);
 
-
-                               /* Wait */
                                query = inkey();
                                screen_load();