-/*!
+/*!
* @file defines.h
- * @brief ¼çÍפʥޥ¯¥íÄêµÁ¥Ø¥Ã¥À / Purpose: global constants and macro definitions
+ * @brief 主要なマクロ定義ヘッダ / Purpose: global constants and macro definitions
* @date 2014/01/02
* @author
* Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
* You have been warned.\n
*/
+#define VERSION_NAME "Hengband" /*!< バリアント名称 / Name of the version/variant */
-/*
- * Name of the version/variant
- */
-#define VERSION_NAME "Hengband"
-
-
-/*
- * "Program Version Number" of the game
- *
+/*!
+ * @brief ゲームのバージョン番号定義 / "Program Version Number" of the game
+ * @details
+ * 本FAKE_VERSIONそのものは未使用である。Zangと整合性を合わせるための疑似的処理のためFAKE_VER_MAJORは実値-10が該当のバージョン番号となる。
+ * <pre>
* FAKE_VER_MAJOR=1,2 were reserved for ZAngband version 1.x.x/2.x.x .
- *
* Program Version of Hengband version is
* "(FAKE_VER_MAJOR-10).(FAKE_VER_MINOR).(FAKE_VER_PATCH)".
+ * </pre>
*/
#define FAKE_VERSION 0
-#define FAKE_VER_MAJOR 12
-#define FAKE_VER_MINOR 1
-#define FAKE_VER_PATCH 4
+#define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */
+#define FAKE_VER_MINOR 1 /*!< ゲームのバージョン番号定義(マイナー番号) */
+#define FAKE_VER_PATCH 5 /*!< ゲームのバージョン番号定義(パッチ番号) */
-/*
- * "Savefile Version Number" for Hengband 1.1.1 and later
- *
+
+/*!
+ * @brief セーブファイル上のバージョン定義(メジャー番号) / "Savefile Version Number" for Hengband 1.1.1 and later
+ * @details
+ * <pre>
* First three digits may be same as the Program Version. But not
* always same. It means that newer version may preserves lower
* compatibility with the older version.
- *
* For example, newer Hengband 1.4.4 creates savefiles marked with
* Savefile Version 1.4.0.0 . It means that Hengband 1.4.0 can load a
* savefile of Hengband 1.4.4 (lower compatibility!).
- *
* Upper compatibility is always guaranteed.
+ * </pre>
*/
#define H_VER_MAJOR 2
-#define H_VER_MINOR 1
-#define H_VER_PATCH 2
-#define H_VER_EXTRA 4
+#define H_VER_MINOR 1 /*!< セーブファイル上のバージョン定義(マイナー番号) */
+#define H_VER_PATCH 2 /*!< セーブファイル上のバージョン定義(パッチ番号) */
+#define H_VER_EXTRA 4 /*!< セーブファイル上のバージョン定義(エクストラ番号) */
+#define ANGBAND_2_8_1 /*!< Angband 2.8.1以降から有効な処理分岐を定義 */
+#define ZANGBAND /*!< Zangband 以降から有効な処理分岐を定義 */
-#define ANGBAND_2_8_1
-#define ZANGBAND
-
-/*
- * Number of grids in each block (vertically)
- * Probably hard-coded to 11, see "generate.c"
+/*!
+ * @brief generate.cで用いられる基本的なブロック数単位(垂直方向)
+ * Number of grids in each block (vertically) Probably hard-coded to 11, see "generate.c"
*/
#define BLOCK_HGT 11
-/*
- * Number of grids in each block (horizontally)
- * Probably hard-coded to 11, see "generate.c"
+/*!
+ * @brief generate.cで用いられる基本的なブロック数単位(水平方向)
+ * Number of grids in each block (horizontally) Probably hard-coded to 11, see "generate.c"
*/
#define BLOCK_WID 11
-
-/*
- * Number of grids in each panel (vertically)
- * Must be a multiple of BLOCK_HGT
+/*!
+ * @brief 表示上の基本的なパネル単位(垂直方向、BLOCK_HGTの倍数で設定すること)
+ * Number of grids in each panel (vertically) Must be a multiple of BLOCK_HGT
*/
#define PANEL_HGT 11
-/*
- * Number of grids in each panel (horizontally)
- * Must be a multiple of BLOCK_WID
+/*!
+ * @brief 表示上の基本的なパネル単位(水平方向、BLOCK_WIDの倍数で設定すること)
+ * Number of grids in each panel (horizontally) Must be a multiple of BLOCK_WID
*/
#define PANEL_WID 33
-
-/*
- * Number of grids used to display the dungeon (vertically).
- * Must be a multiple of 11, probably hard-coded to 22.
+/*!
+ * @brief 表示上の基本的なブロック単位(垂直方向、PANEL_HGTの倍数で設定すること)
+ * Number of grids used to display the dungeon (vertically). Must be a multiple of 11, probably hard-coded to 22.
*/
#define SCREEN_HGT 22
-/*
- * Number of grids used to display the dungeon (horizontally).
- * Must be a multiple of 33, probably hard-coded to 66.
+/*!
+ * @brief 表示上の基本的なブロック単位(水平方向、PANEL_WIDの倍数で設定すること)
+ * Number of grids used to display the dungeon (horizontally). Must be a multiple of 33, probably hard-coded to 66.
*/
#define SCREEN_WID 66
-
-/*
- * Maximum dungeon height in grids, must be a multiple of SCREEN_HGT,
- * probably hard-coded to SCREEN_HGT * 3.
+/*!
+ * @brief 表示上のダンジョンの最大垂直サイズ(SCREEN_HGTの3倍が望ましい)
+ * Maximum dungeon height in grids, must be a multiple of SCREEN_HGT, probably hard-coded to SCREEN_HGT * 3.
*/
#define MAX_HGT 66
-/*
- * Maximum dungeon width in grids, must be a multiple of SCREEN_WID,
- * probably hard-coded to SCREEN_WID * 3.
+/*!
+ * @brief 表示上のダンジョンの最大水平サイズ(SCREEN_WIDの3倍が望ましい)
+ * Maximum dungeon width in grids, must be a multiple of SCREEN_WID, probably hard-coded to SCREEN_WID * 3.
*/
#define MAX_WID 198
-
/*
* Quest constants
*/
-#define MIN_RANDOM_QUEST 40
-#define MAX_RANDOM_QUEST 49
+#define MIN_RANDOM_QUEST 40 /*<! ランダムクエストを割り当てるクエストIDの開始値 */
+#define MAX_RANDOM_QUEST 49 /*<! ランダムクエストを割り当てるクエストIDの終了値 */
-/* Check is the quest index is "fixed" */
+/*!
+ * @brief 該当IDが固定クエストかどうかを判定する / Check is the quest index is "fixed"
+ * @param Q_IDX クエストID
+ * @return 固定クエストならばTRUEを返す
+ */
#define is_fixed_quest_idx(Q_IDX) (((Q_IDX) < MIN_RANDOM_QUEST) || ((Q_IDX) > MAX_RANDOM_QUEST))
-#define QUEST_TOWER1 5
-#define QUEST_TOWER2 6
-#define QUEST_TOWER3 7
-#define QUEST_OBERON 8
-#define QUEST_SERPENT 9
+#define QUEST_TOWER1 5 /*<! 塔クエスト(第1階層)に割り振るクエストID */
+#define QUEST_TOWER2 6 /*<! 塔クエスト(第2階層)に割り振るクエストID */
+#define QUEST_TOWER3 7 /*<! 塔クエスト(第3階層)に割り振るクエストID */
+#define QUEST_OBERON 8 /*<! オベロン打倒クエストに割り振るクエストID */
+#define QUEST_SERPENT 9 /*<! サーペント打倒クエストに割り振るクエストID */
/*
* Arena constants
/*
* Misc constants
*/
-#define TOWN_DAWN 10000 /*!< 1Æüʬ¤Î¥¿¡¼¥ó / Number of ticks from dawn to dawn XXX */
+#define TOWN_DAWN 10000 /*!< 1日分のターン / Number of ticks from dawn to dawn XXX */
#define TURNS_PER_TICK 10L /*!< Number of energy-gain-turns per ticks */
-#define MAX_DAYS 20000 /*!< ÆâÉô½èÍýÃæ¤ÇÊÝ»ý¤µ¤ì¤ëºÇÂçÆü¿ô / Maximum days */
-#define BREAK_GLYPH 550 /*!< ¼é¤ê¤Î¥ë¡¼¥ó¤Î¶¯¿ÙÅÙ / Rune of protection resistance */
-#define BREAK_MINOR_GLYPH 299 /*!< Çúȯ¤Î¥ë¡¼¥ó¤Îȯư¤·¤ä¤¹¤µ / For explosive runes */
+#define MAX_DAYS 20000 /*!< 内部処理中で保持される最大日数 / Maximum days */
+#define BREAK_GLYPH 550 /*!< 守りのルーンの強靭度 / Rune of protection resistance */
+#define BREAK_MINOR_GLYPH 299 /*!< 爆発のルーンの発動しやすさ / For explosive runes */
#define BTH_PLUS_ADJ 3 /*!< Adjust BTH per plus-to-hit */
#define MON_MULT_ADJ 8 /*!< High value slows multiplication */
#define MON_SUMMON_ADJ 2 /*!< Adjust level of summoned creatures */
/* "Biases" for random artifact gen */
-#define BIAS_ELEC 1 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:ÅÅ·â */
-#define BIAS_POIS 2 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:ÆÇ */
-#define BIAS_FIRE 3 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:²Ð±ê */
-#define BIAS_COLD 4 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:Î䵤 */
-#define BIAS_ACID 5 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:»À */
-#define BIAS_STR 6 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:ÏÓÎÏ */
-#define BIAS_INT 7 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:ÃÎÎÏ */
-#define BIAS_WIS 8 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:¸¤µ */
-#define BIAS_DEX 9 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:´ïÍѤµ */
-#define BIAS_CON 10 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:ÂÑµ× */
-#define BIAS_CHR 11 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:Ì¥ÎÏ */
-#define BIAS_CHAOS 12 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:º®ÆÙ */
-#define BIAS_PRIESTLY 13 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:¥×¥ê¡¼¥¹¥È·Ï */
-#define BIAS_NECROMANTIC 14 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:»àÎî */
-#define BIAS_LAW 15 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:Ë¡ */
-#define BIAS_ROGUE 16 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:Åð±·Ï */
-#define BIAS_MAGE 17 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:¥á¥¤¥¸·Ï */
-#define BIAS_WARRIOR 18 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:Àï»Î·Ï */
-#define BIAS_RANGER 19 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:¥ì¥ó¥¸¥ã¡¼·Ï */
-#define MAX_BIAS 20 /*!< ¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¥Ð¥¤¥¢¥¹:ºÇÂç¿ô */
+#define BIAS_ELEC 1 /*!< ランダムアーティファクトバイアス:電撃 */
+#define BIAS_POIS 2 /*!< ランダムアーティファクトバイアス:毒 */
+#define BIAS_FIRE 3 /*!< ランダムアーティファクトバイアス:火炎 */
+#define BIAS_COLD 4 /*!< ランダムアーティファクトバイアス:冷気 */
+#define BIAS_ACID 5 /*!< ランダムアーティファクトバイアス:酸 */
+#define BIAS_STR 6 /*!< ランダムアーティファクトバイアス:腕力 */
+#define BIAS_INT 7 /*!< ランダムアーティファクトバイアス:知力 */
+#define BIAS_WIS 8 /*!< ランダムアーティファクトバイアス:賢さ */
+#define BIAS_DEX 9 /*!< ランダムアーティファクトバイアス:器用さ */
+#define BIAS_CON 10 /*!< ランダムアーティファクトバイアス:耐久 */
+#define BIAS_CHR 11 /*!< ランダムアーティファクトバイアス:魅力 */
+#define BIAS_CHAOS 12 /*!< ランダムアーティファクトバイアス:混沌 */
+#define BIAS_PRIESTLY 13 /*!< ランダムアーティファクトバイアス:プリースト系 */
+#define BIAS_NECROMANTIC 14 /*!< ランダムアーティファクトバイアス:死霊 */
+#define BIAS_LAW 15 /*!< ランダムアーティファクトバイアス:法 */
+#define BIAS_ROGUE 16 /*!< ランダムアーティファクトバイアス:盗賊系 */
+#define BIAS_MAGE 17 /*!< ランダムアーティファクトバイアス:メイジ系 */
+#define BIAS_WARRIOR 18 /*!< ランダムアーティファクトバイアス:戦士系 */
+#define BIAS_RANGER 19 /*!< ランダムアーティファクトバイアス:レンジャー系 */
+#define MAX_BIAS 20 /*!< ランダムアーティファクトバイアス:最大数 */
/*** Pet constants ***/
#define EGO_AMU_SLOW_D 210
#define EGO_AMU_INFRA 211
#define EGO_AMU_SEE_INVIS 212
-#define EGO_AMU_HOLD_LIFE 213
+#define EGO_AMU_HOLD_EXP 213
#define EGO_AMU_DRAIN_EXP 214
#define EGO_AMU_FOOL 215
#define EGO_AMU_AGGRAVATE 216
#define ACT_CURE_LW 81
#define ACT_CURE_MW 82
#define ACT_CURE_POISON 83
-#define ACT_REST_LIFE 84
+#define ACT_REST_EXP 84
#define ACT_REST_ALL 85
#define ACT_CURE_700 86
#define ACT_CURE_1000 87
#define TR_THROW 44 /* Later */
#define TR_REFLECT 45 /* Reflect 'bolts' */
#define TR_FREE_ACT 46 /* Free Action */
-#define TR_HOLD_LIFE 47 /* Hold Life */
+#define TR_HOLD_EXP 47 /* Hold EXP */
#define TR_RES_ACID 48
#define TR_RES_ELEC 49
#define TR_RES_FIRE 50
#define RBE_EXP_80 28
#define RBE_DISEASE 29
#define RBE_TIME 30
-#define RBE_EXP_VAMP 31
+#define RBE_DR_LIFE 31
#define RBE_DR_MANA 32
#define RBE_SUPERHURT 33
#define RBE_INERTIA 34
#define RF5_CAUSE_3 0x00004000 /* Cause Critical Wound */
#define RF5_CAUSE_4 0x00008000 /* Cause Mortal Wound */
#define RF5_BO_ACID 0x00010000 /* Acid Bolt */
-#define RF5_BO_ELEC 0x00020000 /* Elec Bolt (unused) */
+#define RF5_BO_ELEC 0x00020000 /* Elec Bolt */
#define RF5_BO_FIRE 0x00040000 /* Fire Bolt */
#define RF5_BO_COLD 0x00080000 /* Cold Bolt */
#define RF5_BA_LITE 0x00100000 /* StarBurst */
#define RF9_EAT_LOSE_STR 0x02000000
#define RF9_EAT_LOSE_INT 0x04000000
#define RF9_EAT_LOSE_WIS 0x08000000
-#define RF9_EAT_LOSE_DEX 0x01000000
+#define RF9_EAT_LOSE_DEX 0x10000000
#define RF9_EAT_LOSE_CON 0x20000000
#define RF9_EAT_LOSE_CHR 0x40000000
#define RF9_EAT_DRAIN_MANA 0x80000000
/*** Music constants ***/
-#define MUSIC_TITLE 0
-#define MUSIC_DEAD 1
-#define MUSIC_EXIT 2
-#define MUSIC_TOWN 3
-
-#define MUSIC_BASIC_MAX 4 /*!< BGMÄêµÁ¤ÎºÇÂç¿ô */
+#define MUSIC_BASIC_DEFAULT 0
+#define MUSIC_BASIC_GAMEOVER 1
+#define MUSIC_BASIC_EXIT 2
+#define MUSIC_BASIC_TOWN 3
+#define MUSIC_BASIC_FIELD1 4
+#define MUSIC_BASIC_FIELD2 5
+#define MUSIC_BASIC_FIELD3 6
+#define MUSIC_BASIC_DUN_LOW 7
+#define MUSIC_BASIC_DUN_MED 8
+#define MUSIC_BASIC_DUN_HIGH 9
+#define MUSIC_BASIC_DUN_FEEL1 10
+#define MUSIC_BASIC_DUN_FEEL2 11
+#define MUSIC_BASIC_WINNER 12
+#define MUSIC_BASIC_BUILD 13
+#define MUSIC_BASIC_WILD 14
+#define MUSIC_BASIC_QUEST 15
+#define MUSIC_BASIC_ARENA 16
+#define MUSIC_BASIC_BATTLE 17
+#define MUSIC_BASIC_MAX 18 /*!< BGM定義の最大数 */
/*** Sound constants ***/
/*
* Mega-Hack -- maximum known sounds
*/
-#define SOUND_MAX 66 /*!< ¸ú²Ì²»ÄêµÁ¤ÎºÇÂç¿ô */
+#define SOUND_MAX 66 /*!< 効果音定義の最大数 */
-#define MAX_VIRTUE 18 /*!< ÆÁÄêµÁ¤ÎºÇÂç¿ô */
+#define MAX_VIRTUE 18 /*!< 徳定義の最大数 */
#define V_COMPASSION 1
#define V_HONOUR 2
#define have_dark_flag(ARRAY) \
(have_flag(ARRAY, TR_LITE_M1) || have_flag(ARRAY, TR_LITE_M2) || have_flag(ARRAY, TR_LITE_M3))
+
+/* Spell Type flag */
+#define MONSTER_TO_PLAYER 0x01
+#define MONSTER_TO_MONSTER 0x02
+
+/* summoning number */
+#define S_NUM_6 (easy_band ? 2 : 6)
+#define S_NUM_4 (easy_band ? 1 : 4)
+
+/* monster spell number */
+#define RF4_SPELL_START 32 * 3
+#define RF5_SPELL_START 32 * 4
+#define RF6_SPELL_START 32 * 5
+
+#define RF4_SPELL_SIZE 32
+#define RF5_SPELL_SIZE 32
+#define RF6_SPELL_SIZE 32
+
+/* Spell Damage Calc Flag*/
+#define DAM_ROLL 1
+#define DAM_MAX 2
+#define DAM_MIN 3
+#define DICE_NUM 4
+#define DICE_SIDE 5
+#define DICE_MULT 6
+#define DICE_DIV 7
+#define BASE_DAM 8