… | |
… | |
37 | get_pet_enemy (object *pet, rv_vector * rv) |
37 | get_pet_enemy (object *pet, rv_vector * rv) |
38 | { |
38 | { |
39 | object *owner, *tmp, *attacker, *tmp3; |
39 | object *owner, *tmp, *attacker, *tmp3; |
40 | int i; |
40 | int i; |
41 | sint16 x, y; |
41 | sint16 x, y; |
42 | mapstruct *nm; |
42 | maptile *nm; |
43 | int search_arr[SIZEOFFREE]; |
43 | int search_arr[SIZEOFFREE]; |
44 | int mflags; |
44 | int mflags; |
45 | |
45 | |
46 | attacker = pet->attacked_by; /*pointer to attacking enemy */ |
46 | attacker = pet->attacked_by; /*pointer to attacking enemy */ |
47 | pet->attacked_by = NULL; /*clear this, since we are dealing with it */ |
47 | pet->attacked_by = NULL; /*clear this, since we are dealing with it */ |
… | |
… | |
263 | * Interesting enough, we don't use the passed map structure in |
263 | * Interesting enough, we don't use the passed map structure in |
264 | * this function. |
264 | * this function. |
265 | */ |
265 | */ |
266 | |
266 | |
267 | void |
267 | void |
268 | remove_all_pets (mapstruct *map) |
268 | remove_all_pets (maptile *map) |
269 | { |
269 | { |
270 | objectlink *obl, *next; |
270 | objectlink *obl, *next; |
271 | object *owner; |
271 | object *owner; |
272 | |
272 | |
273 | for (obl = first_friendly_object; obl != NULL; obl = next) |
273 | for (obl = first_friendly_object; obl != NULL; obl = next) |
… | |
… | |
336 | pet_move (object *ob) |
336 | pet_move (object *ob) |
337 | { |
337 | { |
338 | int dir, i; |
338 | int dir, i; |
339 | sint16 dx, dy; |
339 | sint16 dx, dy; |
340 | object *ob2, *owner; |
340 | object *ob2, *owner; |
341 | mapstruct *m; |
341 | maptile *m; |
342 | |
342 | |
343 | /* Check to see if player pulled out */ |
343 | /* Check to see if player pulled out */ |
344 | if ((owner = get_owner (ob)) == NULL) |
344 | if ((owner = get_owner (ob)) == NULL) |
345 | { |
345 | { |
346 | remove_ob (ob); /* Will be freed when returning */ |
346 | remove_ob (ob); /* Will be freed when returning */ |
… | |
… | |
581 | |
581 | |
582 | for (tmp = op; tmp; tmp = tmp->more) |
582 | for (tmp = op; tmp; tmp = tmp->more) |
583 | { |
583 | { |
584 | sint16 x = tmp->x + freearr_x[op->direction], y = tmp->y + freearr_y[op->direction]; |
584 | sint16 x = tmp->x + freearr_x[op->direction], y = tmp->y + freearr_y[op->direction]; |
585 | object *victim; |
585 | object *victim; |
586 | mapstruct *m; |
586 | maptile *m; |
587 | int mflags; |
587 | int mflags; |
588 | |
588 | |
589 | m = op->map; |
589 | m = op->map; |
590 | mflags = get_map_flags (m, &m, x, y, &x, &y); |
590 | mflags = get_map_flags (m, &m, x, y, &x, &y); |
591 | |
591 | |