{
STR_OFFSET name; /*!< 地形名参照のためのネームバッファオフセット値 / Name (offset) */
STR_OFFSET text; /*!< 地形説明参照のためのネームバッファオフセット値 / Text (offset) */
- s16b tag; /*!< 地形特性タグ参照のためのネームバッファオフセット値 / Tag (offset) */
+ STR_OFFSET tag; /*!< 地形特性タグ参照のためのネームバッファオフセット値 / Tag (offset) */
- s16b mimic; /*!< 未確定時の外形地形ID / Feature to mimic */
+ IDX mimic; /*!< 未確定時の外形地形ID / Feature to mimic */
- u32b flags[FF_FLAG_SIZE]; /*!< 地形の基本特性ビット配列 / Flags */
+ BIT_FLAGS flags[FF_FLAG_SIZE]; /*!< 地形の基本特性ビット配列 / Flags */
u16b priority; /*!< 縮小表示で省略する際の表示優先度 / Map priority */
- s16b destroyed; /*!< *破壊*に巻き込まれた時の地形移行先(未実装?) / Default destroyed state */
+ IDX destroyed; /*!< *破壊*に巻き込まれた時の地形移行先(未実装?) / Default destroyed state */
feature_state state[MAX_FEAT_STATES]; /*!< feature_state テーブル */
byte subtype; /*!< 副特性値 */
- byte power; /*!< 地形強度 */
+ FEAT_POWER power; /*!< 地形強度 */
- byte d_attr[F_LIT_MAX]; /*!< デフォルトの地形シンボルカラー / Default feature attribute */
- byte d_char[F_LIT_MAX]; /*!< デフォルトの地形シンボルアルファベット / Default feature character */
+ SYMBOL_COLOR d_attr[F_LIT_MAX]; /*!< デフォルトの地形シンボルカラー / Default feature attribute */
+ SYMBOL_CODE 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 */
+ SYMBOL_COLOR x_attr[F_LIT_MAX]; /*!< 設定変更後の地形シンボルカラー / Desired feature attribute */
+ SYMBOL_CODE x_char[F_LIT_MAX]; /*!< 設定変更後の地形シンボルアルファベット / Desired feature character */
};
STR_OFFSET text; /*!< 解説テキスト参照のためのネームバッファオフセット値 / Text (offset) */
STR_OFFSET flavor_name; /*!< 未確定名参照のためのネームバッファオフセット値 / Flavor name (offset) */
- byte tval; /*!< ベースアイテム種別の大項目値 Object type */
- byte sval; /*!< ベースアイテム種別の小項目値 Object sub type */
+ OBJECT_TYPE_VALUE tval; /*!< ベースアイテム種別の大項目値 Object type */
+ OBJECT_SUBTYPE_VALUE sval; /*!< ベースアイテム種別の小項目値 Object sub type */
- s16b pval; /*!< ベースアイテムのpval(能力修正共通値) Object extra info */
+ PARAMETER_VALUE pval; /*!< ベースアイテムのpval(能力修正共通値) Object extra info */
- s16b to_h; /*!< ベースアイテムの命中修正値 / Bonus to hit */
- s16b to_d; /*!< ベースアイテムのダメージ修正値 / Bonus to damage */
- s16b to_a; /*!< ベースアイテムのAC修正値 / Bonus to armor */
+ HIT_PROB to_h; /*!< ベースアイテムの命中修正値 / Bonus to hit */
+ HIT_POINT to_d; /*!< ベースアイテムのダメージ修正値 / Bonus to damage */
+ ARMOUR_CLASS to_a; /*!< ベースアイテムのAC修正値 / Bonus to armor */
- s16b ac; /*!< ベースアイテムのAC基本値 / Base armor */
+ ARMOUR_CLASS ac; /*!< ベースアイテムのAC基本値 / Base armor */
- byte dd, ds; /*!< ダメージダイスの数と大きさ / Damage dice/sides */
+ DICE_NUMBER dd;
+ DICE_SID ds; /*!< ダメージダイスの数と大きさ / Damage dice/sides */
- s16b weight; /*!< ベースアイテムの重量 / Weight */
+ WEIGHT weight; /*!< ベースアイテムの重量 / Weight */
- s32b cost; /*!< ベースアイテムの基本価値 / Object "base cost" */
+ PRICE cost; /*!< ベースアイテムの基本価値 / Object "base cost" */
- u32b flags[TR_FLAG_SIZE]; /*!< ベースアイテムの基本特性ビット配列 / Flags */
+ BIT_FLAGS flags[TR_FLAG_SIZE]; /*!< ベースアイテムの基本特性ビット配列 / Flags */
- u32b gen_flags; /*!< ベースアイテムの生成特性ビット配列 / flags for generate */
+ BIT_FLAGS gen_flags; /*!< ベースアイテムの生成特性ビット配列 / flags for generate */
- byte locale[4]; /*!< ベースアイテムの生成階テーブル / Allocation level(s) */
+ DEPTH locale[4]; /*!< ベースアイテムの生成階テーブル / Allocation level(s) */
byte chance[4]; /*!< ベースアイテムの生成確率テーブル / Allocation chance(s) */
- byte level; /*!< ベースアイテムの基本生成階 / Level */
+ DEPTH level; /*!< ベースアイテムの基本生成階 / Level */
byte extra; /*!< その他色々のビットフラグ配列 / Something */
- byte d_attr; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
- byte d_char; /*!< デフォルトのアイテムシンボルアルファベット / Default object character */
+ SYMBOL_COLOR d_attr; /*!< デフォルトのアイテムシンボルカラー / Default object attribute */
+ SYMBOL_CODE d_char; /*!< デフォルトのアイテムシンボルアルファベット / Default object character */
- byte x_attr; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */
- byte x_char; /*!< 設定変更後のアイテムシンボルアルファベット / Desired object character */
+ SYMBOL_COLOR x_attr; /*!< 設定変更後のアイテムシンボルカラー / Desired object attribute */
+ SYMBOL_CODE x_char; /*!< 設定変更後のアイテムシンボルアルファベット / Desired object character */
s16b flavor; /*!< 調査中(TODO) / Special object flavor (or zero) */
bool tried; /*!< ベースアイテムを未鑑定のまま試したことがあるか / The player has "tried" one of the items */
- byte act_idx; /*!< 発動能力のID / Activative ability index */
+ IDX act_idx; /*!< 発動能力のID / Activative ability index */
};
STR_OFFSET name; /*!< アーティファクト名(headerオフセット参照) / Name (offset) */
STR_OFFSET text; /*!< アーティファクト解説(headerオフセット参照) / Text (offset) */
- byte tval; /*!< ベースアイテム大項目ID / Artifact type */
- byte sval; /*!< ベースアイテム小項目ID / Artifact sub type */
+ OBJECT_TYPE_VALUE tval; /*!< ベースアイテム大項目ID / Artifact type */
+ OBJECT_SUBTYPE_VALUE sval; /*!< ベースアイテム小項目ID / Artifact sub type */
- s16b pval; /*!< pval修正値 / Artifact extra info */
+ PARAMETER_VALUE pval; /*!< pval修正値 / Artifact extra info */
- s16b to_h; /*!< 命中ボーナス値 / Bonus to hit */
- s16b to_d; /*!< ダメージボーナス値 / Bonus to damage */
- s16b to_a; /*!< ACボーナス値 / Bonus to armor */
+ HIT_PROB to_h; /*!< 命中ボーナス値 / Bonus to hit */
+ HIT_POINT to_d; /*!< ダメージボーナス値 / Bonus to damage */
+ ARMOUR_CLASS to_a; /*!< ACボーナス値 / Bonus to armor */
- s16b ac; /*!< 上書きベースAC値 / Base armor */
+ ARMOUR_CLASS ac; /*!< 上書きベースAC値 / Base armor */
- byte dd, ds; /*!< ダイス値 / Damage when hits */
+ DICE_NUMBER dd;
+ DICE_SID ds; /*!< ダイス値 / Damage when hits */
- s16b weight; /*!< 重量 / Weight */
+ WEIGHT weight; /*!< 重量 / Weight */
- s32b cost; /*!< 基本価格 / Artifact "cost" */
+ PRICE cost; /*!< 基本価格 / Artifact "cost" */
- u32b flags[TR_FLAG_SIZE]; /*! アイテムフラグ / Artifact Flags */
+ BIT_FLAGS flags[TR_FLAG_SIZE]; /*! アイテムフラグ / Artifact Flags */
- u32b gen_flags; /*! アイテム生成フラグ / flags for generate */
+ BIT_FLAGS gen_flags; /*! アイテム生成フラグ / flags for generate */
- byte level; /*! 基本生成階 / Artifact level */
- byte rarity; /*! レアリティ / Artifact rarity */
+ DEPTH level; /*! 基本生成階 / Artifact level */
+ RARITY rarity; /*! レアリティ / Artifact rarity */
byte cur_num; /*! 現在の生成数 / Number created (0 or 1) */
byte max_num; /*! (未使用)最大生成数 / Unused (should be "1") */
DEPTH level; /* Minimum level */
RARITY rarity; /* Object rarity */
- byte max_to_h; /* Maximum to-hit bonus */
- byte max_to_d; /* Maximum to-dam bonus */
- byte max_to_a; /* Maximum to-ac bonus */
+ HIT_PROB max_to_h; /* Maximum to-hit bonus */
+ HIT_POINT max_to_d; /* Maximum to-dam bonus */
+ ARMOUR_CLASS max_to_a; /* Maximum to-ac bonus */
PARAMETER_VALUE max_pval; /* Maximum pval */
- s32b cost; /* Ego-item "cost" */
+ PRICE cost; /* Ego-item "cost" */
- u32b flags[TR_FLAG_SIZE]; /* Ego-Item Flags */
-
- u32b gen_flags; /* flags for generate */
+ BIT_FLAGS flags[TR_FLAG_SIZE]; /* Ego-Item Flags */
+ BIT_FLAGS gen_flags; /* flags for generate */
IDX act_idx; /* Activative ability index */
};
{
byte method;
byte effect;
- byte d_dice;
- byte d_side;
+ DICE_NUMBER d_dice;
+ DICE_SID d_side;
};
#ifdef JP
STR_OFFSET E_name; /*!< 名前データのオフセット(英語) / Name offset(English) */
#endif
- STR_OFFSET text; /*!< 思い出テキストのオフセット / Lore text offset */
+ STR_OFFSET text; /*!< 思い出テキストのオフセット / Lore text offset */
- byte hdice; /*!< HPのダイス数 / Creatures hit dice count */
- byte hside; /*!< HPのダイス面数 / Creatures hit dice sides */
+ DICE_NUMBER hdice; /*!< HPのダイス数 / Creatures hit dice count */
+ DICE_SID hside; /*!< HPのダイス面数 / Creatures hit dice sides */
- s16b ac; /*!< アーマークラス / Armour Class */
+ ARMOUR_CLASS ac; /*!< アーマークラス / Armour Class */
s16b sleep; /*!< 睡眠値 / Inactive counter (base) */
byte aaf; /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
- byte speed; /*!< 加速(110で+0) / Speed (normally 110) */
+ SPEED speed; /*!< 加速(110で+0) / Speed (normally 110) */
- s32b mexp; /*!< 殺害時基本経験値 / Exp value for kill */
+ EXP mexp; /*!< 殺害時基本経験値 / Exp value for kill */
s16b extra; /*!< 未使用 / Unused (for now) */
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 flags7; /* Flags 7 (movement related abilities) */
- u32b flags8; /* Flags 8 (wilderness info) */
- u32b flags9; /* Flags 9 (drops info) */
- u32b flagsr; /* Flags R (resistances info) */
+ BIT_FLAGS flags1; /* Flags 1 (general) */
+ BIT_FLAGS flags2; /* Flags 2 (abilities) */
+ BIT_FLAGS flags3; /* Flags 3 (race/resist) */
+ BIT_FLAGS flags4; /* Flags 4 (inate/breath) */
+ 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) */
- 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) */
+ BIT_FLAGS a_ability_flags1; /* Activate Ability Flags 5 (normal spells) */
+ BIT_FLAGS a_ability_flags2; /* Activate Ability Flags 6 (special spells) */
+ BIT_FLAGS a_ability_flags3; /* Activate Ability Flags 7 (implementing) */
+ BIT_FLAGS 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];
+ MONRACE_IDX reinforce_id[6];
+ DICE_NUMBER reinforce_dd[6];
+ DICE_SID reinforce_ds[6];
- u16b artifact_id[4]; /* 特定アーティファクトドロップID */
- u16b artifact_rarity[4]; /* 特定アーティファクトレア度 */
- u16b artifact_percent[4]; /* 特定アーティファクトドロップ率 */
+ ARTIFACT_IDX artifact_id[4]; /* 特定アーティファクトドロップID */
+ RARITY artifact_rarity[4]; /* 特定アーティファクトレア度 */
+ PERCENTAGE artifact_percent[4]; /* 特定アーティファクトドロップ率 */
- u32b arena_ratio; /* アリーナの評価修正値(%基準 / 0=100%) / Arena */
+ PERCENTAGE arena_ratio; /* アリーナの評価修正値(%基準 / 0=100%) / Arena */
- s16b next_r_idx;
- u32b next_exp;
+ MONRACE_IDX next_r_idx;
+ EXP next_exp;
- DEPTH level; /* Level of creature */
+ DEPTH level; /* Level of creature */
RARITY rarity; /* Rarity of creature */
- byte d_attr; /* Default monster attribute */
- byte d_char; /* Default monster character */
+ SYMBOL_COLOR d_attr; /* Default monster attribute */
+ SYMBOL_CODE d_char; /* Default monster character */
- byte x_attr; /* Desired monster attribute */
- byte x_char; /* Desired monster character */
+ SYMBOL_COLOR x_attr; /* Desired monster attribute */
+ SYMBOL_CODE x_char; /* Desired monster character */
byte max_num; /* Maximum population allowed per level */
byte typ; /* Vault type */
byte rat; /* Vault rating */
- byte hgt; /* Vault height */
- byte wid; /* Vault width */
+ POSITION hgt; /* Vault height */
+ POSITION wid; /* Vault width */
};
struct skill_table
{
- s16b w_start[5][64]; /* start weapon exp */
- s16b w_max[5][64]; /* max weapon exp */
- s16b s_start[10]; /* start skill */
- s16b s_max[10]; /* max skill */
+ SUB_EXP w_start[5][64]; /* start weapon exp */
+ SUB_EXP w_max[5][64]; /* max weapon exp */
+ SUB_EXP s_start[10]; /* start skill */
+ SUB_EXP s_max[10]; /* max skill */
};
IDX feat; /* Hack -- feature type */
IDX o_idx; /* Object in this grid */
- IDX m_idx; /* Monster in this grid */
+ MONSTER_IDX m_idx; /* Monster in this grid */
s16b special; /* Special cave info */
IDX name1; /* Artifact type, if any */
IDX name2; /* Ego-Item type, if any */
- byte xtra1; /* Extra info type (now unused) */
- 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 */
+ XTRA8 xtra1; /* Extra info type (now unused) */
+ XTRA8 xtra2; /* Extra info activation index */
+ XTRA8 xtra3; /* Extra info for weaponsmith */
+ XTRA16 xtra4; /* Extra info fuel or captured monster's current HP */
+ XTRA16 xtra5; /* Extra info captured monster's max HP */
HIT_PROB to_h; /* Plusses to hit */
HIT_POINT to_d; /* Plusses to damage */
ARMOUR_CLASS ac; /* Normal AC */
- byte dd, ds; /* Damage dice/sides */
+ DICE_NUMBER dd;
+ DICE_SID ds; /* Damage dice/sides */
- s16b timeout; /* Timeout Counter */
+ TIME_EFFECT timeout; /* Timeout Counter */
byte ident; /* Special flags */
byte feeling; /* Game generated inscription number (eg, pseudo-id) */
- u32b art_flags[TR_FLAG_SIZE]; /* Extra Flags for ego and artifacts */
-
- u32b curse_flags; /* Flags for curse */
+ BIT_FLAGS art_flags[TR_FLAG_SIZE]; /* Extra Flags for ego and artifacts */
+ BIT_FLAGS curse_flags; /* Flags for curse */
IDX next_o_idx; /* Next object in stack (if any) */
IDX held_m_idx; /* Monster holding us (if any) */
struct monster_type
{
- IDX r_idx; /* Monster race index */
+ MONRACE_IDX r_idx; /* Monster race index */
IDX ap_r_idx; /* Monster race appearance index */
byte sub_align; /* Sub-alignment for a neutral monster */
TIME_EFFECT mtimed[MAX_MTIMED]; /* Timed status counter */
- byte mspeed; /* Monster "speed" */
+ SPEED mspeed; /* Monster "speed" */
ACTION_ENERGY energy_need; /* Monster "energy" */
POSITION cdis; /* Current dis from player */
- byte mflag; /* Extra monster flags */
- byte mflag2; /* Extra monster flags */
+ BIT_FLAGS8 mflag; /* Extra monster flags */
+ BIT_FLAGS8 mflag2; /* Extra monster flags */
bool ml; /* Monster is "visible" */
- IDX hold_o_idx; /* Object being held (if any) */
+ OBJECT_IDX hold_o_idx; /* Object being held (if any) */
POSITION target_y; /* Can attack !los player */
POSITION target_x; /* Can attack !los player */
- u16b nickname; /* Monster's Nickname */
+ STR_OFFSET nickname; /* Monster's Nickname */
- u32b exp;
+ EXP exp;
- u32b smart; /* Field for "smart_learn" */
+ BIT_FLAGS smart; /* Field for "smart_learn" */
- s16b parent_m_idx;
+ MONSTER_IDX parent_m_idx;
};
struct alloc_entry
{
- s16b index; /* The actual index */
+ IDX index; /* The actual index */
- byte level; /* Base dungeon level */
- byte prob1; /* Probability, pass 1 */
- byte prob2; /* Probability, pass 2 */
- byte prob3; /* Probability, pass 3 */
+ DEPTH level; /* Base dungeon level */
+ PROB prob1; /* Probability, pass 1 */
+ PROB prob2; /* Probability, pass 2 */
+ PROB prob3; /* Probability, pass 3 */
u16b total; /* Unused for now */
};
s16b type; /*!< クエストの種別 / The quest type */
char name[60]; /*!< クエスト名 / Quest name */
- s16b level; /*!< 処理階層 / Dungeon level */
- s16b r_idx; /*!< クエスト対象のモンスターID / Monster race */
+ DEPTH level; /*!< 処理階層 / Dungeon level */
+ MONRACE_IDX r_idx; /*!< クエスト対象のモンスターID / Monster race */
- s16b cur_num; /*!< 撃破したモンスターの数 / Number killed */
- s16b max_num; /*!< 求められるモンスターの撃破数 / Number required */
+ MONSTER_NUMBER cur_num; /*!< 撃破したモンスターの数 / Number killed */
+ MONSTER_NUMBER max_num; /*!< 求められるモンスターの撃破数 / Number required */
- s16b k_idx; /*!< クエスト対象のアイテムID / object index */
- s16b num_mon; /*!< QUEST_TYPE_KILL_NUMBER時の目標撃破数 number of monsters on level */
+ IDX k_idx; /*!< クエスト対象のアイテムID / object index */
+ MONSTER_NUMBER num_mon; /*!< QUEST_TYPE_KILL_NUMBER時の目標撃破数 number of monsters on level */
byte flags; /*!< クエストに関するフラグビット / quest flags */
byte dungeon; /*!< クエスト対象のダンジョンID / quest dungeon */
struct magic_type
{
- byte slevel; /* Required level (to learn) */
- byte smana; /* Required mana (to cast) */
- byte sfail; /* Minimum chance of failure */
- byte sexp; /* Encoded experience bonus */
+ PLAYER_LEVEL slevel; /* Required level (to learn) */
+ MANA_POINT smana; /* Required mana (to cast) */
+ PERCENTAGE sfail; /* Minimum chance of failure */
+ EXP sexp; /* Encoded experience bonus */
};
struct player_magic
{
- int spell_book; /* Tval of spell books (if any) */
+ OBJECT_TYPE_VALUE spell_book; /* Tval of spell books (if any) */
int spell_xtra; /* Something for later */
int spell_stat; /* Stat for spells (if any) */
CHARACTER_IDX prace; /* Race index */
CHARACTER_IDX pclass; /* Class index */
CHARACTER_IDX pseikaku; /* Seikaku index */
- CHARACTER_IDX realm1; /* First magic realm */
- CHARACTER_IDX realm2; /* Second magic realm */
+ REALM_IDX realm1; /* First magic realm */
+ REALM_IDX realm2; /* Second magic realm */
CHARACTER_IDX oops; /* Unused */
DICE_SID hitdie; /* Hit dice (sides) */
PRICE au; /* Current Gold */
- s32b max_max_exp; /* Max max experience (only to calculate score) */
- s32b max_exp; /* Max experience */
- s32b exp; /* Cur experience */
+ EXP max_max_exp; /* Max max experience (only to calculate score) */
+ EXP max_exp; /* Max experience */
+ EXP exp; /* Cur experience */
u32b exp_frac; /* Cur exp frac (times 2^16) */
PLAYER_LEVEL lev; /* Level */
s16b town_num; /* Current town number */
s16b arena_number; /* monster number in arena -KMW- */
bool inside_arena; /* Is character inside arena? */
- IDX inside_quest; /* Inside quest level */
+ QUEST_IDX inside_quest; /* Inside quest level */
bool inside_battle; /* Is character inside tougijou? */
POSITION wilderness_x; /* Coordinates in the wilderness */
TIME_EFFECT magicdef;
TIME_EFFECT tim_res_nether; /* Timed -- Nether resistance */
TIME_EFFECT tim_res_time; /* Timed -- Time resistance */
- byte mimic_form;
+ IDX mimic_form;
TIME_EFFECT tim_mimic;
TIME_EFFECT tim_sh_fire;
TIME_EFFECT tim_sh_holy;
TIME_EFFECT dustrobe; /* Timed -- Robe of dust */
s16b chaos_patron;
- u32b muta1;
- u32b muta2;
- u32b muta3;
+ BIT_FLAGS muta1;
+ BIT_FLAGS muta2;
+ BIT_FLAGS muta3;
s16b virtues[8];
s16b vir_types[8];
- s16b word_recall; /* Word of recall counter */
- s16b alter_reality; /* Alter reality counter */
- byte recall_dungeon; /* Dungeon set to be recalled */
+ TIME_EFFECT word_recall; /* Word of recall counter */
+ TIME_EFFECT alter_reality; /* Alter reality counter */
+ DUNGEON_IDX 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 */
+ ENERGY energy_need; /* Energy needed for next move */
+ ENERGY enchant_energy_need; /* Energy needed for next upkeep effect */
- s16b food; /* Current nutrition */
+ FEED food; /* Current nutrition */
- u32b special_attack; /* Special attack capacity -LM- */
- u32b special_defense; /* Special block capacity -LM- */
+ BIT_FLAGS special_attack; /* Special attack capacity -LM- */
+ BIT_FLAGS special_defense; /* Special block capacity -LM- */
byte action; /* Currently action */
- 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 */
+ BIT_FLAGS spell_learned1; /* bit mask of spells learned */
+ BIT_FLAGS spell_learned2; /* bit mask of spells learned */
+ BIT_FLAGS spell_worked1; /* bit mask of spells tried and worked */
+ BIT_FLAGS spell_worked2; /* bit mask of spells tried and worked */
+ BIT_FLAGS spell_forgotten1; /* bit mask of spells learned but forgotten */
+ BIT_FLAGS spell_forgotten2; /* bit mask of spells learned but forgotten */
+ SPELL_IDX spell_order[64]; /* order spells learned/remembered/forgotten */
SUB_EXP spell_exp[64]; /* Proficiency of spells */
SUB_EXP weapon_exp[5][64]; /* Proficiency of weapons */
SUB_EXP skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */
- s32b magic_num1[108]; /* Array for non-spellbook type magic */
- byte magic_num2[108]; /* Flags for non-spellbook type magics */
+ MAGIC_NUM1 magic_num1[108]; /*!< Array for non-spellbook type magic */
+ MAGIC_NUM2 magic_num2[108]; /*!< Flags for non-spellbook type magics */
- s16b mane_spell[MAX_MANE];
- s16b mane_dam[MAX_MANE];
+ SPELL_IDX mane_spell[MAX_MANE];
+ HIT_POINT mane_dam[MAX_MANE];
s16b mane_num;
s16b concent; /* Sniper's concentration level */
- s16b player_hp[PY_MAX_LEVEL];
+ HIT_POINT 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 */
bool wizard; /* Player is in wizard mode */
- s16b riding; /* Riding on a monster of this index */
+ MONSTER_IDX riding; /* Riding on a monster of this index */
byte knowledge; /* Knowledge about yourself */
- s32b visit; /* Visited towns */
+ BIT_FLAGS visit; /* Visited towns */
byte start_race; /* Race at birth */
- s32b old_race1; /* Record of race changes */
- s32b old_race2; /* Record of race changes */
+ BIT_FLAGS old_race1; /* Record of race changes */
+ BIT_FLAGS old_race2; /* Record of race changes */
s16b old_realm; /* Record of realm changes */
s16b pet_follow_distance; /* Length of the imaginary "leash" for pets */
byte prace; /* Race index */
byte pclass; /* Class index */
byte pseikaku; /* Seikaku index */
- byte realm1; /* First magic realm */
- byte realm2; /* Second magic realm */
+ REALM_IDX realm1; /* First magic realm */
+ REALM_IDX realm2; /* Second magic realm */
s16b age;
s16b ht;
s32b au;
- s16b stat_max[6]; /* Current "maximal" stat values */
- s16b stat_max_max[6]; /* Maximal "maximal" stat values */
- s16b player_hp[PY_MAX_LEVEL];
+ BASE_STATUS stat_max[6]; /* Current "maximal" stat values */
+ BASE_STATUS stat_max_max[6]; /* Maximal "maximal" stat values */
+ HIT_POINT player_hp[PY_MAX_LEVEL];
s16b chaos_patron;
int town;
int road;
u32b seed;
- s16b level;
+ DEPTH level;
byte entrance;
};
int index;
};
-typedef bool (*monster_hook_type)(int r_idx);
+typedef bool (*monster_hook_type)(MONRACE_IDX r_idx);
/*
typedef struct
{
- s16b feat; /* Feature tile */
- byte percent; /* Chance of type */
+ FEAT_IDX feat; /* Feature tile */
+ PERCENTAGE percent; /* Chance of type */
}
feat_prob;
STR_OFFSET name; /* Name */
STR_OFFSET text; /* Description */
- byte dy;
- byte dx;
+ POSITION dy;
+ POSITION dx;
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;
+ FEAT_IDX outer_wall; /* Outer wall tile */
+ FEAT_IDX inner_wall; /* Inner wall tile */
+ FEAT_IDX stream1; /* stream tile */
+ FEAT_IDX stream2; /* stream tile */
+
+ DEPTH mindepth; /* Minimal depth */
+ DEPTH maxdepth; /* Maximal depth */
+ PLAYER_LEVEL min_plev; /* Minimal plev needed to enter -- it's an anti-cheating mesure */
+ BIT_FLAGS16 pit;
+ BIT_FLAGS16 nest;
byte mode; /* Mode of combinaison of the monster flags */
int min_m_alloc_level; /* Minimal number of monsters per level */
int max_m_alloc_chance; /* There is a 1/max_m_alloc_chance chance per round of creating a new monster */
- u32b flags1; /* Flags 1 */
+ BIT_FLAGS flags1; /* Flags 1 */
- u32b mflags1; /* The monster flags that are allowed */
- u32b mflags2;
- u32b mflags3;
- u32b mflags4;
- u32b mflags7;
- u32b mflags8;
- u32b mflags9;
- u32b mflagsr;
+ BIT_FLAGS mflags1; /* The monster flags that are allowed */
+ BIT_FLAGS mflags2;
+ BIT_FLAGS mflags3;
+ BIT_FLAGS mflags4;
+ BIT_FLAGS mflags7;
+ BIT_FLAGS mflags8;
+ BIT_FLAGS mflags9;
+ BIT_FLAGS mflagsr;
- u32b m_a_ability_flags1;
- u32b m_a_ability_flags2;
- u32b m_a_ability_flags3;
- u32b m_a_ability_flags4;
+ BIT_FLAGS m_a_ability_flags1;
+ BIT_FLAGS m_a_ability_flags2;
+ BIT_FLAGS m_a_ability_flags3;
+ BIT_FLAGS m_a_ability_flags4;
char r_char[5]; /* Monster race allowed */
int final_object; /* The object you'll find at the bottom */
{
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;
+ DEPTH 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 */
*/
typedef struct
{
- s16b open;
- s16b broken;
- s16b closed;
- s16b locked[MAX_LJ_DOORS];
- s16b num_locked;
- s16b jammed[MAX_LJ_DOORS];
- s16b num_jammed;
+ FEAT_IDX open;
+ FEAT_IDX broken;
+ FEAT_IDX closed;
+ FEAT_IDX locked[MAX_LJ_DOORS];
+ FEAT_IDX num_locked;
+ FEAT_IDX jammed[MAX_LJ_DOORS];
+ FEAT_IDX num_jammed;
} door_type;