#ifndef WH_VARS_H_f9fa570a_ #define WH_VARS_H_f9fa570a_ /* * Externs for global variables. */ #include "structs.h" /* * The dungeon itself. Levels is the actual array; levels is offset * from it so that it can be subscripted by level numbers, some of * which are negative. */ extern LEVEL Levels[N_LEVELS]; #define levels (&Levels[LEVEL_OFFSET]) /* * The entrance, the place where the player is placed at the beginning * of the game. Also used for flood-fills a few places. */ extern LOC *entrance; /* * The order of the elemental planes from the player's POV. The [0] * element is closest to the dungeon. The values stored here are * level numbers L_EARTH, L_AIR, L_FIRE, and L_WATER. */ extern int elem_order[L__NELEM]; /* * The inverse of elem_order[]: indexed by level number, returns * subscript in elem_order[]. */ #if L__FIRSTELEM+L__NELEM != 0 // See structs.h. #error "elem_order_i assumes L__FIRSTELEM == - L__NELEM" #endif extern int elem_order_i_[L__NELEM]; #define elem_order_i (&elem_order_i_[-L__FIRSTELEM]) /* * The array of all monster types. */ extern MONTYPE montypes[]; /* * The array of all object types. */ extern OBJTYPE objtypes[]; /* * The player-avatar monster. */ extern MONST *you; /* * The number of times "you" has been attacked. This is used to, for * example, handle cursed armour. */ extern unsigned int you_were_attacked; /* * The number of times "you" has attacked. This is used to, for * example, handle cursed weapons. */ extern unsigned int you_attacked; /* * Offsets between level coordinates and display coordinates (dispo?) * or between level coordinates and map coordinates (mapo?). See the * comment on them in display.c for more. */ extern int dispox; extern int dispoy; extern int mapox; extern int mapoy; /* * The map currently in use, or nil if none. */ extern OBJ *map; /* * The current time. This is in-game time, not real-world time. */ extern TIME curtime; /* * The chain of all monsters, and the count of monsters on it. */ extern MONST *mchain; extern int mchain_count; /* * The location of the observer used by seecell(). */ extern LOC *seecell_loc; /* * The eight possible directions, represented as delta-x and delta-y. */ extern const int delta[8][2]; /* * Boolean indicating whether Iuz is currently mad at you. */ extern int Z_mad; /* * The locations of the various gates. */ extern LOC *gate_dungeon; extern LOC *gate_uworld_dungeon; extern LOC *gate_uworld_hell; extern LOC *gate_hell; extern LOC *gate_elem_dungeon_[L__NELEM]; extern LOC *gate_elem_uworld_[L__NELEM]; #if L__FIRSTELEM+L__NELEM != 0 // See structs.h. #error "gate_elem_* paradigm assumes L__FIRSTELEM == - L__NELEM" #endif #define gate_elem_dungeon (&gate_elem_dungeon_[-L__FIRSTELEM]) #define gate_elem_uworld (&gate_elem_uworld_[-L__FIRSTELEM]) #endif