From 36881be66ca3223d4b0d464ec54a677e545360dc Mon Sep 17 00:00:00 2001 From: Deskull Date: Tue, 12 Dec 2017 00:41:32 +0900 Subject: [PATCH] =?utf8?q?#37287=20#37353=20(2.2.0.89)=20FEAT=5FSUBTYPE,?= =?utf8?q?=20FEAT=5FPRIORITY=20=E5=9E=8B=E3=82=92=E5=AE=9A=E7=BE=A9?= =?utf8?q?=E3=81=97=E3=80=81=E5=9E=8B=E3=81=AE=E7=BD=AE=E6=8F=9B=E3=82=92?= =?utf8?q?=E7=B6=99=E7=B6=9A=E4=B8=AD=E3=80=82=20/=20Define=20FEAT=5FSUBTY?= =?utf8?q?PE,=20FEAT=5FPRIORITY=20ongoing=20type=20replacement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/h-type.h | 3 +++ src/init1.c | 2 +- src/main-win.c | 2 +- src/types.h | 4 ++-- src/xtra2.c | 4 ++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/h-type.h b/src/h-type.h index 11e3b2966..c5e92885c 100644 --- a/src/h-type.h +++ b/src/h-type.h @@ -134,6 +134,7 @@ typedef s32b POSITION; /*!< ゲーム中の座標型を定義 */ typedef s16b POSITION_IDX; /*!< ゲーム中の座標リストID型 */ typedef s32b ALIGNMENT; /*!< 善悪属性の型定義 */ +typedef byte FEAT_SUBTYPE; /*!< 地形情報の副値 (トラップ種別/パターン種別/店舗種別)*/ /*! * @var typedef s32b HIT_POINT @@ -240,6 +241,8 @@ typedef s16b ACTION_SKILL_POWER; /*!< 行動技能値 */ typedef int PET_COMMAND_IDX; /*!< ペットへの指示ID */ typedef byte FF_FLAGS_IDX; /*!< 地形特性ID */ +typedef s16b FEAT_PRIORITY; /*!< 地形の縮小表示優先順位 */ + /*** Pointers to all the basic types defined above ***/ typedef real *real_ptr; diff --git a/src/init1.c b/src/init1.c index 9ddb02948..00f81c4e9 100644 --- a/src/init1.c +++ b/src/init1.c @@ -1821,7 +1821,7 @@ errr parse_f_info(char *buf, header *head) if (1 == sscanf(s, "SUBTYPE_%d", &i)) { /* Extract a "subtype" */ - f_ptr->subtype = i; + f_ptr->subtype = (FEAT_SUBTYPE)i; /* Start at next entry */ s = t; diff --git a/src/main-win.c b/src/main-win.c index c7418172e..689d7b317 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -1691,7 +1691,7 @@ static bool init_graphics(void) /* if (can_use_graphics != arg_graphics) */ { char buf[1024]; - int wid, hgt, twid, thgt, ox, oy; + BYTE wid, hgt, twid, thgt, ox, oy; cptr name; if (arg_graphics == GRAPHICS_ADAM_BOLT) diff --git a/src/types.h b/src/types.h index f8443b4df..67bee7d1f 100644 --- a/src/types.h +++ b/src/types.h @@ -79,11 +79,11 @@ struct feature_type BIT_FLAGS flags[FF_FLAG_SIZE]; /*!< 地形の基本特性ビット配列 / Flags */ - u16b priority; /*!< 縮小表示で省略する際の表示優先度 / Map priority */ + FEAT_PRIORITY priority; /*!< 縮小表示で省略する際の表示優先度 / Map priority */ feature_state state[MAX_FEAT_STATES]; /*!< feature_state テーブル */ - byte subtype; /*!< 副特性値 */ + FEAT_SUBTYPE subtype; /*!< 副特性値 */ FEAT_POWER power; /*!< 地形強度 */ SYMBOL_COLOR d_attr[F_LIT_MAX]; /*!< デフォルトの地形シンボルカラー / Default feature attribute */ diff --git a/src/xtra2.c b/src/xtra2.c index 1f54bd4ef..350e67bce 100644 --- a/src/xtra2.c +++ b/src/xtra2.c @@ -3510,9 +3510,9 @@ static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info) if (c_ptr->mimic) sprintf(f_idx_str, "%d/%d", c_ptr->feat, c_ptr->mimic); else sprintf(f_idx_str, "%d", c_ptr->feat); #ifdef JP - sprintf(out_val, "%s%s%s%s[%s] %x %s %d %d %d (%d,%d) %d", s1, name, s2, s3, info, c_ptr->info, f_idx_str, c_ptr->dist, c_ptr->cost, c_ptr->when, y, x, travel.cost[y][x]); + sprintf(out_val, "%s%s%s%s[%s] %x %s %d %d %d (%d,%d) %d", s1, name, s2, s3, info, c_ptr->info, f_idx_str, c_ptr->dist, c_ptr->cost, c_ptr->when, (int)y, (int)x, travel.cost[y][x]); #else - sprintf(out_val, "%s%s%s%s [%s] %x %s %d %d %d (%d,%d)", s1, s2, s3, name, info, c_ptr->info, f_idx_str, c_ptr->dist, c_ptr->cost, c_ptr->when, y, x); + sprintf(out_val, "%s%s%s%s [%s] %x %s %d %d %d (%d,%d)", s1, s2, s3, name, info, c_ptr->info, f_idx_str, c_ptr->dist, c_ptr->cost, c_ptr->when, (int)y, (int)x); #endif } else -- 2.11.0