version 1.20 | | version 1.21 |
---|
| | |
/* | | /* |
* static char *rcsid_random_map_c = | | * static char *rcsid_random_map_c = |
* "$Id: random_map.c,v 1.20 2001/05/03 18:29:35 mardahl Exp $"; | | * "$Id: random_map.c,v 1.21 2001/05/04 22:10:04 mardahl Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
} | | } |
| | |
if(strstr(RP->layoutstyle,"maze")) { | | if(strstr(RP->layoutstyle,"maze")) { |
maze = maze_gen(RP->Xsize,RP->Ysize,RP->layoutoptions1,RP); | | maze = maze_gen(RP->Xsize,RP->Ysize,RP->layoutoptions1); |
RP->map_layout_style = MAZE_LAYOUT; | | RP->map_layout_style = MAZE_LAYOUT; |
| | |
if(!(RANDOM()%2)) doorify_layout(maze,RP); | | if(!(RANDOM()%2)) doorify_layout(maze,RP); |
| | |
if(maze == 0) /* unknown or unspecified layout type, pick one at random */ | | if(maze == 0) /* unknown or unspecified layout type, pick one at random */ |
switch(RANDOM()%NROFLAYOUTS) { | | switch(RANDOM()%NROFLAYOUTS) { |
case 0: | | case 0: |
maze = maze_gen(RP->Xsize,RP->Ysize,RANDOM()%2,RP); | | maze = maze_gen(RP->Xsize,RP->Ysize,RANDOM()%2); |
RP->map_layout_style = MAZE_LAYOUT; | | RP->map_layout_style = MAZE_LAYOUT; |
if(!(RANDOM()%2)) doorify_layout(maze,RP); | | if(!(RANDOM()%2)) doorify_layout(maze,RP); |
break; | | break; |