… | |
… | |
293 | MTH void allocate (); |
293 | MTH void allocate (); |
294 | MTH int size () const { return width * height; } |
294 | MTH int size () const { return width * height; } |
295 | |
295 | |
296 | MTH object *insert (object *op, int x, int y, object *originator = 0, int flags = 0); |
296 | MTH object *insert (object *op, int x, int y, object *originator = 0, int flags = 0); |
297 | |
297 | |
298 | mapspace const &at (uint32 x, uint32 y) const { return spaces [x + width * y]; } |
298 | mapspace const &at (uint32 x, uint32 y) const { return spaces [x * height + y]; } |
299 | mapspace &at (uint32 x, uint32 y) { return spaces [x + width * y]; } |
299 | mapspace &at (uint32 x, uint32 y) { return spaces [x * height + y]; } |
300 | }; |
300 | }; |
301 | |
301 | |
302 | /* This is used by get_rangevector to determine where the other |
302 | /* This is used by get_rangevector to determine where the other |
303 | * creature is. get_rangevector takes into account map tiling, |
303 | * creature is. get_rangevector takes into account map tiling, |
304 | * so you just can not look the the map coordinates and get the |
304 | * so you just can not look the the map coordinates and get the |