version 1.22 | | version 1.23 |
---|
| | |
/* | | /* |
* static char *rcsid_special_c = | | * static char *rcsid_special_c = |
* "$Id: special.c,v 1.22 2005/10/28 19:08:53 akirschbaum Exp $"; | | * "$Id: special.c,v 1.23 2005/11/16 08:16:08 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
while(i<0 && tries<10) { | | while(i<0 && tries<10) { |
ix = RANDOM() % (MAP_WIDTH(map) -2) +1; | | ix = RANDOM() % (MAP_WIDTH(map) -2) +1; |
iy = RANDOM() % (MAP_HEIGHT(map) -2) +1; | | iy = RANDOM() % (MAP_HEIGHT(map) -2) +1; |
i = find_first_free_spot(fountain->arch,map,ix,iy); | | i = find_first_free_spot(fountain,map,ix,iy); |
tries++; | | tries++; |
}; | | }; |
if(i==-1) { /* can't place fountain */ | | if(i==-1) { /* can't place fountain */ |
| | |
while(i<0) { | | while(i<0) { |
ix = RANDOM() % (MAP_WIDTH(map) -2) +1; | | ix = RANDOM() % (MAP_WIDTH(map) -2) +1; |
iy = RANDOM() % (MAP_HEIGHT(map) -2) +1; | | iy = RANDOM() % (MAP_HEIGHT(map) -2) +1; |
i = find_first_free_spot(the_exit->arch,map,ix,iy); | | i = find_first_free_spot(the_exit,map,ix,iy); |
} | | } |
| | |
ix += freearr_x[i]; | | ix += freearr_x[i]; |