Go to the documentation of this file.
24 #define MAGIC_MAP_SIZE 50
25 #define MAGIC_MAP_HALF MAGIC_MAP_SIZE/2
40 #define MAP_LAYER_FLOOR 0
41 #define MAP_LAYER_NO_PICK1 1
42 #define MAP_LAYER_NO_PICK2 2
43 #define MAP_LAYER_ITEM1 3
44 #define MAP_LAYER_ITEM2 4
45 #define MAP_LAYER_ITEM3 5
46 #define MAP_LAYER_LIVING1 6
47 #define MAP_LAYER_LIVING2 7
48 #define MAP_LAYER_FLY1 8
49 #define MAP_LAYER_FLY2 9
57 #define MAP_TYPE_LEGACY 1
58 #define MAP_TYPE_DEFAULT 2
59 #define MAP_TYPE_CHOICE 3
62 #define MAP_WHEN_RESET(m) ((m)->reset_time)
64 #define MAP_RESET_TIMEOUT(m) ((m)->reset_timeout)
65 #define MAP_DIFFICULTY(m) ((m)->difficulty)
66 #define MAP_TIMEOUT(m) ((m)->timeout)
67 #define MAP_SWAP_TIME(m) ((m)->swap_time)
68 #define MAP_OUTDOORS(m) ((m)->outdoor)
75 #define MAP_DARKNESS(m) (m)->darkness
78 #define MAP_WIDTH(m) (m)->width
80 #define MAP_HEIGHT(m) (m)->height
82 #define MAP_SIZE(m) map_size(m)
85 #define MAP_ENTER_X(m) (m)->enter_x
87 #define MAP_ENTER_Y(m) (m)->enter_y
89 #define MAP_NOSMOOTH(m) (m)->nosmooth
97 #define MAP_PLAYER_UNIQUE 0x2
98 #define MAP_NO_DIFFICULTY 0x4
100 #define MAP_OVERLAY 0x10
111 #define SAVE_FLAG_SAVE_UNPAID 1
112 #define SAVE_FLAG_NO_REMOVE 2
121 #define SAVE_MODE_NORMAL 0
122 #define SAVE_MODE_INPLACE 1
123 #define SAVE_MODE_OVERLAY 2
131 #define MAP_IN_MEMORY 1
132 #define MAP_SWAPPED 2
133 #define MAP_LOADING 3
144 #define SAVE_ERROR_OK 0
145 #define SAVE_ERROR_RCREATION -1
146 #define SAVE_ERROR_UCREATION -2
147 #define SAVE_ERROR_WRITE -3
148 #define SAVE_ERROR_NO_PATH -4
149 #define SAVE_ERROR_URENAME -5
150 #define SAVE_ERROR_CLOSE -6
152 #define SAVE_ERROR_NOT_IN_MEMORY -10
153 #define SAVE_ERROR_PLAYER -11
162 #define GET_MAP_FLAGS(M, X, Y) ((M)->spaces[(X)+(M)->width*(Y)].flags)
164 #define SET_MAP_FLAGS(M, X, Y, C) ((M)->spaces[(X)+(M)->width*(Y)].flags = C)
166 #define GET_MAP_LIGHT(M, X, Y) ((M)->spaces[(X)+(M)->width*(Y)].light)
168 #define SET_MAP_LIGHT(M, X, Y, L) ((M)->spaces[(X)+(M)->width*(Y)].light = L)
169 #define GET_MAP_PLAYER(M, X, Y) ((M)->spaces[(X)+(M)->width*(Y)].pl)
170 #define SET_MAP_PLAYER(M, X, Y, C) ((M)->spaces[(X)+(M)->width*(Y)].pl = C)
173 #define GET_MAP_OB(M, X, Y) ((M)->spaces[(X)+(M)->width*(Y)].bottom)
175 #define GET_MAP_TOP(M, X, Y) ((M)->spaces[(X)+(M)->width*(Y)].top)
178 #define SET_MAP_OB(M, X, Y, tmp) ((M)->spaces[(X)+(M)->width*(Y)].bottom = (tmp))
180 #define SET_MAP_TOP(M, X, Y, tmp) ((M)->spaces[(X)+(M)->width*(Y)].top = (tmp))
183 #define SET_MAP_FACE_OBJ(M, X, Y, C, L) ((M)->spaces[(X)+(M)->width*(Y)].faces_obj[L] = C)
185 #define GET_MAP_FACE_OBJ(M, X, Y, L) ((M)->spaces[(X)+(M)->width*(Y)].faces_obj[L])
190 #define GET_MAP_FACE_OBJS(M, X, Y) ((M)->spaces[(X)+(M)->width*(Y)].faces_obj)
193 #define GET_MAP_MOVE_BLOCK(M, X, Y) ((M)->spaces[(X)+(M)->width*(Y)].move_block)
195 #define SET_MAP_MOVE_BLOCK(M, X, Y, C) ((M)->spaces[(X)+(M)->width*(Y)].move_block = C)
198 #define GET_MAP_MOVE_SLOW(M, X, Y) ((M)->spaces[(X)+(M)->width*(Y)].move_slow)
200 #define SET_MAP_MOVE_SLOW(M, X, Y, C) ((M)->spaces[(X)+(M)->width*(Y)].move_slow = C)
203 #define GET_MAP_MOVE_ON(M, X, Y) ((M)->spaces[(X)+(M)->width*(Y)].move_on)
205 #define SET_MAP_MOVE_ON(M, X, Y, C) ((M)->spaces[(X)+(M)->width*(Y)].move_on = C)
208 #define GET_MAP_MOVE_OFF(M, X, Y) ((M)->spaces[(X)+(M)->width*(Y)].move_off)
210 #define SET_MAP_MOVE_OFF(M, X, Y, C) ((M)->spaces[(X)+(M)->width*(Y)].move_off = C)
218 #define OUT_OF_REAL_MAP(M, X, Y) ((X) < 0 || (Y) < 0 || (X) >= (M)->width || (Y) >= (M)->height)
227 #define P_BLOCKSVIEW 0x01
228 #define P_NO_MAGIC 0x02
236 #define AB_NO_PASS 0x04
237 #define P_PLAYER 0x08
238 #define P_IS_ALIVE 0x10
239 #define P_NO_CLERIC 0x20
240 #define P_NEED_UPDATE 0x40
241 #define P_NO_ERROR 0x80
250 #define P_OUT_OF_MAP 0x100
251 #define P_NEW_MAP 0x200
struct shopitem shopitems
const char *const map_layer_name[MAP_LAYERS]
struct mapdef * tile_map[4]
static event_registration m
struct shopitem * shopitems
const typedef char * sstring
struct regiondef * parent
struct rv_vector rv_vector
uint32_t map_size(mapstruct *m)
object * faces_obj[MAP_LAYERS]
struct regiondef * region