From 25cf88bc70d8d08b155f78cc152b247711d0757d Mon Sep 17 00:00:00 2001 From: Deskull Date: Tue, 19 Dec 2017 00:11:07 +0900 Subject: [PATCH] =?utf8?q?#37287=20#37353=20(2.2.0.89)=20=E5=9E=8B?= =?utf8?q?=E3=81=AE=E7=BD=AE=E6=8F=9B=E3=82=92=E7=B6=99=E7=B6=9A=E3=81=97?= =?utf8?q?=E3=80=81=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92=E8=BF=BD?= =?utf8?q?=E5=8A=A0=E3=80=82/=20Ongoing=20type=20replacement=20and=20addin?= =?utf8?q?g=20comments.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cmd1.c | 8 ++++---- src/flavor.c | 2 +- src/floors.c | 2 +- src/init1.c | 4 ++-- src/save.c | 4 ++-- src/types.h | 17 +++++++++++++---- src/variable.c | 8 +++++--- src/xtra2.c | 2 +- 8 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/cmd1.c b/src/cmd1.c index c0852d9df..f93ee1774 100644 --- a/src/cmd1.c +++ b/src/cmd1.c @@ -567,10 +567,9 @@ s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, BIT_FLAGS mo * @param x 対象となるマスのX座標 * @return なし */ -static void discover_hidden_things(int y, int x) +static void discover_hidden_things(POSITION y, POSITION x) { - s16b this_o_idx, next_o_idx = 0; - + OBJECT_IDX this_o_idx, next_o_idx = 0; cave_type *c_ptr; /* Access the grid */ @@ -640,7 +639,8 @@ static void discover_hidden_things(int y, int x) */ void search(void) { - int i, chance; + DIRECTION i; + PERCENTAGE chance; /* Start with base search ability */ chance = p_ptr->skill_srh; diff --git a/src/flavor.c b/src/flavor.c index 57a5cb458..4aff4dc63 100644 --- a/src/flavor.c +++ b/src/flavor.c @@ -281,7 +281,7 @@ static void shuffle_flavors(byte tval) */ void flavor_init(void) { - int i; + KIND_OBJECT_IDX i; u32b state_backup[4]; /* Hack -- Backup the RNG state */ diff --git a/src/floors.c b/src/floors.c index eda649571..7366f8cb9 100644 --- a/src/floors.c +++ b/src/floors.c @@ -251,7 +251,7 @@ s16b get_new_floor_id(void) /* None found */ if (i == MAX_SAVED_FLOORS) { - int oldest = 0; + s16b oldest = 0; u32b oldest_visit = 0xffffffffL; /* Search for oldest */ diff --git a/src/init1.c b/src/init1.c index e51b84978..c69fb590c 100644 --- a/src/init1.c +++ b/src/init1.c @@ -3624,8 +3624,8 @@ struct dungeon_grid OBJECT_IDX object; /* Object */ EGO_IDX ego; /* Ego-Item */ ARTIFACT_IDX artifact; /* Artifact */ - IDX trap; /* Trap */ - int cave_info; /* Flags for CAVE_MARK, CAVE_GLOW, CAVE_ICKY, CAVE_ROOM */ + IDX trap; /* Trap */ + BIT_FLAGS cave_info; /* Flags for CAVE_MARK, CAVE_GLOW, CAVE_ICKY, CAVE_ROOM */ s16b special; /* Reserved for special terrain info */ int random; /* Number of the random effect */ }; diff --git a/src/save.c b/src/save.c index 8ff189474..341f3c4c7 100644 --- a/src/save.c +++ b/src/save.c @@ -940,7 +940,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr) /*** The saved floor ***/ wr_s16b(sf_ptr->floor_id); - wr_byte(sf_ptr->savefile_id); + wr_byte((byte_hack)sf_ptr->savefile_id); wr_s16b((s16b)sf_ptr->dun_level); wr_s32b(sf_ptr->last_visit); wr_u32b(sf_ptr->visit_mark); @@ -1211,7 +1211,7 @@ static bool wr_dungeon(void) saved_floor_type *sf_ptr = &saved_floors[i]; wr_s16b(sf_ptr->floor_id); - wr_byte(sf_ptr->savefile_id); + wr_byte((byte_hack)sf_ptr->savefile_id); wr_s16b((s16b)sf_ptr->dun_level); wr_s32b(sf_ptr->last_visit); wr_u32b(sf_ptr->visit_mark); diff --git a/src/types.h b/src/types.h index aae13d322..2e4af9d9c 100644 --- a/src/types.h +++ b/src/types.h @@ -144,7 +144,7 @@ struct object_kind SYMBOL_COLOR x_attr; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */ SYMBOL_CODE x_char; /*!< 設定変更後のアイテムシンボルアルファベット / Desired object character */ - s16b flavor; /*!< 調査中(TODO) / Special object flavor (or zero) */ + IDX flavor; /*!< 調査中(TODO) / Special object flavor (or zero) */ bool easy_know; /*!< ベースアイテムが初期からベース名を判断可能かどうか / This object is always known (if aware) */ @@ -456,7 +456,7 @@ typedef struct cave_type cave_type; struct cave_type { - u16b info; /* Hack -- cave flags */ + BIT_FLAGS info; /* Hack -- cave flags */ FEAT_IDX feat; /* Hack -- feature type */ OBJECT_IDX o_idx; /* Object in this grid */ @@ -1335,7 +1335,16 @@ struct player_type ACTION_SKILL_POWER skill_dev; /*!< 行動技能値:魔道具使用 / Skill: Magic Devices */ ACTION_SKILL_POWER skill_sav; /*!< 行動技能値:魔法防御 / Skill: Saving throw */ ACTION_SKILL_POWER skill_stl; /*!< 行動技能値:隠密 / Skill: Stealth factor */ - ACTION_SKILL_POWER skill_srh; /*!< 行動技能値:知覚 / Skill: Searching ability */ + + /*! + * 行動技能値:知覚 / Skill: Searching ability + * この値はトラップの判定処理などで混乱、盲目、幻覚、無光源などの + * 状態異常がない限り、難易度修正などがないままそのままパーセンテージ値として使われる。 + * 100以上ならば必ず全てのトラップを見つけることが出来る。 + */ + ACTION_SKILL_POWER skill_srh; + + ACTION_SKILL_POWER skill_fos; /*!< 行動技能値:探索 / Skill: Searching frequency */ ACTION_SKILL_POWER skill_thn; /*!< 行動技能値:打撃命中能力 / Skill: To hit (normal) */ ACTION_SKILL_POWER skill_thb; /*!< 行動技能値:射撃命中能力 / Skill: To hit (shooting) */ @@ -1685,7 +1694,7 @@ typedef struct */ typedef struct { - u16b info; + BIT_FLAGS info; s16b feat; s16b mimic; s16b special; diff --git a/src/variable.c b/src/variable.c index b2ce4dc57..a901d3726 100644 --- a/src/variable.c +++ b/src/variable.c @@ -96,9 +96,11 @@ u32b seed_town; /* Hack -- consistent town layout */ s16b command_cmd; /* Current "Angband Command" */ -COMMAND_ARG command_arg; /* Gives argument of current command */ -s16b command_rep; /* Gives repetition of current command */ -DIRECTION command_dir; /* Gives direction of current command */ +COMMAND_ARG command_arg; /*!< 各種コマンドの汎用的な引数として扱う / Gives argument of current command */ + +s16b command_rep; /*!< 各種コマンドの汎用的なリピート数として扱う / Gives repetition of current command */ + +DIRECTION command_dir; /*!< 各種コマンドの汎用的な方向値処理として扱う/ Gives direction of current command */ s16b command_see; /* See "object1.c" */ s16b command_wrk; /* See "object1.c" */ diff --git a/src/xtra2.c b/src/xtra2.c index 350e67bce..5c3b67859 100644 --- a/src/xtra2.c +++ b/src/xtra2.c @@ -3510,7 +3510,7 @@ 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, (int)y, (int)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, (unsigned int)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, (int)y, (int)x); #endif -- 2.11.0