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.52 by root, Fri Jul 2 15:03:57 2010 UTC vs.
Revision 1.54 by root, Sat Jul 3 01:49:18 2010 UTC

272 dynbuf_text buf; 272 dynbuf_text buf;
273 273
274 { 274 {
275 random_map_params &rp = *new random_map_params; // for zero_intiialised to work... 275 random_map_params &rp = *new random_map_params; // for zero_intiialised to work...
276 276
277 rp.hv = (HV *)SvREFCNT_inc_NN ((SV *)RP->hv); 277 rp.hv = (HV *)newHV ();
278 rp.hv_clone ();
279 278
280 rp.xsize = g_xsize; 279 rp.xsize = g_xsize;
281 rp.ysize = g_ysize; 280 rp.ysize = g_ysize;
282 281
282 rp.set ("wallstyle" , RP->get_str ("wallstyle" , 0));
283 rp.set ("floorstyle" , RP->get_str ("floorstyle", 0));
284 rp.set ("exitstyle" , RP->get_str ("exitstyle" , 0));
285 rp.set ("region" , RP->get_str ("region" , 0));
286 rp.set ("monsterstyle" , mon);
283 rp.set ("treasurestyle", "none"); 287 rp.set ("treasurestyle", "none");
288 rp.set ("layoutstyle" , style);
284 rp.set ("decorstyle" , decor); 289 rp.set ("decorstyle" , decor);
285 rp.set ("decoroptions" , (IV)-1); 290 rp.set ("decoroptions" , (IV)-1);
286
287 assign (rp.monsterstyle, mon);
288 assign (rp.layoutstyle , style);
289 291
290 rp.layoutoptions1 = RMOPT_WALLS_ONLY; 292 rp.layoutoptions1 = RMOPT_WALLS_ONLY;
291 rp.symmetry = SYMMETRY_NONE; 293 rp.symmetry = SYMMETRY_NONE;
292 rp.dungeon_depth = RP->dungeon_level; 294 rp.dungeon_depth = RP->dungeon_level;
293 rp.dungeon_level = RP->dungeon_level; 295 rp.dungeon_level = RP->dungeon_level;
294 rp.difficulty = RP->difficulty; 296 rp.difficulty = RP->difficulty;
295 rp.difficulty_given = RP->difficulty; 297 rp.difficulty_given = RP->difficulty;
296 rp.difficulty_increase = RP->difficulty_increase; 298 rp.difficulty_increase = RP->difficulty_increase;
297 rp.orientation = 1; 299 rp.orientation = 1;
298 rp.random_seed = uint32_t (RP->random_seed + 0xdeadbeef); 300 rp.random_seed = uint32_t (RP->random_seed + 0xdeadbeef);
299 rp.region = RP->region;
300 301
301 the_exit->slaying = shstr_random_map_exit; 302 the_exit->slaying = shstr_random_map_exit;
302 the_exit->msg = rp.as_shstr (); 303 the_exit->msg = rp.as_shstr ();
303 304
304 delete &rp; 305 delete &rp;
305 } 306 }
306 307
307 insert_ob_in_map (the_exit, map, NULL, 0); 308 insert_ob_in_map (the_exit, map, NULL, 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines