version 1.1 | | version 1.2 |
---|
| | |
less than 3x that then hollow things out, stick in | | less than 3x that then hollow things out, stick in |
a stairsup and stairs down, and exit */ | | a stairsup and stairs down, and exit */ |
| | |
if(xsize < 15 || ysize < 15) { | | if(xsize < 11 || ysize < 11) { |
for(i=1;i<xsize-1;i++) | | for(i=1;i<xsize-1;i++) |
for(i=j;i<ysize-1;j++) | | for(j=1;j<ysize-1;j++) |
maze[i][j]=0; | | maze[i][j]=0; |
maze[i/2][j/2]='>'; | | maze[i/2][j/2]='>'; |
maze[i/2][j/2+1]='<'; | | maze[i/2][j/2+1]='<'; |
| | |
else i++; | | else i++; |
} | | } |
| | |
| | if(i==0) { /* no can do! */ |
| | for(i=1;i<xsize-1;i++) |
| | for(j=1;j<ysize-1;j++) |
| | maze[i][j]=0; |
| | maze[i/2][j/2]='>'; |
| | maze[i/2][j/2+1]='<'; |
| | return maze; |
| | } |
| | |
| | |
/* erase the areas occupied by the rooms */ | | /* erase the areas occupied by the rooms */ |
roguelike_make_rooms(Rooms,maze,options); | | roguelike_make_rooms(Rooms,maze,options); |
| | |
| | |
walk--; | | walk--; |
maze[walk->x][walk->y] = '>'; | | maze[walk->x][walk->y] = '>'; |
| | |
| | /* convert all the '.' to 0, we're through witht he '.' */ |
| | for(i=0;i<xsize;i++) |
| | for(j=0;j<ysize;j++) |
| | if(maze[i][j]=='.') maze[i][j]=0; |
| | |
| | |
return maze; | | return maze; |
} | | } |
| | |
} | | } |
| | |
} | | } |
for(i=0;i<xsize;i++) | | |
for(j=0;j<ysize;j++) | | |
if(maze[i][j]=='.') maze[i][j]=0; | | |
} | | } |