From: Deskull Date: Mon, 3 Dec 2018 22:59:21 +0000 (+0900) Subject: [Refactor] #37353 型の置換。 / Type replacement. X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=ac11db5d244b62930283a06a9c6e81a188233c1c [Refactor] #37353 型の置換。 / Type replacement. --- diff --git a/src/floor-generate.c b/src/floor-generate.c index 809f977e0..0f7db3aab 100644 --- a/src/floor-generate.c +++ b/src/floor-generate.c @@ -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; diff --git a/src/grid.c b/src/grid.c index 81aadab57..46b10b5e7 100644 --- a/src/grid.c +++ b/src/grid.c @@ -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); diff --git a/src/grid.h b/src/grid.h index 08b736588..3268555be 100644 --- a/src/grid.h +++ b/src/grid.h @@ -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); diff --git a/src/object1.c b/src/object1.c index dca9f716b..35f1c31e4 100644 --- a/src/object1.c +++ b/src/object1.c @@ -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 */ diff --git a/src/xtra2.c b/src/xtra2.c index e1d685678..11c0fbc78 100644 --- a/src/xtra2.c +++ b/src/xtra2.c @@ -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();