version 1.32 | | version 1.33 |
---|
| | |
/* | | /* |
* static char *rcsid_random_map_c = | | * static char *rcsid_random_map_c = |
* "$Id: random_map.c,v 1.32 2003/03/03 08:09:23 mwedel Exp $"; | | * "$Id: random_map.c,v 1.33 2003/03/07 07:33:13 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
arguments it needs. */ | | arguments it needs. */ |
char **layoutgen(RMParms *RP) { | | char **layoutgen(RMParms *RP) { |
char **maze=0; | | char **maze=0; |
if(RP->symmetry!=NO_SYM) { | | |
if(RP->Xsize<15) RP->Xsize = 15 + RANDOM()%25; | | if(RP->Xsize<MIN_RANDOM_MAP_SIZE) RP->Xsize = MIN_RANDOM_MAP_SIZE + RANDOM()%25 + 5; |
if(RP->Ysize<15) RP->Ysize = 15 + RANDOM()%25; | | if(RP->Ysize<MIN_RANDOM_MAP_SIZE) RP->Ysize = MIN_RANDOM_MAP_SIZE + RANDOM()%25 + 5; |
} | | |
else { | | |
/* Has to be at least 10 for square spirals to work */ | | |
if(RP->Xsize<10) RP->Xsize = 10 + RANDOM()%25; | | |
if(RP->Ysize<10) RP->Ysize = 10 + RANDOM()%25; | | |
} | | |
| | |
if(RP->symmetry == RANDOM_SYM) { | | if(RP->symmetry == RANDOM_SYM) { |
RP->symmetry_used = (RANDOM() % ( XY_SYM))+1; | | RP->symmetry_used = (RANDOM() % ( XY_SYM))+1; |