39 #define NR_DECOR_OPTIONS 1
80 snprintf(style_name,
sizeof(style_name),
"/styles/decorstyles");
82 decor_map =
find_style(style_name, decorstyle, -1);
83 if (decor_map == NULL)
87 if (decor_option == 0)
90 switch (decor_option) {
95 int number_to_place = RANDOM()%((RP->
Xsize*RP->
Ysize)/5);
97 object *new_decor_object;
99 while (failures < 100 && number_to_place > 0) {
102 x = RANDOM()%(RP->
Xsize-2)+1;
103 y = RANDOM()%(RP->
Ysize-2)+1;
125 for (i = 1; i < RP->
Xsize-1; i++)
126 for (j = 1; j < RP->
Ysize-1; j++) {
127 if (maze[i][j] == 0) {
128 object *new_decor_object, *this_object;
object * pick_random_object(mapstruct *style)
void put_decor(mapstruct *map, char **maze, char *decorstyle, int decor_option, RMParms *RP)
int obj_count_in_map(mapstruct *map, int x, int y)
object * insert_ob_in_map(object *op, mapstruct *m, object *originator, int flag)
#define MOVE_BLOCK_DEFAULT
int snprintf(char *dest, int max, const char *format,...)
#define GET_MAP_OB(M, X, Y)
mapstruct * find_style(const char *dirname, const char *stylename, int difficulty)
void copy_object(object *op2, object *op)
object * arch_to_object(archetype *at)