|
Crossfire Server, Trunk
|
#include <stdlib.h>#include <stdio.h>#include <global.h>#include <time.h>#include <maze_gen.h>#include <room_gen.h>#include <random_map.h>#include <sproto.h>#include <rproto.h>
Include dependency graph for square_spiral.c:Go to the source code of this file.
Functions | |
| void | find_top_left_corner (char **maze, int *cx, int *cy) |
| char ** | make_square_spiral_layout (int xsize, int ysize, int _unused_option, int _unused_layers) |
| char ** | map_gen_onion (int xsize, int ysize, int option, int layers) |
Square-spiral layout generator.
Definition in file square_spiral.c.
| 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 wall, and then looks right until it finds a vertical wall, i.e., the corner. It sets cx and cy to that. it also starts from cx and cy.
| maze | where to look. |
| cx | |
| cy | where to start from, and detected corner. |
Definition at line 53 of file square_spiral.c.
Referenced by make_square_spiral_layout().
Here is the caller graph for this function:| char** make_square_spiral_layout | ( | int | xsize, |
| int | ysize, | ||
| int | _unused_option, | ||
| int | _unused_layers | ||
| ) |
Generates a square-spiral layout.
| xsize | |
| ysize | size of the layout. |
| _unused_option | unused. |
| _unused_layers | unused. |
Definition at line 80 of file square_spiral.c.
References find_top_left_corner(), make_wall(), map_gen_onion(), OPT_CENTERED, OPT_NO_DOORS, RANDOM, and nlohmann::detail::void().
Referenced by layoutgen().
Here is the call graph for this function:
Here is the caller graph for this function:| char** map_gen_onion | ( | int | xsize, |
| int | ysize, | ||
| int | option, | ||
| int | layers | ||
| ) |
Generates an onion layout.
| xsize | |
| ysize | layout size. |
| option | combination of OPT_xxx values. |
| layers | number of layers the onion should have. |
Definition at line 70 of file room_gen_onion.c.
References bottom_centered_onion(), bottom_right_centered_onion(), centered_onion(), OPT_BOTTOM_C, OPT_BOTTOM_R, OPT_CENTERED, OPT_IRR_SPACE, OPT_LINEAR, OPT_WALL_OFF, OPT_WALLS_ONLY, CFweardisguise::option, and RANDOM.
Referenced by make_square_spiral_layout().
Here is the call graph for this function:
Here is the caller graph for this function: