OSDN Git Service

#37345 (2.2.0.54) [l]ook(Roguelikeキーモード時[x])を[*]と同じく押しっ放しで対象候補の次を選べるように実装。 / Implemen...
[hengband/hengband.git] / src / types.h
index f8d6ea9..550076d 100644 (file)
@@ -1,21 +1,19 @@
-/* File: types.h */
-
-/* Purpose: global type declarations */
-
-/*
- * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
- *
- * This software may be copied and distributed for educational, research, and
- * not for profit purposes provided that this copyright and statement are
- * included in all such copies.
- */
-
-
-/*
+/*!
+ * @file types.h
+ * @brief グローバルな構造体の定義 / global type declarations
+ * @date 2014/08/10
+ * @author
+ * <pre>
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
+ * This software may be copied and distributed for educational, research,
+ * and not for profit purposes provided that this copyright and statement
+ * are included in all such copies.  Other copyrights may also apply.
+ * </pre>
+ * @details
+ * <pre>
+ * このファイルはangband.hでのみインクルードすること。
  * This file should ONLY be included by "angband.h"
- */
-
-/*
+ *
  * Note that "char" may or may not be signed, and that "signed char"
  * may or may not work on all machines.  So always use "s16b" or "s32b"
  * for signed values.  Also, note that unsigned values cause math problems
  * in "header_type", and the "m_idx" and "o_idx" fields in "cave_type".  All
  * of these could be removed, but this would, in general, slow down the game
  * and increase the complexity of the code.
+ * </pre>
  */
 
 
+/*!
+ * @struct feature_state
+ * @brief 地形状態変化指定構造体 / Feature state structure
+ */
+typedef struct feature_state feature_state;
 
+struct feature_state
+{
+       byte action; /*!< 変化条件をFF_*のIDで指定 / Action (FF_*) */
+       s16b result; /*!< 変化先ID / Result (f_info ID) */
+};
 
 
-/*
- * Information about terrain "features"
+/*!
+ * @struct feature_type
+ * @brief 地形情報の構造体 / Information about terrain "features"
  */
 
 typedef struct feature_type feature_type;
 
 struct feature_type
 {
-       u32b name;                      /* Name (offset) */
-       u32b text;                      /* Text (offset) */
+       u32b name;                /*!< 地形名参照のためのネームバッファオフセット値 / Name (offset) */
+       u32b text;                /*!< 地形説明参照のためのネームバッファオフセット値 /  Text (offset) */
+       s16b tag;                 /*!< 地形特性タグ参照のためのネームバッファオフセット値 /  Tag (offset) */
+
+       s16b mimic;               /*!< 未確定時の外形地形ID / Feature to mimic */
 
-       byte mimic;                     /* Feature to mimic */
+       u32b flags[FF_FLAG_SIZE]; /*!< 地形の基本特性ビット配列 / Flags */
 
-       byte extra;                     /* Extra byte (unused) */
+       u16b priority;            /*!< 縮小表示で省略する際の表示優先度 / Map priority */
+       s16b destroyed;           /*!< *破壊*に巻き込まれた時の地形移行先(未実装?) / Default destroyed state */
 
-       s16b unused;            /* Extra bytes (unused) */
+       feature_state state[MAX_FEAT_STATES]; /*!< feature_state テーブル */
 
-       byte d_attr;            /* Default feature attribute */
-       byte d_char;            /* Default feature character */
+       byte subtype;  /*!< 副特性値 */
+       byte power;    /*!< 地形強度 */
 
+       byte d_attr[F_LIT_MAX];   /*!< デフォルトの地形シンボルカラー / Default feature attribute */
+       byte d_char[F_LIT_MAX];   /*!< デフォルトの地形シンボルアルファベット / Default feature character */
 
-       byte x_attr;            /* Desired feature attribute */
-       byte x_char;            /* Desired feature character */
+       byte x_attr[F_LIT_MAX];   /*!< 設定変更後の地形シンボルカラー / Desired feature attribute */
+       byte x_char[F_LIT_MAX];   /*!< 設定変更後の地形シンボルアルファベット / Desired feature character */
 };
 
 
-/*
- * Information about object "kinds", including player knowledge.
- *
+/*!
+ * @struct object_kind
+ * @brief ベースアイテム情報の構造体 / Information about object "kinds", including player knowledge.
+ * @details
+ * ゲーム進行用のセーブファイル上では aware と tried のみ保存対象とすること。と英文ではあるが実際はもっとある様子である。 /
  * Only "aware" and "tried" are saved in the savefile
  */
 
@@ -84,102 +102,101 @@ typedef struct object_kind object_kind;
 
 struct object_kind
 {
-       u32b name;                      /* Name (offset) */
-       u32b text;                      /* Text (offset) */
-
-       byte tval;                      /* Object type */
-       byte sval;                      /* Object sub type */
-
-       s16b pval;                      /* Object extra info */
+       u32b name;                      /*!< ベースアイテム名参照のためのネームバッファオフセット値 / Name (offset) */
+       u32b text;                      /*!< 解説テキスト参照のためのネームバッファオフセット値 / Text (offset) */
+       u32b flavor_name;       /*!< 未確定名参照のためのネームバッファオフセット値 / Flavor name (offset) */
 
-       s16b to_h;                      /* Bonus to hit */
-       s16b to_d;                      /* Bonus to damage */
-       s16b to_a;                      /* Bonus to armor */
+       byte tval;                      /*!< ベースアイテム種別の大項目値 Object type */
+       byte sval;                      /*!< ベースアイテム種別の小項目値 Object sub type */
 
-       s16b ac;                        /* Base armor */
+       s16b pval;                      /*!< ベースアイテムのpval(能力修正共通値) Object extra info */
 
-       byte dd, ds;            /* Damage dice/sides */
-
-       s16b weight;            /* Weight */
+       s16b to_h;                      /*!< ベースアイテムの命中修正値 / Bonus to hit */
+       s16b to_d;                      /*!< ベースアイテムのダメージ修正値 / Bonus to damage */
+       s16b to_a;                      /*!< ベースアイテムのAC修正値 / Bonus to armor */
 
-       s32b cost;                      /* Object "base cost" */
+       s16b ac;                        /*!< ベースアイテムのAC基本値 /  Base armor */
 
-       u32b flags1;            /* Flags, set 1 */
-       u32b flags2;            /* Flags, set 2 */
-       u32b flags3;            /* Flags, set 3 */
+       byte dd, ds;            /*!< ダメージダイスの数と大きさ / Damage dice/sides */
 
-       u32b gen_flags;         /* flags for generate */
+       s16b weight;            /*!< ベースアイテムの重量 / Weight */
 
-       byte locale[4];         /* Allocation level(s) */
-       byte chance[4];         /* Allocation chance(s) */
+       s32b cost;                      /*!< ベースアイテムの基本価値 / Object "base cost" */
 
-       byte level;                     /* Level */
-       byte extra;                     /* Something */
+       u32b flags[TR_FLAG_SIZE];       /*!< ベースアイテムの基本特性ビット配列 / Flags */
 
+       u32b gen_flags;         /*!< ベースアイテムの生成特性ビット配列 / flags for generate */
 
-       byte d_attr;            /* Default object attribute */
-       byte d_char;            /* Default object character */
+       byte locale[4];         /*!< ベースアイテムの生成階テーブル / Allocation level(s) */
+       byte chance[4];         /*!< ベースアイテムの生成確率テーブル / Allocation chance(s) */
 
+       byte level;                     /*!< ベースアイテムの基本生成階 / Level */
+       byte extra;                     /*!< その他色々のビットフラグ配列 / Something */
 
-       byte x_attr;            /* Desired object attribute */
-       byte x_char;            /* Desired object character */
+       byte d_attr;            /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
+       byte d_char;            /*!< デフォルトのアイテムシンボルアルファベット / Default object character */
 
+       byte x_attr;            /*!< 設定変更後のアイテムシンボルカラー /  Desired object attribute */
+       byte x_char;            /*!< 設定変更後のアイテムシンボルアルファベット /  Desired object character */
 
-       byte flavor;                    /* Special object flavor (or zero) */
+       s16b flavor;            /*!< 調査中(TODO) / Special object flavor (or zero) */
 
-       bool easy_know;         /* This object is always known (if aware) */
+       bool easy_know;         /*!< ベースアイテムが初期からベース名を判断可能かどうか / This object is always known (if aware) */
 
+       bool aware;                     /*!< ベースアイテムが鑑定済かどうか /  The player is "aware" of the item's effects */
 
-       bool aware;                     /* The player is "aware" of the item's effects */
+       bool tried;                     /*!< ベースアイテムを未鑑定のまま試したことがあるか /  The player has "tried" one of the items */
 
-       bool tried;                     /* The player has "tried" one of the items */
+       byte act_idx;           /*!< 発動能力のID /  Activative ability index */
 };
 
 
 
-/*
- * Information about "artifacts".
- *
- * Note that the save-file only writes "cur_num" to the savefile.
- *
- * Note that "max_num" is always "1" (if that artifact "exists")
- */
-
 typedef struct artifact_type artifact_type;
 
+/*!
+ * @struct artifact_type
+ * @brief 固定アーティファクト情報の構造体 / Artifact structure.
+ * @details
+ * @note
+ * the save-file only writes "cur_num" to the savefile.
+ * "max_num" is always "1" (if that artifact "exists")
+ */
 struct artifact_type
 {
-       u32b name;                      /* Name (offset) */
-       u32b text;                      /* Text (offset) */
+       u32b name;                      /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
+       u32b text;                      /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
 
-       byte tval;                      /* Artifact type */
-       byte sval;                      /* Artifact sub type */
+       byte tval;                      /*!< ベースアイテム大項目ID / Artifact type */
+       byte sval;                      /*!< ベースアイテム小項目ID / Artifact sub type */
 
-       s16b pval;                      /* Artifact extra info */
+       s16b pval;                      /*!< pval修正値 / Artifact extra info */
 
-       s16b to_h;                      /* Bonus to hit */
-       s16b to_d;                      /* Bonus to damage */
-       s16b to_a;                      /* Bonus to armor */
+       s16b to_h;                      /*!< 命中ボーナス値 /  Bonus to hit */
+       s16b to_d;                      /*!< ダメージボーナス値 / Bonus to damage */
+       s16b to_a;                      /*!< ACボーナス値 / Bonus to armor */
 
-       s16b ac;                        /* Base armor */
+       s16b ac;                        /*!< 上書きベースAC値 / Base armor */
 
-       byte dd, ds;            /* Damage when hits */
+       byte dd, ds;            /*!< ダイス値 / Damage when hits */
 
-       s16b weight;            /* Weight */
+       s16b weight;            /*!< 重量 / Weight */
 
-       s32b cost;                      /* Artifact "cost" */
+       s32b cost;                      /*!< 基本価格 / Artifact "cost" */
 
-       u32b flags1;            /* Artifact Flags, set 1 */
-       u32b flags2;            /* Artifact Flags, set 2 */
-       u32b flags3;            /* Artifact Flags, set 3 */
+       u32b flags[TR_FLAG_SIZE];       /*! アイテムフラグ / Artifact Flags */
 
-       u32b gen_flags;         /* flags for generate */
+       u32b gen_flags;         /*! アイテム生成フラグ / flags for generate */
+
+       byte level;                     /*! 基本生成階 / Artifact level */
+       byte rarity;            /*! レアリティ / Artifact rarity */
+
+       byte cur_num;           /*! 現在の生成数 / Number created (0 or 1) */
+       byte max_num;           /*! (未使用)最大生成数 / Unused (should be "1") */
 
-       byte level;                     /* Artifact level */
-       byte rarity;            /* Artifact rarity */
+       s16b floor_id;      /*! アイテムを落としたフロアのID / Leaved on this location last time */
 
-       byte cur_num;           /* Number created (0 or 1) */
-       byte max_num;           /* Unused (should be "1") */
+       byte act_idx;           /*! 発動能力ID / Activative ability index */
 };
 
 
@@ -208,11 +225,11 @@ struct ego_item_type
 
        s32b cost;                      /* Ego-item "cost" */
 
-       u32b flags1;            /* Ego-Item Flags, set 1 */
-       u32b flags2;            /* Ego-Item Flags, set 2 */
-       u32b flags3;            /* Ego-Item Flags, set 3 */
+       u32b flags[TR_FLAG_SIZE];       /* Ego-Item Flags */
 
        u32b gen_flags;         /* flags for generate */
+
+       byte act_idx;           /* Activative ability index */
 };
 
 
@@ -238,6 +255,14 @@ struct monster_blow
 };
 
 
+typedef struct mbe_info_type mbe_info_type;
+
+struct mbe_info_type
+{
+       int power;        /* The attack "power" */
+       int explode_type; /* Explosion effect */
+};
+
 
 /*
  * Monster "race" information, including racial memories
@@ -264,39 +289,51 @@ typedef struct monster_race monster_race;
 
 struct monster_race
 {
-       u32b name;                              /* Name (offset) */
+       u32b name;                              /*!< 名前データのオフセット(日本語) /  Name offset(Japanese) */
 #ifdef JP
-        u32b E_name;                    /* ±Ñ¸ì̾ (offset) */
+       u32b E_name;            /*!< 名前データのオフセット(英語) /  Name offset(English) */
 #endif
-       u32b text;                              /* Text (offset) */
+       u32b text;                              /*!< 思い出テキストのオフセット / Lore text offset */
 
-       byte hdice;                             /* Creatures hit dice count */
-       byte hside;                             /* Creatures hit dice sides */
+       byte hdice;                             /*!< HPのダイス数 / Creatures hit dice count */
+       byte hside;                             /*!< HPのダイス面数 / Creatures hit dice sides */
 
-       s16b ac;                                /* Armour Class */
+       s16b ac;                                /*!< アーマークラス / Armour Class */
 
-       s16b sleep;                             /* Inactive counter (base) */
-       byte aaf;                               /* Area affect radius (1-100) */
-       byte speed;                             /* Speed (normally 110) */
+       s16b sleep;                             /*!< 睡眠値 / Inactive counter (base) */
+       byte aaf;                               /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
+       byte speed;                             /*!< 加速(110で+0) / Speed (normally 110) */
 
-       s32b mexp;                              /* Exp value for kill */
+       s32b mexp;                              /*!< 殺害時基本経験値 / Exp value for kill */
 
-       s16b extra;                             /* Unused (for now) */
+       s16b extra;                             /*!< 未使用 /  Unused (for now) */
 
-       byte freq_inate;                /* Inate spell frequency */
-       byte freq_spell;                /* Other spell frequency */
+       byte freq_spell;                /*!< 魔法&特殊能力仕様頻度(1/n) /  Spell frequency */
 
        u32b flags1;                    /* Flags 1 (general) */
        u32b flags2;                    /* Flags 2 (abilities) */
        u32b flags3;                    /* Flags 3 (race/resist) */
        u32b flags4;                    /* Flags 4 (inate/breath) */
-       u32b flags5;                    /* Flags 5 (normal spells) */
-       u32b flags6;                    /* Flags 6 (special spells) */
        u32b flags7;                    /* Flags 7 (movement related abilities) */
        u32b flags8;                    /* Flags 8 (wilderness info) */
        u32b flags9;                    /* Flags 9 (drops info) */
+       u32b flagsr;                    /* Flags R (resistances info) */
+
+       u32b a_ability_flags1;  /* Activate Ability Flags 5 (normal spells) */
+       u32b a_ability_flags2;  /* Activate Ability Flags 6 (special spells) */
+       u32b a_ability_flags3;  /* Activate Ability Flags 7 (implementing) */
+       u32b a_ability_flags4;  /* Activate Ability Flags 8 (implementing) */
 
        monster_blow blow[4];   /* Up to four blows per round */
+       u16b reinforce_id[6];
+       u16b reinforce_dd[6];
+       u16b reinforce_ds[6];
+
+       u16b artifact_id[4];    /* 特定アーティファクトドロップID */
+       u16b artifact_rarity[4];        /* 特定アーティファクトレア度 */
+       u16b artifact_percent[4]; /* 特定アーティファクトドロップ率 */
+
+       u32b arena_ratio;               /* アリーナの評価修正値(%基準 / 0=100%) / Arena */
 
        s16b next_r_idx;
        u32b next_exp;
@@ -317,11 +354,14 @@ struct monster_race
 
        byte cur_num;                   /* Monster population on current level */
 
+       s16b floor_id;          /* Location of unique monster */
+
 
        s16b r_sights;                  /* Count sightings of this monster */
        s16b r_deaths;                  /* Count deaths from this monster */
 
-       s16b r_pkills;                  /* Count monsters killed in this life */
+       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 */
 
        byte r_wake;                    /* Number of times woken up (?) */
@@ -333,7 +373,6 @@ struct monster_race
        byte r_drop_gold;               /* Max number of gold dropped at once */
        byte r_drop_item;               /* Max number of item dropped at once */
 
-       byte r_cast_inate;              /* Max number of inate spells seen */
        byte r_cast_spell;              /* Max number of other spells seen */
 
        byte r_blows[4];                /* Number of times each blow type was seen */
@@ -344,7 +383,8 @@ struct monster_race
        u32b r_flags4;                  /* Observed racial flags */
        u32b r_flags5;                  /* Observed racial flags */
        u32b r_flags6;                  /* Observed racial flags */
-       u32b r_flags7;                  /* Observed racial flags */
+       /* u32b r_flags7; */    /* Observed racial flags */
+       u32b r_flagsr;                  /* Observed racial resistance flags */
 };
 
 
@@ -416,7 +456,7 @@ struct cave_type
 {
        u16b info;              /* Hack -- cave flags */
 
-       byte feat;              /* Hack -- feature type */
+       s16b feat;              /* Hack -- feature type */
 
        s16b o_idx;             /* Object in this grid */
 
@@ -424,7 +464,7 @@ struct cave_type
 
        s16b special;   /* Special cave info */
 
-       byte mimic;             /* Feature to mimic */
+       s16b mimic;             /* Feature to mimic */
 
        byte cost;              /* Hack -- cost of flowing */
        byte dist;              /* Hack -- distance from player */
@@ -498,10 +538,10 @@ struct object_type
        byte name2;                     /* Ego-Item type, if any */
 
        byte xtra1;                     /* Extra info type (now unused) */
-       byte xtra2;                     /* Extra info index */
-       byte xtra3;                     /* Extra info */
-       s16b xtra4;                     /* Extra info */
-       s16b xtra5;                     /* Extra info */
+       byte xtra2;                     /* Extra info activation index */
+       byte xtra3;                     /* Extra info for weaponsmith */
+       s16b xtra4;                     /* Extra info fuel or captured monster's current HP */
+       s16b xtra5;                     /* Extra info captured monster's max HP */
 
        s16b to_h;                      /* Plusses to hit */
        s16b to_d;                      /* Plusses to damage */
@@ -522,36 +562,13 @@ struct object_type
 
        byte feeling;          /* Game generated inscription number (eg, pseudo-id) */
 
-       u32b art_flags1;        /* Flags, set 1  Alas, these were necessary */
-       u32b art_flags2;        /* Flags, set 2  for the random artifacts of*/
-       u32b art_flags3;        /* Flags, set 3  Zangband */
+       u32b art_flags[TR_FLAG_SIZE];        /* Extra Flags for ego and artifacts */
 
        u32b curse_flags;        /* Flags for curse */
 
        s16b next_o_idx;        /* Next object in stack (if any) */
 
        s16b held_m_idx;        /* Monster holding us (if any) */
-
-#ifdef SCRIPT_OBJ_KIND
-       char *name;
-
-       byte d_attr;            /* Default object attribute */
-       byte d_char;            /* Default object character */
-
-
-       byte x_attr;            /* Desired object attribute */
-       byte x_char;            /* Desired object character */
-
-
-       byte flavor;                    /* Special object flavor (or zero) */
-
-       bool easy_know;         /* This object is always known (if aware) */
-
-
-       bool aware;                     /* The player is "aware" of the item's effects */
-
-       bool tried;                     /* The player has "tried" one of the items */
-#endif /* SCRIPT_OBJ_KIND */
 };
 
 
@@ -569,33 +586,29 @@ typedef struct monster_type monster_type;
 
 struct monster_type
 {
-       s16b r_idx;                     /* Monster race index */
+       s16b r_idx;             /* Monster race index */
+       s16b ap_r_idx;          /* Monster race appearance index */
+       byte sub_align;         /* Sub-alignment for a neutral monster */
 
-       byte fy;                        /* Y location on map */
-       byte fx;                        /* X location on map */
+       byte fy;                /* Y location on map */
+       byte fx;                /* X location on map */
 
-       s16b hp;                        /* Current Hit points */
-       s16b maxhp;                     /* Max Hit points */
-       s16b max_maxhp;                 /* Max Max Hit points */
+       s16b hp;                /* Current Hit points */
+       s16b maxhp;             /* Max Hit points */
+       s16b max_maxhp;         /* Max Max Hit points */
+       u32b dealt_damage;              /* Sum of damages dealt by player */
 
-       s16b csleep;            /* Inactive counter */
+       s16b mtimed[MAX_MTIMED];        /* Timed status counter */
 
-       byte mspeed;            /* Monster "speed" */
-       s16b energy;            /* Monster "energy" */
+       byte mspeed;            /* Monster "speed" */
+       s16b energy_need;       /* Monster "energy" */
 
-       byte fast;              /* Monster is stunned */
-       byte slow;              /* Monster is stunned */
-       byte stunned;           /* Monster is stunned */
-       byte confused;          /* Monster is confused */
-       byte monfear;           /* Monster is afraid */
-       byte invulner;          /* Monster is temporarily invulnerable */
+       byte cdis;              /* Current dis from player */
 
-       byte cdis;                      /* Current dis from player */
+       byte mflag;             /* Extra monster flags */
+       byte mflag2;            /* Extra monster flags */
 
-       byte mflag;                     /* Extra monster flags */
-       byte mflag2;                    /* Extra monster flags */
-
-       bool ml;                        /* Monster is "visible" */
+       bool ml;                /* Monster is "visible" */
 
        s16b hold_o_idx;        /* Object being held (if any) */
 
@@ -606,23 +619,9 @@ struct monster_type
 
        u32b exp;
 
-#ifdef WDT_TRACK_OPTIONS
-
-       byte ty;                        /* Y location of target */
-       byte tx;                        /* X location of target */
-
-       byte t_dur;                     /* How long are we tracking */
-
-       byte t_bit;                     /* Up to eight bit flags */
-
-#endif /* WDT_TRACK_OPTIONS */
-
-#ifdef DRS_SMART_OPTIONS
-
        u32b smart;                     /* Field for "smart_learn" */
 
-#endif /* DRS_SMART_OPTIONS */
-
+       s16b parent_m_idx;
 };
 
 
@@ -686,31 +685,34 @@ struct option_type
 };
 
 
-/*
- * Structure for the "quests"
- */
 typedef struct quest_type quest_type;
 
+/*!
+ * @struct quest_type
+ * @brief クエスト情報の構造体 / Structure for the "quests".
+ */
+
 struct quest_type
 {
-       s16b status;            /* Is the quest taken, completed, finished? */
+       s16b status;            /*!< クエストの進行ステータス / Is the quest taken, completed, finished? */
 
-       s16b type;              /* The quest type */
+       s16b type;              /*!< クエストの種別 / The quest type */
 
-       char name[60];          /* Quest name */
-       s16b level;             /* Dungeon level */
-       s16b r_idx;             /* Monster race */
+       char name[60];          /*!< クエスト名 / Quest name */
+       s16b level;             /*!< 処理階層 / Dungeon level */
+       s16b r_idx;             /*!< クエスト対象のモンスターID / Monster race */
 
-       s16b cur_num;           /* Number killed */
-       s16b max_num;           /* Number required */
+       s16b cur_num;           /*!< 撃破したモンスターの数 / Number killed */
+       s16b max_num;           /*!< 求められるモンスターの撃破数 / Number required */
 
-       s16b k_idx;             /* object index */
-       s16b num_mon;           /* number of monsters on level */
+       s16b k_idx;             /*!< クエスト対象のアイテムID / object index */
+       s16b num_mon;           /*!< QUEST_TYPE_KILL_NUMBER時の目標撃破数 number of monsters on level */
 
-       byte flags;             /* quest flags */
-       byte dungeon;           /* quest dungeon */
+       byte flags;             /*!< クエストに関するフラグビット / quest flags */
+       byte dungeon;           /*!< クエスト対象のダンジョンID / quest dungeon */
 
-       byte complev;           /* player level (complete) */
+       byte complev;           /*!< クリア時プレイヤーレベル / player level (complete) */
+       u32b comptime;          /*!< クリア時ゲーム時間 /  quest clear time*/
 };
 
 
@@ -723,7 +725,7 @@ struct owner_type
 {
        cptr owner_name;        /* Name */
 
-       s16b max_cost;          /* Purse limit */
+       s32b max_cost;          /* Purse limit */
 
        byte max_inflate;       /* Inflation (max) */
        byte min_inflate;       /* Inflation (min) */
@@ -820,8 +822,8 @@ struct player_sex
        cptr title;                     /* Type of sex */
        cptr winner;            /* Name of winner */
 #ifdef JP
-       cptr E_title;           /* ±Ñ¸ìÀ­ÊÌ */
-       cptr E_winner;          /* ±Ñ¸ìÀ­ÊÌ */
+       cptr E_title;           /* 英語性別 */
+       cptr E_winner;          /* 英語性別 */
 #endif
 };
 
@@ -837,7 +839,7 @@ struct player_race
        cptr title;                     /* Type of race */
 
 #ifdef JP
-       cptr E_title;           /* ±Ñ¸ì¼ï² */
+       cptr E_title;           /* 英語種族 */
 #endif
        s16b r_adj[6];          /* Racial stat bonuses */
 
@@ -884,7 +886,7 @@ struct player_class
        cptr title;                     /* Type of class */
 
 #ifdef JP
-       cptr E_title;           /* ±Ñ¸ì¿¦¶È */
+       cptr E_title;           /* 英語職業 */
 #endif
        s16b c_adj[6];          /* Class stat modifier */
 
@@ -919,7 +921,7 @@ struct player_seikaku
        cptr title;                     /* Type of seikaku */
 
 #ifdef JP
-       cptr E_title;           /* ±Ñ¸ìÀ­³Ê */
+       cptr E_title;           /* 英語性格 */
 #endif
 
        s16b a_adj[6];          /* seikaku stat bonuses */
@@ -935,7 +937,7 @@ struct player_seikaku
 
        s16b a_mhp;                     /* Race hit-dice modifier */
 
-       byte no;                        /* ¤Î */
+       byte no;                        /*  */
        byte sex;                       /* seibetu seigen */
 };
 
@@ -972,9 +974,9 @@ struct player_type
 
        byte hitdie;            /* Hit dice (sides) */
        u16b expfact;       /* Experience factor
-                                                * Note: was byte, causing overflow for Amberite
-                                                * characters (such as Amberite Paladins)
-                                                */
+                            * Note: was byte, causing overflow for Amberite
+                            * characters (such as Amberite Paladins)
+                            */
 
        s16b age;                       /* Characters age */
        s16b ht;                        /* Height */
@@ -984,9 +986,10 @@ struct player_type
 
        s32b au;                        /* Current Gold */
 
+       s32b max_max_exp;       /* Max max experience (only to calculate score) */
        s32b max_exp;           /* Max experience */
        s32b exp;                       /* Cur experience */
-       u16b exp_frac;          /* Cur exp frac (times 2^16) */
+       u32b exp_frac;          /* Cur exp frac (times 2^16) */
 
        s16b lev;                       /* Level */
 
@@ -996,19 +999,17 @@ struct player_type
        s16b inside_quest;              /* Inside quest level */
        bool inside_battle;             /* Is character inside tougijou? */
 
-       s16b rewards[MAX_BACT]; /* Status of rewards in town */
-
        s32b wilderness_x;      /* Coordinates in the wilderness */
        s32b wilderness_y;
        bool wild_mode;
 
-       s16b mhp;                       /* Max hit pts */
-       s16b chp;                       /* Cur hit pts */
-       u16b chp_frac;          /* Cur hit frac (times 2^16) */
+       s32b mhp;                       /* Max hit pts */
+       s32b chp;                       /* Cur hit pts */
+       u32b chp_frac;          /* Cur hit frac (times 2^16) */
 
-       s16b msp;                       /* Max mana pts */
-       s16b csp;                       /* Cur mana pts */
-       u16b csp_frac;          /* Cur mana frac (times 2^16) */
+       s32b msp;                       /* Max mana pts */
+       s32b csp;                       /* Cur mana pts */
+       u32b csp_frac;          /* Cur mana frac (times 2^16) */
 
        s16b max_plv;           /* Max Player Level */
 
@@ -1016,24 +1017,27 @@ struct player_type
        s16b stat_max_max[6];   /* Maximal "maximal" stat values */
        s16b stat_cur[6];       /* Current "natural" stat values */
 
+       s16b learned_spells;
+       s16b add_spells;
+
        u32b count;
 
-       s16b fast;                      /* Timed -- Fast */
-       s16b slow;                      /* Timed -- Slow */
-       s16b blind;                     /* Timed -- Blindness */
+       s16b fast;              /* Timed -- Fast */
+       s16b slow;              /* Timed -- Slow */
+       s16b blind;             /* Timed -- Blindness */
        s16b paralyzed;         /* Timed -- Paralysis */
        s16b confused;          /* Timed -- Confusion */
        s16b afraid;            /* Timed -- Fear */
-       s16b image;                     /* Timed -- Hallucination */
+       s16b image;             /* Timed -- Hallucination */
        s16b poisoned;          /* Timed -- Poisoned */
-       s16b cut;                       /* Timed -- Cut */
-       s16b stun;                      /* Timed -- Stun */
+       s16b cut;               /* Timed -- Cut */
+       s16b stun;              /* Timed -- Stun */
 
        s16b protevil;          /* Timed -- Protection */
        s16b invuln;            /* Timed -- Invulnerable */
        s16b ult_res;           /* Timed -- Ultimate Resistance */
-       s16b hero;                      /* Timed -- Heroism */
-       s16b shero;                     /* Timed -- Super Heroism */
+       s16b hero;              /* Timed -- Heroism */
+       s16b shero;             /* Timed -- Super Heroism */
        s16b shield;            /* Timed -- Shield Spell */
        s16b blessed;           /* Timed -- Blessed */
        s16b tim_invis;         /* Timed -- See Invisible */
@@ -1056,7 +1060,7 @@ struct player_type
        s16b tim_regen;
        s16b kabenuke;
        s16b tim_stealth;
-       s16b tim_ffall;
+       s16b tim_levitation;
        s16b tim_sh_touki;
        s16b lightspeed;
        s16b tsubureru;
@@ -1066,8 +1070,10 @@ struct player_type
        byte mimic_form;
        s16b tim_mimic;
        s16b tim_sh_fire;
+       s16b tim_sh_holy;
+       s16b tim_eyeeye;
 
-        /* for mirror master */
+       /* for mirror master */
        s16b tim_reflect;       /* Timed -- Reflect */
        s16b multishadow;       /* Timed -- Multi-shadow */
        s16b dustrobe;          /* Timed -- Robe of dust */
@@ -1080,30 +1086,99 @@ struct player_type
        s16b virtues[8];
        s16b vir_types[8];
 
-       s16b word_recall;       /* Word of recall counter */
-       byte recall_dungeon;
+       s16b word_recall;         /* Word of recall counter */
+       s16b alter_reality;       /* Alter reality counter */
+       byte recall_dungeon;      /* Dungeon set to be recalled */
+
+       s16b energy_need;         /* Energy needed for next move */
+       s16b enchant_energy_need;         /* Energy needed for next upkeep effect        */
+
+       s16b food;                /* Current nutrition */
+
+       u32b special_attack;      /* Special attack capacity -LM- */
+       u32b special_defense;     /* Special block capacity -LM- */
+       byte action;              /* Currently action */
 
-       s16b energy;            /* Current energy */
+       u32b spell_learned1;      /* bit mask of spells learned */
+       u32b spell_learned2;      /* bit mask of spells learned */
+       u32b spell_worked1;       /* bit mask of spells tried and worked */
+       u32b spell_worked2;       /* bit mask of spells tried and worked */
+       u32b spell_forgotten1;    /* bit mask of spells learned but forgotten */
+       u32b spell_forgotten2;    /* bit mask of spells learned but forgotten */
+       byte spell_order[64];     /* order spells learned/remembered/forgotten */
 
-       s16b food;                      /* Current nutrition */
+       s16b spell_exp[64];       /* Proficiency of spells */
+       s16b weapon_exp[5][64];   /* Proficiency of weapons */
+       s16b skill_exp[GINOU_MAX];       /* Proficiency of misc. skill */
 
-       u32b total_weight;              /* Total weight being carried */
+       s32b magic_num1[108];     /* Array for non-spellbook type magic */
+       byte magic_num2[108];     /* Flags for non-spellbook type magics */
+
+       s16b mane_spell[MAX_MANE];
+       s16b mane_dam[MAX_MANE];
+       s16b mane_num;
+
+       s16b concent;      /* Sniper's concentration level */
+
+       s16b player_hp[PY_MAX_LEVEL];
+       char died_from[80];       /* What killed the player */
+       cptr last_message;        /* Last message on death or retirement */
+       char history[4][60];      /* Textual "history" for the Player */
+
+       u16b total_winner;        /* Total winner */
+       u16b panic_save;          /* Panic save */
+
+       u16b noscore;             /* Cheating flags */
+
+       bool wait_report_score;   /* Waiting to report score */
+       bool is_dead;             /* Player is dead */
+
+       bool wizard;              /* Player is in wizard mode */
+
+       s16b riding;              /* Riding on a monster of this index */
+       byte knowledge;           /* Knowledge about yourself */
+       s32b visit;               /* Visited towns */
+
+       byte start_race;          /* Race at birth */
+       s32b old_race1;           /* Record of race changes */
+       s32b old_race2;           /* Record of race changes */
+       s16b old_realm;           /* Record of realm changes */
+
+       s16b pet_follow_distance; /* Length of the imaginary "leash" for pets */
+       s16b pet_extra_flags;     /* Various flags for controling pets */
 
-       u32b special_attack;    /* Special attack capacity -LM- */
-       u32b special_defense;   /* Special block capacity -LM- */
-       byte action;            /* Currently action */
+       s16b today_mon;           /* Wanted monster */
 
-       s16b health_who;                /* Health bar trackee */
+       bool dtrap;               /* Whether you are on trap-safe grids */
+       s16b floor_id;            /* Current floor location */ 
+
+       bool autopick_autoregister; /* auto register is in-use or not */
+
+       byte feeling;           /* Most recent dungeon feeling */
+       s32b feeling_turn;      /* The turn of the last dungeon feeling */
+
+
+       /*** Temporary fields ***/
+
+       bool playing;                   /* True if player is playing */
+       bool leaving;                   /* True if player is leaving */
+
+       byte exit_bldg;                 /* Goal obtained in arena? -KMW- */
+
+       bool leaving_dungeon;   /* True if player is leaving the dungeon */
+       bool teleport_town;
+       bool enter_dungeon;     /* Just enter the dungeon */
+
+       s16b health_who;        /* Health bar trackee */
 
        s16b monster_race_idx;  /* Monster race trackee */
 
        s16b object_kind_idx;   /* Object kind trackee */
 
        s16b new_spells;        /* Number of spells available */
-
        s16b old_spells;
-       s16b learned_spells;
-       s16b add_spells;
+
+       s16b old_food_aux;      /* Old value of food */
 
        bool old_cumber_armor;
        bool old_cumber_glove;
@@ -1115,10 +1190,6 @@ struct player_type
        bool old_monlite;
 
        s16b old_lite;          /* Old radius of lite (if any) */
-       s16b old_view;          /* Old radius of view (if any) */
-
-       s16b old_food_aux;      /* Old value of food */
-
 
        bool cumber_armor;      /* Mana draining armor */
        bool cumber_glove;      /* Mana draining gloves */
@@ -1140,6 +1211,18 @@ struct player_type
        s16b stat_use[6];       /* Current modified stats */
        s16b stat_top[6];       /* Maximal modified stats */
 
+       bool sutemi;
+       bool counter;
+
+       s32b align;                             /* Good/evil/neutral */
+       s16b run_py;
+       s16b run_px;
+
+
+       /*** Extracted fields ***/
+
+       u32b total_weight;      /* Total weight being carried */
+
        s16b stat_add[6];       /* Modifiers to stat values */
        s16b stat_ind[6];       /* Indexes into stat tables */
 
@@ -1183,17 +1266,29 @@ struct player_type
        bool sustain_chr;       /* Keep charisma */
 
        u32b cursed;            /* Player is cursed */
-       bool sutemi;
-       bool counter;
 
-       bool can_swim;                  /* No damage falling */
-       bool ffall;                     /* No damage falling */
-       bool lite;                      /* Permanent light */
+       bool can_swim;          /* No damage falling */
+       bool levitation;                /* No damage falling */
+       bool lite;              /* Permanent light */
        bool free_act;          /* Never paralyzed */
        bool see_inv;           /* Can see invisible */
        bool regenerate;        /* Regenerate hit pts */
-       bool hold_life;         /* Resist life draining */
+       bool hold_exp;          /* Resist exp draining */
+
        bool telepathy;         /* Telepathy */
+       bool esp_animal;
+       bool esp_undead;
+       bool esp_demon;
+       bool esp_orc;
+       bool esp_troll;
+       bool esp_giant;
+       bool esp_dragon;
+       bool esp_human;
+       bool esp_evil;
+       bool esp_good;
+       bool esp_nonliving;
+       bool esp_unique;
+
        bool slow_digest;       /* Slower digestion */
        bool bless_blade;       /* Blessed blade */
        bool xtra_might;        /* Extra might bow */
@@ -1205,6 +1300,10 @@ struct player_type
        bool heavy_spell;
        bool warning;
        bool mighty_throw;
+       bool see_nocto;         /* Noctovision */
+
+       s16b to_dd[2]; /* Extra dice/sides */
+       s16b to_ds[2];
 
        s16b dis_to_h[2];       /* Known bonus to hit (wield) */
        s16b dis_to_h_b;        /* Known bonus to hit (bow) */
@@ -1249,37 +1348,48 @@ struct player_type
 
        byte tval_ammo;         /* Correct ammo tval */
 
-       s16b pspeed;            /* Current speed */
+       byte pspeed;            /* Current speed */
 
-       /*** Pet commands ***/
-       s16b pet_follow_distance; /* Length of the imaginary "leash" for pets */
-       s16b pet_extra_flags; /* Length of the imaginary "leash" for pets */
+       s16b energy_use;        /* Energy use this turn */
 
-       /*** Temporary fields ***/
-       byte exit_bldg;                 /* Goal obtained in arena? -KMW- */
-       byte leftbldg;                  /* did we just leave a special area? -KMW- */
-       bool leaving;                   /* True if player is leaving */
+       int y;  /* Player location in dungeon */
+       int x;  /* Player location in dungeon */
+       char name[32]; /* Current player's character name */
+};
 
-       bool leaving_dungeon;   /* True if player is leaving the dungeon */
-       bool teleport_town;
 
-       s32b align;                             /* Good/evil/neutral */
-       s16b today_mon;
+/*
+ * A structure to hold "rolled" information
+ */
+typedef struct birther birther;
 
-       s16b riding;
-       byte knowledge;
-       s32b visit;
+struct birther
+{
+       byte psex;         /* Sex index */
+       byte prace;        /* Race index */
+       byte pclass;       /* Class index */
+       byte pseikaku;     /* Seikaku index */
+       byte realm1;       /* First magic realm */
+       byte realm2;       /* Second magic realm */
 
-       s32b magic_num1[108];
-       byte magic_num2[108];
+       s16b age;
+       s16b ht;
+       s16b wt;
+       s16b sc;
 
-       byte start_race;
-       s32b old_race1;
-       s32b old_race2;
-       s16b old_realm;
+       s32b au;
 
-       s16b run_py;
-       s16b run_px;
+       s16b stat_max[6];       /* Current "maximal" stat values */
+       s16b stat_max_max[6];   /* Maximal "maximal" stat values */
+       s16b player_hp[PY_MAX_LEVEL];
+
+       s16b chaos_patron;
+
+       s16b vir_types[8];
+
+       char history[4][60];
+
+       bool quick_ok;
 };
 
 
@@ -1366,14 +1476,14 @@ struct building_type
 typedef struct border_type border_type;
 struct border_type
 {
-       byte    north[MAX_WID];
-       byte    south[MAX_WID];
-       byte    east[MAX_HGT];
-       byte    west[MAX_HGT];
-       byte    north_west;
-       byte    north_east;
-       byte    south_west;
-       byte    south_east;
+       s16b north[MAX_WID];
+       s16b south[MAX_WID];
+       s16b east[MAX_HGT];
+       s16b west[MAX_HGT];
+       s16b north_west;
+       s16b north_east;
+       s16b south_west;
+       s16b south_east;
 };
 
 
@@ -1424,7 +1534,7 @@ typedef struct tag_type tag_type;
 struct tag_type
 {
        int     tag;
-       void    *pointer;
+       int     index;
 };
 
 typedef bool (*monster_hook_type)(int r_idx);
@@ -1478,6 +1588,15 @@ struct high_score
        char how[40];           /* Method of death (string) */
 };
 
+
+typedef struct
+{
+       s16b feat;    /* Feature tile */
+       byte percent; /* Chance of type */
+}
+feat_prob;
+
+
 /* A structure for the != dungeon types */
 typedef struct dungeon_info_type dungeon_info_type;
 struct dungeon_info_type {
@@ -1487,25 +1606,16 @@ struct dungeon_info_type {
        byte dy;
        byte dx;
 
-       byte floor1;            /* Floor tile 1 */
-       byte floor_percent1;    /* Chance of type 1 */
-       byte floor2;            /* Floor tile 2 */
-       byte floor_percent2;    /* Chance of type 2 */
-       byte floor3;            /* Floor tile 3 */
-       byte floor_percent3;    /* Chance of type 3 */
-       byte outer_wall;        /* Outer wall tile */
-       byte inner_wall;        /* Inner wall tile */
-       s16b stream1;           /* stream tile */
-       s16b stream2;           /* stream tile */
-       byte fill_type1;        /* Cave tile 1 */
-       byte fill_percent1;     /* Chance of type 1 */
-       byte fill_type2;        /* Cave tile 2 */
-       byte fill_percent2;     /* Chance of type 2 */
-       byte fill_type3;        /* Cave tile 3 */
-       byte fill_percent3;     /* Chance of type 3 */
-       s16b mindepth;          /* Minimal depth */
-       s16b maxdepth;          /* Maximal depth */
-       byte min_plev;          /* Minimal plev needed to enter -- it's an anti-cheating mesure */
+       feat_prob floor[DUNGEON_FEAT_PROB_NUM]; /* Floor probability */
+       feat_prob fill[DUNGEON_FEAT_PROB_NUM];  /* Cave wall probability */
+       s16b outer_wall;                        /* Outer wall tile */
+       s16b inner_wall;                        /* Inner wall tile */
+       s16b stream1;                           /* stream tile */
+       s16b stream2;                           /* stream tile */
+
+       s16b mindepth;         /* Minimal depth */
+       s16b maxdepth;         /* Maximal depth */
+       byte min_plev;         /* Minimal plev needed to enter -- it's an anti-cheating mesure */
        s16b pit;
        s16b nest;
        byte mode;              /* Mode of combinaison of the monster flags */
@@ -1519,11 +1629,15 @@ struct dungeon_info_type {
        u32b mflags2;
        u32b mflags3;
        u32b mflags4;
-       u32b mflags5;
-       u32b mflags6;
        u32b mflags7;
        u32b mflags8;
        u32b mflags9;
+       u32b mflagsr;
+
+       u32b m_a_ability_flags1;
+       u32b m_a_ability_flags2;
+       u32b m_a_ability_flags3;
+       u32b m_a_ability_flags4;
 
        char r_char[5];         /* Monster race allowed */
        int final_object;       /* The object you'll find at the bottom */
@@ -1537,5 +1651,102 @@ struct dungeon_info_type {
 };
 
 
+/*!
+ * @struct autopick_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 */
+       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 */
+} autopick_type;
 
 
+/*
+ *  A structure type for the saved floor
+ */
+typedef struct 
+{
+       s16b floor_id;        /* No recycle until 65536 IDs are all used */
+       byte savefile_id;     /* ID for savefile (from 0 to MAX_SAVED_FLOOR) */
+       s16b 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 */
+} saved_floor_type;
+
+
+/*
+ *  A structure type for terrain template of saving dungeon floor
+ */
+typedef struct
+{
+       u16b info;
+       s16b feat;
+       s16b mimic;
+       s16b special;
+       u16b occurrence;
+} cave_template_type;
+
+
+/*!
+ * @struct arena_type
+ * @brief 闘技場のモンスターエントリー構造体 / A structure type for arena entry
+ */
+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 */
+} arena_type;
+
+
+/*
+ * A structure type for doors
+ */
+typedef struct
+{
+       s16b open;
+       s16b broken;
+       s16b closed;
+       s16b locked[MAX_LJ_DOORS];
+       s16b num_locked;
+       s16b jammed[MAX_LJ_DOORS];
+       s16b num_jammed;
+} door_type;
+
+
+#ifdef TRAVEL
+/*
+ *  A structure type for travel command
+ */
+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 */
+} travel_type;
+#endif
+
+typedef struct {
+       cptr flag;
+       byte index;
+       byte level;
+       s32b value;
+       struct {
+               int constant;
+               int dice;
+       } timeout;
+       cptr desc;
+} activation_type;
+
+typedef struct {
+       int flag;
+       int type;
+       cptr name;
+} dragonbreath_type;