Crossfire Server, Branch 1.12  R12190
Functions
test.c File Reference
#include <stdio.h>
#include <global.h>
#include <expand2x.h>
Include dependency graph for test.c:

Go to the source code of this file.

Functions

void dump_layout (char **layout, int Xsize, int Ysize)
char ** gen_corridor_rooms (int, int, int)
int main ()
char ** make_snake_layout (int xsize, int ysize)
 Generate a snake-like layout.
char ** make_square_spiral_layout (int xsize, int ysize)
 Generates a square-spiral layout.
char ** map_gen_spiral (int, int, int)
 Generates a spiral layout.
char ** roguelike_layout_gen (int xsize, int ysize, int options)
 Actually make the rogue layout.

Function Documentation

void dump_layout ( char **  layout,
int  Xsize,
int  Ysize 
)

Definition at line 13 of file test.c.

char** gen_corridor_rooms ( int  ,
int  ,
int   
)
int main ( void  )

Definition at line 26 of file test.c.

References dump_layout(), expand2x(), and roguelike_layout_gen().

Here is the call graph for this function:

char** make_snake_layout ( int  xsize,
int  ysize 
)

Generate a snake-like layout.

Parameters:
xsize
ysizelayout size.
Returns:
generated layout.

Definition at line 20 of file snake.c.

char** make_square_spiral_layout ( int  xsize,
int  ysize 
)

Generates a square-spiral layout.

Parameters:
xsize
ysizesize of the layout.
Returns:
generated layout.
Todo:
use function in another file for character searching.

Definition at line 90 of file square_spiral.c.

References find_top_left_corner(), make_wall(), map_gen_onion(), OPT_CENTERED, and OPT_NO_DOORS.

Here is the call graph for this function:

char** map_gen_spiral ( int  xsize,
int  ysize,
int  option 
)

Generates a spiral layout.

Parameters:
xsize
ysizelayout size.
optioncombination of SPIRAL_xxx values.
Returns:
generated layout.

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:

char** roguelike_layout_gen ( int  xsize,
int  ysize,
int  options 
)

Actually make the rogue layout.

We work by a reduction process: first we make everything a wall, then we remove areas to make rooms

Parameters:
xsize
ysizewanted layout size.
options2 to have circular rooms, 1 for rectanglar ones, another value for random choice.
Returns:
generated layout.

Definition at line 69 of file rogue_layout.c.

References roguelike_link_rooms(), roguelike_make_rooms(), roguelike_place_room(), surround_check(), Room::x, and Room::y.

Referenced by layoutgen(), and main().

Here is the call graph for this function:

Here is the caller graph for this function: