Go to the documentation of this file.
45 int surround_index = 0;
47 if ((i > 0) && (
layout[i-1][j] ==
'D' ||
layout[i-1][j] ==
'#')) {
50 if ((i < Xsize-1) && (
layout[i+1][j] ==
'D' ||
layout[i+1][j] ==
'#')) {
53 if ((j > 0) && (
layout[i][j-1] ==
'D' ||
layout[i][j-1] ==
'#')) {
56 if ((j < Ysize-1) && (
layout[i][j+1] ==
'D' ||
layout[i][j+1] ==
'#')) {
59 return surround_index;
80 if (!strcmp(doorstyle,
"none")) {
83 vdoors =
find_style(
"/styles/doorstyles", doorstyle, -1);
87 vdoors =
find_style(
"/styles/doorstyles/vdoors", doorstyle, -1);
91 snprintf(doorpath,
sizeof(doorpath),
"/styles/doorstyles/hdoors%s", strrchr(vdoors->
path,
'/'));
95 for (i = 0; i < RP->
Xsize; i++)
96 for (j = 0; j < RP->
Ysize; j++) {
97 if (maze[i][j] ==
'D') {
99 object *this_door, *new_door;
mapstruct * find_style(const char *dirname, const char *stylename, int difficulty)
void object_copy(const object *src_ob, object *dest_ob)
int surround_check2(char **layout, int i, int j, int Xsize, int Ysize)
void put_doors(mapstruct *the_map, char **maze, const char *doorstyle, RMParms *RP)
object * pick_random_object(mapstruct *style)
object * arch_to_object(archetype *at)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)