42 #define NUM_OF_SPECIAL_TYPES 4
44 #define SPECIAL_SUBMAP 1
45 #define SPECIAL_FOUNTAIN 2
46 #define SPECIAL_EXIT 3
56 #define NR_OF_HOLE_TYPES 3
74 for (i = xstart; i < xstart+xsize; i++)
75 for (j = ystart; j < ystart+ysize; j++) {
113 if (tmp->
head != NULL)
153 for (tries = 0; tries < 20; tries++) {
158 for (l = i; l < i+xsize; l++)
159 for (m = j; m < j+ysize; m++)
160 is_occupied |= layout[l][m];
168 for (tries = 0; tries < 10; tries++) {
172 for (l = i; l < i+xsize; l++)
173 for (m = j; m < j+ysize; m++)
174 if (layout[l][m] ==
'C' || layout[l][m] ==
'>' || layout[l][m] ==
'<')
193 int ix, iy, i = -1, tries = 0;
199 while (i < 0 && tries < 10) {
238 const char *style, *decor, *
mon;
240 int g_xsize, g_ysize;
291 LOG(
llevError,
"place_special_exit: undefined hole type %d\n", hole_type);
305 "none", style, decor,
"none", RP->
exitstyle, NULL, NULL, NULL,
329 switch (special_type) {
333 if (special_map == NULL)
short freearr_x[SIZEOFFREE]
int find_spot_for_submap(mapstruct *map, char **layout, int *ix, int *iy, int xsize, int ysize)
object * pick_random_object(mapstruct *style)
void nuke_map_region(mapstruct *map, int xstart, int ystart, int xsize, int ysize)
short freearr_y[SIZEOFFREE]
void place_fountain_with_specials(mapstruct *map)
void remove_ob(object *op)
object * create_archetype(const char *name)
int find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
#define MIN_RANDOM_MAP_SIZE
#define QUERY_FLAG(xyz, p)
object * get_object(void)
void include_map_in_map(mapstruct *dest_map, mapstruct *in_map, int x, int y)
object * insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag)
float difficulty_increase
void place_specials_in_map(mapstruct *map, char **layout, RMParms *RP)
void write_parameters_to_string(char *buf, int xsize_n, int ysize_n, const char *wallstyle_n, const char *floorstyle_n, const char *monsterstyle_n, const char *treasurestyle_n, const char *layoutstyle_n, const char *decorstyle_n, const char *doorstyle_n, const char *exitstyle_n, const char *final_map_n, const char *exit_on_final_map_n, const char *this_map_n, int layoutoptions1_n, int layoutoptions2_n, int layoutoptions3_n, int symmetry_n, int dungeon_depth_n, int dungeon_level_n, int difficulty_n, int difficulty_given_n, int decoroptions_n, int orientation_n, int origin_x_n, int origin_y_n, int random_seed_n, int treasureoptions_n, float difficulty_increase)
void insert_multisquare_ob_in_map(object *new_obj, mapstruct *map)
sstring add_string(const char *str)
void place_special_exit(mapstruct *map, int hole_type, RMParms *RP)
void copy_object_with_inv(object *src_ob, object *dest_ob)
#define GET_MAP_OB(M, X, Y)
void LOG(LogLevel logLevel, const char *format,...)
mapstruct * find_style(const char *dirname, const char *stylename, int difficulty)
void copy_object(object *op2, object *op)
void free_object(object *ob)
#define NUM_OF_SPECIAL_TYPES
object * arch_to_object(archetype *at)