forked from muspellsson/omega-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
glob.h
301 lines (209 loc) · 6.6 KB
/
glob.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
/* omega copyright (c) 1987,1988,1989 by Laurence Raphael Brothers */
/* this file contains extern declarations of global variables used
throughout the program */
/* it includes the other header files, so every program module
(except o.c) can just include this file. */
/* glob.h */
#ifndef INCLUDED_GLOB_H
#define INCLUDED_GLOB_H
#include "defs.h"
#include "extern.h"
#ifdef DEBUG /* Added by DG, naturally. */
/* Debug log file */
extern FILE *DG_debug_log;
extern int DG_debug_flag;
#endif
extern char SaveFileName[80];
/* stash save-file away; for emergency saves, default for planned saves */
/* This string holds the path to the library files */
extern char *Omegalib;
/* This string holds the path to the volatile files */
extern char *Omegastate;
/* one of each monster */
extern struct monster Monsters[NUMMONSTERS];
/* one of each spell */
extern struct spell Spells[NUMSPELLS+1];
/* one of each item */
extern struct object Objects[TOTALITEMS];
/* locations of city sites [0] - found, [1] - x, [2] - y */
extern int CitySiteList[NUMCITYSITES][3];
extern struct player Player;
/* the player */
/*extern int LENGTH;*/
/* level y dimension */
/*extern int WIDTH;*/
/* level x dimension */
extern long GameStatus;
/* Game Status bit vector */
extern int ScreenLength;
extern int ScreenWidth;
/* How large is level window */
extern struct terrain Country[COUNTRY_WIDTH][COUNTRY_LENGTH];
/* The countryside */
#ifdef MSDOS_SUPPORTED_ANTIQUE
extern struct level TheLevel;
#endif
extern struct level *City;
/* The city of Rampart */
extern struct level *TempLevel;
/* Place holder */
extern struct level *Dungeon;
/* Pointer to current Dungeon */
extern struct level *Level;
/* Pointer to current Level */
extern int Current_Dungeon;
/* What is Dungeon now (an E_ constant) */
extern int Villagenum;
/* Current Village number */
extern int ScreenOffset;
/* Offset of displayed screen to level */
extern int ScreenXOffset;
/* Offset of displayed screen to level */
extern int MaxDungeonLevels;
/*Deepest level allowed in dungeon */
extern int Current_Environment;
/* Which environment are we in (an E_ constant) */
extern int Last_Environment;
/* Which environment were we in last (an E_ constant) */
extern int Dirs[2][9];
/* 9 xy directions */
extern char Cmd;
/* last player command */
extern int Command_Duration;
/* how long does current command take */
extern struct monster *Arena_Monster;
/* Opponent in arena */
extern int Arena_Opponent;
/* case label of opponent in l_arena()*/
extern int Arena_Victory;
/* did player win in arena? */
extern int Imprisonment;
/* amount of time spent in jail */
extern int Precipitation;
/* Hours of rain, snow, etc */
extern int Phase;
/* Phase of the moon */
extern int Lunarity;
/* How player is affected by moon */
extern int Date;
/* day of the year */
extern int Pawndate;
/* Pawn Shop item generation date */
extern pob Pawnitems[PAWNITEMS];
/* items in pawn shop */
extern int ViewHour;
/* crystal ball use marker */
extern int ViewDay;
/* crystal ball use marker */
extern int ZapHour;
/* staff of enchantment use marker */
extern int ZapDay;
/* staff of enchantment use marker */
extern int HelmHour;
/* helm of teleportation use marker*/
extern int HelmDay;
/* helm of teleportation use marker*/
extern int SymbolUseHour;
/* holy symbol use marker */
extern int SymbolUseDay;
/* holy symbol use marker */
extern int Constriction;
/* Dragonlord Attack State */
extern int Blessing;
/* Altar Blessing State */
extern int LastDay;
/* DPW date of dole */
extern int RitualHour;
/* last use of ritual magic */
extern int RitualRoom;
/* last room use of ritual magic */
extern int Lawstone;
/* magic stone counter */
extern int Chaostone;
/* magic stone counter */
extern int Mindstone;
/* magic stone counter */
extern int Searchnum;
/* number of times to search on 's' */
extern int Verbosity;
/* verbosity level */
extern int Behavior;
/* NPC behavior, if entered */
extern char Seed;
/* random seed */
extern long Time;
/* turn number */
extern int Tick;
/* current second in minute; action coordinator */
extern char Stringbuffer[STRING_BUFFER_SIZE][80];
/* the last printed strings */
extern long Gymcredit;
/* credit at rampart gym */
extern int Spellsleft;
/* research allowance at college */
extern int SalaryAmount;
/* legion salary */
extern int SalaryAccount;
/* account number to which legion salary is paid */
extern int Studiesleft;
/* study allowance at Monastery */
extern int StarGemUse;
/* last date of star gem use */
extern int HiMagicUse;
/* last date of high magic use */
extern int HiMagic;
/* current level for l_throne */
#ifdef NEW_BANK
extern bank_account *bank;
/* ptr to a list of bank accounts */
#else
extern long Balance;
/* bank account */
#endif
extern long FixedPoints;
/* points are frozen after adepthood*/
extern int LastCountryLocX;
/* previous position in countryside */
extern int LastCountryLocY;
/* previous position in countryside */
extern int LastTownLocX;
/* previous position in village or city */
extern int LastTownLocY;
/* previous position in village or city */
extern char Password[64];
/* autoteller password */
extern pol Condoitems;
/* items in condo */
extern pol Bagitems;
/* items in bag of holding artifact */
extern char Str1[STRING_LEN],Str2[STRING_LEN],Str3[STRING_LEN],Str4[STRING_LEN];
/* Some string space, random uses */
/* high score names, levels, behavior */
extern int Shadowlordbehavior,Archmagebehavior,Primebehavior,Justiciarbehavior;
extern int Commandantbehavior,Chaoslordbehavior,Lawlordbehavior;
extern int Championbehavior,Priestbehavior[7],Hibehavior,Dukebehavior;
extern int Grandmasterbehavior;
extern char Shadowlord[80],Archmage[80],Prime[80],Commandant[80],Duke[80];
extern char Champion[80],Priest[7][80],Hiscorer[80],Hidescrip[80];
extern char Chaoslord[80],Lawlord[80],Justiciar[80],Grandmaster[80];
extern int Shadowlordlevel,Archmagelevel,Primelevel,Commandantlevel,Dukelevel;
extern int Championlevel,Priestlevel[7],Hilevel,Justiciarlevel;
extern int Grandmasterlevel;
extern long Hiscore;
extern int Chaoslordlevel,Lawlordlevel,Chaos,Law;
/* New globals which used to be statics */
extern int twiddle;
extern int saved;
extern int onewithchaos;
extern int club_hinthour;
extern int winnings;
extern int tavern_hinthour;
extern int scroll_ids[30];
extern int potion_ids[30];
extern int stick_ids[30];
extern int ring_ids[30];
extern int cloak_ids[30];
extern int boot_ids[30];
extern int deepest[E_MAX + 1];
extern int level_seed[E_MAX + 1];
#endif /* INCLUDED_GLOB_H */