1 /* source/variable.c: Global variables */
2 
3 char *copyright[5] = {
4 "Copyright (c) 1989-94 James E. Wilson, Robert A. Keoneke",
5 "",
6 "This software may be copied and distributed for educational, research, and",
7 "not for profit purposes provided that this copyright and statement are",
8 "included in all such copies."};
9 
10 #include <stdio.h>
11 
12 #include "config.h"
13 #include "constant.h"
14 #include "types.h"
15 
16 /* Save the store's last increment value.  */
17 int16 last_store_inc;
18 
19 /* a horrible hack: needed because compact_monster() can be called from
20    creatures() via summon_monster() and place_monster() */
21 int hack_monptr = -1;
22 
23 int weapon_heavy = FALSE;
24 int pack_heavy = FALSE;
25 vtype died_from;
26 int32 birth_date;
27 
28 vtype savefile;			/* The savefile to use. */
29 
30 int16 total_winner = FALSE;
31 int32 max_score = 0;
32 int character_generated = 0;	/* don't save score until char gen finished */
33 int character_saved = 0;	/* prevents save on kill after save_char() */
34 FILE *highscore_fp;		/* File pointer to high score file */
35 int32u randes_seed;		/* for restarting randes_state */
36 int32u town_seed;		/* for restarting town_seed */
37 int16 cur_height,cur_width;	/* Cur dungeon size    */
38 int16 dun_level = 0;		/* Cur dungeon level   */
39 int16 missile_ctr = 0;		/* Counter for missiles */
40 int msg_flag;			/* Set with first msg  */
41 vtype old_msg[MAX_SAVE_MSG];	/* Last message	      */
42 int16 last_msg = 0;		/* Where last is held */
43 int death = FALSE;		/* True if died	      */
44 int find_flag;			/* Used in MORIA for .(dir) */
45 int free_turn_flag;		/* Used in MORIA, do not move creatures  */
46 int command_count;		/* Gives repetition of commands. -CJS- */
47 int default_dir = FALSE;	/* Use last direction for repeated command */
48 int32 turn = -1;		/* Cur turn of game    */
49 int wizard = FALSE;		/* Wizard flag	      */
50 int to_be_wizard = FALSE;	/* used during startup, when -w option used */
51 int16 panic_save = FALSE;	/* this is true if playing from a panic save */
52 int16 noscore = FALSE;		/* Don't log the game. -CJS- */
53 
54 int rogue_like_commands;	/* set in config.h/main.c */
55 
56 /* options set via the '=' command */
57 int find_cut = TRUE;
58 int find_examine = TRUE;
59 int find_bound = FALSE;
60 int find_prself = FALSE;
61 int prompt_carry_flag = FALSE;
62 int show_weight_flag = FALSE;
63 int highlight_seams = FALSE;
64 int find_ignore_doors = FALSE;
65 int sound_beep_flag = TRUE;
66 int display_counts = TRUE;
67 
68 char doing_inven = FALSE;	/* Track inventory commands. -CJS- */
69 int screen_change = FALSE;	/* Track screen updates for inven_commands. */
70 char last_command = ' ';  	/* Memory of previous command. */
71 
72 /* these used to be in dungeon.c */
73 int new_level_flag;		/* Next level when true	 */
74 int teleport_flag;		/* Handle teleport traps  */
75 int player_light;		/* Player carrying light */
76 int eof_flag = FALSE;		/* Used to signal EOF/HANGUP condition */
77 int light_flag = FALSE;		/* Track if temporary light about player.  */
78 
79 int wait_for_more = FALSE;	/* used when ^C hit during -more- prompt */
80 int closing_flag = FALSE;	/* Used for closing   */
81 
82 /*  Following are calculated from max dungeon sizes		*/
83 int16 max_panel_rows,max_panel_cols;
84 int panel_row,panel_col;
85 int panel_row_min,panel_row_max;
86 int panel_col_min,panel_col_max;
87 int panel_col_prt,panel_row_prt;
88 
89 #ifdef MAC
90 cave_type (*cave)[MAX_WIDTH];
91 #else
92 cave_type cave[MAX_HEIGHT][MAX_WIDTH];
93 #endif
94 
95 #ifdef MAC
96 recall_type *c_recall;
97 #else
98 recall_type c_recall[MAX_CREATURES];	/* Monster memories */
99 #endif
100 
101 /* See atarist/st-stuff.c */
102 #if defined(atarist) && defined(__GNUC__)
103 char extended_file_name[80];
104 #endif
105