Crossfire Server, Trunk  R20576
door.c File Reference

door-related functions. More...

#include "global.h"
#include <string.h>
#include "random_map.h"
#include "rproto.h"
Include dependency graph for door.c:

Go to the source code of this file.


void put_doors (mapstruct *the_map, char **maze, const char *doorstyle, RMParms *RP)
 Add doors to a map. More...
int surround_check2 (char **layout, int i, int j, int Xsize, int Ysize)
 Serch for doors or walls around a spot. More...

Detailed Description

door-related functions.

Definition in file door.c.

Function Documentation

◆ put_doors()

void put_doors ( mapstruct the_map,
char **  maze,
const char *  doorstyle,
RMParms RP 

Add doors to a map.

the_mapmap we're adding doors to.
mazemaze layout.
doorstyledoor style to be. If "none", won't do anything. If NULL, will choose one randomly.
RPrandom map parameters.

Definition at line 73 of file door.c.

References obj::arch, arch_to_object(), find_style(), object_copy(), object_insert_in_map_at(), mapdef::path, pick_random_object(), snprintf, surround_check2(), 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:

◆ surround_check2()

int surround_check2 ( char **  layout,
int  i,
int  j,
int  Xsize,
int  Ysize 

Serch for doors or walls around a spot.

jcoordinates to check.
Ysizemaze size.
Combination of flags:
  • 1 = door or wall to left.
  • 2 = door or wall to right.
  • 4 = door or wall above.
  • 8 = door or wall below.

Definition at line 43 of file door.c.

Referenced by put_doors().

Here is the caller graph for this function: