Crossfire Server, Trunk  R20513
Functions
floor.c File Reference

Floor handling. More...

#include <global.h>
#include <random_map.h>
#include <rproto.h>
Include dependency graph for floor.c:

Go to the source code of this file.

Functions

static int can_propagate (char item)
 Checks if the tile 'propagates' the floor. More...
 
mapstructmake_map_floor (char **layout, char *floorstyle, RMParms *RP)
 Creates the Crossfire mapstruct object from the layout, and adds the floor. More...
 
static void put_floor (mapstruct *map, char **layout, int x, int y, object *floor_arch)
 Put a floor at specified location, and then to adjacent tiles if applicable. More...
 

Detailed Description

Floor handling.

Definition in file floor.c.

Function Documentation

static int can_propagate ( char  item)
static

Checks if the tile 'propagates' the floor.

Parameters
itemtile to check.
Returns
1 if this tile should propagate, 0 else.

Definition at line 30 of file floor.c.

Referenced by put_floor().

Here is the caller graph for this function:

mapstruct* make_map_floor ( char **  layout,
char *  floorstyle,
RMParms RP 
)

Creates the Crossfire mapstruct object from the layout, and adds the floor.

Parameters
layoutgenerated layout.
floorstylefloor style. Can be NULL, in which case a random one is chosen.
RPparameters of the random map.
Returns
Crossfire map.

Definition at line 75 of file floor.c.

References obj::arch, arch_to_object(), find_style(), get_empty_map(), GET_MAP_OB, INS_NO_MERGE, INS_NO_WALK_ON, RMParms::multiple_floors, object_insert_in_map_at(), pick_random_object(), put_floor(), snprintf, RMParms::Xsize, and RMParms::Ysize.

Referenced by generate_random_map().

Here is the call graph for this function:

Here is the caller graph for this function:

static void put_floor ( mapstruct map,
char **  layout,
int  x,
int  y,
object floor_arch 
)
static

Put a floor at specified location, and then to adjacent tiles if applicable.

Parameters
mapwhere to put the floor.
layoutlayout that was used to generate the map.
x
ycoordinates.
floor_archwhat floor to use.

Definition at line 47 of file floor.c.

References obj::arch, arch_to_object(), can_propagate(), GET_MAP_OB, INS_NO_MERGE, INS_NO_WALK_ON, and object_insert_in_map_at().

Referenced by make_map_floor().

Here is the call graph for this function:

Here is the caller graph for this function: