 |
Crossfire Server, Trunk
1.75.0
|
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;
struct archetype * arch
Pointer to archetype.
void object_copy(const object *src_ob, object *dest_ob)
Copy object first frees everything allocated by the second object, and then copies the contents of th...
mapstruct * find_style(const char *dirname, const char *stylename, int difficulty)
Loads and returns the map requested.
char path[HUGE_BUF]
Filename of the map.
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Same as object_insert_in_map() except it handle separate coordinates and do a clean job preparing mul...
int surround_check2(char **layout, int i, int j, int Xsize, int Ysize)
Serch for doors or walls around a spot.
object * pick_random_object(mapstruct *style)
Picks a random object from a style map.
void put_doors(mapstruct *the_map, char **maze, const char *doorstyle, RMParms *RP)
Add doors to a map.
object * arch_to_object(archetype *at)
Creates and returns a new object which is a copy of the given archetype.