OSDN Git Service

[Refactor] #37353 定義の移動(SM_.*)。 / Move definition "SM_.*".
[hengband/hengband.git] / src / types.h
index 72f0ddc..d30307a 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 */
 
 
@@ -539,8 +537,8 @@ struct object_type
 
        WEIGHT weight;          /* Item weight */
 
-       IDX name1;                      /* Artifact type, if any */
-       IDX name2;                      /* Ego-Item type, if any */
+       ARTIFACT_IDX name1;             /* Artifact type, if any */
+       EGO_IDX name2;                  /* Ego-Item type, if any */
 
        XTRA8 xtra1;                    /* Extra info type (now unused) */
        XTRA8 xtra2;                    /* Extra info activation index */
@@ -560,7 +558,6 @@ struct object_type
        TIME_EFFECT timeout;    /* Timeout Counter */
 
        byte ident;                     /* Special flags  */
-
        byte marked;            /* Object is marked */
 
        u16b inscription;       /* Inscription index */
@@ -571,8 +568,8 @@ struct object_type
        BIT_FLAGS art_flags[TR_FLAG_SIZE];        /* Extra Flags for ego and artifacts */
        BIT_FLAGS curse_flags;        /* Flags for curse */
 
-       IDX next_o_idx; /* Next object in stack (if any) */
-       IDX held_m_idx; /* Monster holding us (if any) */
+       OBJECT_IDX next_o_idx;  /* Next object in stack (if any) */
+       MONSTER_IDX held_m_idx; /* Monster holding us (if any) */
 
        ARTIFACT_BIAS_IDX artifact_bias; /*!< ランダムアーティファクト生成時のバイアスID */
 };
@@ -581,9 +578,7 @@ struct object_type
 
 /*
  * Monster information, for a specific monster.
- *
  * Note: fy, fx constrain dungeon size to 256x256
- *
  * The "hold_o_idx" field points to the first object of a stack
  * of objects (if any) being carried by the monster (see above).
  */
@@ -593,7 +588,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 +597,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 */
 
@@ -625,7 +620,40 @@ struct monster_type
 
        EXP exp;
 
-       BIT_FLAGS smart;                        /* Field for "smart_learn" */
+       /* TODO: クローン、ペット、有効化は意義が異なるので別変数に切り離すこと。save/loadのバージョン更新が面倒そうだけど */
+       BIT_FLAGS smart; /*!< Field for "smart_learn" - Some bit-flags for the "smart" field */
+       #define SM_RES_ACID             0x00000001 /*!< モンスターの学習フラグ: プレイヤーに酸耐性あり */
+       #define SM_RES_ELEC             0x00000002 /*!< モンスターの学習フラグ: プレイヤーに電撃耐性あり */
+       #define SM_RES_FIRE             0x00000004 /*!< モンスターの学習フラグ: プレイヤーに火炎耐性あり */
+       #define SM_RES_COLD             0x00000008 /*!< モンスターの学習フラグ: プレイヤーに冷気耐性あり */
+       #define SM_RES_POIS             0x00000010 /*!< モンスターの学習フラグ: プレイヤーに毒耐性あり */
+       #define SM_RES_NETH             0x00000020 /*!< モンスターの学習フラグ: プレイヤーに地獄耐性あり */
+       #define SM_RES_LITE             0x00000040 /*!< モンスターの学習フラグ: プレイヤーに閃光耐性あり */
+       #define SM_RES_DARK             0x00000080 /*!< モンスターの学習フラグ: プレイヤーに暗黒耐性あり */
+       #define SM_RES_FEAR             0x00000100 /*!< モンスターの学習フラグ: プレイヤーに恐怖耐性あり */
+       #define SM_RES_CONF             0x00000200 /*!< モンスターの学習フラグ: プレイヤーに混乱耐性あり */
+       #define SM_RES_CHAOS            0x00000400 /*!< モンスターの学習フラグ: プレイヤーにカオス耐性あり */
+       #define SM_RES_DISEN            0x00000800 /*!< モンスターの学習フラグ: プレイヤーに劣化耐性あり */
+       #define SM_RES_BLIND            0x00001000 /*!< モンスターの学習フラグ: プレイヤーに盲目耐性あり */
+       #define SM_RES_NEXUS            0x00002000 /*!< モンスターの学習フラグ: プレイヤーに因果混乱耐性あり */
+       #define SM_RES_SOUND            0x00004000 /*!< モンスターの学習フラグ: プレイヤーに轟音耐性あり */
+       #define SM_RES_SHARD            0x00008000 /*!< モンスターの学習フラグ: プレイヤーに破片耐性あり */
+       #define SM_OPP_ACID             0x00010000 /*!< モンスターの学習フラグ: プレイヤーに二重酸耐性あり */
+       #define SM_OPP_ELEC             0x00020000 /*!< モンスターの学習フラグ: プレイヤーに二重電撃耐性あり */
+       #define SM_OPP_FIRE             0x00040000 /*!< モンスターの学習フラグ: プレイヤーに二重火炎耐性あり */
+       #define SM_OPP_COLD             0x00080000 /*!< モンスターの学習フラグ: プレイヤーに二重冷気耐性あり */
+       #define SM_OPP_POIS             0x00100000 /*!< モンスターの学習フラグ: プレイヤーに二重毒耐性あり */
+       #define SM_OPP_XXX1             0x00200000 /*!< 未使用 / (unused) */
+       #define SM_CLONED               0x00400000 /*!< クローンである / Cloned */
+       #define SM_PET                  0x00800000 /*!< ペットである / Pet */
+       #define SM_IMM_ACID             0x01000000 /*!< モンスターの学習フラグ: プレイヤーに酸免疫あり */
+       #define SM_IMM_ELEC             0x02000000 /*!< モンスターの学習フラグ: プレイヤーに電撃免疫あり */
+       #define SM_IMM_FIRE             0x04000000 /*!< モンスターの学習フラグ: プレイヤーに火炎免疫あり */
+       #define SM_IMM_COLD             0x08000000 /*!< モンスターの学習フラグ: プレイヤーに冷気免疫あり */
+       #define SM_FRIENDLY             0x10000000 /*!< 友好的である / Friendly */
+       #define SM_IMM_REFLECT          0x20000000 /*!< モンスターの学習フラグ: プレイヤーに反射あり */
+       #define SM_IMM_FREE             0x40000000 /*!< モンスターの学習フラグ: プレイヤーに麻痺耐性あり */
+       #define SM_IMM_MANA             0x80000000 /*!< モンスターの学習フラグ: プレイヤーにMPがない */
 
        MONSTER_IDX parent_m_idx;
 };
@@ -686,8 +714,8 @@ struct option_type
        byte    o_set;
        byte    o_bit;
 
-       cptr    o_text;
-       cptr    o_desc;
+       concptr o_text;
+       concptr o_desc;
 };
 
 
@@ -703,7 +731,7 @@ struct quest_type
        QUEST_STATUS status;          /*!< クエストの進行ステータス / Is the quest taken, completed, finished? */
        QUEST_TYPE type;              /*!< クエストの種別 / The quest type */
 
-       char name[60];          /*!< クエスト名 / Quest name */
+       GAME_TEXT name[60];          /*!< クエスト名 / Quest name */
        DEPTH level;            /*!< 処理階層 / Dungeon level */
        MONRACE_IDX r_idx;      /*!< クエスト対象のモンスターID / Monster race */
 
@@ -728,17 +756,12 @@ typedef struct owner_type owner_type;
 
 struct owner_type
 {
-       cptr owner_name;        /* Name */
-
+       concptr owner_name;     /* Name */
        PRICE max_cost;         /* Purse limit */
-
        byte max_inflate;       /* Inflation (max) */
        byte min_inflate;       /* Inflation (min) */
-
        byte haggle_per;        /* Haggle unit */
-
        byte insult_max;        /* Insult limit */
-
        byte owner_race;        /* Owner race */
 };
 
@@ -824,11 +847,11 @@ typedef struct player_sex player_sex;
 
 struct player_sex
 {
-       cptr title;                     /* Type of sex */
-       cptr winner;            /* Name of winner */
+       concptr title;                  /* Type of sex */
+       concptr winner;         /* Name of winner */
 #ifdef JP
-       cptr E_title;           /* 英語性別 */
-       cptr E_winner;          /* 英語性別 */
+       concptr E_title;                /* 英語性別 */
+       concptr E_winner;               /* 英語性別 */
 #endif
 };
 
@@ -841,10 +864,10 @@ typedef struct player_race player_race;
 
 struct player_race
 {
-       cptr title;                     /* Type of race */
+       concptr title;                  /* Type of race */
 
 #ifdef JP
-       cptr E_title;           /* 英語種族 */
+       concptr E_title;                /* 英語種族 */
 #endif
        s16b r_adj[6];          /* Racial stat bonuses */
 
@@ -888,10 +911,10 @@ typedef struct player_class player_class;
 
 struct player_class
 {
-       cptr title;                     /* Type of class */
+       concptr title;                  /* Type of class */
 
 #ifdef JP
-       cptr E_title;           /* 英語職業 */
+       concptr E_title;                /* 英語職業 */
 #endif
        s16b c_adj[6];          /* Class stat modifier */
 
@@ -923,10 +946,10 @@ struct player_class
 typedef struct player_seikaku player_seikaku;
 struct player_seikaku
 {
-       cptr title;                     /* Type of seikaku */
+       concptr title;                  /* Type of seikaku */
 
 #ifdef JP
-       cptr E_title;           /* 英語性格 */
+       concptr E_title;                /* 英語性格 */
 #endif
 
        s16b a_adj[6];          /* seikaku stat bonuses */
@@ -969,19 +992,19 @@ struct player_type
        POSITION oldpy;         /* Previous player location -KMW- */
        POSITION oldpx;         /* Previous player location -KMW- */
 
-       CHARACTER_IDX psex;                     /* Sex index */
-       CHARACTER_IDX prace;                    /* Race index */
-       CHARACTER_IDX pclass;           /* Class index */
-       CHARACTER_IDX pseikaku;         /* Seikaku index */
-       REALM_IDX realm1;        /* First magic realm */
-       REALM_IDX realm2;        /* Second magic realm */
-       CHARACTER_IDX oops;                     /* Unused */
+       SEX_IDX psex;           /* Sex index */
+       RACE_IDX prace;         /* Race index */
+       CLASS_IDX pclass;       /* Class index */
+       CHARACTER_IDX pseikaku; /* Seikaku index */
+       REALM_IDX realm1;               /* First magic realm */
+       REALM_IDX realm2;               /* Second magic realm */
+       CHARACTER_IDX oops;             /* Unused */
 
-       DICE_SID hitdie;                /* Hit dice (sides) */
-       u16b expfact;       /* Experience factor
-                            * Note: was byte, causing overflow for Amberite
-                            * characters (such as Amberite Paladins)
-                            */
+       DICE_SID hitdie;        /* Hit dice (sides) */
+       u16b expfact;   /* Experience factor
+                                       * Note: was byte, causing overflow for Amberite
+                                       * characters (such as Amberite Paladins)
+                                       */
 
        s16b age;                       /* Characters age */
        s16b ht;                        /* Height */
@@ -1082,9 +1105,108 @@ struct player_type
        TIME_EFFECT dustrobe;          /* Timed -- Robe of dust */
 
        PATRON_IDX chaos_patron;
-       BIT_FLAGS muta1;
-       BIT_FLAGS muta2;
-       BIT_FLAGS muta3;
+
+       BIT_FLAGS muta1; /*!< レイシャル型の変異 / "Activatable" mutations must be in MUT1_* */        
+       #define MUT1_SPIT_ACID                  0x00000001L /*!< 突然変異: 酸の唾 */
+       #define MUT1_BR_FIRE                    0x00000002L /*!< 突然変異: 炎のブレス */
+       #define MUT1_HYPN_GAZE                  0x00000004L /*!< 突然変異: 催眠睨み */
+       #define MUT1_TELEKINES                  0x00000008L /*!< 突然変異: 念動力 */
+       #define MUT1_VTELEPORT                  0x00000010L /*!< 突然変異: テレポート / Voluntary teleport */
+       #define MUT1_MIND_BLST                  0x00000020L /*!< 突然変異: 精神攻撃 */
+       #define MUT1_RADIATION                  0x00000040L /*!< 突然変異: 放射能 */
+       #define MUT1_VAMPIRISM                  0x00000080L /*!< 突然変異: 吸血 */
+       #define MUT1_SMELL_MET                  0x00000100L /*!< 突然変異: 金属嗅覚 */
+       #define MUT1_SMELL_MON                  0x00000200L /*!< 突然変異: 敵臭嗅覚 */
+       #define MUT1_BLINK                      0x00000400L /*!< 突然変異: ショート・テレポート */
+       #define MUT1_EAT_ROCK                   0x00000800L /*!< 突然変異: 岩喰い */
+       #define MUT1_SWAP_POS                   0x00001000L /*!< 突然変異: 位置交換 */
+       #define MUT1_SHRIEK                     0x00002000L /*!< 突然変異: 叫び */
+       #define MUT1_ILLUMINE                   0x00004000L /*!< 突然変異: 照明 */
+       #define MUT1_DET_CURSE                  0x00008000L /*!< 突然変異: 呪い感知 */
+       #define MUT1_BERSERK                    0x00010000L /*!< 突然変異: 狂戦士化 */
+       #define MUT1_POLYMORPH                  0x00020000L /*!< 突然変異: 変身 */
+       #define MUT1_MIDAS_TCH                  0x00040000L /*!< 突然変異: ミダスの手 */
+       #define MUT1_GROW_MOLD                  0x00080000L /*!< 突然変異: カビ発生 */
+       #define MUT1_RESIST                     0x00100000L /*!< 突然変異: エレメント耐性 */
+       #define MUT1_EARTHQUAKE                 0x00200000L /*!< 突然変異: 地震 */
+       #define MUT1_EAT_MAGIC                  0x00400000L /*!< 突然変異: 魔力喰い */
+       #define MUT1_WEIGH_MAG                  0x00800000L /*!< 突然変異: 魔力感知 */
+       #define MUT1_STERILITY                  0x01000000L /*!< 突然変異: 増殖阻止 */
+       #define MUT1_PANIC_HIT                  0x02000000L /*!< 突然変異: ヒットアンドアウェイ */
+       #define MUT1_DAZZLE                     0x04000000L /*!< 突然変異: 眩惑 */
+       #define MUT1_LASER_EYE                  0x08000000L /*!< 突然変異: レーザー・アイ */
+       #define MUT1_RECALL                     0x10000000L /*!< 突然変異: 帰還 */
+       #define MUT1_BANISH                     0x20000000L /*!< 突然変異: 邪悪消滅 */
+       #define MUT1_COLD_TOUCH                 0x40000000L /*!< 突然変異: 凍結の手 */
+       #define MUT1_LAUNCHER                   0x80000000L /*!< 突然変異: アイテム投げ */
+
+       BIT_FLAGS muta2; /*!< 常時効果つきの変異1 / Randomly activating mutations must be MUT2_* */
+       #define MUT2_BERS_RAGE                  0x00000001L /*!< 突然変異: 狂戦士化の発作 */
+       #define MUT2_COWARDICE                  0x00000002L /*!< 突然変異: 臆病 */
+       #define MUT2_RTELEPORT                  0x00000004L /*!< 突然変異: ランダムテレポート / Random teleport, instability */
+       #define MUT2_ALCOHOL                    0x00000008L /*!< 突然変異: アルコール分泌 */
+       #define MUT2_HALLU                      0x00000010L /*!< 突然変異: 幻覚を引き起こす精神錯乱 */
+       #define MUT2_FLATULENT                  0x00000020L /*!< 突然変異: 猛烈な屁 */
+       #define MUT2_SCOR_TAIL                  0x00000040L /*!< 突然変異: サソリの尻尾 */
+       #define MUT2_HORNS                      0x00000080L /*!< 突然変異: ツノ */
+       #define MUT2_BEAK                       0x00000100L /*!< 突然変異: クチバシ */
+       #define MUT2_ATT_DEMON                  0x00000200L /*!< 突然変異: デーモンを引き付ける */
+       #define MUT2_PROD_MANA                  0x00000400L /*!< 突然変異: 制御できない魔力のエネルギー */
+       #define MUT2_SPEED_FLUX                 0x00000800L /*!< 突然変異: ランダムな加減速 */
+       #define MUT2_BANISH_ALL                 0x00001000L /*!< 突然変異: ランダムなモンスター消滅 */
+       #define MUT2_EAT_LIGHT                  0x00002000L /*!< 突然変異: 光源喰い */
+       #define MUT2_TRUNK                      0x00004000L /*!< 突然変異: 象の鼻 */
+       #define MUT2_ATT_ANIMAL                 0x00008000L /*!< 突然変異: 動物を引き寄せる */
+       #define MUT2_TENTACLES                  0x00010000L /*!< 突然変異: 邪悪な触手 */
+       #define MUT2_RAW_CHAOS                  0x00020000L /*!< 突然変異: 純カオス */
+       #define MUT2_NORMALITY                  0x00040000L /*!< 突然変異: ランダムな変異の消滅 */
+       #define MUT2_WRAITH                     0x00080000L /*!< 突然変異: ランダムな幽体化 */
+       #define MUT2_POLY_WOUND                 0x00100000L /*!< 突然変異: ランダムな傷の変化 */
+       #define MUT2_WASTING                    0x00200000L /*!< 突然変異: 衰弱 */
+       #define MUT2_ATT_DRAGON                 0x00400000L /*!< 突然変異: ドラゴンを引き寄せる */
+       #define MUT2_WEIRD_MIND                 0x00800000L /*!< 突然変異: ランダムなテレパシー */
+       #define MUT2_NAUSEA                     0x01000000L /*!< 突然変異: 落ち着きの無い胃 */
+       #define MUT2_CHAOS_GIFT                 0x02000000L /*!< 突然変異: カオスパトロン */
+       #define MUT2_WALK_SHAD                  0x04000000L /*!< 突然変異: ランダムな現実変容 */
+       #define MUT2_WARNING                    0x08000000L /*!< 突然変異: 警告 */
+       #define MUT2_INVULN                     0x10000000L /*!< 突然変異: ランダムな無敵化 */
+       #define MUT2_SP_TO_HP                   0x20000000L /*!< 突然変異: ランダムなMPからHPへの変換 */
+       #define MUT2_HP_TO_SP                   0x40000000L /*!< 突然変異: ランダムなHPからMPへの変換 */
+       #define MUT2_DISARM                     0x80000000L /*!< 突然変異: ランダムな武器落とし */
+
+       BIT_FLAGS muta3; /*!< 常時効果つきの変異2 / Other mutations will be mainly in MUT3_* */
+       #define MUT3_HYPER_STR                  0x00000001L /*!< 突然変異: 超人的な力 */
+       #define MUT3_PUNY                       0x00000002L /*!< 突然変異: 虚弱 */
+       #define MUT3_HYPER_INT                  0x00000004L /*!< 突然変異: 生体コンピュータ */
+       #define MUT3_MORONIC                    0x00000008L /*!< 突然変異: 精神薄弱 */
+       #define MUT3_RESILIENT                  0x00000010L /*!< 突然変異: 弾力のある体 */
+       #define MUT3_XTRA_FAT                   0x00000020L /*!< 突然変異: 異常な肥満 */
+       #define MUT3_ALBINO                     0x00000040L /*!< 突然変異: アルビノ */
+       #define MUT3_FLESH_ROT                  0x00000080L /*!< 突然変異: 腐敗した肉体 */
+       #define MUT3_SILLY_VOI                  0x00000100L /*!< 突然変異: 間抜けなキーキー声 */
+       #define MUT3_BLANK_FAC                  0x00000200L /*!< 突然変異: のっぺらぼう */
+       #define MUT3_ILL_NORM                   0x00000400L /*!< 突然変異: 幻影に覆われた体 */
+       #define MUT3_XTRA_EYES                  0x00000800L /*!< 突然変異: 第三の目 */
+       #define MUT3_MAGIC_RES                  0x00001000L /*!< 突然変異: 魔法防御 */
+       #define MUT3_XTRA_NOIS                  0x00002000L /*!< 突然変異: 騒音 */
+       #define MUT3_INFRAVIS                   0x00004000L /*!< 突然変異: 赤外線視力 */
+       #define MUT3_XTRA_LEGS                  0x00008000L /*!< 突然変異: 追加の脚 */
+       #define MUT3_SHORT_LEG                  0x00010000L /*!< 突然変異: 短い脚 */
+       #define MUT3_ELEC_TOUC                  0x00020000L /*!< 突然変異: 電撃オーラ */
+       #define MUT3_FIRE_BODY                  0x00040000L /*!< 突然変異: 火炎オーラ */
+       #define MUT3_WART_SKIN                  0x00080000L /*!< 突然変異: イボ肌 */
+       #define MUT3_SCALES                     0x00100000L /*!< 突然変異: 鱗肌 */
+       #define MUT3_IRON_SKIN                  0x00200000L /*!< 突然変異: 鉄の肌 */
+       #define MUT3_WINGS                      0x00400000L /*!< 突然変異: 翼 */
+       #define MUT3_FEARLESS                   0x00800000L /*!< 突然変異: 恐れ知らず */
+       #define MUT3_REGEN                      0x01000000L /*!< 突然変異: 急回復 */
+       #define MUT3_ESP                        0x02000000L /*!< 突然変異: テレパシー */
+       #define MUT3_LIMBER                     0x04000000L /*!< 突然変異: しなやかな肉体 */
+       #define MUT3_ARTHRITIS                  0x08000000L /*!< 突然変異: 関節の痛み */
+       #define MUT3_BAD_LUCK                   0x10000000L /*!< 突然変異: 黒いオーラ(不運) */
+       #define MUT3_VULN_ELEM                  0x20000000L /*!< 突然変異: 元素攻撃弱点 */
+       #define MUT3_MOTION                     0x40000000L /*!< 突然変異: 正確で力強い動作 */
+       #define MUT3_GOOD_LUCK                  0x80000000L /*!< 突然変異: 白いオーラ(幸運) */
 
        s16b virtues[8];
        s16b vir_types[8];
@@ -1125,7 +1247,7 @@ struct player_type
 
        HIT_POINT player_hp[PY_MAX_LEVEL];
        char died_from[80];       /* What killed the player */
-       cptr last_message;        /* Last message on death or retirement */
+       concptr last_message;        /* Last message on death or retirement */
        char history[4][60];      /* Textual "history" for the Player */
 
        u16b total_winner;        /* Total winner */
@@ -1142,7 +1264,7 @@ struct player_type
        byte knowledge;           /* Knowledge about yourself */
        BIT_FLAGS visit;               /* Visited towns */
 
-       byte start_race;          /* Race at birth */
+       RACE_IDX start_race;          /* Race at birth */
        BIT_FLAGS old_race1;           /* Record of race changes */
        BIT_FLAGS old_race2;           /* Record of race changes */
        s16b old_realm;           /* Record of realm changes */
@@ -1153,7 +1275,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 */
 
@@ -1174,9 +1296,9 @@ struct player_type
 
        IDX health_who; /* Health bar trackee */
 
-       IDX monster_race_idx;   /* Monster race trackee */
+       MONRACE_IDX monster_race_idx;   /* Monster race trackee */
 
-       IDX object_kind_idx;    /* Object kind trackee */
+       KIND_OBJECT_IDX object_kind_idx;        /* Object kind trackee */
 
        s16b new_spells;        /* Number of spells available */
        s16b old_spells;
@@ -1205,11 +1327,27 @@ struct player_type
 
        s16b cur_lite;          /* Radius of lite (if any) */
 
-
-       u32b notice;            /* Special Updates (bit flags) */
-       u32b update;            /* Pending Updates (bit flags) */
-       u32b redraw;            /* Normal Redraws (bit flags) */
-       u32b window;            /* Window Redraws (bit flags) */
+       BIT_FLAGS update;       /* Pending Updates */
+               #define PU_BONUS        0x00000001L     /*!< ステータス更新フラグ: 能力値修正 / Calculate bonuses */
+               #define PU_TORCH        0x00000002L     /*!< ステータス更新フラグ: 光源半径 / Calculate torch radius */
+               #define PU_HP           0x00000010L     /*!< ステータス更新フラグ: HP / Calculate chp and mhp */
+               #define PU_MANA         0x00000020L     /*!< ステータス更新フラグ: MP / Calculate csp and msp */
+               #define PU_SPELLS       0x00000040L     /*!< ステータス更新フラグ: 魔法学習数 / Calculate spells */
+               #define PU_COMBINE      0x00000100L     /*!< アイテム処理フラグ: アイテムの結合を要する / Combine the pack */
+               #define PU_REORDER      0x00000200L     /*!< アイテム処理フラグ: アイテムの並び替えを要する / Reorder the pack */
+               #define PU_AUTODESTROY  0x00000400L     /*!< アイテム処理フラグ: アイテムの自動破壊を要する / Auto-destroy marked item */
+               #define PU_UN_VIEW      0x00010000L     /*!< ステータス更新フラグ: 地形の視界外化 / Forget view */
+               #define PU_UN_LITE      0x00020000L     /*!< ステータス更新フラグ: 明暗範囲の視界外化 / Forget lite */
+               #define PU_VIEW         0x00100000L     /*!< ステータス更新フラグ: 視界 / Update view */
+               #define PU_LITE         0x00200000L     /*!< ステータス更新フラグ: 明暗範囲 / Update lite */
+               #define PU_MON_LITE     0x00400000L     /*!< ステータス更新フラグ: モンスターの光源範囲 / Monster illumination */
+               #define PU_DELAY_VIS    0x00800000L     /*!< ステータス更新フラグ: 視界の追加更新 / Mega-Hack -- Delayed visual update */
+               #define PU_MONSTERS     0x01000000L     /*!< ステータス更新フラグ: モンスターのステータス / Update monsters */
+               #define PU_DISTANCE     0x02000000L     /*!< ステータス更新フラグ: プレイヤーとモンスターの距離 / Update distances */
+               #define PU_FLOW         0x10000000L     /*!< ステータス更新フラグ: プレイヤーから各マスへの到達距離 / Update flow */
+
+       BIT_FLAGS redraw;       /* Normal Redraws */
+       BIT_FLAGS window;       /* Window Redraws */
 
        s16b stat_use[6];       /* Current modified stats */
        s16b stat_top[6];       /* Maximal modified stats */
@@ -1217,9 +1355,10 @@ struct player_type
        bool sutemi;
        bool counter;
 
-       ALIGNMENT align;                                /* Good/evil/neutral */
+       ALIGNMENT align; /* Good/evil/neutral */
        POSITION run_py;
        POSITION run_px;
+       DIRECTION fishing_dir;
 
 
        /*** Extracted fields ***/
@@ -1252,6 +1391,7 @@ struct player_type
        bool resist_neth;       /* Resist nether */
        bool resist_fear;       /* Resist fear */
        bool resist_time;       /* Resist time */
+       bool resist_water;      /* Resist water */
 
        bool reflect;       /* Reflect 'bolt' attacks */
        bool sh_fire;       /* Fiery 'immolation' effect */
@@ -1344,7 +1484,6 @@ struct player_type
         */
        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) */
@@ -1363,7 +1502,7 @@ struct player_type
 
        POSITION y;     /* Player location in dungeon */
        POSITION x;     /* Player location in dungeon */
-       char name[32]; /*!< 現在のプレイヤー名 / Current player's character name */
+       GAME_TEXT name[32]; /*!< 現在のプレイヤー名 / Current player's character name */
 };
 
 
@@ -1374,12 +1513,12 @@ typedef struct birther birther;
 
 struct birther
 {
-       byte psex;         /* Sex index */
-       byte prace;        /* Race index */
-       byte pclass;       /* Class index */
-       byte pseikaku;     /* Seikaku index */
-       REALM_IDX realm1;       /* First magic realm */
-       REALM_IDX realm2;       /* Second magic realm */
+       SEX_IDX psex;           /* Sex index */
+       RACE_IDX prace;         /* Race index */
+       CLASS_IDX pclass;       /* Class index */
+       CHARACTER_IDX pseikaku; /* Seikaku index */
+       REALM_IDX realm1;       /* First magic realm */
+       REALM_IDX realm2;       /* Second magic realm */
 
        s16b age;
        s16b ht;
@@ -1408,7 +1547,7 @@ typedef struct martial_arts martial_arts;
 
 struct martial_arts
 {
-       cptr    desc;       /* A verbose attack description */
+       concptr    desc;       /* A verbose attack description */
        int     min_level;  /* Minimum level to use */
        int     chance;     /* Chance of 'success' */
        int     dd;         /* Damage dice */
@@ -1420,9 +1559,9 @@ typedef struct kamae kamae;
 
 struct kamae
 {
-       cptr    desc;       /* A verbose kamae description */
+       concptr    desc;       /* A verbose kamae description */
        int     min_level;  /* Minimum level to use */
-       cptr    info;
+       concptr    info;
 };
 
 /* Mindcrafters */
@@ -1432,7 +1571,7 @@ struct mind_type
        int     min_lev;
        int     mana_cost;
        int     fail;
-       cptr    name;
+       concptr    name;
 };
 
 typedef struct mind_power mind_power;
@@ -1452,7 +1591,7 @@ struct monster_power
        int     manedam;
        int     manefail;
        int     use_stat;
-       cptr    name;
+       concptr    name;
 };
 
 
@@ -1464,11 +1603,11 @@ typedef struct building_type building_type;
 
 struct building_type
 {
-       char name[20];                  /* proprietor name */
-       char owner_name[20];            /* proprietor name */
+       GAME_TEXT name[20];                  /* proprietor name */
+       GAME_TEXT owner_name[20];            /* proprietor name */
        char owner_race[20];            /* proprietor race */
 
-       char act_names[8][30];          /* action names */
+       GAME_TEXT act_names[8][30];          /* action names */
        PRICE member_costs[8];           /* Costs for class members of building */
        PRICE other_costs[8];               /* Costs for nonguild members */
        char letters[8];                /* action letters */
@@ -1503,12 +1642,12 @@ struct border_type
 typedef struct wilderness_type wilderness_type;
 struct wilderness_type
 {
-       int         terrain;
-       int         town;
-       int         road;
-       u32b        seed;
-       DEPTH        level;
-       byte        entrance;
+       int terrain;
+       int town;
+       int road;
+       u32b seed;
+       DEPTH level;
+       byte entrance;
 };
 
 
@@ -1519,20 +1658,19 @@ struct wilderness_type
 typedef struct town_type town_type;
 struct town_type
 {
-       char        name[32];
-       u32b        seed;      /* Seed for RNG */
-       store_type      *store;    /* The stores [MAX_STORES] */
-       byte        numstores;
+       GAME_TEXT name[32];
+       u32b seed;      /* Seed for RNG */
+       store_type *store;    /* The stores [MAX_STORES] */
+       byte numstores;
 };
 
 /* Dungeons */
 typedef struct dun_type dun_type;
 struct dun_type
 {
-       byte min_level; /* Minimum level in the dungeon */
-       byte max_level; /* Maximum dungeon level allowed */
-
-       cptr name;      /* The name of the dungeon */
+       DEPTH min_level; /* Minimum level in the dungeon */
+       DEPTH max_level; /* Maximum dungeon level allowed */
+       concptr name;      /* The name of the dungeon */
 };
 
 /*
@@ -1542,11 +1680,11 @@ typedef struct tag_type tag_type;
 
 struct tag_type
 {
-       int     tag;
-       int     index;
+       int tag;
+       int index;
 };
 
-typedef bool (*monster_hook_type)(MONRACE_IDX r_idx);
+typedef bool (*monsterrace_hook_type)(MONRACE_IDX r_idx);
 
 
 /*
@@ -1570,31 +1708,24 @@ typedef struct high_score high_score;
 
 struct high_score
 {
-       char what[8];           /* Version info (string) */
-
-       char pts[10];           /* Total Score (number) */
-
-       char gold[10];          /* Total Gold (number) */
-
-       char turns[10];         /* Turns Taken (number) */
-
-       char day[10];           /* Time stamp (string) */
-
-       char who[16];           /* Player Name (string) */
-
-       char uid[8];            /* Player UID (number) */
-
-       char sex[2];            /* Player Sex (string) */
-       char p_r[3];            /* Player Race (number) */
-       char p_c[3];            /* Player Class (number) */
-       char p_a[3];            /* Player Seikaku (number) */
-
-       char cur_lev[4];                /* Current Player Level (number) */
-       char cur_dun[4];                /* Current Dungeon Level (number) */
-       char max_lev[4];                /* Max Player Level (number) */
-       char max_dun[4];                /* Max Dungeon Level (number) */
-
-       char how[40];           /* Method of death (string) */
+       GAME_TEXT what[8];              /* Version info (string) */
+       GAME_TEXT pts[10];              /* Total Score (number) */
+       GAME_TEXT gold[10];             /* Total Gold (number) */
+       GAME_TEXT turns[10];            /* Turns Taken (number) */
+       GAME_TEXT day[10];              /* Time stamp (string) */
+       GAME_TEXT who[16];              /* Player Name (string) */
+       GAME_TEXT uid[8];               /* Player UID (number) */
+       GAME_TEXT sex[2];               /* Player Sex (string) */
+       GAME_TEXT p_r[3];               /* Player Race (number) */
+       GAME_TEXT p_c[3];               /* Player Class (number) */
+       GAME_TEXT p_a[3];               /* Player Seikaku (number) */
+
+       GAME_TEXT cur_lev[4];           /* Current Player Level (number) */
+       GAME_TEXT cur_dun[4];           /* Current Dungeon Level (number) */
+       GAME_TEXT max_lev[4];           /* Max Player Level (number) */
+       GAME_TEXT max_dun[4];           /* Max Dungeon Level (number) */
+
+       GAME_TEXT how[40];              /* Method of death (string) */
 };
 
 
@@ -1609,8 +1740,9 @@ feat_prob;
 /* A structure for the != dungeon types */
 typedef struct dungeon_info_type dungeon_info_type;
 struct dungeon_info_type {
-       STR_OFFSET name;                /* Name */
-       STR_OFFSET text;                /* Description */
+
+       STR_OFFSET name; /* Name */
+       STR_OFFSET text; /* Description */
 
        POSITION dy;
        POSITION dx;
@@ -1665,9 +1797,9 @@ struct dungeon_info_type {
  * @brief 自動拾い/破壊設定データの構造体 / A structure type for entry of auto-picker/destroyer
  */
 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 */
+       concptr name;          /*!< 自動拾い/破壊定義の名称一致基準 / Items which have 'name' as part of its name match */
+       concptr insc;          /*!< 対象となったアイテムに自動で刻む内容 / Items will be auto-inscribed as 'insc' */
+       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,13 +1811,13 @@ 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. */
        u32b visit_mark;      /* Older has always smaller mark. */
-       s16b upper_floor_id;  /* a floor connected with level teleportation */
-       s16b lower_floor_id;  /* a floor connected with level tel. and trap door */
+       FLOOR_IDX upper_floor_id;  /* a floor connected with level teleportation */
+       FLOOR_IDX lower_floor_id;  /* a floor connected with level tel. and trap door */
 } saved_floor_type;
 
 
@@ -1695,8 +1827,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 +1840,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,26 +1868,26 @@ typedef struct
 typedef struct {
        int run; /* Remaining grid number */
        int cost[MAX_HGT][MAX_WID];
-       int x; /* Target X */
-       int y; /* Target Y */
+       POSITION x; /* Target X */
+       POSITION y; /* Target Y */
        DIRECTION dir; /* Running direction */
 } travel_type;
 #endif
 
 typedef struct {
-       cptr flag;
+       concptr flag;
        byte index;
        byte level;
        s32b value;
        struct {
                int constant;
-               int dice;
+               DICE_NUMBER dice;
        } timeout;
-       cptr desc;
+       concptr desc;
 } activation_type;
 
 typedef struct {
        int flag;
        int type;
-       cptr name;
+       concptr name;
 } dragonbreath_type;