![]() |
Crossfire Server, Trunk
1.75.0
|
#include "global.h"#include <string.h>#include "random_map.h"#include "rproto.h"#include <assert.h>
Include dependency graph for wall.cpp:Go to the source code of this file.
Functions | |
| void | make_map_walls (mapstruct *map, char **layout, char *w_style, RMParms *RP) |
| takes a map and a layout, and puts walls in the map (picked from w_style) at '#' marks. More... | |
| object * | pick_joined_wall (object *the_wall, char **layout, int i, int j, RMParms *RP) |
| Picks the right wall type for this square, to make it look nice, and have everything nicely joined. More... | |
| object * | retrofit_joined_wall (mapstruct *the_map, int i, int j, int insert_flag, RMParms *RP) |
| this takes a map, and changes an existing wall to match what's blocked around it, counting only doors and walls as blocked. More... | |
| 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. More... | |
| 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. More... | |
| int | surround_flag3 (mapstruct *map, int i, int j, RMParms *RP) |
| Check a map for blocked spots. More... | |
| int | surround_flag4 (mapstruct *map, int i, int j, RMParms *RP) |
| Check a map for spots with walls. More... | |
Variables | |
| static const char * | wall_join [16] |
| Suffix to add to a base wall archetype name to get the joined wall based on the value returned by surround_flag2(). More... | |
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 184 of file wall.cpp.
References object::arch, arch_to_object(), find_style(), INS_NO_MERGE, INS_NO_WALK_ON, MOVE_ALL, object::move_allow, object::move_block, archetype::name, object_insert_in_map_at(), pick_joined_wall(), pick_random_object(), strlcpy(), RMParms::wall_name, 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: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 255 of file wall.cpp.
References object::arch, arch_to_object(), archetype::name, surround_flag2(), try_find_archetype(), and wall_join.
Referenced by make_map_walls().
Here is the call graph for this function:
Here is the caller graph for this function: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 314 of file wall.cpp.
References arch_to_object(), DOOR, EXIT, FOR_MAP_FINISH, FOR_MAP_PREPARE, INS_NO_MERGE, INS_NO_WALK_ON, LOCKED_DOOR, object::map, MOVE_ALL, object::move_block, MOVE_WALK, object_free_drop_inventory(), object_insert_in_map_at(), object_remove(), surround_flag4(), TELEPORTER, try_find_archetype(), object::type, wall_join, and RMParms::wall_name.
Referenced by lock_and_hide_doors().
Here is the call graph for this function:
Here is the caller graph for this function:| 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 40 of file wall.cpp.
Referenced by doorify_layout().
Here is the caller graph for this function:| 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 77 of file wall.cpp.
Referenced by can_make_wall(), and pick_joined_wall().
Here is the caller graph for this function: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 114 of file wall.cpp.
References GET_MAP_MOVE_BLOCK, and MOVE_BLOCK_DEFAULT.
Referenced by find_enclosed_spot().
Here is the caller graph for this function: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 152 of file wall.cpp.
References wall_blocked().
Referenced by retrofit_joined_wall().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Suffix to add to a base wall archetype name to get the joined wall based on the value returned by surround_flag2().
Definition at line 232 of file wall.cpp.
Referenced by pick_joined_wall(), and retrofit_joined_wall().