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