00001 // struct_world.h 00004 00005 #ifndef STRUCT_WORLD_H 00006 #define STRUCT_WORLD_H 00007 00017 struct tile 00018 { 00019 uchar type; 00020 uchar flags; 00021 ushort special; 00022 }; 00023 TYPEDEF(struct tile tile) 00024 00025 00026 00027 00028 00029 00030 #define TFLAG_EXPLORED 1 00032 #define TFLAG_HIDETRAP 2 00033 00034 #define TFLAG_OCCUPIED 4 00035 00036 #define TFLAG_LIT 8 00037 00038 #define TFLAG_INTRINSIC_LIGHT 16 00039 00040 #define TFLAG_MUTABLE 32 00041 00042 #define TFLAG_TEMP 64 00043 00044 #define TFLAG_ITEM 128 00045 00046 00047 #define NUM_FOUNTAIN_TYPES 7 00048 00049 #ifdef DATA_FILE 00050 # define MAPSIZE_X (get_w()->mapsize_x) 00051 # define MAPSIZE_Y (get_w()->mapsize_y) 00052 #else 00053 # define MAPSIZE_X (w->mapsize_x) 00054 # define MAPSIZE_Y (w->mapsize_y) 00055 #endif 00056 00067 struct world 00068 { 00069 struct world_descriptor desc; 00070 00071 #ifdef IS_CALCULATOR 00072 # ifdef DATA_FILE 00073 ushort padding; 00074 # else 00075 HANDLE constfile; 00076 # endif 00077 #endif // IS_CALCULATOR 00078 char* constfileoffset; 00079 00081 DATA_WRAP_PTR(const void** dll_functions;) 00082 00083 DATA_WRAP_PTR(const struct export_functions *dll_interface;) 00084 00085 00086 00087 00088 struct tiledesc* tiledescs; 00089 struct filelink current_map_link; 00090 CONST struct mapdesc* current_map; 00091 CONST struct filelink* itemdescs; 00092 CONST struct spelldesc* spelldescs; 00093 CONST struct shopdesc* shopdescs; 00094 CONST struct classdesc* playerclasses; 00095 CONST struct filelink* shuffledata; 00096 uint* shuffletranslation; 00097 00098 ushort mapsize_x; 00099 ushort mapsize_y; 00100 struct tile **t; 00101 00103 struct itemsinfo items; 00104 00106 struct monster m[MONSTERS_MAX]; 00107 struct player plr; 00108 00115 struct monster *wandering_monsters; 00117 ushort wandering_monsters_num; 00118 00119 ushort pad; 00120 00126 ulong *itemids; 00128 ulong time; 00130 uchar level; 00132 uchar maxlevel; 00135 uchar messagevis; 00140 uchar interrupt; 00141 00142 uchar options[NUM_OPTIONS]; 00143 00145 uchar game_flags[64]; 00146 00147 #ifdef ALLOWDEBUG 00148 00149 uchar debug_mode; 00150 #endif 00151 }; 00152 TYPEDEF(struct world world) 00153 00154 #endif
1.3.6