From a58f569ba38d96ded9bd51e6030c890cdddb59f1 Mon Sep 17 00:00:00 2001 From: iks Date: Sun, 18 Apr 2021 15:24:35 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20Doxygen=E3=82=B3=E3=83=A1=E3=83=B3?= =?utf8?q?=E3=83=88=E8=BF=BD=E5=8A=A0=E3=80=81typedef=20struct=E3=82=92str?= =?utf8?q?uct=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/monster-floor/monster-death-util.h | 4 +- src/mspell/mspell-attack-util.h | 2 +- src/mspell/smart-mspell-util.h | 2 +- src/system/monster-race-definition.h | 123 +++++++++++++++++---------------- src/system/monster-type-definition.h | 2 +- 5 files changed, 67 insertions(+), 66 deletions(-) diff --git a/src/monster-floor/monster-death-util.h b/src/monster-floor/monster-death-util.h index b00d32793..cf1ee8a11 100644 --- a/src/monster-floor/monster-death-util.h +++ b/src/monster-floor/monster-death-util.h @@ -1,9 +1,9 @@ -#pragma once +#pragma once #include "system/angband.h" typedef struct monster_type monster_type; -typedef struct monster_race monster_race; +struct monster_race; typedef struct monster_death_type { MONSTER_IDX m_idx; monster_type *m_ptr; diff --git a/src/mspell/mspell-attack-util.h b/src/mspell/mspell-attack-util.h index 6b680316e..e4c559641 100644 --- a/src/mspell/mspell-attack-util.h +++ b/src/mspell/mspell-attack-util.h @@ -16,7 +16,7 @@ enum mspell_lite_type { // Monster Spell Attack. typedef struct monster_type monster_type; -typedef struct monster_race monster_race; +struct monster_race; typedef struct msa_type { MONSTER_IDX m_idx; monster_type *m_ptr; diff --git a/src/mspell/smart-mspell-util.h b/src/mspell/smart-mspell-util.h index 81b7e57b4..16706f910 100644 --- a/src/mspell/smart-mspell-util.h +++ b/src/mspell/smart-mspell-util.h @@ -7,7 +7,7 @@ #include "util/flag-group.h" // Monster Spell Remover. -typedef struct monster_race monster_race; +struct monster_race; typedef struct msr_type { monster_race *r_ptr; EnumClassFlagGroup ability_flags; diff --git a/src/system/monster-race-definition.h b/src/system/monster-race-definition.h index 170793c1c..e3840bd29 100644 --- a/src/system/monster-race-definition.h +++ b/src/system/monster-race-definition.h @@ -25,7 +25,9 @@ typedef struct monster_blow { DICE_SID d_side{}; } monster_blow; -/* +/*! + * @brief モンスター種族の定義構造体 + * @details * Monster "race" information, including racial memories * * Note that "d_attr" and "d_char" are used for MORE than "visual" stuff. @@ -44,66 +46,65 @@ typedef struct monster_blow { * monster recall (no knowledge of spells, etc). All of the "recall" * fields have a special prefix to aid in searching for them. */ - -typedef struct monster_race { - std::string name; /*!< 名前データのオフセット(日本語) / Name offset(Japanese) */ +struct monster_race { + std::string name; //!< 名前データのオフセット(日本語) / Name offset(Japanese) #ifdef JP - std::string E_name; /*!< 名前データのオフセット(英語) / Name offset(English) */ + std::string E_name; //!< 名前データのオフセット(英語) / Name offset(English) #endif - std::string text; /*!< 思い出テキストのオフセット / Lore text offset */ - DICE_NUMBER hdice{}; /*!< HPのダイス数 / Creatures hit dice count */ - DICE_SID hside{}; /*!< HPのダイス面数 / Creatures hit dice sides */ - ARMOUR_CLASS ac{}; /*!< アーマークラス / Armour Class */ - SLEEP_DEGREE sleep{}; /*!< 睡眠値 / Inactive counter (base) */ - POSITION aaf{}; /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */ - SPEED speed{}; /*!< 加速(110で+0) / Speed (normally 110) */ - EXP mexp{}; /*!< 殺害時基本経験値 / Exp value for kill */ - BIT_FLAGS16 extra{}; /*!< 未使用 / Unused (for now) */ - RARITY freq_spell{}; /*!< 魔法&特殊能力仕様頻度(1/n) / Spell frequency */ - BIT_FLAGS flags1{}; /* Flags 1 (general) */ - BIT_FLAGS flags2{}; /* Flags 2 (abilities) */ - BIT_FLAGS flags3{}; /* Flags 3 (race/resist) */ - BIT_FLAGS flags7{}; /* Flags 7 (movement related abilities) */ - BIT_FLAGS flags8{}; /* Flags 8 (wilderness info) */ - BIT_FLAGS flags9{}; /* Flags 9 (drops info) */ - BIT_FLAGS flagsr{}; /* Flags R (resistances info) */ - EnumClassFlagGroup ability_flags; /* Ability Flags */ - monster_blow blow[MAX_NUM_BLOWS]{}; /* Up to four blows per round */ - MONRACE_IDX reinforce_id[6]{}; - DICE_NUMBER reinforce_dd[6]{}; - DICE_SID reinforce_ds[6]{}; - ARTIFACT_IDX artifact_id[4]{}; /* 特定アーティファクトドロップID */ - RARITY artifact_rarity[4]{}; /* 特定アーティファクトレア度 */ - PERCENTAGE artifact_percent[4]{}; /* 特定アーティファクトドロップ率 */ - PERCENTAGE arena_ratio{}; /* モンスター闘技場の掛け金倍率修正値(%基準 / 0=100%) / The adjustment ratio for gambling monster */ - MONRACE_IDX next_r_idx{}; - EXP next_exp{}; - DEPTH level{}; /* Level of creature */ - RARITY rarity{}; /* Rarity of creature */ - TERM_COLOR d_attr{}; /* Default monster attribute */ - SYMBOL_CODE d_char{}; /* Default monster character */ - TERM_COLOR x_attr{}; /* Desired monster attribute */ - SYMBOL_CODE x_char{}; /* Desired monster character */ - MONSTER_NUMBER max_num{}; /* Maximum population allowed per level */ - MONSTER_NUMBER cur_num{}; /* Monster population on current level */ - FLOOR_IDX floor_id{}; /* Location of unique monster */ - MONSTER_NUMBER r_sights{}; /* Count sightings of this monster */ - MONSTER_NUMBER r_deaths{}; /* Count deaths from this monster */ - MONSTER_NUMBER r_pkills{}; /* Count visible monsters killed in this life */ - MONSTER_NUMBER r_akills{}; /* Count all monsters killed in this life */ - MONSTER_NUMBER r_tkills{}; /* Count monsters killed in all lives */ - byte r_wake{}; /* Number of times woken up (?) */ - byte r_ignore{}; /* Number of times ignored (?) */ + std::string text; //!< 思い出テキストのオフセット / Lore text offset + DICE_NUMBER hdice{}; //!< HPのダイス数 / Creatures hit dice count + DICE_SID hside{}; //!< HPのダイス面数 / Creatures hit dice sides + ARMOUR_CLASS ac{}; //!< アーマークラス / Armour Class + SLEEP_DEGREE sleep{}; //!< 睡眠値 / Inactive counter (base) + POSITION aaf{}; //!< 感知範囲(1-100スクエア) / Area affect radius (1-100) + SPEED speed{}; //!< 加速(110で+0) / Speed (normally 110) + EXP mexp{}; //!< 殺害時基本経験値 / Exp value for kill + BIT_FLAGS16 extra{}; //!< 未使用 / Unused (for now) + RARITY freq_spell{}; //!< 魔法&特殊能力仕様頻度(1/n) / Spell frequency + BIT_FLAGS flags1{}; //!< Flags 1 (general) + BIT_FLAGS flags2{}; //!< Flags 2 (abilities) + BIT_FLAGS flags3{}; //!< Flags 3 (race/resist) + BIT_FLAGS flags7{}; //!< Flags 7 (movement related abilities) + BIT_FLAGS flags8{}; //!< Flags 8 (wilderness info) + BIT_FLAGS flags9{}; //!< Flags 9 (drops info) + BIT_FLAGS flagsr{}; //!< 耐性フラグ / Flags R (resistances info) + EnumClassFlagGroup ability_flags; //!< 能力フラグ(魔法/ブレス) / Ability Flags + monster_blow blow[MAX_NUM_BLOWS]{}; //!< 打撃能力定義 / Up to four blows per round + MONRACE_IDX reinforce_id[6]{}; //!< 指定護衛モンスター種族ID(6種まで) + DICE_NUMBER reinforce_dd[6]{}; //!< 指定護衛数ダイス数 + DICE_SID reinforce_ds[6]{}; //!< 指定護衛数ダイス面 + ARTIFACT_IDX artifact_id[4]{}; //!< 特定アーティファクトドロップID + RARITY artifact_rarity[4]{}; //!< 特定アーティファクトレア度 + PERCENTAGE artifact_percent[4]{}; //!< 特定アーティファクトドロップ率 + PERCENTAGE arena_ratio{}; //!< モンスター闘技場の掛け金倍率修正値(%基準 / 0=100%) / The adjustment ratio for gambling monster + MONRACE_IDX next_r_idx{}; //!< 進化先モンスター種族ID + EXP next_exp{}; //!< 進化に必要な経験値 + DEPTH level{}; //!< レベル / Level of creature + RARITY rarity{}; //!< レアリティ / Rarity of creature + TERM_COLOR d_attr{}; //!< デフォルトの表示色 / Default monster attribute + SYMBOL_CODE d_char{}; //!< デフォルトの表示文字 / Default monster character + TERM_COLOR x_attr{}; //!< 設定した表示色(またはタイル位置Y) / Desired monster attribute + SYMBOL_CODE x_char{}; //!< 設定した表示文字(またはタイル位置X) / Desired monster character + MONSTER_NUMBER max_num{}; //!< 階に最大存在できる数 / Maximum population allowed per level + MONSTER_NUMBER cur_num{}; //!< 階に現在いる数 / Monster population on current level + FLOOR_IDX floor_id{}; //!< 存在している保存階ID / Location of unique monster + MONSTER_NUMBER r_sights{}; //!< 見えている数 / Count sightings of this monster + MONSTER_NUMBER r_deaths{}; //!< このモンスターに殺された人数 / Count deaths from this monster + MONSTER_NUMBER r_pkills{}; //!< このゲームで倒すのを見た数 / Count visible monsters killed in this life + MONSTER_NUMBER r_akills{}; //!< このゲームで倒した数 / Count all monsters killed in this life + MONSTER_NUMBER r_tkills{}; //!< 全ゲームで倒した数 / Count monsters killed in all lives + byte r_wake{}; //!< @に気づいて起きた数 / Number of times woken up (?) + byte r_ignore{}; //!< @に気づいていない数 / Number of times ignored (?) #define MR1_EVOLUTION 0x01 - byte r_xtra1{}; /* Something */ - byte r_xtra2{}; /* Something (unused) */ - ITEM_NUMBER r_drop_gold{}; /*!< これまでに撃破時に落とした財宝の数 / Max number of gold dropped at once */ - ITEM_NUMBER r_drop_item{}; /*!< これまでに撃破時に落としたアイテムの数 / Max number of item dropped at once */ - byte r_cast_spell{}; /* Max number of other spells seen */ - byte r_blows[MAX_NUM_BLOWS]{}; /* Number of times each blow type was seen */ - u32b r_flags1{}; /* Observed racial flags */ - u32b r_flags2{}; /* Observed racial flags */ - u32b r_flags3{}; /* Observed racial flags */ - u32b r_flagsr{}; /* Observed racial resistance flags */ - EnumClassFlagGroup r_ability_flags; /* Observed racial ability flags */ -} monster_race; + byte r_xtra1{}; //!< 特殊な思い出フラグ(進化) / Something + byte r_xtra2{}; //!< 未使用 / Something (unused) + ITEM_NUMBER r_drop_gold{}; //!< これまでに撃破時に落とした財宝の数 / Max number of gold dropped at once + ITEM_NUMBER r_drop_item{}; //!< これまでに撃破時に落としたアイテムの数 / Max number of item dropped at once + byte r_cast_spell{}; //!< 使った魔法/ブレスの種類数 / Max unique number of spells seen + byte r_blows[MAX_NUM_BLOWS]{}; //!< 受けた打撃 / Number of times each blow type was seen + u32b r_flags1{}; //!< Observed racial flags + u32b r_flags2{}; //!< Observed racial flags + u32b r_flags3{}; //!< Observed racial flags + u32b r_flagsr{}; //!< 見た耐性フラグ / Observed racial resistance flags + EnumClassFlagGroup r_ability_flags; //!< 見た能力フラグ(魔法/ブレス) / Observed racial ability flags +}; diff --git a/src/system/monster-type-definition.h b/src/system/monster-type-definition.h index f7508ce9b..57bb62c40 100644 --- a/src/system/monster-type-definition.h +++ b/src/system/monster-type-definition.h @@ -13,7 +13,7 @@ * of objects (if any) being carried by the monster (see above). */ typedef struct floor_type floor_type; -typedef struct monster_race monster_race; +struct monster_race; typedef struct monster_type { MONRACE_IDX r_idx{}; /*!< モンスターの実種族ID (これが0の時は死亡扱いになる) / Monster race index 0 = dead. */ MONRACE_IDX ap_r_idx{}; /*!< モンスターの外見種族ID(あやしい影、たぬき、ジュラル星人誤認などにより変化する)Monster race appearance index */ -- 2.11.0