Crossfire Server, Branches 1.12
R18729
|
Go to the source code of this file.
Functions | |
void | make_map_walls (mapstruct *map, char **layout, char *w_style, RMParms *RP) |
object * | pick_joined_wall (object *the_wall, char **layout, int i, int j, RMParms *RP) |
object * | retrofit_joined_wall (mapstruct *the_map, int i, int j, int insert_flag, RMParms *RP) |
int | surround_flag (char **layout, int i, int j, RMParms *RP) |
int | surround_flag2 (char **layout, int i, int j, RMParms *RP) |
int | surround_flag3 (mapstruct *map, int i, int j, RMParms *RP) |
int | surround_flag4 (mapstruct *map, int i, int j, RMParms *RP) |
Deals with wall management in random maps.
Definition in file wall.c.
takes a map and a layout, and puts walls in the map (picked from w_style) at '#' marks.
map | map where walls will be put. |
layout | layout containing walls and such. |
w_style | wall style. Must not be NULL, can be "none". |
RP | map parameters. |
Definition at line 180 of file wall.c.
References obj::arch, arch_to_object(), find_style(), INS_NO_MERGE, INS_NO_WALK_ON, insert_ob_in_map(), MOVE_ALL, obj::move_allow, obj::move_block, archt::name, pick_joined_wall(), pick_random_object(), snprintf(), RMParms::wall_name, obj::x, RMParms::Xsize, obj::y, and RMParms::Ysize.
Referenced by generate_random_map().
Picks the right wall type for this square, to make it look nice, and have everything nicely joined. It uses the layout.
the_wall | wall we want to insert. |
layout | |
i | |
j | where to insert. |
RP | map parameters. |
Definition at line 241 of file wall.c.
References obj::arch, arch_to_object(), archt::name, surround_flag2(), and try_find_archetype().
Referenced by make_map_walls().
this takes a map, and changes an existing wall to match what's blocked around it, counting only doors and walls as blocked. If insert_flag is 1, . If not, it will only return the wall which would belong there, and doesn't remove anything. It depends on the global, previously-set variable, "wall_name"
the_map | |
i | |
j | where to look. |
insert_flag | if 1, insert the correct wall into the map, else don't insert. |
RP | map parameters. |
Definition at line 362 of file wall.c.
References obj::above, arch_to_object(), DOOR, EXIT, free_object(), GET_MAP_OB, INS_NO_MERGE, INS_NO_WALK_ON, insert_ob_in_map(), LOCKED_DOOR, obj::map, MOVE_ALL, obj::move_block, obj::move_type, MOVE_WALK, remove_ob(), surround_flag4(), TELEPORTER, try_find_archetype(), obj::type, RMParms::wall_name, obj::x, and obj::y.
Referenced by lock_and_hide_doors().
int surround_flag | ( | char ** | layout, |
int | i, | ||
int | j, | ||
RMParms * | RP | ||
) |
Given a layout and a coordinate, tell me which squares up/down/right/left are occupied.
layout | |
i | |
j | spot to look. |
RP | map parameters. |
Definition at line 56 of file wall.c.
Referenced by doorify_layout().
int surround_flag2 | ( | char ** | layout, |
int | i, | ||
int | j, | ||
RMParms * | RP | ||
) |
Given a layout and a coordinate, tell me which squares up/down/right/left are occupied by walls.
layout | |
i | |
j | spot to look. |
RP | map parameters. |
Definition at line 88 of file wall.c.
Referenced by can_make_wall(), and pick_joined_wall().
Check a map for blocked spots. Since this is part of the random map code, presumption is that this is not a tiled map. What is considered blocking and not is somewhat hard coded.
map | |
i | |
j | spot to look. |
RP | map parameters. |
Definition at line 120 of file wall.c.
References GET_MAP_MOVE_BLOCK, and MOVE_BLOCK_DEFAULT.
Referenced by find_enclosed_spot().
Check a map for spots with walls. Since this is part of the random map code, presumption is that this is not a tiled map. What is considered blocking and not is somewhat hard coded.
map | |
i | |
j | spot to look. |
RP | map parameters. |
Definition at line 153 of file wall.c.
References wall_blocked().
Referenced by retrofit_joined_wall().