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.57 by root, Sun Aug 22 20:23:07 2010 UTC vs.
Revision 1.60 by root, Fri Jan 21 19:01:42 2011 UTC

223 break; 223 break;
224 } 224 }
225 } 225 }
226 226
227 if (!hole_type) 227 if (!hole_type)
228 hole_type = rmg_rndm (NR_OF_HOLE_TYPES) + 1; 228 hole_type = rmg_rndm (1, NR_OF_HOLE_TYPES - 1);
229 229
230 const char *style, *decor, *mon; 230 const char *style, *decor, *mon;
231 int g_xsize, g_ysize; 231 int g_xsize, g_ysize;
232 232
233 switch (hole_type) 233 switch (hole_type)
292 rp.set ("layoutstyle" , style); 292 rp.set ("layoutstyle" , style);
293 rp.set ("decorstyle" , decor); 293 rp.set ("decorstyle" , decor);
294 rp.set ("decoroptions" , (IV)-1); 294 rp.set ("decoroptions" , (IV)-1);
295 rp.set ("symmetry" , (IV)SYMMETRY_NONE); 295 rp.set ("symmetry" , (IV)SYMMETRY_NONE);
296 rp.set ("orientation" , (IV)1); 296 rp.set ("orientation" , (IV)1);
297 rp.set ("random_seed" , RP->get_uv ("random_seed") + 0xdeadbeefU);
297 298
298 rp.layoutoptions1 = RMOPT_WALLS_ONLY; 299 rp.layoutoptions1 = RMOPT_WALLS_ONLY;
299 rp.dungeon_depth = RP->dungeon_level; 300 rp.dungeon_depth = RP->dungeon_level;
300 rp.dungeon_level = RP->dungeon_level; 301 rp.dungeon_level = RP->dungeon_level;
301 rp.difficulty = RP->difficulty; 302 rp.difficulty = RP->difficulty;
302 rp.difficulty_given = RP->difficulty; 303 rp.difficulty_given = RP->difficulty;
303 rp.difficulty_increase = RP->difficulty_increase; 304 rp.difficulty_increase = RP->difficulty_increase;
304 rp.random_seed = uint32_t (RP->random_seed + 0xdeadbeef);
305 305
306 the_exit->slaying = shstr_random_map_exit; 306 the_exit->slaying = shstr_random_map_exit;
307 the_exit->msg = rp.as_shstr (); 307 the_exit->msg = rp.as_shstr ();
308 308
309 delete &rp; 309 delete &rp;
313} 313}
314 314
315void 315void
316place_specials_in_map (maptile *map, layout &maze, random_map_params *RP) 316place_specials_in_map (maptile *map, layout &maze, random_map_params *RP)
317{ 317{
318 switch (rmg_rndm (NUM_OF_SPECIAL_TYPES)) 318 switch (rmg_rndm (NUM_OF_SPECIAL_TYPES)) // can be NO_SPECIAL as well
319 { 319 {
320 case SPECIAL_SUBMAP: 320 case SPECIAL_SUBMAP:
321 { 321 {
322 /* includes a special map into the random map being made. */ 322 /* includes a special map into the random map being made. */
323 maptile *special_map = find_style ("/styles/specialmaps", 0, RP->difficulty, true); 323 maptile *special_map = find_style ("/styles/specialmaps", 0, RP->difficulty, true);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines