… | |
… | |
289 | ~maptile (); |
289 | ~maptile (); |
290 | void do_destroy (); |
290 | void do_destroy (); |
291 | void gather_callbacks (AV *&callbacks, event_type event) const; |
291 | void gather_callbacks (AV *&callbacks, event_type event) const; |
292 | |
292 | |
293 | MTH void allocate (); |
293 | MTH void allocate (); |
294 | |
|
|
295 | MTH int size () const { return width * height; } |
294 | MTH int size () const { return width * height; } |
296 | |
295 | |
|
|
296 | MTH object *insert (object *op, int x, int y, object *originator = 0, int flags = 0); |
|
|
297 | |
|
|
298 | MTH void link (); |
|
|
299 | MTH void unlink (); |
|
|
300 | |
297 | mapspace const &at (uint32 x, uint32 y) const { return spaces [x + width * y]; } |
301 | mapspace const &at (uint32 x, uint32 y) const { return spaces [x * height + y]; } |
298 | mapspace &at (uint32 x, uint32 y) { return spaces [x + width * y]; } |
302 | mapspace &at (uint32 x, uint32 y) { return spaces [x * height + y]; } |
299 | }; |
303 | }; |
|
|
304 | |
|
|
305 | #define for_all_maps(var) for (maptile *var = first_map; var; var = var->next) |
300 | |
306 | |
301 | /* This is used by get_rangevector to determine where the other |
307 | /* This is used by get_rangevector to determine where the other |
302 | * creature is. get_rangevector takes into account map tiling, |
308 | * creature is. get_rangevector takes into account map tiling, |
303 | * so you just can not look the the map coordinates and get the |
309 | * so you just can not look the the map coordinates and get the |
304 | * righte value. distance_x/y are distance away, which |
310 | * righte value. distance_x/y are distance away, which |