… | |
… | |
47 | #define MAGIC_MAP_SIZE 50 |
47 | #define MAGIC_MAP_SIZE 50 |
48 | #define MAGIC_MAP_HALF MAGIC_MAP_SIZE/2 |
48 | #define MAGIC_MAP_HALF MAGIC_MAP_SIZE/2 |
49 | |
49 | |
50 | #define MAP_LAYERS 3 |
50 | #define MAP_LAYERS 3 |
51 | |
51 | |
52 | /* options passed to ready_map_name and load_original_map */ |
|
|
53 | #define MAP_FLUSH 0x01 |
|
|
54 | #define MAP_PLAYER_UNIQUE 0x02 |
|
|
55 | #define MAP_BLOCK 0x04 |
|
|
56 | #define MAP_STYLE 0x08 |
|
|
57 | #define MAP_OVERLAY 0x10 |
|
|
58 | |
|
|
59 | /* Values for in_memory below. Should probably be an enumerations */ |
52 | /* Values for in_memory below. Should probably be an enumerations */ |
60 | enum { |
53 | enum { |
61 | MAP_IN_MEMORY, |
54 | MAP_IN_MEMORY, |
62 | MAP_SWAPPED, |
55 | MAP_SWAPPED, |
63 | MAP_LOADING, |
56 | MAP_LOADING, |
… | |
… | |
227 | struct mapspace *spaces; /* Array of spaces on this map */ |
220 | struct mapspace *spaces; /* Array of spaces on this map */ |
228 | |
221 | |
229 | tstamp ACC (RW, last_access); /* last time this map was accessed somehow */ |
222 | tstamp ACC (RW, last_access); /* last time this map was accessed somehow */ |
230 | |
223 | |
231 | shstr ACC (RW, name); /* Name of map as given by its creator */ |
224 | shstr ACC (RW, name); /* Name of map as given by its creator */ |
232 | struct region *ACC (RW, region); /* What jurisdiction in the game world this map is ruled by |
225 | struct region *ACC (RW, default_region); /* What jurisdiction in the game world this map is ruled by |
233 | * points to the struct containing all the properties of |
226 | * points to the struct containing all the properties of |
234 | * the region */ |
227 | * the region */ |
235 | double ACC (RW, reset_time); |
228 | double ACC (RW, reset_time); |
236 | uint32 ACC (RW, reset_timeout); /* How many seconds must elapse before this map |
229 | uint32 ACC (RW, reset_timeout); /* How many seconds must elapse before this map |
237 | * should be reset |
230 | * should be reset |
… | |
… | |
249 | uint16 ACC (RW, difficulty); /* What level the player should be to play here */ |
242 | uint16 ACC (RW, difficulty); /* What level the player should be to play here */ |
250 | |
243 | |
251 | bool ACC (RW, per_player); |
244 | bool ACC (RW, per_player); |
252 | bool ACC (RW, per_party); |
245 | bool ACC (RW, per_party); |
253 | bool ACC (RW, outdoor); /* True if an outdoor map */ |
246 | bool ACC (RW, outdoor); /* True if an outdoor map */ |
|
|
247 | bool ACC (RW, nodrop); /* avoid dropping anything on this map */ |
254 | uint8 ACC (RW, darkness); /* indicates level of darkness of map */ |
248 | uint8 ACC (RW, darkness); /* indicates level of darkness of map */ |
255 | |
249 | |
256 | uint16 ACC (RW, enter_x); /* enter_x and enter_y are default entrance location */ |
250 | uint16 ACC (RW, enter_x); /* enter_x and enter_y are default entrance location */ |
257 | uint16 ACC (RW, enter_y); /* on the map if none are set in the exit */ |
251 | uint16 ACC (RW, enter_y); /* on the map if none are set in the exit */ |
258 | oblinkpt *buttons; /* Linked list of linked lists of buttons */ |
252 | oblinkpt *buttons; /* Linked list of linked lists of buttons */ |
… | |
… | |
297 | MTH void clear_unique_items (); |
291 | MTH void clear_unique_items (); |
298 | |
292 | |
299 | MTH void clear_header (); |
293 | MTH void clear_header (); |
300 | MTH void clear_links_to (maptile *m); |
294 | MTH void clear_links_to (maptile *m); |
301 | |
295 | |
|
|
296 | struct region *region (int x, int y) const |
|
|
297 | { |
|
|
298 | return default_region; |
|
|
299 | } |
|
|
300 | |
302 | // loas the header pseudo-object |
301 | // loas the header pseudo-object |
303 | bool _load_header (object_thawer &thawer); |
302 | bool _load_header (object_thawer &thawer); |
304 | MTH bool _load_header (const char *path); |
303 | MTH bool _load_header (const char *path); |
305 | |
304 | |
306 | // load objects into the map |
305 | // load objects into the map |