version 1.24 | | version 1.25 |
---|
| | |
/* | | /* |
* static char *rcsid_move_c = | | * static char *rcsid_move_c = |
* "$Id: move.c,v 1.24 2003/01/13 07:42:50 mwedel Exp $"; | | * "$Id: move.c,v 1.25 2003/02/14 08:18:41 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* This is currently only used for the boulder roll code. | | * This is currently only used for the boulder roll code. |
*/ | | */ |
| | |
int try_fit (object *op, int x, int y) | | int try_fit (object *op, mapstruct *m, int x, int y) |
{ | | { |
object *tmp, *more; | | object *tmp, *more; |
sint16 tx, ty; | | sint16 tx, ty; |
int mflags; | | int mflags; |
mapstruct *m; | | |
| | |
if (op->head) | | if (op->head) |
op = op->head; | | op = op->head; |
| | |
for (more = op; more ; more = more->more) { | | for (more = op; more ; more = more->more) { |
tx = x + more->x - op->x; | | tx = x + more->x - op->x; |
ty = y + more->y - op->y; | | ty = y + more->y - op->y; |
m = op->map; | | |
| | |
mflags = get_map_flags(m, &m, tx, ty, &tx, &ty); | | mflags = get_map_flags(m, &m, tx, ty, &tx, &ty); |
| | |
| | |
return 0; | | return 0; |
} | | } |
} | | } |
if (try_fit (op, x, y)) | | if (try_fit (op, m, x, y)) |
return 0; | | return 0; |
| | |
remove_ob(op); | | remove_ob(op); |