OSDN Git Service

#37287 (2.2.0.89) C4774警告は抑止。型の置換を継続中。 / Suppress C4774 warning. Ongoing type replace...
[hengband/hengband.git] / src / types.h
index 737340b..69fc915 100644 (file)
@@ -148,7 +148,7 @@ struct object_kind
 
        bool tried;                     /*!< ベースアイテムを未鑑定のまま試したことがあるか /  The player has "tried" one of the items */
 
-       IDX act_idx;            /*!< 発動能力のID /  Activative ability index */
+       ACTIVATION_IDX act_idx;         /*!< 発動能力のID /  Activative ability index */
 };
 
 
@@ -351,19 +351,18 @@ struct monster_race
        SYMBOL_CODE x_char;                     /* Desired monster character */
 
 
-       byte max_num;                   /* Maximum population allowed per level */
+       MONSTER_NUMBER max_num; /* Maximum population allowed per level */
+       MONSTER_NUMBER cur_num; /* Monster population on current level */
 
-       byte cur_num;                   /* Monster population on current level */
+       FLOOR_IDX floor_id;             /* Location of unique monster */
 
-       s16b floor_id;          /* Location of unique monster */
 
+       MONSTER_NUMBER r_sights;        /* Count sightings of this monster */
+       MONSTER_NUMBER r_deaths;        /* Count deaths from this monster */
 
-       s16b r_sights;                  /* Count sightings of this monster */
-       s16b r_deaths;                  /* Count deaths from this monster */
-
-       s16b r_pkills;                  /* Count visible monsters killed in this life */
-       s16b r_akills;                  /* Count all monsters killed in this life */
-       s16b r_tkills;                  /* Count monsters killed in all lives */
+       MONSTER_NUMBER r_pkills;        /* Count visible monsters killed in this life */
+       MONSTER_NUMBER r_akills;        /* Count all monsters killed in this life */
+       MONSTER_NUMBER r_tkills;        /* Count monsters killed in all lives */
 
        byte r_wake;                    /* Number of times woken up (?) */
        byte r_ignore;                  /* Number of times ignored (?) */
@@ -371,8 +370,8 @@ struct monster_race
        byte r_xtra1;                   /* Something (unused) */
        byte r_xtra2;                   /* Something (unused) */
 
-       byte r_drop_gold;               /* Max number of gold dropped at once */
-       byte r_drop_item;               /* Max number of item dropped at once */
+       ITEM_NUMBER r_drop_gold;        /*!< これまでに撃破時に落とした財宝の数 / Max number of gold dropped at once */
+       ITEM_NUMBER r_drop_item;        /*!< これまでに撃破時に落としたアイテムの数 / Max number of item dropped at once */
 
        byte r_cast_spell;              /* Max number of other spells seen */
 
@@ -459,7 +458,12 @@ struct cave_type
        OBJECT_IDX o_idx;               /* Object in this grid */
        MONSTER_IDX m_idx;              /* Monster in this grid */
 
-       s16b special;   /* Special cave info */
+       /*! 地形の特別な情報を保存する / Special cave info
+        * 具体的な使用一覧はクエスト行き階段の移行先クエストID、
+        * 各ダンジョン入口の移行先ダンジョンID、
+        * 
+        */
+       s16b special;
 
        FEAT_IDX mimic;         /* Feature to mimic */
 
@@ -537,8 +541,8 @@ struct object_type
        XTRA8 xtra1;                    /* Extra info type (now unused) */
        XTRA8 xtra2;                    /* Extra info activation index */
        XTRA8 xtra3;                    /* Extra info for weaponsmith */
-       XTRA16 xtra4;                   /* Extra info fuel or captured monster's current HP */
-       XTRA16 xtra5;                   /* Extra info captured monster's max HP */
+       XTRA16 xtra4;                   /*!< 光源の残り寿命、あるいは捕らえたモンスターの現HP / Extra info fuel or captured monster's current HP */
+       XTRA16 xtra5;                   /*!< 捕らえたモンスターの最大HP / Extra info captured monster's max HP */
 
        HIT_PROB to_h;                  /* Plusses to hit */
        HIT_POINT to_d;                 /* Plusses to damage */
@@ -1092,7 +1096,7 @@ struct player_type
 
        BIT_FLAGS special_attack;         /* Special attack capacity -LM- */
        BIT_FLAGS special_defense;        /* Special block capacity -LM- */
-       byte action;              /* Currently action */
+       ACTION_IDX action;                /* Currently action */
 
        BIT_FLAGS spell_learned1;         /* bit mask of spells learned */
        BIT_FLAGS spell_learned2;         /* bit mask of spells learned */
@@ -1209,14 +1213,14 @@ struct player_type
        bool sutemi;
        bool counter;
 
-       s32b align;                             /* Good/evil/neutral */
+       ALIGNMENT align;                                /* Good/evil/neutral */
        POSITION run_py;
        POSITION run_px;
 
 
        /*** Extracted fields ***/
 
-       u32b total_weight;      /* Total weight being carried */
+       WEIGHT total_weight;    /*!< 所持品と装備品の計算総重量 / Total weight being carried */
 
        s16b stat_add[6];       /* Modifiers to stat values */
        s16b stat_ind[6];       /* Indexes into stat tables */
@@ -1260,7 +1264,7 @@ struct player_type
        bool sustain_con;       /* Keep constitution */
        bool sustain_chr;       /* Keep charisma */
 
-       u32b cursed;            /* Player is cursed */
+       BIT_FLAGS cursed;       /* Player is cursed */
 
        bool can_swim;          /* No damage falling */
        bool levitation;                /* No damage falling */
@@ -1297,21 +1301,20 @@ struct player_type
        bool mighty_throw;
        bool see_nocto;         /* Noctovision */
 
-       s16b to_dd[2]; /* Extra dice/sides */
-       s16b to_ds[2];
+       DICE_NUMBER to_dd[2]; /* Extra dice/sides */
+       DICE_SID to_ds[2];
 
-       s16b dis_to_h[2];       /* Known bonus to hit (wield) */
-       s16b dis_to_h_b;        /* Known bonus to hit (bow) */
-       s16b dis_to_d[2];       /* Known bonus to dam (wield) */
-       s16b dis_to_a;          /* Known bonus to ac */
+       HIT_PROB dis_to_h[2];   /*!< 判明している現在の表記上の近接武器命中修正値 /  Known bonus to hit (wield) */
+       HIT_PROB dis_to_h_b;    /*!< 判明している現在の表記上の射撃武器命中修正値 / Known bonus to hit (bow) */
+       HIT_POINT dis_to_d[2];  /*!< 判明している現在の表記上の近接武器ダメージ修正値 / Known bonus to dam (wield) */
+       ARMOUR_CLASS dis_to_a;  /*!< 判明している現在の表記上の装備AC修正値 / Known bonus to ac */
+       ARMOUR_CLASS dis_ac;    /*!< 判明している現在の表記上の装備AC基礎値 / Known base ac */
 
-       s16b dis_ac;            /* Known base ac */
-
-       s16b to_h[2];                   /* Bonus to hit (wield) */
-       s16b to_h_b;                    /* Bonus to hit (bow) */
-       s16b to_h_m;                    /* Bonus to hit (misc) */
-       s16b to_d[2];                   /* Bonus to dam (wield) */
-       s16b to_d_m;                    /* Bonus to dam (misc) */
+       s16b to_h[2];           /* Bonus to hit (wield) */
+       s16b to_h_b;            /* Bonus to hit (bow) */
+       s16b to_h_m;            /* Bonus to hit (misc) */
+       s16b to_d[2];           /* Bonus to dam (wield) */
+       s16b to_d_m;            /* Bonus to dam (misc) */
        s16b to_a;                      /* Bonus to ac */
 
        s16b to_m_chance;               /* Minusses to cast chance */
@@ -1321,35 +1324,33 @@ struct player_type
        bool hidarite;
        bool no_flowed;
 
-       s16b ac;                        /* Base ac */
-
-       s16b see_infra;         /* Infravision range */
+       ARMOUR_CLASS ac;        /*!< 装備無しの基本AC / Base ac */
 
-       s16b skill_dis;         /* Skill: Disarming */
-       s16b skill_dev;         /* Skill: Magic Devices */
-       s16b skill_sav;         /* Skill: Saving throw */
-       s16b skill_stl;         /* Skill: Stealth factor */
-       s16b skill_srh;         /* Skill: Searching ability */
-       s16b skill_fos;         /* Skill: Searching frequency */
-       s16b skill_thn;         /* Skill: To hit (normal) */
-       s16b skill_thb;         /* Skill: To hit (shooting) */
-       s16b skill_tht;         /* Skill: To hit (throwing) */
-       s16b skill_dig;         /* Skill: Digging */
+       ACTION_SKILL_POWER see_infra;   /*!< 赤外線視能力の強さ /Infravision range */
+       ACTION_SKILL_POWER skill_dis;   /*!< 行動技能値:解除能力 / Skill: Disarming */
+       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 */
+       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) */
+       ACTION_SKILL_POWER skill_tht;   /*!< 行動技能値:投射命中能力 / Skill: To hit (throwing) */
+       ACTION_SKILL_POWER skill_dig;   /*!< 行動技能値:掘削 / Skill: Digging */
 
        s16b num_blow[2];       /* Number of blows */
        s16b num_fire;          /* Number of shots */
 
        byte tval_xtra;         /* Correct xtra tval */
-
        byte tval_ammo;         /* Correct ammo tval */
 
        byte pspeed;            /* Current speed */
 
-       s16b energy_use;        /* Energy use this turn */
+       ENERGY energy_use;      /* Energy use this turn */
 
        POSITION y;     /* Player location in dungeon */
        POSITION x;     /* Player location in dungeon */
-       char name[32]; /* Current player's character name */
+       char name[32]; /*!< 現在のプレイヤー名 / Current player's character name */
 };
 
 
@@ -1372,13 +1373,13 @@ struct birther
        s16b wt;
        s16b sc;
 
-       s32b au;
+       PRICE au; /*!< 初期の所持金 */
 
        BASE_STATUS stat_max[6];        /* Current "maximal" stat values */
        BASE_STATUS stat_max_max[6];    /* Maximal "maximal" stat values */
        HIT_POINT player_hp[PY_MAX_LEVEL];
 
-       s16b chaos_patron;
+       PATRON_IDX chaos_patron;
 
        s16b vir_types[8];
 
@@ -1432,9 +1433,9 @@ struct mind_power
 typedef struct monster_power monster_power;
 struct monster_power
 {
-       int     level;
-       int     smana;
-       int     fail;
+       PLAYER_LEVEL level;
+       MANA_POINT smana;
+       PERCENTAGE fail;
        int     manedam;
        int     manefail;
        int     use_stat;
@@ -1455,15 +1456,15 @@ struct building_type
        char owner_race[20];            /* proprietor race */
 
        char act_names[8][30];          /* action names */
-       s32b member_costs[8];           /* Costs for class members of building */
-       s32b other_costs[8];                /* Costs for nonguild members */
+       PRICE member_costs[8];           /* Costs for class members of building */
+       PRICE other_costs[8];               /* Costs for nonguild members */
        char letters[8];                /* action letters */
        s16b actions[8];                /* action codes */
        s16b action_restr[8];           /* action restrictions */
 
-       s16b member_class[MAX_CLASS];   /* which classes are part of guild */
-       s16b member_race[MAX_RACES];    /* which classes are part of guild */
-       s16b member_realm[MAX_MAGIC+1]; /* which realms are part of guild */
+       CLASS_IDX member_class[MAX_CLASS];   /* which classes are part of guild */
+       RACE_IDX member_race[MAX_RACES];    /* which classes are part of guild */
+       REALM_IDX member_realm[MAX_MAGIC+1]; /* which realms are part of guild */
 };
 
 
@@ -1613,7 +1614,7 @@ struct dungeon_info_type {
        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 */
+       BIT_FLAGS8 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 */