OSDN Git Service

Thrown torch's dice is changed
[hengband/hengband.git] / src / variable.c
index 2af1b74..b9b3f37 100644 (file)
@@ -16,7 +16,7 @@
 /*
  * Hack -- Link a copyright message into the executable
  */
-cptr copyright[5] =
+const cptr copyright[5] =
 {
        "Copyright (c) 1989 James E. Wilson, Robert A. Keoneke",
        "",
@@ -88,6 +88,8 @@ bool character_saved;         /* The character was just saved to a savefile */
 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 */
 
@@ -120,8 +122,10 @@ s16b monster_level;                /* Current monster creation level */
 s16b base_level;        /* Base dungeon level */
 
 s32b turn;                             /* Current game turn */
+s32b turn_limit;               /* Limit of game turn */
 s32b dungeon_turn;                     /* Game turn in dungeon */
-s32b old_turn;                 /* Turn when level began (feelings) */
+s32b dungeon_turn_limit;       /* Limit of game turn in dungeon */
+s32b old_turn;                 /* Turn when level began */
 s32b old_battle;
 
 bool use_sound;                        /* The "sound" mode is enabled */
@@ -134,6 +138,7 @@ bool inkey_base;            /* See the "inkey()" function */
 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 */
 
@@ -164,7 +169,6 @@ 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;
@@ -216,6 +220,9 @@ 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 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 view_reduce_view; /* Reduce view-radius in town */
 bool fresh_before;     /* Flush output while continuous command */
 bool fresh_after;      /* Flush output after monster's move */
@@ -239,6 +246,7 @@ bool compress_savefile;     /* Compress messages in savefiles */
 bool abbrev_extra;     /* Describe obj's extra resistances by abbreviation */
 bool abbrev_all;       /* Describe obj's all resistances by abbreviation */
 bool exp_need; /* Show the experience needed for next level */
+bool ignore_unview;    /* Ignore whenever any monster does */
 
 
 /*** Game-Play Options ***/
@@ -246,9 +254,6 @@ bool exp_need;      /* Show the experience needed for next level */
 bool stack_force_notes;        /* Merge inscriptions when stacking */
 bool stack_force_costs;        /* Merge discounts when stacking */
 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 small_levels;     /* Allow unusually small dungeon levels */
 bool always_small_levels;      /* Always create unusually small dungeon levels */
 bool empty_levels;     /* Allow empty 'arena' levels */
@@ -260,7 +265,6 @@ bool send_score;    /* Send score dump to the world score server */
 #endif
 
 bool allow_debug_opts; /* Allow use of debug/cheat options */
-bool autoload_pref_files;
 
 
 /*** Disturbance Options ***/
@@ -325,7 +329,7 @@ bool record_rand_art;       /* Record random artifacts */
 bool record_destroy_uniq;      /* Record when destroy unique monster */
 bool record_fix_quest; /* Record fixed quests */
 bool record_rand_quest;        /* Record random quests */
-bool record_maxdeapth; /* Record movements to deepest level */
+bool record_maxdepth;  /* Record movements to deepest level */
 bool record_stair;     /* Record recall and stair movements */
 bool record_buy;       /* Record purchased items */
 bool record_sell;      /* Record sold items */
@@ -362,11 +366,6 @@ 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 */
 
 
@@ -544,7 +543,7 @@ term *angband_term[8];
 /*
  * Standard window names
  */
-char angband_term_name[8][16] =
+const char angband_term_name[8][16] =
 {
        "Hengband",
        "Term-1",
@@ -584,9 +583,9 @@ byte angband_color_table[256][4] =
 /*
  * Standard sound names
  */
-char angband_sound_name[SOUND_MAX][16] =
+const cptr angband_sound_name[SOUND_MAX] =
 {
-       "",
+       "dummy",
        "hit",
        "miss",
        "flee",
@@ -651,6 +650,7 @@ char angband_sound_name[SOUND_MAX][16] =
        "show",
        "unused",
        "explode",
+       "glass",
 };
 
 
@@ -691,6 +691,12 @@ object_type *o_list;
  */
 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
@@ -770,11 +776,11 @@ player_type *p_ptr = &p_body;
  * 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;
 
 
 /*
@@ -1034,7 +1040,7 @@ bool record_rand_art;
 bool record_destroy_uniq;
 bool record_fix_quest;
 bool record_rand_quest;
-bool record_maxdeapth;
+bool record_maxdepth;
 bool record_stair;
 bool record_buy;
 bool record_sell;
@@ -1169,8 +1175,6 @@ int riding_t_m_idx;
 s16b kubi_r_idx[MAX_KUBI];
 s16b today_mon;
 
-monster_type party_mon[MAX_PARTY_MON];
-
 bool write_level;
 
 u32b playtime;
@@ -1188,6 +1192,81 @@ bool generate_encounter;
 
 cptr screen_dump = NULL;
 
+/*** Terrain feature variables ***/
+
+/* Nothing */
+s16b feat_none;
+
+/* Floor */
+s16b feat_floor;
+
+/* Objects */
+s16b feat_glyph;
+s16b feat_explosive_rune;
+s16b feat_mirror;
+
+/* Doors */
+door_type feat_door[MAX_DOOR_TYPES];
+
+/* Stairs */
+s16b feat_up_stair;
+s16b feat_down_stair;
+s16b feat_entrance;
+
+/* Special traps */
+s16b feat_trap_open;
+s16b feat_trap_armageddon;
+s16b feat_trap_piranha;
+
+/* Rubble */
+s16b feat_rubble;
+
+/* Seams */
+s16b feat_magma_vein;
+s16b feat_quartz_vein;
+
+/* Walls */
+s16b feat_granite;
+s16b feat_permanent;
+
+/* Glass floor */
+s16b feat_glass_floor;
+
+/* Glass walls */
+s16b feat_glass_wall;
+s16b feat_permanent_glass_wall;
+
+/* Pattern */
+s16b feat_pattern_start;
+s16b feat_pattern_1;
+s16b feat_pattern_2;
+s16b feat_pattern_3;
+s16b feat_pattern_4;
+s16b feat_pattern_end;
+s16b feat_pattern_old;
+s16b feat_pattern_exit;
+s16b feat_pattern_corrupted;
+
+/* Various */
+s16b feat_black_market;
+s16b feat_town;
+
+/* Terrains */
+s16b feat_deep_water;
+s16b feat_shallow_water;
+s16b feat_deep_lava;
+s16b feat_shallow_lava;
+s16b feat_dirt;
+s16b feat_grass;
+s16b feat_flower;
+s16b feat_brake;
+s16b feat_tree;
+s16b feat_mountain;
+s16b feat_swamp;
+
+/* Unknown grid (not detected) */
+s16b feat_undetected;
+
 /*
  * Which dungeon ?
  */
@@ -1209,3 +1288,16 @@ bool chuukei_client;
 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;