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_OUTDOORS(m) ((m)->outdoor)
70 #define MAP_DARKNESS(m) (m)->darkness
73 #define MAP_WIDTH(m) (m)->width
75 #define MAP_HEIGHT(m) (m)->height
77 #define MAP_SIZE(m) map_size(m)
80 #define MAP_ENTER_X(m) (m)->enter_x
82 #define MAP_ENTER_Y(m) (m)->enter_y
84 #define MAP_NOSMOOTH(m) (m)->nosmooth
92 #define MAP_PLAYER_UNIQUE 0x2
93 #define MAP_NO_DIFFICULTY 0x4
95 #define MAP_OVERLAY 0x10
106 #define SAVE_FLAG_SAVE_UNPAID 1
107 #define SAVE_FLAG_NO_REMOVE 2
116 #define SAVE_MODE_NORMAL 0
117 #define SAVE_MODE_INPLACE 1
118 #define SAVE_MODE_OVERLAY 2
126 #define MAP_IN_MEMORY 1
127 #define MAP_SWAPPED 2
128 #define MAP_LOADING 3
139 #define SAVE_ERROR_OK 0
140 #define SAVE_ERROR_RCREATION -1
141 #define SAVE_ERROR_UCREATION -2
142 #define SAVE_ERROR_WRITE -3
143 #define SAVE_ERROR_NO_PATH -4
144 #define SAVE_ERROR_URENAME -5
145 #define SAVE_ERROR_CLOSE -6
147 #define SAVE_ERROR_NOT_IN_MEMORY -10
148 #define SAVE_ERROR_PLAYER -11
157 #define GET_MAP_FLAGS(M, X, Y) (map_space(M, X, Y)->flags)
159 #define SET_MAP_FLAGS(M, X, Y, C) (map_space(M, X, Y)->flags = C)
162 #define GET_MAP_LIGHT(M, X, Y) (map_space(M, X, Y)->light)
164 #define SET_MAP_LIGHT(M, X, Y, L) (map_space(M, X, Y)->light = L)
166 #define GET_MAP_PLAYER(M, X, Y) (map_space(M, X, Y)->pl)
167 #define SET_MAP_PLAYER(M, X, Y, C) (map_space(M, X, Y)->pl = C)
170 #define GET_MAP_OB(M, X, Y) (map_space(M, X, Y)->bottom)
172 #define GET_MAP_TOP(M, X, Y) (map_space(M, X, Y)->top)
175 #define SET_MAP_OB(M, X, Y, tmp) (map_space(M, X, Y)->bottom = (tmp))
177 #define SET_MAP_TOP(M, X, Y, tmp) (map_space(M, X, Y)->top = (tmp))
180 #define SET_MAP_FACE_OBJ(M, X, Y, C, L) (map_space(M, X, Y)->faces_obj[L] = C)
182 #define GET_MAP_FACE_OBJ(M, X, Y, L) (map_space(M, X, Y)->faces_obj[L])
187 #define GET_MAP_FACE_OBJS(M, X, Y) (map_space(M, X, Y)->faces_obj)
190 #define GET_MAP_MOVE_BLOCK(M, X, Y) (map_space(M, X, Y)->move_block)
192 #define SET_MAP_MOVE_BLOCK(M, X, Y, C) (map_space(M, X, Y)->move_block = C)
195 #define GET_MAP_MOVE_SLOW(M, X, Y) (map_space(M, X, Y)->move_slow)
197 #define SET_MAP_MOVE_SLOW(M, X, Y, C) (map_space(M, X, Y)->move_slow = C)
200 #define GET_MAP_MOVE_ON(M, X, Y) (map_space(M, X, Y)->move_on)
202 #define SET_MAP_MOVE_ON(M, X, Y, C) (map_space(M, X, Y)->move_on = C)
205 #define GET_MAP_MOVE_OFF(M, X, Y) (map_space(M, X, Y)->move_off)
207 #define SET_MAP_MOVE_OFF(M, X, Y, C) (map_space(M, X, Y)->move_off = C)
215 #define OUT_OF_REAL_MAP(M, X, Y) ((X) < 0 || (Y) < 0 || (X) >= (M)->width || (Y) >= (M)->height)
224 #define P_BLOCKSVIEW 0x01
225 #define P_NO_MAGIC 0x02
233 #define AB_NO_PASS 0x04
234 #define P_PLAYER 0x08
235 #define P_IS_ALIVE 0x10
236 #define P_NO_CLERIC 0x20
237 #define P_NEED_UPDATE 0x40
238 #define P_NO_ERROR 0x80
247 #define P_OUT_OF_MAP 0x100
248 #define P_NEW_MAP 0x200
const char *const map_layer_name[MAP_LAYERS]
void map_reset_swap(mapstruct *m)
struct shopitems * shopitems
static event_registration m
MapSpace * map_space(const mapstruct *m, int x, int y)
bool map_path_unique(const char *name)
const typedef char * sstring
uint32_t map_size(mapstruct *m)
object * faces_obj[MAP_LAYERS]