-/* File: variable.c */
-
-/*
- * 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.
+/*!
+ * @file variable.c
+ * @brief グローバル変数定義 / Angband variables
+ * @date 2014/10/05
+ * @author
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke<br>
+ * <br>
+ * This software may be copied and distributed for educational, research,<br>
+ * and not for profit purposes provided that this copyright and statement<br>
+ * are included in all such copies. Other copyrights may also apply.<br>
*/
-/* Purpose: Angband variables */
-
#include "angband.h"
-
-/*
+/*!
+ * コピーライト情報 /
* Hack -- Link a copyright message into the executable
*/
-cptr copyright[5] =
+const cptr copyright[5] =
{
"Copyright (c) 1989 James E. Wilson, Robert A. Keoneke",
"",
};
-int max_macrotrigger = 0;
-cptr macro_template = NULL;
-cptr macro_modifier_chr;
-cptr macro_modifier_name[MAX_MACRO_MOD];
-cptr macro_trigger_name[MAX_MACRO_TRIG];
-cptr macro_trigger_keycode[2][MAX_MACRO_TRIG];
+int max_macrotrigger = 0; /*!< 現在登録中のマクロ(トリガー)の数 */
+cptr macro_template = NULL; /*!< Angband設定ファイルのT: タグ情報から読み込んだ長いTコードを処理するために利用する文字列ポインタ */
+cptr macro_modifier_chr; /*!< &x# で指定されるマクロトリガーに関する情報を記録する文字列ポインタ */
+cptr macro_modifier_name[MAX_MACRO_MOD]; /*!< マクロ上で取り扱う特殊キーを文字列上で表現するためのフォーマットを記録した文字列ポインタ配列 */
+cptr macro_trigger_name[MAX_MACRO_TRIG]; /*!< マクロのトリガーコード */
+cptr macro_trigger_keycode[2][MAX_MACRO_TRIG]; /*!< マクロの内容 */
+
+int level_up = 0; /*!< レベルアップの際に遅延してcalc_mana()関数上で上昇量を表示するかどうかの判定フラグ */
-/* ¥ì¥Ù¥ë¥¢¥Ã¥×¤Î»þ¤Ë¾å¾ºÎ̤òɽ¼¨¤¹¤ë¤Î¤Ë»È¤¦ */
-int level_up = 0;
/*
- * List for auto-picker/destroyer entries
+ * 自動拾い/破壊設定のリストに関する変数 / List for auto-picker/destroyer entries
*/
-int max_autopick = 0;
-int max_max_autopick = 0;
-autopick_type *autopick_list = NULL;
+int max_autopick = 0; /*!< 現在登録している自動拾い/破壊設定の数 */
+int max_max_autopick = 0; /*!< 自動拾い/破壊設定の限界数 */
+autopick_type *autopick_list = NULL; /*!< 自動拾い/破壊設定構造体のポインタ配列 */
/*
* Savefile version
bool arg_fiddle; /* Command arg -- Request fiddle mode */
bool arg_wizard; /* Command arg -- Request wizard mode */
bool arg_sound; /* Command arg -- Request special sounds */
+bool arg_music; /* Command arg -- Request special musics */
byte arg_graphics; /* Command arg -- Request graphics mode */
bool arg_monochrome; /* Command arg -- Request monochrome mode */
bool arg_force_original; /* Command arg -- Request original keyset */
bool character_icky; /* The game is in an icky full screen mode */
bool character_xtra; /* The game is in an icky startup mode */
+bool creating_savefile; /* New savefile is currently created */
+
u32b seed_flavor; /* Hack -- consistent object colors */
u32b seed_town; /* Hack -- consistent town layout */
s16b command_cmd; /* Current "Angband Command" */
-s16b command_arg; /* Gives argument of current command */
-s16b command_rep; /* Gives repetition of current command */
-s16b command_dir; /* Gives direction of current command */
+COMMAND_ARG command_arg; /*!< 各種コマンドの汎用的な引数として扱う / Gives argument of current command */
+
+COMMAND_NUM command_rep; /*!< 各種コマンドの汎用的なリピート数として扱う / Gives repetition of current command */
+
+DIRECTION command_dir; /*!< 各種コマンドの汎用的な方向値処理として扱う/ Gives direction of current command */
s16b command_see; /* See "object1.c" */
s16b command_wrk; /* See "object1.c" */
-s16b command_gap = 999; /* See "object1.c" */
+TERM_LEN command_gap = 999; /* See "object1.c" */
s16b command_new; /* Command chaining from inven/equip view */
-s16b energy_use; /* Energy use this turn */
-
bool msg_flag; /* Used in msg_print() for "buffering" */
s16b running; /* Current counter for running, if any */
-s16b resting; /* Current counter for resting, if any */
-
-s16b cur_hgt; /* Current dungeon height */
-s16b cur_wid; /* Current dungeon width */
-s16b dun_level; /* Current dungeon level */
-s16b num_repro; /* Current reproducer count */
-s16b object_level; /* Current object creation level */
-s16b monster_level; /* Current monster creation level */
-s16b base_level; /* Base dungeon level */
-
-s32b turn; /* Current game turn */
-s32b dungeon_turn; /* Game turn in dungeon */
-s32b old_turn; /* Turn when level began (feelings) */
-s32b old_battle;
+GAME_TURN resting; /* Current counter for resting, if any */
+
+POSITION cur_hgt; /* Current dungeon height */
+POSITION cur_wid; /* Current dungeon width */
+DEPTH dun_level; /*!< 現在の実ダンジョン階層、base_levelの参照元となる / Current dungeon level */
+MONSTER_NUMBER num_repro; /*!< Current reproducer count */
+DEPTH base_level; /*!< 基本生成レベル、後述のobject_level, monster_levelの参照元となる / Base dungeon level */
+DEPTH object_level; /*!< アイテムの生成レベル、base_levelを起点に一時変更する時に参照 / Current object creation level */
+DEPTH monster_level; /*!< モンスターの生成レベル、base_levelを起点に一時変更する時に参照 / Current monster creation level */
+bool invoking_midnight_curse; /*!< 悪夢モード時の真夜中太古の呪い発生処理フラグ */
+
+GAME_TURN turn; /*!< 画面表示上のゲーム時間基準となるターン / Current game turn */
+GAME_TURN turn_limit; /*!< turnの最大値 / Limit of game turn */
+GAME_TURN dungeon_turn; /*!< NASTY生成の計算に関わる内部ターン値 / Game turn in dungeon */
+GAME_TURN dungeon_turn_limit; /*!< dungeon_turnの最大値 / Limit of game turn in dungeon */
+GAME_TURN old_turn; /* Turn when level began */
+GAME_TURN old_battle;
bool use_sound; /* The "sound" mode is enabled */
+bool use_music; /* The "music" mode is enabled */
bool use_graphics; /* The "graphics" mode is enabled */
bool use_bigtile = FALSE;
bool inkey_xtra; /* See the "inkey()" function */
bool inkey_scan; /* See the "inkey()" function */
bool inkey_flag; /* See the "inkey()" function */
+bool get_com_no_macros = FALSE; /* Expand macros in "get_com" or not */
-s16b coin_type; /* Hack -- force coin type */
+OBJECT_SUBTYPE_VALUE coin_type; /* Hack -- force coin type */
bool opening_chest; /* Hack -- prevent chest generation */
bool repair_monsters; /* Hack -- optimize detect monsters */
bool repair_objects; /* Hack -- optimize detect objects */
-s16b inven_nxt; /* Hack -- unused */
-bool hack_mind;
+bool is_loading_now; /*!< ロード直後にcalc_bonus()時の徳変化、及びsanity_blast()による異常を抑止する */
bool hack_mutation;
s16b inven_cnt; /* Number of items in inventory */
s16b o_max = 1; /* Number of allocated objects */
s16b o_cnt = 0; /* Number of live objects */
-s16b m_max = 1; /* Number of allocated monsters */
-s16b m_cnt = 0; /* Number of live monsters */
+MONSTER_IDX m_max = 1; /* Number of allocated monsters */
+MONSTER_IDX m_cnt = 0; /* Number of live monsters */
-s16b hack_m_idx = 0; /* Hack -- see "process_monsters()" */
-s16b hack_m_idx_ii = 0;
+MONSTER_IDX hack_m_idx = 0; /* Hack -- see "process_monsters()" */
+MONSTER_IDX hack_m_idx_ii = 0;
bool multi_rew = FALSE;
char summon_kin_type; /* Hack, by Julian Lighton: summon 'relatives' */
int total_friends = 0;
-s32b total_friend_levels = 0;
s32b friend_align = 0;
int leaving_quest = 0;
bool reinit_wilderness = FALSE;
-/*
- * Software options (set via the '=' command). See "tables.c"
- */
-
-
-/* Option Set 1 -- User Interface */
-
-bool rogue_like_commands; /* Rogue-like commands */
-bool quick_messages; /* Activate quick messages */
-bool auto_more;
-bool command_menu;
-bool other_query_flag; /* Prompt for various information */
-bool carry_query_flag; /* Prompt before picking things up */
-bool use_old_target; /* Use old target by default */
-bool always_pickup; /* Pick things up by default */
-bool always_repeat; /* Repeat obvious commands */
-bool depth_in_feet; /* Show dungeon level in feet */
-
-bool stack_force_notes; /* Merge inscriptions when stacking */
-bool stack_force_costs; /* Merge discounts when stacking */
-
-bool show_labels; /* Show labels in object listings */
-bool show_weights; /* Show weights in object listings */
-
-bool ring_bell; /* Ring the bell (on errors, etc) */
-
-bool show_item_graph;
-bool numpad_as_cursorkey;
-
-
-/* Option Set 2 -- Disturbance */
-
-bool find_ignore_stairs; /* Run past stairs */
-bool find_ignore_doors; /* Run through open doors */
-bool find_cut; /* Run past known corners */
-
-bool disturb_move; /* Disturb whenever any monster moves */
-bool disturb_near; /* Disturb whenever viewable monster moves */
-bool disturb_high; /* Disturb whenever high-level monster moves */
-bool disturb_panel; /* Disturb whenever map panel changes */
-bool disturb_state; /* Disturn whenever player state changes */
-bool disturb_minor; /* Disturb whenever boring things happen */
-
-bool disturb_trap_detect; /* Disturb when leaving trap detected area */
-bool alert_trap_detect; /* Alert when leaving trap detected area */
-bool last_words; /* Get last words upon dying */
-bool over_exert;
-bool small_levels; /* Allow unusually small dungeon levels */
-bool always_small_levels; /* Use always unusually small dungeon levels */
-bool empty_levels; /* Allow empty 'arena' levels */
-bool bound_walls_perm; /* Boundary walls are created by permanent wall */
-bool equippy_chars; /* Back by popular demand... */
-bool display_mutations; /* Skip mutations screen even if we have it */
-bool plain_descriptions; /* Plain object descriptions */
-bool confirm_destroy; /* Known worthless items are destroyed without confirmation */
-bool confirm_quest; /* Prompt before staircases... */
-bool confirm_wear; /* Confirm before putting on known cursed items */
-bool disturb_pets; /* Pets moving nearby disturb us */
-
-
-
-/* Option Set 3 -- Game-Play */
-
-bool manual_haggle; /* Auto-haggle in stores */
-
-bool auto_scum; /* Auto-scum for good levels */
-
-bool expand_list; /* Expand the power of the list commands */
-
-bool view_perma_grids; /* Map remembers all perma-lit grids */
-bool view_torch_grids; /* Map remembers all torch-lit grids */
-bool view_unsafe_grids; /* Map marked by detect traps */
-
-bool dungeon_align; /* Generate dungeons with aligned rooms */
-
-bool track_follow; /* Monsters follow the player */
-bool track_target; /* Monsters target the player */
-
-bool smart_learn; /* Monsters learn from their mistakes */
-bool smart_cheat; /* Monsters exploit player weaknesses */
-
-
-/* Option Set 4 -- Efficiency */
-
-bool view_reduce_view; /* Reduce view-radius in town */
-
-bool check_abort; /* Avoid checking for user abort */
-
-bool flush_failure; /* Flush input on any failure */
-bool flush_disturb; /* Flush input on disturbance */
-
-bool fresh_before; /* Flush output before normal commands */
-bool fresh_after; /* Flush output after normal commands */
-bool fresh_message; /* Flush output after all messages */
-
-bool compress_savefile; /* Compress messages in savefiles */
-
-bool hilite_player; /* Hilite the player with the cursor */
-
-bool view_yellow_lite; /* Use special colors for torch-lit grids */
-bool view_bright_lite; /* Use special colors for 'viewable' grids */
-
-bool view_granite_lite; /* Use special colors for wall grids (slow) */
-bool view_special_lite; /* Use special colors for floor grids (slow) */
-bool new_ascii_graphics;
-bool display_path;
-bool always_show_list;
-bool abbrev_extra;
-bool abbrev_all;
-bool target_pet;
-bool plain_pickup;
-
-bool powerup_home;
-bool send_score;
-bool allow_debug_opts; /* Allow use of debug/cheat options */
-
-/* Cheating options */
-
-bool cheat_peek; /* Peek into object creation */
-bool cheat_hear; /* Peek into monster creation */
-bool cheat_room; /* Peek into dungeon creation */
-bool cheat_xtra; /* Peek into something else */
-bool cheat_know; /* Know complete monster info */
-bool cheat_live; /* Allow player to avoid death */
-bool cheat_save; /* Ask for saving death */
-
-
-/* Special options */
-
-byte hitpoint_warn; /* Hitpoint warning (0 to 9) */
-byte mana_warn; /* Mana color (0 to 9) */
-
-byte delay_factor; /* Delay factor (0 to 9) */
-
-bool autosave_l; /* Autosave before entering new levels */
-bool autosave_t; /* Timed autosave */
-s16b autosave_freq; /* Autosave frequency */
-
/*
* Dungeon variables
*/
-byte feeling; /* Most recent feeling */
-s16b rating; /* Level's current rating */
-
-bool good_item_flag; /* True if "Artifact" on this level */
-
bool closing_flag; /* Dungeon is closing */
* Dungeon size info
*/
-s16b panel_row_min, panel_row_max;
-s16b panel_col_min, panel_col_max;
-s16b panel_col_prt, panel_row_prt;
+POSITION panel_row_min, panel_row_max;
+POSITION panel_col_min, panel_col_max;
+POSITION panel_col_prt, panel_row_prt;
-/*
- * Player location in dungeon
- */
-int py;
-int px;
/*
* Targetting variables
*/
-s16b target_who;
-s16b target_col;
-s16b target_row;
+IDX target_who;
+POSITION target_col;
+POSITION target_row;
/*
int player_egid;
/*
- * Current player's character name
- */
-char player_name[32];
-
-/*
* Stripped version of "player_name"
*/
char player_base[32];
/*
* Array of grids lit by player lite (see "cave.c")
*/
-s16b lite_n;
-s16b lite_y[LITE_MAX];
-s16b lite_x[LITE_MAX];
+POSITION_IDX lite_n;
+POSITION lite_y[LITE_MAX];
+POSITION lite_x[LITE_MAX];
/*
* Array of grids lit by player lite (see "cave.c")
*/
-s16b mon_lite_n;
-s16b mon_lite_y[MON_LITE_MAX];
-s16b mon_lite_x[MON_LITE_MAX];
+POSITION_IDX mon_lite_n;
+POSITION mon_lite_y[MON_LITE_MAX];
+POSITION mon_lite_x[MON_LITE_MAX];
/*
* Array of grids viewable to the player (see "cave.c")
*/
-s16b view_n;
-byte view_y[VIEW_MAX];
-byte view_x[VIEW_MAX];
+POSITION_IDX view_n;
+POSITION view_y[VIEW_MAX];
+POSITION view_x[VIEW_MAX];
/*
* Array of grids for use by various functions (see "cave.c")
*/
-s16b temp_n;
-byte temp_y[TEMP_MAX];
-byte temp_x[TEMP_MAX];
+POSITION_IDX temp_n;
+POSITION temp_y[TEMP_MAX];
+POSITION temp_x[TEMP_MAX];
/*
* Array of grids for delayed visual updating (see "cave.c")
*/
-s16b redraw_n = 0;
-byte redraw_y[REDRAW_MAX];
-byte redraw_x[REDRAW_MAX];
+POSITION_IDX redraw_n = 0;
+POSITION redraw_y[REDRAW_MAX];
+POSITION redraw_x[REDRAW_MAX];
/*
/*
* The number of quarks
*/
-s16b quark__num;
+STR_OFFSET quark__num;
/*
* The pointers to the quarks [QUARK_MAX]
/*
* The next "free" index to use
*/
-u16b message__next;
+u32b message__next;
/*
* The index of the oldest message (none yet)
*/
-u16b message__last;
+u32b message__last;
/*
* The next "free" offset
*/
-u16b message__head;
+u32b message__head;
/*
* The offset to the oldest used char (none yet)
*/
-u16b message__tail;
+u32b message__tail;
/*
* The array of offsets, by index [MESSAGE_MAX]
*/
-u16b *message__ptr;
+u32b *message__ptr;
/*
* The array of chars, by offset [MESSAGE_BUF]
/*
* Standard window names
*/
-char angband_term_name[8][16] =
+const char angband_term_name[8][16] =
{
"Hengband",
"Term-1",
/*
* Standard sound names
*/
-char angband_sound_name[SOUND_MAX][16] =
+const cptr angband_sound_name[SOUND_MAX] =
{
- "",
+ "dummy",
"hit",
"miss",
"flee",
"show",
"unused",
"explode",
+ "glass",
+ "reflect",
+};
+
+/*
+ * Standard music names
+ */
+const cptr angband_music_basic_name[MUSIC_BASIC_MAX] =
+{
+ "default",
+ "gameover",
+ "exit",
+ "town",
+ "field1",
+ "field2",
+ "field3",
+ "dun_low",
+ "dun_med",
+ "dun_high",
+ "feel1",
+ "feel2",
+ "winner",
+ "build",
+ "wild",
+ "quest",
+ "arena",
+ "battle",
+ "quest_clear",
+ "final_quest_clear",
+ "ambush",
};
*/
monster_type *m_list;
+/*
+ * The array to process dungeon monsters [max_m_idx]
+ */
+s16b *mproc_list[MAX_MTIMED];
+s16b mproc_max[MAX_MTIMED]; /* Number of monsters to be processed */
+
/*
* Maximum number of towns
* Specify attr/char pairs for visual special effects
* Be sure to use "index & 0x7F" to avoid illegal access
*/
-byte misc_to_attr[256];
+TERM_COLOR misc_to_attr[256];
char misc_to_char[256];
* Specify attr/char pairs for inventory items (by tval)
* Be sure to use "index & 0x7F" to avoid illegal access
*/
-byte tval_to_attr[128];
+TERM_COLOR tval_to_attr[128];
char tval_to_char[128];
* Pointer to the player tables
* (sex, race, class, magic)
*/
-player_sex *sp_ptr;
-player_race *rp_ptr;
-player_class *cp_ptr;
-player_seikaku *ap_ptr;
-player_magic *mp_ptr;
+const player_sex *sp_ptr;
+const player_race *rp_ptr;
+const player_class *cp_ptr;
+const player_seikaku *ap_ptr;
+const player_magic *mp_ptr;
/*
*/
feature_type *f_info;
char *f_name;
+char *f_tag;
/*
* The object kind arrays
* Here is a "pseudo-hook" used during calls to "get_item()" and
* "show_inven()" and "show_equip()", and the choice window routines.
*/
-byte item_tester_tval;
+OBJECT_TYPE_VALUE item_tester_tval;
/*
/*
* Hack -- function hook to restrict "get_obj_num_prep()" function
*/
-bool (*get_obj_num_hook)(int k_idx);
+bool (*get_obj_num_hook)(KIND_OBJECT_IDX k_idx);
/* Hack, monk armour */
bool monk_armour_aux;
bool monk_notify_aux;
-#ifdef ALLOW_EASY_OPEN /* TNB */
-bool easy_open;
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
-#ifdef ALLOW_EASY_DISARM /* TNB */
-bool easy_disarm;
-#endif /* ALLOW_EASY_DISARM -- TNB */
-
-#ifdef ALLOW_EASY_FLOOR /* TNB */
-bool easy_floor;
-#endif /* ALLOW_EASY_FLOOR -- TNB */
-
-bool use_command;
-bool center_player;
-bool center_running;
-
-/* Auto-destruction options */
-bool destroy_items;
-bool destroy_feeling;
-bool destroy_identify;
-bool leave_worth;
-bool leave_equip;
-bool leave_wanted;
-bool leave_corpse;
-bool leave_junk;
-bool leave_chest;
-bool leave_special;
-
-/* Nikki */
-bool record_fix_art;
-bool record_rand_art;
-bool record_destroy_uniq;
-bool record_fix_quest;
-bool record_rand_quest;
-bool record_maxdeapth;
-bool record_stair;
-bool record_buy;
-bool record_sell;
-bool record_danger;
-bool record_arena;
-bool record_ident;
-bool record_named_pet;
-char record_o_name[MAX_NLEN];
-s32b record_turn;
/*
* Wilderness
/*
* Maximum number of quests
*/
-u16b max_quests;
+QUEST_IDX max_q_idx;
/*
* Maximum number of monsters in r_info.txt
*/
-u16b max_r_idx;
+MONRACE_IDX max_r_idx;
/*
* Maximum number of items in k_info.txt
*/
-u16b max_k_idx;
+KIND_OBJECT_IDX max_k_idx;
/*
* Maximum number of vaults in v_info.txt
*/
-u16b max_v_idx;
+IDX max_v_idx;
/*
* Maximum number of terrain features in f_info.txt
*/
-u16b max_f_idx;
+IDX max_f_idx;
/*
* Maximum number of artifacts in a_info.txt
*/
-u16b max_a_idx;
+ARTIFACT_IDX max_a_idx;
/*
* Maximum number of ego-items in e_info.txt
*/
-u16b max_e_idx;
+IDX max_e_idx;
/*
* Maximum number of dungeon in e_info.txt
*/
-u16b max_d_idx;
+DUNGEON_IDX max_d_idx;
/*
* Maximum number of objects in the level
*/
-u16b max_o_idx;
+OBJECT_IDX max_o_idx;
/*
* Maximum number of monsters in the level
*/
-u16b max_m_idx;
+MONSTER_IDX max_m_idx;
/*
* Maximum size of the wilderness
*/
-s32b max_wild_x;
-s32b max_wild_y;
+POSITION max_wild_x;
+POSITION max_wild_y;
/*
* Quest info
int mutant_regenerate_mod = 100;
-/*
- * Birth options
- */
-bool easy_band;
-bool vanilla_town; /* Use "vanilla" town without set quests */
-bool ironman_shops; /* Stores are permanently closed */
-bool ironman_small_levels; /* Always create unusually small dungeon levels */
-bool ironman_downward; /* Don't allow climbing upwards/recalling */
-bool ironman_autoscum; /* Permanently enable the autoscummer */
-bool lite_town; /* Use "lite" town without wilderness */
-bool ironman_empty_levels; /* Always create empty 'arena' levels */
-bool ironman_rooms; /* Always generate very unusual rooms */
-bool ironman_nightmare; /* Play the game in Nightmare mode */
-bool left_hander;
-bool preserve_mode;
-bool autoroller;
-bool autochara;
-
-
bool can_save = FALSE; /* Game can be saved */
s16b world_monster;
int cap_mon;
int cap_mspeed;
-int cap_hp;
-int cap_maxhp;
-u16b cap_nickname;
+HIT_POINT cap_hp;
+HIT_POINT cap_maxhp;
+STR_OFFSET cap_nickname;
-s16b battle_mon[4];
+MONRACE_IDX battle_mon[4];
int sel_monster;
int battle_odds;
-int kakekin;
+PRICE kakekin;
u32b mon_odds[4];
-int pet_t_m_idx;
-int riding_t_m_idx;
+MONSTER_IDX pet_t_m_idx;
+MONSTER_IDX riding_t_m_idx;
-s16b kubi_r_idx[MAX_KUBI];
-s16b today_mon;
-
-monster_type party_mon[MAX_PARTY_MON];
+MONSTER_IDX kubi_r_idx[MAX_KUBI];
+MONSTER_IDX today_mon;
bool write_level;
cptr screen_dump = NULL;
+/*** Terrain feature variables ***/
+
+/* Nothing */
+FEAT_IDX feat_none;
+
+/* Floor */
+FEAT_IDX feat_floor;
+
+/* Objects */
+FEAT_IDX feat_glyph;
+FEAT_IDX feat_explosive_rune;
+FEAT_IDX feat_mirror;
+
+/* Doors */
+door_type feat_door[MAX_DOOR_TYPES];
+
+/* Stairs */
+FEAT_IDX feat_up_stair;
+FEAT_IDX feat_down_stair;
+FEAT_IDX feat_entrance;
+
+/* Special traps */
+FEAT_IDX feat_trap_open;
+FEAT_IDX feat_trap_armageddon;
+FEAT_IDX feat_trap_piranha;
+
+/* Rubble */
+FEAT_IDX feat_rubble;
+
+/* Seams */
+FEAT_IDX feat_magma_vein;
+FEAT_IDX feat_quartz_vein;
+
+/* Walls */
+FEAT_IDX feat_granite;
+FEAT_IDX feat_permanent;
+
+/* Glass floor */
+FEAT_IDX feat_glass_floor;
+
+/* Glass walls */
+FEAT_IDX feat_glass_wall;
+FEAT_IDX feat_permanent_glass_wall;
+
+/* Pattern */
+FEAT_IDX feat_pattern_start;
+FEAT_IDX feat_pattern_1;
+FEAT_IDX feat_pattern_2;
+FEAT_IDX feat_pattern_3;
+FEAT_IDX feat_pattern_4;
+FEAT_IDX feat_pattern_end;
+FEAT_IDX feat_pattern_old;
+FEAT_IDX feat_pattern_exit;
+FEAT_IDX feat_pattern_corrupted;
+
+/* Various */
+FEAT_IDX feat_black_market;
+FEAT_IDX feat_town;
+
+/* Terrains */
+FEAT_IDX feat_deep_water;
+FEAT_IDX feat_shallow_water;
+FEAT_IDX feat_deep_lava;
+FEAT_IDX feat_shallow_lava;
+FEAT_IDX feat_dirt;
+FEAT_IDX feat_grass;
+FEAT_IDX feat_flower;
+FEAT_IDX feat_brake;
+FEAT_IDX feat_tree;
+FEAT_IDX feat_mountain;
+FEAT_IDX feat_swamp;
+
+/* Unknown grid (not detected) */
+FEAT_IDX feat_undetected;
+
/*
* Which dungeon ?
*/
-byte dungeon_type;
-s16b *max_dlv;
+DUNGEON_IDX dungeon_type;
+DEPTH *max_dlv;
-byte feat_wall_outer;
-byte feat_wall_inner;
-byte feat_wall_solid;
-byte floor_type[100], fill_type[100];
+FEAT_IDX feat_wall_outer;
+FEAT_IDX feat_wall_inner;
+FEAT_IDX feat_wall_solid;
+FEAT_IDX floor_type[100], fill_type[100];
bool now_damaged;
-s16b now_message;
+COMMAND_CODE now_message;
bool use_menu;
#ifdef CHUUKEI
char *server_name;
int server_port;
#endif
+
+/* for movie */
+bool browsing_movie;
+
+#ifdef TRAVEL
+/* for travel */
+travel_type travel;
+#endif
+
+/* for snipers */
+int snipe_type = SP_NONE;
+bool reset_concent = FALSE; /* Concentration reset flag */
+bool is_fired = FALSE;
+