OSDN Git Service

(2.2.0.19) 店主の最大売却取引額を符号付き32ビットにして30000を超える額を指定できるようにした。 / Change type of "max_cost...
[hengband/hengband.git] / src / types.h
index 8fe6711..1dcc31d 100644 (file)
@@ -1,21 +1,19 @@
-/* File: types.h */
-
-/*
+/*!
+ * @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.
- */
-
-/* Purpose: global type declarations */
-
-
-/*
+ * </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>
  */
 
 
-
-
-
-/*
- * Feature state structure
- *
- * - Action (FF_*)
- * - Result (f_info ID)
+/*!
+ * @struct feature_state
+ * @brief 地形状態変化指定構造体 / Feature state structure
  */
 typedef struct feature_state feature_state;
 
 struct feature_state
 {
-       byte action;
-       s16b result;
+       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) */
-       s16b tag;                 /* Tag (offset) */
+       u32b name;                /*!< 地形名参照のためのネームバッファオフセット値 / Name (offset) */
+       u32b text;                /*!< 地形説明参照のためのネームバッファオフセット値 /  Text (offset) */
+       s16b tag;                 /*!< 地形特性タグ参照のためのネームバッファオフセット値 /  Tag (offset) */
 
-       s16b mimic;               /* Feature to mimic */
+       s16b mimic;               /*!< 未確定時の外形地形ID / Feature to mimic */
 
-       u32b flags[FF_FLAG_SIZE]; /* Flags */
+       u32b flags[FF_FLAG_SIZE]; /*!< 地形の基本特性ビット配列 / Flags */
 
-       u16b priority;            /* Map priority */
-       s16b destroyed;           /* Default destroyed state */
+       u16b priority;            /*!< 縮小表示で省略する際の表示優先度 / Map priority */
+       s16b destroyed;           /*!< *破壊*に巻き込まれた時の地形移行先(未実装?) / Default destroyed state */
 
-       feature_state state[MAX_FEAT_STATES];
+       feature_state state[MAX_FEAT_STATES]; /*!< feature_state テーブル */
 
-       byte subtype;
-       byte power;
+       byte subtype;  /*!< 副特性値 */
+       byte power;    /*!< 地形強度 */
 
-       byte d_attr[F_LIT_MAX];   /* Default feature attribute */
-       byte d_char[F_LIT_MAX];   /* Default feature character */
+       byte d_attr[F_LIT_MAX];   /*!< デフォルトの地形シンボルカラー / Default feature attribute */
+       byte d_char[F_LIT_MAX];   /*!< デフォルトの地形シンボルアルファベット / Default feature character */
 
-       byte x_attr[F_LIT_MAX];   /* Desired feature attribute */
-       byte x_char[F_LIT_MAX];   /* 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
  */
 
@@ -105,105 +102,101 @@ typedef struct object_kind object_kind;
 
 struct object_kind
 {
-       u32b name;                      /* Name (offset) */
-       u32b text;                      /* Text (offset) */
-       u32b flavor_name;               /* Flavor name (offset) */
+       u32b name;                      /*!< ベースアイテム名参照のためのネームバッファオフセット値 / Name (offset) */
+       u32b text;                      /*!< 解説テキスト参照のためのネームバッファオフセット値 / Text (offset) */
+       u32b flavor_name;       /*!< 未確定名参照のためのネームバッファオフセット値 / Flavor name (offset) */
 
-       byte tval;                      /* Object type */
-       byte sval;                      /* Object sub type */
+       byte tval;                      /*!< ベースアイテム種別の大項目値 Object type */
+       byte sval;                      /*!< ベースアイテム種別の小項目値 Object sub type */
 
-       s16b pval;                      /* Object extra info */
+       s16b pval;                      /*!< ベースアイテムのpval(能力修正共通値) Object 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 dice/sides */
-
-       s16b weight;            /* Weight */
+       byte dd, ds;            /*!< ダメージダイスの数と大きさ / Damage dice/sides */
 
-       s32b cost;                      /* Object "base cost" */
+       s16b weight;            /*!< ベースアイテムの重量 / Weight */
 
-       u32b flags[TR_FLAG_SIZE];       /* Flags */
+       s32b cost;                      /*!< ベースアイテムの基本価値 / Object "base cost" */
 
-       u32b gen_flags;         /* flags for generate */
+       u32b flags[TR_FLAG_SIZE];       /*!< ベースアイテムの基本特性ビット配列 / Flags */
 
-       byte locale[4];         /* Allocation level(s) */
-       byte chance[4];         /* Allocation chance(s) */
+       u32b gen_flags;         /*!< ベースアイテムの生成特性ビット配列 / flags for generate */
 
-       byte level;                     /* Level */
-       byte extra;                     /* Something */
+       byte locale[4];         /*!< ベースアイテムの生成階テーブル / Allocation level(s) */
+       byte chance[4];         /*!< ベースアイテムの生成確率テーブル / Allocation chance(s) */
 
+       byte level;                     /*!< ベースアイテムの基本生成階 / Level */
+       byte extra;                     /*!< その他色々のビットフラグ配列 / Something */
 
-       byte d_attr;            /* Default object attribute */
-       byte d_char;            /* Default 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 x_attr;            /* Desired object attribute */
-       byte x_char;            /* Desired object character */
+       s16b flavor;            /*!< 調査中(TODO) / Special object flavor (or zero) */
 
+       bool easy_know;         /*!< ベースアイテムが初期からベース名を判断可能かどうか / This object is always known (if aware) */
 
-       s16b flavor;            /* Special object flavor (or zero) */
+       bool aware;                     /*!< ベースアイテムが鑑定済かどうか /  The player is "aware" of the item's effects */
 
-       bool easy_know;         /* This object is always known (if aware) */
+       bool tried;                     /*!< ベースアイテムを未鑑定のまま試したことがあるか /  The player has "tried" one of the items */
 
-
-       bool aware;                     /* The player is "aware" of the item's effects */
-
-       bool tried;                     /* The player has "tried" one of the items */
-
-       byte act_idx;           /* Activative ability index */
+       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 flags[TR_FLAG_SIZE];       /* Artifact Flags */
+       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 level;                     /*! 基本生成階 / Artifact level */
+       byte rarity;            /*! レアリティ / Artifact rarity */
 
-       byte cur_num;           /* Number created (0 or 1) */
-       byte max_num;           /* Unused (should be "1") */
+       byte cur_num;           /*! 現在の生成数 / Number created (0 or 1) */
+       byte max_num;           /*! (未使用)最大生成数 / Unused (should be "1") */
 
-       s16b floor_id;          /* Leaved on this location last time */
+       s16b floor_id;      /*! アイテムを落としたフロアのID / Leaved on this location last time */
 
-       byte act_idx;           /* Activative ability index */
+       byte act_idx;           /*! 発動能力ID / Activative ability index */
 };
 
 
@@ -296,26 +289,26 @@ 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_spell;                /* Spell frequency */
+       byte freq_spell;                /*!< 魔法&特殊能力仕様頻度(1/n) /  Spell frequency */
 
        u32b flags1;                    /* Flags 1 (general) */
        u32b flags2;                    /* Flags 2 (abilities) */
@@ -329,6 +322,15 @@ struct monster_race
        u32b flagsr;                    /* Flags R (resistances info) */
 
        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;
@@ -349,7 +351,7 @@ struct monster_race
 
        byte cur_num;                   /* Monster population on current level */
 
-       s16b floor_id;                  /* Location of unique monster */
+       s16b floor_id;          /* Location of unique monster */
 
 
        s16b r_sights;                  /* Count sightings of this monster */
@@ -378,7 +380,7 @@ 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 */
 };
 
@@ -591,6 +593,7 @@ struct monster_type
        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 mtimed[MAX_MTIMED];        /* Timed status counter */
 
@@ -679,31 +682,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*/
 };
 
 
@@ -716,7 +722,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) */
@@ -813,8 +819,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
 };
 
@@ -830,7 +836,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 */
 
@@ -877,7 +883,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 */
 
@@ -912,7 +918,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 */
@@ -928,7 +934,7 @@ struct player_seikaku
 
        s16b a_mhp;                     /* Race hit-dice modifier */
 
-       byte no;                        /* ¤Î */
+       byte no;                        /*  */
        byte sex;                       /* seibetu seigen */
 };
 
@@ -1264,7 +1270,7 @@ struct player_type
        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;
@@ -1340,6 +1346,12 @@ struct player_type
        byte tval_ammo;         /* Correct ammo tval */
 
        byte pspeed;            /* Current speed */
+
+       s16b energy_use;        /* Energy use this turn */
+
+       int y;  /* Player location in dungeon */
+       int x;  /* Player location in dungeon */
+       char name[32]; /* Current player's character name */
 };
 
 
@@ -1633,16 +1645,17 @@ struct dungeon_info_type {
 };
 
 
-/*
- *  A structure type for entry of auto-picker/destroyer
+/*!
+ * @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 */
+       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;
 
 
@@ -1674,14 +1687,15 @@ typedef struct
 } cave_template_type;
 
 
-/*
- * A structure type for arena entry
+/*!
+ * @struct arena_type
+ * @brief 闘技場のモンスターエントリー構造体 / A structure type for arena entry
  */
 typedef struct
 {
-       s16b r_idx; /* Monster (0 means victory prizing) */
-       byte tval;  /* tval of prize (0 means no prize) */
-       byte sval;  /* sval of prize */
+       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;
 
 
@@ -1705,11 +1719,11 @@ typedef struct
  *  A structure type for travel command
  */
 typedef struct {
-       int run;
+       int run; /* Remaining grid number */
        int cost[MAX_HGT][MAX_WID];
-       int x;
-       int y;
-       int dir;
+       int x; /* Target X */
+       int y; /* Target Y */
+       int dir; /* Running direction */
 } travel_type;
 #endif