… | |
… | |
388 | |
388 | |
389 | mapxy (object *op) |
389 | mapxy (object *op) |
390 | : m(op->map), x(op->x), y(op->y) |
390 | : m(op->map), x(op->x), y(op->y) |
391 | { } |
391 | { } |
392 | |
392 | |
|
|
393 | mapxy &move (int dx, int dy) |
|
|
394 | { |
|
|
395 | x += dx; |
|
|
396 | y += dy; |
|
|
397 | |
|
|
398 | return *this; |
|
|
399 | } |
|
|
400 | |
393 | mapxy &move (int dir) |
401 | mapxy &move (int dir) |
394 | { |
402 | { |
395 | x += freearr_x [dir]; |
403 | return move (freearr_x [dir], freearr_y [dir]); |
396 | y += freearr_y [dir]; |
|
|
397 | |
|
|
398 | return *this; |
|
|
399 | } |
404 | } |
400 | |
405 | |
401 | operator void *() const { return (void *)m; } |
406 | operator void *() const { return (void *)m; } |
402 | mapxy &operator =(const object *op) |
407 | mapxy &operator =(const object *op) |
403 | { |
408 | { |