|
Crossfire Server, Branches 1.12
R18729
|
Include dependency graph for room_gen_spiral.c:Go to the source code of this file.
Macros | |
| #define | FINE_SPIRAL 2 |
| #define | FIT_SPIRAL 4 |
| #define | MAX(x, y) (((x) < (y)) ? (y) : (x)) |
| #define | MAX_FINE .454545 |
| #define | MAX_SPIRAL_OPT 8 |
| #define | MIN(x, y) (((x) < (y)) ? (x) : (y)) |
| #define | RANDOM_OPTIONS 0 |
| #define | REGULAR_SPIRAL 1 |
Functions | |
| void | connect_spirals (int xsize, int ysize, int sym, char **layout) |
| char ** | map_gen_spiral (int xsize, int ysize, int option) |
| int | surround_check (char **maze, int i, int j, int xsize, int ysize) |
The spiral room generator:
Definition in file room_gen_spiral.c.
| #define MAX | ( | x, | |
| y | |||
| ) | (((x) < (y)) ? (y) : (x)) |
Definition at line 51 of file room_gen_spiral.c.
| #define MAX_FINE .454545 |
Definition at line 54 of file room_gen_spiral.c.
Referenced by map_gen_spiral().
| #define MIN | ( | x, | |
| y | |||
| ) | (((x) < (y)) ? (x) : (y)) |
Definition at line 48 of file room_gen_spiral.c.
Referenced by map_gen_spiral().
| void connect_spirals | ( | int | xsize, |
| int | ysize, | ||
| int | sym, | ||
| char ** | layout | ||
| ) |
Connects disjoint spirals which may result from the symmetrization process.
| xsize | |
| ysize | layout size. |
| sym | one of the SYM_xxx values. |
| layout | layout to alter. |
Definition at line 159 of file room_gen_spiral.c.
References surround_check(), X_SYM, XY_SYM, and Y_SYM.
Referenced by symmetrize_layout().
Here is the call graph for this function:
Here is the caller graph for this function:| char** map_gen_spiral | ( | int | xsize, |
| int | ysize, | ||
| int | option | ||
| ) |
Generates a spiral layout.
| xsize | |
| ysize | layout size. |
| option | combination of SPIRAL_xxx values. |
Definition at line 68 of file room_gen_spiral.c.
References FINE_SPIRAL, FIT_SPIRAL, MAX_FINE, MAX_SPIRAL_OPT, MIN, and REGULAR_SPIRAL.
Referenced by layoutgen().
Here is the caller graph for this function:| int surround_check | ( | char ** | layout, |
| int | i, | ||
| int | j, | ||
| int | Xsize, | ||
| int | Ysize | ||
| ) |
Checks free spots around a spot.
| layout | map layout. |
| i | |
| j | coordinates to check. |
| Xsize | |
| Ysize | size of the layout. |
Definition at line 44 of file rogue_layout.c.
Referenced by connect_spirals().
Here is the caller graph for this function: