OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / types.h
index e6414f6..c85764e 100644 (file)
@@ -301,8 +301,8 @@ struct monster_race
 
        ARMOUR_CLASS ac;                /*!< アーマークラス / Armour Class */
 
-       s16b sleep;                             /*!< 睡眠値 / Inactive counter (base) */
-       byte aaf;                               /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
+       SLEEP_DEGREE sleep;                             /*!< 睡眠値 / Inactive counter (base) */
+       POSITION aaf;                           /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
        SPEED speed;                            /*!< 加速(110で+0) / Speed (normally 110) */
 
        EXP mexp;                               /*!< 殺害時基本経験値 / Exp value for kill */
@@ -401,8 +401,8 @@ struct vault_type
        STR_OFFSET name;        /* Name (offset) */
        STR_OFFSET text;        /* Text (offset) */
 
-       byte typ;                       /* Vault type */
-       byte rat;                       /* Vault rating */
+       ROOM_IDX typ;           /* Vault type */
+       PROB rat;                       /* Vault rating (unused) */
        POSITION hgt;           /* Vault height */
        POSITION wid;           /* Vault width */
 };
@@ -455,13 +455,13 @@ struct cave_type
 {
        u16b info;              /* Hack -- cave flags */
 
-       IDX feat;               /* Hack -- feature type */
-       IDX o_idx;              /* Object in this grid */
+       FEAT_IDX feat;          /* Hack -- feature type */
+       OBJECT_IDX o_idx;               /* Object in this grid */
        MONSTER_IDX m_idx;              /* Monster in this grid */
 
        s16b special;   /* Special cave info */
 
-       s16b mimic;             /* Feature to mimic */
+       FEAT_IDX mimic;         /* Feature to mimic */
 
        byte cost;              /* Hack -- cost of flowing */
        byte dist;              /* Hack -- distance from player */
@@ -515,7 +515,7 @@ typedef struct object_type object_type;
 
 struct object_type
 {
-       IDX k_idx;                      /* Kind index (zero if "dead") */
+       KIND_OBJECT_IDX k_idx;                  /* Kind index (zero if "dead") */
 
        POSITION iy;                    /* Y-position on map, or zero */
        POSITION ix;                    /* X-position on map, or zero */
@@ -695,14 +695,14 @@ struct quest_type
        s16b type;              /*!< クエストの種別 / The quest type */
 
        char name[60];          /*!< クエスト名 / Quest name */
-       DEPTH level;             /*!< 処理階層 / Dungeon level */
-       MONRACE_IDX r_idx;             /*!< クエスト対象のモンスターID / Monster race */
-          
-       s16b cur_num;           /*!< 撃破したモンスターの数 / Number killed */
-       s16b max_num;           /*!< 求められるモンスターの撃破数 / Number required */
+       DEPTH level;            /*!< 処理階層 / Dungeon level */
+       MONRACE_IDX r_idx;      /*!< クエスト対象のモンスターID / Monster race */
 
-       IDX k_idx;             /*!< クエスト対象のアイテムID / object index */
-       s16b num_mon;           /*!< QUEST_TYPE_KILL_NUMBER時の目標撃破数 number of monsters on level */
+       MONSTER_NUMBER cur_num; /*!< 撃破したモンスターの数 / Number killed */
+       MONSTER_NUMBER max_num; /*!< 求められるモンスターの撃破数 / Number required */
+
+       IDX k_idx;              /*!< クエスト対象のアイテムID / object index */
+       MONSTER_NUMBER num_mon; /*!< QUEST_TYPE_KILL_NUMBER時の目標撃破数 number of monsters on level */
 
        byte flags;             /*!< クエストに関するフラグビット / quest flags */
        byte dungeon;           /*!< クエスト対象のダンジョンID / quest dungeon */
@@ -1061,7 +1061,7 @@ struct player_type
        TIME_EFFECT magicdef;
        TIME_EFFECT tim_res_nether;     /* Timed -- Nether resistance */
        TIME_EFFECT tim_res_time;       /* Timed -- Time resistance */
-       IDX mimic_form;
+       MIMIC_RACE_IDX mimic_form;
        TIME_EFFECT tim_mimic;
        TIME_EFFECT tim_sh_fire;
        TIME_EFFECT tim_sh_holy;
@@ -1072,7 +1072,7 @@ struct player_type
        TIME_EFFECT multishadow;       /* Timed -- Multi-shadow */
        TIME_EFFECT dustrobe;          /* Timed -- Robe of dust */
 
-       s16b chaos_patron;
+       PATRON_IDX chaos_patron;
        BIT_FLAGS muta1;
        BIT_FLAGS muta2;
        BIT_FLAGS muta3;
@@ -1609,34 +1609,34 @@ struct dungeon_info_type {
 
        DEPTH mindepth;         /* Minimal depth */
        DEPTH maxdepth;         /* Maximal depth */
-       byte min_plev;         /* Minimal plev needed to enter -- it's an anti-cheating mesure */
-       s16b pit;
-       s16b nest;
+       PLAYER_LEVEL min_plev;         /* Minimal plev needed to enter -- it's an anti-cheating mesure */
+       BIT_FLAGS16 pit;
+       BIT_FLAGS16 nest;
        byte mode;              /* Mode of combinaison of the monster flags */
 
        int min_m_alloc_level;  /* Minimal number of monsters per level */
        int max_m_alloc_chance; /* There is a 1/max_m_alloc_chance chance per round of creating a new monster */
 
-       u32b flags1;            /* Flags 1 */
+       BIT_FLAGS flags1;               /* Flags 1 */
 
-       u32b mflags1;           /* The monster flags that are allowed */
-       u32b mflags2;
-       u32b mflags3;
-       u32b mflags4;
-       u32b mflags7;
-       u32b mflags8;
-       u32b mflags9;
-       u32b mflagsr;
+       BIT_FLAGS mflags1;              /* The monster flags that are allowed */
+       BIT_FLAGS mflags2;
+       BIT_FLAGS mflags3;
+       BIT_FLAGS mflags4;
+       BIT_FLAGS mflags7;
+       BIT_FLAGS mflags8;
+       BIT_FLAGS mflags9;
+       BIT_FLAGS mflagsr;
 
-       u32b m_a_ability_flags1;
-       u32b m_a_ability_flags2;
-       u32b m_a_ability_flags3;
-       u32b m_a_ability_flags4;
+       BIT_FLAGS m_a_ability_flags1;
+       BIT_FLAGS m_a_ability_flags2;
+       BIT_FLAGS m_a_ability_flags3;
+       BIT_FLAGS m_a_ability_flags4;
 
        char r_char[5];         /* Monster race allowed */
-       int final_object;       /* The object you'll find at the bottom */
-       int final_artifact;     /* The artifact you'll find at the bottom */
-       int final_guardian;     /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
+       KIND_OBJECT_IDX final_object;   /* The object you'll find at the bottom */
+       ARTIFACT_IDX final_artifact;    /* The artifact you'll find at the bottom */
+       MONRACE_IDX final_guardian;     /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
 
        byte special_div;       /* % of monsters affected by the flags/races allowed, to add some variety */
        int tunnel_percent;