… | |
… | |
63 | TILE_NUM, |
63 | TILE_NUM, |
64 | }; |
64 | }; |
65 | |
65 | |
66 | /* Values for in_memory below */ |
66 | /* Values for in_memory below */ |
67 | enum { |
67 | enum { |
68 | MAP_ACTIVE, |
68 | MAP_SWAPPED, // header loaded, nothing else |
69 | MAP_INACTIVE, // not used atm. |
69 | MAP_INACTIVE, // in memory, linkable, but not active |
70 | MAP_SWAPPED, |
70 | MAP_ACTIVE, // running! |
71 | MAP_LOADING, |
|
|
72 | MAP_SAVING, |
|
|
73 | }; |
71 | }; |
74 | |
72 | |
75 | /* GET_MAP_FLAGS really shouldn't be used very often - get_map_flags should |
73 | /* GET_MAP_FLAGS really shouldn't be used very often - get_map_flags should |
76 | * really be used, as it is multi tile aware. However, there are some cases |
74 | * really be used, as it is multi tile aware. However, there are some cases |
77 | * where it is known the map is not tiled or the values are known |
75 | * where it is known the map is not tiled or the values are known |
… | |
… | |
364 | void init (); |
362 | void init (); |
365 | ~maptile (); |
363 | ~maptile (); |
366 | |
364 | |
367 | void do_destroy (); |
365 | void do_destroy (); |
368 | void gather_callbacks (AV *&callbacks, event_type event) const; |
366 | void gather_callbacks (AV *&callbacks, event_type event) const; |
|
|
367 | |
|
|
368 | MTH bool linkable () { return in_memory >= MAP_INACTIVE; } |
369 | |
369 | |
370 | MTH int size () const { return width * height; } |
370 | MTH int size () const { return width * height; } |
371 | |
371 | |
372 | MTH object *insert (object *op, int x, int y, object *originator = 0, int flags = 0); |
372 | MTH object *insert (object *op, int x, int y, object *originator = 0, int flags = 0); |
373 | |
373 | |