 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
36 char **
map_gen_onion(
int xsize,
int ysize,
int option,
int layers);
57 while (maze[*cx][*cy] == 0) {
61 while (maze[*cx][*cy+1] == 0) {
95 for (i = 0; i < xsize; i++)
96 for (j = 0; j < ysize; j++) {
97 if (maze[i][j] ==
'C') {
107 if (ty < 2 || tx < 2 || tx > xsize-2 || ty > ysize-2) {
112 maze[tx][ty-1] =
'#';
113 maze[tx-1][ty] =
'D';
116 while ((tx > 2) && maze[tx-1][ty]) {
123 while (((ty+1) < ysize) && maze[tx][ty+1]) {
130 while (((tx+1) < xsize) && maze[tx+1][ty]) {
141 maze[xsize-2][1] =
'<';
144 maze[xsize-2][1] =
'>';
char ** map_gen_onion(int xsize, int ysize, int option, int layers)
Generates an onion layout.
char ** make_square_spiral_layout(int xsize, int ysize, int _unused_option, int _unused_layers)
Generates a square-spiral layout.
void find_top_left_corner(char **maze, int *cx, int *cy)
This starts from within a centered onion layer (or between two layers), and looks up until it finds a...
#define OPT_NO_DOORS
Place walls insead of doors.
int make_wall(char **maze, int x, int y, int dir)
Cuts the layout horizontally or vertically by a wall with a door.
#define OPT_CENTERED
Centered.