OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続し、コメントを追加。/ Ongoing type replacement and adding comments.
authorDeskull <desull@users.sourceforge.jp>
Mon, 18 Dec 2017 15:11:07 +0000 (00:11 +0900)
committerDeskull <desull@users.sourceforge.jp>
Mon, 18 Dec 2017 15:11:07 +0000 (00:11 +0900)
src/cmd1.c
src/flavor.c
src/floors.c
src/init1.c
src/save.c
src/types.h
src/variable.c
src/xtra2.c

index c0852d9..f93ee17 100644 (file)
@@ -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;
index 57a5cb4..4aff4dc 100644 (file)
@@ -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 */
index eda6495..7366f8c 100644 (file)
@@ -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 */
index e51b849..c69fb59 100644 (file)
@@ -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 */
 };
index 8ff1894..341f3c4 100644 (file)
@@ -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);
index aae13d3..2e4af9d 100644 (file)
@@ -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;
index b2ce4dc..a901d37 100644 (file)
@@ -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" */
index 350e67b..5c3b678 100644 (file)
@@ -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