OSDN Git Service

[Refactor] #37353 OPT_PAGE_* の重複定義を削除.
[hengband/hengband.git] / src / defines.h
index 0c6da81..b7dbfc3 100644 (file)
 #define SPECIAL_KEY_STORE    253
 #define SPECIAL_KEY_QUIT     252
 
-/*! @brief 消費する行動エネルギー値を正規乱数で返す(中央100/分散25) / Random energy */
-#define ENERGY_NEED() (randnor(100, 25))
-
-/*! @brief 加速値に応じた基本行動エネルギー消費量を返す / Extract energy from speed (Assumes that SPEED is unsigned) */
-#define SPEED_TO_ENERGY(SPEED) (((SPEED) > 199) ? 49 : extract_energy[(SPEED)])
-
 
 /*
  * Misc constants
 #define INVEN_AMMO     23
 
 /*
- * Total number of inventory slots (hard-coded).
+ * Total number of p_ptr->inventory_list slots (hard-coded).
  */
 #define INVEN_TOTAL     36
 
 /*
- * Fake inventory slot for selecting force (hard-coded).
+ * Fake p_ptr->inventory_list slot for selecting force (hard-coded).
  */
 #define INVEN_FORCE     1111
 
  * The values for the "tval" field of various objects.
  *
  * This value is the primary means by which items are sorted in the
- * player inventory, followed by "sval" and "cost".
+ * player p_ptr->inventory_list, followed by "sval" and "cost".
  *
  * Note that a "BOW" with tval = 19 and sval S = 10*N+P takes a missile
  * weapon with tval = 16+N, and does (xP) damage when so combined.  This
 
 
 
-/*
- * Bit flags for apply_magic() (etc)
- */
-#define AM_NO_FIXED_ART 0x00000001 /* Don't allow roll for fixed artifacts */
-#define AM_GOOD         0x00000002 /* Generate good items */
-#define AM_GREAT        0x00000004 /* Generate great items */
-#define AM_SPECIAL      0x00000008 /* Generate artifacts (for debug mode only) */
-#define AM_CURSED       0x00000010 /* Generate cursed/worthless items */
-
-
-/*** Monster blow constants ***/
-
-
-/*!
- * @note モンスターの打撃方法 / New monster blow methods
- * 打撃の種別に応じて傷と朦朧が発生するかがコメントの通りに決まる
- */
-#define RBM_HIT          1 /*!< モンスターの攻撃種別:殴る(傷/朦朧が半々) */
-#define RBM_TOUCH        2 /*!< モンスターの攻撃種別:触る */
-#define RBM_PUNCH        3 /*!< モンスターの攻撃種別:パンチする(朦朧) */
-#define RBM_KICK         4 /*!< モンスターの攻撃種別:蹴る(朦朧) */
-#define RBM_CLAW         5 /*!< モンスターの攻撃種別:ひっかく(傷) */
-#define RBM_BITE         6 /*!< モンスターの攻撃種別:噛む(傷) */
-#define RBM_STING        7 /*!< モンスターの攻撃種別:刺す */
-#define RBM_SLASH        8 /*!< モンスターの攻撃種別:斬る(傷) */
-#define RBM_BUTT         9 /*!< モンスターの攻撃種別:角で突く(朦朧) */
-#define RBM_CRUSH       10 /*!< モンスターの攻撃種別:体当たりする(朦朧) */
-#define RBM_ENGULF      11 /*!< モンスターの攻撃種別:飲み込む */
-#define RBM_CHARGE      12 /*!< モンスターの攻撃種別:請求書を寄越す */
-#define RBM_CRAWL       13 /*!< モンスターの攻撃種別:体の上を這い回る */
-#define RBM_DROOL       14 /*!< モンスターの攻撃種別:よだれをたらす */
-#define RBM_SPIT        15 /*!< モンスターの攻撃種別:つばを吐く */
-#define RBM_EXPLODE     16 /*!< モンスターの攻撃種別:爆発する */
-#define RBM_GAZE        17 /*!< モンスターの攻撃種別:にらむ */
-#define RBM_WAIL        18 /*!< モンスターの攻撃種別:泣き叫ぶ */
-#define RBM_SPORE       19 /*!< モンスターの攻撃種別:胞子を飛ばす */
-#define RBM_XXX4        20 /*!< モンスターの攻撃種別:未定義 */
-#define RBM_BEG         21 /*!< モンスターの攻撃種別:金をせがむ */
-#define RBM_INSULT      22 /*!< モンスターの攻撃種別:侮辱する */
-#define RBM_MOAN        23 /*!< モンスターの攻撃種別:うめく */
-#define RBM_SHOW        24 /*!< モンスターの攻撃種別:歌う */
-#define RBM_SHOOT       25 /*!< モンスターの攻撃種別:射撃(非打撃) */
-
-
-/*!
- * @note モンスターの攻撃効果 / New monster blow effects
- */
-#define RBE_HURT         1 /*!< モンスターの攻撃効果: 攻撃する*/
-#define RBE_POISON       2 /*!< モンスターの攻撃効果: 毒をくらわす*/
-#define RBE_UN_BONUS     3 /*!< モンスターの攻撃効果: 劣化させる*/
-#define RBE_UN_POWER     4 /*!< モンスターの攻撃効果: 充填魔力を吸収する*/
-#define RBE_EAT_GOLD     5 /*!< モンスターの攻撃効果: 金を盗む*/
-#define RBE_EAT_ITEM     6 /*!< モンスターの攻撃効果: アイテムを盗む*/
-#define RBE_EAT_FOOD     7 /*!< モンスターの攻撃効果: あなたの食糧を食べる*/
-#define RBE_EAT_LITE     8 /*!< モンスターの攻撃効果: 明かりを吸収する*/
-#define RBE_ACID         9 /*!< モンスターの攻撃効果: 酸を飛ばす*/
-#define RBE_ELEC        10 /*!< モンスターの攻撃効果: 感電させる*/
-#define RBE_FIRE        11 /*!< モンスターの攻撃効果: 燃やす*/
-#define RBE_COLD        12 /*!< モンスターの攻撃効果: 凍らせる*/
-#define RBE_BLIND       13 /*!< モンスターの攻撃効果: 盲目にする*/
-#define RBE_CONFUSE     14 /*!< モンスターの攻撃効果: 混乱させる*/
-#define RBE_TERRIFY     15 /*!< モンスターの攻撃効果: 恐怖させる*/
-#define RBE_PARALYZE    16 /*!< モンスターの攻撃効果: 麻痺させる*/
-#define RBE_LOSE_STR    17 /*!< モンスターの攻撃効果: 腕力を減少させる*/
-#define RBE_LOSE_INT    18 /*!< モンスターの攻撃効果: 知能を減少させる*/
-#define RBE_LOSE_WIS    19 /*!< モンスターの攻撃効果: 賢さを減少させる*/
-#define RBE_LOSE_DEX    20 /*!< モンスターの攻撃効果: 器用さを減少させる*/
-#define RBE_LOSE_CON    21 /*!< モンスターの攻撃効果: 耐久力を減少させる*/
-#define RBE_LOSE_CHR    22 /*!< モンスターの攻撃効果: 魅力を減少させる*/
-#define RBE_LOSE_ALL    23 /*!< モンスターの攻撃効果: 全ステータスを減少させる*/
-#define RBE_SHATTER     24 /*!< モンスターの攻撃効果: 粉砕する*/
-#define RBE_EXP_10      25 /*!< モンスターの攻撃効果: 経験値を減少(10d6+)させる*/
-#define RBE_EXP_20      26 /*!< モンスターの攻撃効果: 経験値を減少(20d6+)させる*/
-#define RBE_EXP_40      27 /*!< モンスターの攻撃効果: 経験値を減少(40d6+)させる*/
-#define RBE_EXP_80      28 /*!< モンスターの攻撃効果: 経験値を減少(80d6+)させる*/
-#define RBE_DISEASE     29 /*!< モンスターの攻撃効果: 病気にする*/
-#define RBE_TIME        30 /*!< モンスターの攻撃効果: 時間を逆戻りさせる*/
-#define RBE_DR_LIFE     31 /*!< モンスターの攻撃効果: 生命力を吸収する*/
-#define RBE_DR_MANA     32 /*!< モンスターの攻撃効果: 魔力を奪う*/
-#define RBE_SUPERHURT   33 /*!< モンスターの攻撃効果: 強力に攻撃する*/
-#define RBE_INERTIA     34 /*!< モンスターの攻撃効果: 減速させる*/
-#define RBE_STUN        35 /*!< モンスターの攻撃効果: 朦朧とさせる*/
-
-
  /*
   * Hack -- "torch" masks
   */
 #define MR1_SINKA 0x01
 
 
-/* Hack -- Determine monster race appearance index is same as race index */
-#define is_original_ap(A) \
-        (bool)(((A)->ap_r_idx == (A)->r_idx) ? TRUE : FALSE)
-
-#define is_original_ap_and_seen(A) \
-        (bool)((A)->ml && !p_ptr->image && ((A)->ap_r_idx == (A)->r_idx))
-
 /*
  * Is the monster seen by the player?
  */
         (player_can_see_bold((A)->fy, (A)->fx) && projectable(p_ptr->y, p_ptr->x, (A)->fy, (A)->fx)))))
 
 
-/*** Option Definitions ***/
-
-
-#define OPT_PAGE_INPUT          1
-#define OPT_PAGE_MAPSCREEN      2
-#define OPT_PAGE_TEXT           3
-#define OPT_PAGE_GAMEPLAY       4
-#define OPT_PAGE_DISTURBANCE    5
-#define OPT_PAGE_BIRTH          6
-#define OPT_PAGE_AUTODESTROY    7
-#define OPT_PAGE_PLAYRECORD    10
-
-#define OPT_PAGE_JAPANESE_ONLY 99
-
-
 /*** Macro Definitions ***/
 
 
 #define term_screen     (angband_term[0])
 
 /*
- * Return the "attr" for a given item.
- * Use "flavor" if available.
- * Default to user definitions.
- */
-#define object_attr(T) \
-       ((k_info[(T)->k_idx].flavor) ? \
-        (k_info[k_info[(T)->k_idx].flavor].x_attr) : \
-        ((!(T)->k_idx || ((T)->tval != TV_CORPSE) || ((T)->sval != SV_CORPSE) || \
-          (k_info[(T)->k_idx].x_attr != TERM_DARK)) ? \
-         (k_info[(T)->k_idx].x_attr) : (r_info[(T)->pval].x_attr)))
-
-/*
  * Return the "char" for a given item.
  * Use "flavor" if available.
  * Default to user definitions.
        ((int)((G) % 256U))
 
 /*
- * Determines if a map location is currently "on screen" -RAK-
- * Note that "panel_contains(Y,X)" always implies "in_bounds2(Y,X)".
- */
-#define panel_contains(Y,X) \
-  (((Y) >= panel_row_min) && ((Y) <= panel_row_max) && \
-   ((X) >= panel_col_min) && ((X) <= panel_col_max))
-
-
-/*
  * Hack -- Prepare to use the "Secure" routines
  */
 #if defined(SET_UID) && defined(SECURE)
@@ -2453,31 +2320,6 @@ extern int PlayerUID;
 
 /*** Color constants ***/
 
-
-/*
- * Angband "attributes" (with symbols, and base (R,G,B) codes)
- *
- * The "(R,G,B)" codes are given in "fourths" of the "maximal" value,
- * and should "gamma corrected" on most (non-Macintosh) machines.
- */
-#define TERM_DARK                0  /*!< 'd' - 黒 0,0,0 */
-#define TERM_WHITE               1  /*!< 'w' - 白 4,4,4 */
-#define TERM_SLATE               2  /*!< 's' - 灰 2,2,2 */
-#define TERM_ORANGE              3  /*!< 'o' - 橙 4,2,0 */
-#define TERM_RED                 4  /*!< 'r' - 赤 3,0,0 */
-#define TERM_GREEN               5  /*!< 'g' - 緑 0,2,1 */
-#define TERM_BLUE                6  /*!< 'b' - 青 0,0,4 */
-#define TERM_UMBER               7  /*!< 'u' - 琥珀 2,1,0 */
-#define TERM_L_DARK              8  /*!< 'D' - 暗い灰 1,1,1 */
-#define TERM_L_WHITE             9  /*!< 'W' - 明るい灰 3,3,3 */
-#define TERM_VIOLET             10  /*!< 'v' - 紫 4,0,4 */
-#define TERM_YELLOW             11  /*!< 'y' - 黄 4,4,0 */
-#define TERM_L_RED              12  /*!< 'R' - 明るい赤 4,0,0 */
-#define TERM_L_GREEN            13  /*!< 'G' - 明るい緑 0,4,0 */
-#define TERM_L_BLUE             14  /*!< 'B' - 明るい青 0,4,4 */
-#define TERM_L_UMBER            15  /*!< 'U' - 明るい琥珀 3,2,1 */
-
-
 /*
  * Not using graphical tiles for this feature?
  */
@@ -2607,15 +2449,6 @@ extern int PlayerUID;
 
 
 
-/*
- * Initialization flags
- */
-#define INIT_NAME_ONLY          0x01
-#define INIT_SHOW_TEXT          0x02
-#define INIT_ASSIGN             0x04
-#define INIT_CREATE_DUNGEON     0x08
-#define INIT_ONLY_FEATURES      0x10
-#define INIT_ONLY_BUILDINGS     0x20
 
 
 /*
@@ -2647,102 +2480,11 @@ extern int PlayerUID;
  */
 #define TOKENIZE_CHECKQUOTE 0x01  /* Special handling of single quotes */
 
-/*
- * Parse errors
- */
-#define PARSE_ERROR_GENERIC                  1
-#define PARSE_ERROR_ABSOLETE_FILE            2
-#define PARSE_ERROR_MISSING_RECORD_HEADER    3
-#define PARSE_ERROR_NON_SEQUENTIAL_RECORDS   4
-#define PARSE_ERROR_INVALID_FLAG             5
-#define PARSE_ERROR_UNDEFINED_DIRECTIVE      6
-#define PARSE_ERROR_OUT_OF_MEMORY            7
-#define PARSE_ERROR_OUT_OF_BOUNDS            8
-#define PARSE_ERROR_TOO_FEW_ARGUMENTS        9
-#define PARSE_ERROR_UNDEFINED_TERRAIN_TAG   10
-#define PARSE_ERROR_MAX                     11
-
-#define GINOU_SUDE      0
-#define GINOU_NITOURYU  1
-#define GINOU_RIDING    2
-#define GINOU_SHIELD    3
-#define GINOU_TEMPMAX   4
 #define GINOU_MAX      10
 
-/* Proficiency level */
-#define EXP_LEVEL_UNSKILLED 0
-#define EXP_LEVEL_BEGINNER  1
-#define EXP_LEVEL_SKILLED   2
-#define EXP_LEVEL_EXPERT    3
-#define EXP_LEVEL_MASTER    4
-
-/* Proficiency of weapons and misc. skills (except riding) */
-#define WEAPON_EXP_UNSKILLED     0
-#define WEAPON_EXP_BEGINNER   4000
-#define WEAPON_EXP_SKILLED    6000
-#define WEAPON_EXP_EXPERT     7000
-#define WEAPON_EXP_MASTER     8000
-
-/* Proficiency of riding */
-#define RIDING_EXP_UNSKILLED     0
-#define RIDING_EXP_BEGINNER    500
-#define RIDING_EXP_SKILLED    2000
-#define RIDING_EXP_EXPERT     5000
-#define RIDING_EXP_MASTER     8000
-
-/* Proficiency of spells */
-#define SPELL_EXP_UNSKILLED      0
-#define SPELL_EXP_BEGINNER     900
-#define SPELL_EXP_SKILLED     1200
-#define SPELL_EXP_EXPERT      1400
-#define SPELL_EXP_MASTER      1600
-
 #define NO_TOWN 6
 #define SECRET_TOWN 5
 
-#define NIKKI_HIGAWARI     0
-#define NIKKI_BUNSHOU      1
-#define NIKKI_ART          2
-#define NIKKI_UNIQUE       3
-#define NIKKI_FIX_QUEST_C  4
-#define NIKKI_FIX_QUEST_F  5
-#define NIKKI_RAND_QUEST_C 6
-#define NIKKI_RAND_QUEST_F 7
-#define NIKKI_MAXDEAPTH    8
-#define NIKKI_TRUMP        9
-#define NIKKI_STAIR       10
-#define NIKKI_RECALL      11
-#define NIKKI_TO_QUEST    12
-#define NIKKI_TELE_LEV    13
-#define NIKKI_BUY         14
-#define NIKKI_SELL        15
-#define NIKKI_ARENA       16
-#define NIKKI_HANMEI      17
-#define NIKKI_LEVELUP     18
-#define NIKKI_GAMESTART   19
-#define NIKKI_WIZ_TELE    20
-#define NIKKI_NAMED_PET   21
-#define NIKKI_PAT_TELE    22
-#define NIKKI_ART_SCROLL  23
-
-#define NIKKI_WIZARD_LOG  24
-
-
-#define RECORD_NAMED_PET_NAME        0
-#define RECORD_NAMED_PET_UNNAME      1
-#define RECORD_NAMED_PET_DISMISS     2
-#define RECORD_NAMED_PET_DEATH       3
-#define RECORD_NAMED_PET_MOVED       4
-#define RECORD_NAMED_PET_LOST_SIGHT  5
-#define RECORD_NAMED_PET_DESTROY     6
-#define RECORD_NAMED_PET_EARTHQUAKE  7
-#define RECORD_NAMED_PET_GENOCIDE    8
-#define RECORD_NAMED_PET_WIZ_ZAP     9
-#define RECORD_NAMED_PET_TELE_LEVEL  10
-#define RECORD_NAMED_PET_BLAST       11
-#define RECORD_NAMED_PET_HEAL_LEPER  12
-#define RECORD_NAMED_PET_COMPACT     13
-#define RECORD_NAMED_PET_LOSE_PARENT 14
 
 #define MAX_MANE 16
 #define MAX_MONSPELLS 96
@@ -2788,60 +2530,6 @@ extern int PlayerUID;
 #define KNOW_STAT   0x01
 #define KNOW_HPRATE 0x02
 
-/*
- * Music songs
- */
-#define MUSIC_NONE              0
-#define MUSIC_SLOW              1
-#define MUSIC_BLESS             2
-#define MUSIC_STUN              3
-#define MUSIC_L_LIFE            4
-#define MUSIC_FEAR              5
-#define MUSIC_HERO              6
-#define MUSIC_MIND              7
-#define MUSIC_STEALTH           8
-#define MUSIC_ID                9
-#define MUSIC_CONF              10
-#define MUSIC_SOUND             11
-#define MUSIC_CHARM             12
-#define MUSIC_WALL              13
-#define MUSIC_RESIST            14
-#define MUSIC_SPEED             15
-#define MUSIC_DISPEL            16
-#define MUSIC_SARUMAN           17
-#define MUSIC_QUAKE             18
-#define MUSIC_STASIS            19
-#define MUSIC_SHERO             20
-#define MUSIC_H_LIFE            21
-#define MUSIC_INVULN            22
-#define MUSIC_PSI               23
-
-#define MUSIC_DETECT            101
-
-#define SINGING_SONG_EFFECT(P_PTR) ((P_PTR)->magic_num1[0])
-#define INTERUPTING_SONG_EFFECT(P_PTR) ((P_PTR)->magic_num1[1])
-#define SINGING_COUNT(P_PTR) ((P_PTR)->magic_num1[2])
-#define SINGING_SONG_ID(P_PTR) ((P_PTR)->magic_num2[0])
-#define music_singing(X) ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] == (X)))
-#define music_singing_any() ((p_ptr->pclass == CLASS_BARD) && p_ptr->magic_num1[0])
-
-/*
- *  Special essence id for Weapon smith
- */
-#define MIN_SPECIAL_ESSENCE 200
-
-#define ESSENCE_ATTACK        (MIN_SPECIAL_ESSENCE + 0)
-#define ESSENCE_AC            (MIN_SPECIAL_ESSENCE + 1)
-#define ESSENCE_TMP_RES_ACID  (MIN_SPECIAL_ESSENCE + 2)
-#define ESSENCE_TMP_RES_ELEC  (MIN_SPECIAL_ESSENCE + 3)
-#define ESSENCE_TMP_RES_FIRE  (MIN_SPECIAL_ESSENCE + 4)
-#define ESSENCE_TMP_RES_COLD  (MIN_SPECIAL_ESSENCE + 5)
-#define ESSENCE_SH_FIRE       (MIN_SPECIAL_ESSENCE + 6)
-#define ESSENCE_SH_ELEC       (MIN_SPECIAL_ESSENCE + 7)
-#define ESSENCE_SH_COLD       (MIN_SPECIAL_ESSENCE + 8)
-#define ESSENCE_RESISTANCE    (MIN_SPECIAL_ESSENCE + 9)
-#define ESSENCE_SUSTAIN       (MIN_SPECIAL_ESSENCE + 10)
-#define ESSENCE_SLAY_GLOVE    (MIN_SPECIAL_ESSENCE + 11)
 
 
 #define DUNGEON_FEAT_PROB_NUM 3