ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/random_maps/special.C
(Generate patch)

Comparing deliantra/server/random_maps/special.C (file contents):
Revision 1.54 by root, Sat Jul 3 01:49:18 2010 UTC vs.
Revision 1.56 by root, Sun Jul 4 22:12:26 2010 UTC

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 */
47static void 47static void
48nuke_map_region (maptile *map, char **maze, int xstart, int ystart, int xsize, int ysize) 48nuke_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
88static int 88static int
89find_spot_for_submap (maptile *map, char **maze, int *ix, int *iy, int xsize, int ysize) 89find_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
311void 311void
312place_specials_in_map (maptile *map, char **maze, random_map_params *RP) 312place_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 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines