OSDN Git Service

[Refactor] #define MONSTER_HORDE による分岐処理削除 / Delete #define branch by MONSTER_HORDE.
[hengband/hengband.git] / src / types.h
index 84fa936..d41dd9c 100644 (file)
@@ -86,10 +86,10 @@ struct feature_type
        FEAT_SUBTYPE subtype;  /*!< 副特性値 */
        FEAT_POWER power;    /*!< 地形強度 */
 
-       SYMBOL_COLOR d_attr[F_LIT_MAX];   /*!< デフォルトの地形シンボルカラー / Default feature attribute */
+       TERM_COLOR d_attr[F_LIT_MAX];   /*!< デフォルトの地形シンボルカラー / Default feature attribute */
        SYMBOL_CODE d_char[F_LIT_MAX];   /*!< デフォルトの地形シンボルアルファベット / Default feature character */
 
-       SYMBOL_COLOR x_attr[F_LIT_MAX];   /*!< 設定変更後の地形シンボルカラー / Desired feature attribute */
+       TERM_COLOR x_attr[F_LIT_MAX];   /*!< 設定変更後の地形シンボルカラー / Desired feature attribute */
        SYMBOL_CODE x_char[F_LIT_MAX];   /*!< 設定変更後の地形シンボルアルファベット / Desired feature character */
 };
 
@@ -138,10 +138,10 @@ struct object_kind
        DEPTH level;                    /*!< ベースアイテムの基本生成階 / Level */
        BIT_FLAGS8 extra;                       /*!< その他色々のビットフラグ配列 / Something */
 
-       SYMBOL_COLOR d_attr;            /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
+       TERM_COLOR d_attr;              /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
        SYMBOL_CODE d_char;             /*!< デフォルトのアイテムシンボルアルファベット / Default object character */
 
-       SYMBOL_COLOR x_attr;            /*!< 設定変更後のアイテムシンボルカラー /  Desired object attribute */
+       TERM_COLOR x_attr;              /*!< 設定変更後のアイテムシンボルカラー /  Desired object attribute */
        SYMBOL_CODE x_char;             /*!< 設定変更後のアイテムシンボルアルファベット /  Desired object character */
 
        IDX flavor;             /*!< 調査中(TODO) / Special object flavor (or zero) */
@@ -200,7 +200,7 @@ struct artifact_type
        byte cur_num;           /*! 現在の生成数 / Number created (0 or 1) */
        byte max_num;           /*! (未使用)最大生成数 / Unused (should be "1") */
 
-       s16b floor_id;      /*! アイテムを落としたフロアのID / Leaved on this location last time */
+       FLOOR_IDX floor_id;      /*! アイテムを落としたフロアのID / Leaved on this location last time */
 
        byte act_idx;           /*! 発動能力ID / Activative ability index */
 };
@@ -346,12 +346,10 @@ struct monster_race
        DEPTH level;                    /* Level of creature */
        RARITY rarity;                  /* Rarity of creature */
 
-
-       SYMBOL_COLOR d_attr;            /* Default monster attribute */
+       TERM_COLOR d_attr;              /* Default monster attribute */
        SYMBOL_CODE d_char;                     /* Default monster character */
 
-
-       SYMBOL_COLOR x_attr;            /* Desired monster attribute */
+       TERM_COLOR x_attr;              /* Desired monster attribute */
        SYMBOL_CODE x_char;                     /* Desired monster character */
 
 
@@ -593,7 +591,7 @@ typedef struct monster_type monster_type;
 struct monster_type
 {
        MONRACE_IDX r_idx;              /* Monster race index */
-       IDX ap_r_idx;           /* Monster race appearance index */
+       MONRACE_IDX ap_r_idx;   /* Monster race appearance index */
        byte sub_align;         /* Sub-alignment for a neutral monster */
 
        POSITION fy;            /* Y location on map */
@@ -602,7 +600,7 @@ struct monster_type
        HIT_POINT hp;           /* Current Hit points */
        HIT_POINT maxhp;                /* Max Hit points */
        HIT_POINT max_maxhp;            /* Max Max Hit points */
-       u32b dealt_damage;              /* Sum of damages dealt by player */
+       HIT_POINT dealt_damage;         /* Sum of damages dealt by player */
 
        TIME_EFFECT mtimed[MAX_MTIMED]; /* Timed status counter */
 
@@ -1153,7 +1151,7 @@ struct player_type
        s16b today_mon;           /* Wanted monster */
 
        bool dtrap;               /* Whether you are on trap-safe grids */
-       s16b floor_id;            /* Current floor location */ 
+       FLOOR_IDX floor_id;            /* Current floor location */ 
 
        bool autopick_autoregister; /* auto register is in-use or not */
 
@@ -1667,7 +1665,7 @@ struct dungeon_info_type {
 typedef struct {
        cptr name;          /*!< 自動拾い/破壊定義の名称一致基準 / Items which have 'name' as part of its name match */
        cptr insc;          /*!< 対象となったアイテムに自動で刻む内容 / Items will be auto-inscribed as 'insc' */
-       u32b flag[2];       /*!< キーワードに関する汎用的な条件フラグ / Misc. keyword to be matched */
+       BIT_FLAGS flag[2];       /*!< キーワードに関する汎用的な条件フラグ / Misc. keyword to be matched */
        byte action;        /*!< 対象のアイテムを拾う/破壊/放置するかの指定フラグ / Auto-pickup or Destroy or Leave items */
        byte dice;          /*!< 武器のダイス値基準値 / Weapons which have more than 'dice' dice match */
        byte bonus;         /*!< アイテムのボーナス基準値 / Items which have more than 'bonus' magical bonus match */
@@ -1679,7 +1677,7 @@ typedef struct {
  */
 typedef struct 
 {
-       s16b floor_id;        /* No recycle until 65536 IDs are all used */
+       FLOOR_IDX floor_id;        /* No recycle until 65536 IDs are all used */
        s16b savefile_id;     /* ID for savefile (from 0 to MAX_SAVED_FLOOR) */
        DEPTH dun_level;
        s32b last_visit;      /* Time count of last visit. 0 for new floor. */
@@ -1695,8 +1693,8 @@ typedef struct
 typedef struct
 {
        BIT_FLAGS info;
-       s16b feat;
-       s16b mimic;
+       FEAT_IDX feat;
+       FEAT_IDX mimic;
        s16b special;
        u16b occurrence;
 } cave_template_type;
@@ -1708,9 +1706,9 @@ typedef struct
  */
 typedef struct
 {
-       s16b r_idx; /*!< 闘技場のモンスター種族ID(0ならば表彰式) / Monster (0 means victory prizing) */
-       byte tval;  /*!< モンスター打倒後に得られるアイテムの大カテゴリID / tval of prize (0 means no prize) */
-       byte sval;  /*!< モンスター打倒後に得られるアイテムの小カテゴリID / sval of prize */
+       MONRACE_IDX r_idx; /*!< 闘技場のモンスター種族ID(0ならば表彰式) / Monster (0 means victory prizing) */
+       OBJECT_TYPE_VALUE tval;  /*!< モンスター打倒後に得られるアイテムの大カテゴリID / tval of prize (0 means no prize) */
+       OBJECT_SUBTYPE_VALUE sval;  /*!< モンスター打倒後に得られるアイテムの小カテゴリID / sval of prize */
 } arena_type;
 
 
@@ -1736,9 +1734,9 @@ typedef struct
 typedef struct {
        int run; /* Remaining grid number */
        int cost[MAX_HGT][MAX_WID];
-       int x; /* Target X */
-       int y; /* Target Y */
-       int dir; /* Running direction */
+       POSITION x; /* Target X */
+       POSITION y; /* Target Y */
+       DIRECTION dir; /* Running direction */
 } travel_type;
 #endif
 
@@ -1749,7 +1747,7 @@ typedef struct {
        s32b value;
        struct {
                int constant;
-               int dice;
+               DICE_NUMBER dice;
        } timeout;
        cptr desc;
 } activation_type;