version 1.1 | | version 1.2 |
---|
| | |
/* | | /* |
* static char *rcsid_special_c = | | * static char *rcsid_special_c = |
* "$Id: special.c,v 1.1 1999/04/02 19:10:03 uid200 Exp $"; | | * "$Id: special.c,v 1.2 1999/06/26 22:48:36 cvs Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
| | |
void place_fountain_with_specials(mapstruct *map) { | | void place_fountain_with_specials(mapstruct *map) { |
int ix,iy,i; | | int ix,iy,i=-1; |
mapstruct *fountain_style=find_style("/styles/misc","fountains",-1); | | mapstruct *fountain_style=find_style("/styles/misc","fountains",-1); |
object *fountain=get_archetype("fountain"); | | object *fountain=get_archetype("fountain"); |
object *potion=get_object(); | | object *potion=get_object(); |
copy_object(pick_random_object(fountain_style),potion); | | copy_object(pick_random_object(fountain_style),potion); |
| | while(i<0) { |
ix = RANDOM() % (map->mapx -2) +1; | | ix = RANDOM() % (map->mapx -2) +1; |
iy = RANDOM() % (map->mapx -2) +1; | | iy = RANDOM() % (map->mapx -2) +1; |
i = find_first_free_spot(fountain->arch,map,ix,iy); | | i = find_first_free_spot(fountain->arch,map,ix,iy); |
| | }; |
ix += freearr_x[i]; | | ix += freearr_x[i]; |
iy += freearr_y[i]; | | iy += freearr_y[i]; |
potion->face=fountain->face; | | potion->face=fountain->face; |