Crossfire Server, Trunk
|
Go to the source code of this file.
Macros | |
#define | MIN(x, y) (((x) < (y)) ? (x) : (y)) |
Functions | |
void | bottom_centered_onion (char **maze, int xsize, int ysize, int option, int layers) |
void | bottom_right_centered_onion (char **maze, int xsize, int ysize, int option, int layers) |
void | centered_onion (char **maze, int xsize, int ysize, int option, int layers) |
void | draw_onion (char **maze, float *xlocations, float *ylocations, int layers) |
void | make_doors (char **maze, float *xlocations, float *ylocations, int layers, int options) |
char ** | map_gen_onion (int xsize, int ysize, int option, int layers) |
The onion room generator: Onion rooms are like this:
char **map_gen_onion(int xsize, int ysize, int option, int layers);
like this: regular random centered, linear onion bottom/right centered, nonlinear
Definition in file room_gen_onion.c.
#define MIN | ( | x, | |
y | |||
) | (((x) < (y)) ? (x) : (y)) |
Definition at line 48 of file room_gen_onion.c.
void bottom_centered_onion | ( | char ** | maze, |
int | xsize, | ||
int | ysize, | ||
int | option, | ||
int | layers | ||
) |
Create a bottom-centered layout.
maze | layout. |
xsize | |
ysize | layout size. |
option | combination of OPT_xxx values. |
layers | number of layers to create. |
Definition at line 219 of file room_gen_onion.c.
References draw_onion(), make_doors(), MIN, OPT_IRR_SPACE, CFweardisguise::option, and RANDOM.
Referenced by map_gen_onion().
void bottom_right_centered_onion | ( | char ** | maze, |
int | xsize, | ||
int | ysize, | ||
int | option, | ||
int | layers | ||
) |
Create a bottom-right-centered layout.
maze | layout. |
xsize | |
ysize | layout size. |
option | combination of OPT_xxx values. |
layers | number of layers to create. |
Definition at line 471 of file room_gen_onion.c.
References draw_onion(), make_doors(), MIN, OPT_IRR_SPACE, CFweardisguise::option, and RANDOM.
Referenced by map_gen_onion().
void centered_onion | ( | char ** | maze, |
int | xsize, | ||
int | ysize, | ||
int | option, | ||
int | layers | ||
) |
Creates a centered onion layout.
maze | layout. |
xsize | |
ysize | layout size. |
option | combination of OPT_xxx values. |
layers | number of layers to create. |
Definition at line 141 of file room_gen_onion.c.
References draw_onion(), make_doors(), MIN, OPT_IRR_SPACE, CFweardisguise::option, and RANDOM.
Referenced by map_gen_onion().
void draw_onion | ( | char ** | maze, |
float * | xlocations, | ||
float * | ylocations, | ||
int | layers | ||
) |
Draws the lines in the maze defining the onion layers.
maze | map to draw to. |
xlocations | |
ylocations | array of locations. |
layers | number of layers. |
Definition at line 306 of file room_gen_onion.c.
References make_face_from_files::int, banquet::l, guild_entry::x1, and guild_entry::y1.
Referenced by bottom_centered_onion(), bottom_right_centered_onion(), and centered_onion().
void make_doors | ( | char ** | maze, |
float * | xlocations, | ||
float * | ylocations, | ||
int | layers, | ||
int | options | ||
) |
Add doors to the layout.
maze | map to draw to. |
xlocations | |
ylocations | array of locations. Will be free()d. |
layers | number of layers. |
options | combination of OPT_xxx values. |
Definition at line 345 of file room_gen_onion.c.
References cleanup(), make_face_from_files::int, banquet::l, OPT_BOTTOM_C, OPT_BOTTOM_R, OPT_LINEAR, OPT_NO_DOORS, options, RANDOM, guild_entry::x1, and guild_entry::y1.
Referenced by bottom_centered_onion(), bottom_right_centered_onion(), and centered_onion().
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 layoutgen(), and make_square_spiral_layout().