Crossfire Server, Branches 1.12
R18729
|
Go to the source code of this file.
Macros | |
#define | GLORY_HOLE 1 |
#define | MINING_ZONE 3 |
#define | NO_SPECIAL 0 |
#define | NR_OF_HOLE_TYPES 3 |
#define | NUM_OF_SPECIAL_TYPES 4 |
#define | ORC_ZONE 2 |
#define | SPECIAL_EXIT 3 |
#define | SPECIAL_FOUNTAIN 2 |
#define | SPECIAL_SUBMAP 1 |
Functions | |
int | find_spot_for_submap (mapstruct *map, char **layout, int *ix, int *iy, int xsize, int ysize) |
void | include_map_in_map (mapstruct *dest_map, mapstruct *in_map, int x, int y) |
void | nuke_map_region (mapstruct *map, int xstart, int ystart, int xsize, int ysize) |
void | place_fountain_with_specials (mapstruct *map) |
void | place_special_exit (mapstruct *map, int hole_type, RMParms *RP) |
void | place_specials_in_map (mapstruct *map, char **layout, RMParms *RP) |
Those functions handle placement of fountains, submaps, and so on.
Definition in file special.c.
int find_spot_for_submap | ( | mapstruct * | map, |
char ** | layout, | ||
int * | ix, | ||
int * | iy, | ||
int | xsize, | ||
int | ysize | ||
) |
Finds a place to put a submap into.
map | map to insert. |
layout | where to insert into. |
ix | |
iy | coordinates of suitable location if return is 1. |
xsize | |
ysize | size of layout. |
Definition at line 141 of file special.c.
References MAP_HEIGHT, and MAP_WIDTH.
Referenced by place_specials_in_map().
Copy in_map into dest_map at point x,y
dest_map | map where to copy to. |
in_map | map to copy from. |
x | |
y | coordinates to put in_map to. |
Definition at line 100 of file special.c.
References obj::above, add_button_link(), obj::arch, arch_to_object(), copy_object_with_inv(), FLAG_IS_LINKED, GET_MAP_OB, obj::head, insert_multisquare_ob_in_map(), MAP_HEIGHT, MAP_WIDTH, nuke_map_region(), obj::path_attuned, QUERY_FLAG, obj::x, and obj::y.
Referenced by place_specials_in_map().
void nuke_map_region | ( | mapstruct * | map, |
int | xstart, | ||
int | ystart, | ||
int | xsize, | ||
int | ysize | ||
) |
Erases all objects (except floor) in the given rectangle.
map | map to process. |
xstart | |
ystart | top-left coordinates of zone. |
xsize | |
ysize | size of zone. |
Definition at line 70 of file special.c.
References obj::above, FLAG_IS_FLOOR, free_object(), GET_MAP_OB, obj::head, QUERY_FLAG, and remove_ob().
Referenced by include_map_in_map().
void place_fountain_with_specials | ( | mapstruct * | map | ) |
Places a special fountain on the map.
map | map to place to. |
Definition at line 192 of file special.c.
References add_string(), copy_object(), create_archetype(), obj::face, find_first_free_spot(), find_style(), FLAG_IDENTIFIED, FLAG_NO_PICK, free_object(), freearr_x, freearr_y, get_object(), insert_ob_in_map(), M_ADAMANT, MAP_HEIGHT, MAP_WIDTH, obj::material, obj::name, obj::name_pl, pick_random_object(), SET_FLAG, obj::x, and obj::y.
Referenced by place_specials_in_map().
Place an exit with a resource map.
map | where to put the exit. |
hole_type | type of random map to link to, see HOLE_xxx. |
RP | parameters from which map was generated. |
Definition at line 235 of file special.c.
References add_string(), copy_object(), RMParms::difficulty, RMParms::difficulty_increase, RMParms::dungeon_level, RMParms::exitstyle, find_first_free_spot(), find_style(), RMParms::floorstyle, freearr_x, freearr_y, get_object(), GLORY_HOLE, HUGE_BUF, insert_ob_in_map(), llevError, LOG(), MAP_HEIGHT, MAP_WIDTH, MIN_RANDOM_MAP_SIZE, MINING_ZONE, mon, obj::msg, NR_OF_HOLE_TYPES, OPT_WALLS_ONLY, ORC_ZONE, pick_random_object(), obj::slaying, RMParms::wallstyle, write_parameters_to_string(), obj::x, and obj::y.
Referenced by place_specials_in_map().
Main function for specials.
map | map to alter. |
layout | layout the map was generated from. |
RP | parameters the map was generated from. |
Definition at line 323 of file special.c.
References RMParms::difficulty, find_spot_for_submap(), find_style(), include_map_in_map(), MAP_HEIGHT, MAP_WIDTH, NUM_OF_SPECIAL_TYPES, place_fountain_with_specials(), place_special_exit(), SPECIAL_EXIT, SPECIAL_FOUNTAIN, and SPECIAL_SUBMAP.
Referenced by generate_random_map().