… | |
… | |
43 | /* clear map completely of all !floor objects: |
43 | /* clear map completely of all !floor objects: |
44 | * a rectangular area of xsize, ysize |
44 | * a rectangular area of xsize, ysize |
45 | * is cleared with the top left corner at xstart, ystart |
45 | * is cleared with the top left corner at xstart, ystart |
46 | */ |
46 | */ |
47 | static void |
47 | static void |
48 | nuke_map_region (maptile *map, char **maze, int xstart, int ystart, int xsize, int ysize) |
48 | nuke_map_region (maptile *map, layout &maze, int xstart, int ystart, int xsize, int ysize) |
49 | { |
49 | { |
50 | for (int i = xstart; i < xstart + xsize; i++) |
50 | for (int i = xstart; i < xstart + xsize; i++) |
51 | for (int j = ystart; j < ystart + ysize; j++) |
51 | for (int j = ystart; j < ystart + ysize; j++) |
52 | { |
52 | { |
53 | maze[i][j] = 'S'; |
53 | maze[i][j] = 'S'; |
… | |
… | |
84 | dest_map->insert (new_ob, x + i, y + j, 0, INS_NO_MERGE | INS_NO_WALK_ON); |
84 | dest_map->insert (new_ob, x + i, y + j, 0, INS_NO_MERGE | INS_NO_WALK_ON); |
85 | } |
85 | } |
86 | } |
86 | } |
87 | |
87 | |
88 | static int |
88 | static int |
89 | find_spot_for_submap (maptile *map, char **maze, int *ix, int *iy, int xsize, int ysize) |
89 | find_spot_for_submap (maptile *map, layout &maze, int *ix, int *iy, int xsize, int ysize) |
90 | { |
90 | { |
91 | int blocked, i, j; |
91 | int blocked, i, j; |
92 | |
92 | |
93 | /* don't even try to place a submap into a map if the big map isn't |
93 | /* don't even try to place a submap into a map if the big map isn't |
94 | sufficiently large. */ |
94 | sufficiently large. */ |
… | |
… | |
286 | rp.set ("monsterstyle" , mon); |
286 | rp.set ("monsterstyle" , mon); |
287 | rp.set ("treasurestyle", "none"); |
287 | rp.set ("treasurestyle", "none"); |
288 | rp.set ("layoutstyle" , style); |
288 | rp.set ("layoutstyle" , style); |
289 | rp.set ("decorstyle" , decor); |
289 | rp.set ("decorstyle" , decor); |
290 | rp.set ("decoroptions" , (IV)-1); |
290 | rp.set ("decoroptions" , (IV)-1); |
|
|
291 | rp.set ("symmetry" , (IV)SYMMETRY_NONE); |
|
|
292 | rp.set ("orientation" , (IV)1); |
291 | |
293 | |
292 | rp.layoutoptions1 = RMOPT_WALLS_ONLY; |
294 | rp.layoutoptions1 = RMOPT_WALLS_ONLY; |
293 | rp.symmetry = SYMMETRY_NONE; |
|
|
294 | rp.dungeon_depth = RP->dungeon_level; |
295 | rp.dungeon_depth = RP->dungeon_level; |
295 | rp.dungeon_level = RP->dungeon_level; |
296 | rp.dungeon_level = RP->dungeon_level; |
296 | rp.difficulty = RP->difficulty; |
297 | rp.difficulty = RP->difficulty; |
297 | rp.difficulty_given = RP->difficulty; |
298 | rp.difficulty_given = RP->difficulty; |
298 | rp.difficulty_increase = RP->difficulty_increase; |
299 | rp.difficulty_increase = RP->difficulty_increase; |
299 | rp.orientation = 1; |
|
|
300 | rp.random_seed = uint32_t (RP->random_seed + 0xdeadbeef); |
300 | rp.random_seed = uint32_t (RP->random_seed + 0xdeadbeef); |
301 | |
301 | |
302 | the_exit->slaying = shstr_random_map_exit; |
302 | the_exit->slaying = shstr_random_map_exit; |
303 | the_exit->msg = rp.as_shstr (); |
303 | the_exit->msg = rp.as_shstr (); |
304 | |
304 | |
… | |
… | |
307 | |
307 | |
308 | insert_ob_in_map (the_exit, map, NULL, 0); |
308 | insert_ob_in_map (the_exit, map, NULL, 0); |
309 | } |
309 | } |
310 | |
310 | |
311 | void |
311 | void |
312 | place_specials_in_map (maptile *map, char **maze, random_map_params *RP) |
312 | place_specials_in_map (maptile *map, layout &maze, random_map_params *RP) |
313 | { |
313 | { |
314 | switch (rmg_rndm (NUM_OF_SPECIAL_TYPES)) |
314 | switch (rmg_rndm (NUM_OF_SPECIAL_TYPES)) |
315 | { |
315 | { |
316 | case SPECIAL_SUBMAP: |
316 | case SPECIAL_SUBMAP: |
317 | { |
317 | { |