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.48 by root, Tue Apr 13 03:24:32 2010 UTC vs.
Revision 1.51 by root, Wed Jun 30 01:32:57 2010 UTC

221 } 221 }
222 222
223 if (!hole_type) 223 if (!hole_type)
224 hole_type = rmg_rndm (NR_OF_HOLE_TYPES) + 1; 224 hole_type = rmg_rndm (NR_OF_HOLE_TYPES) + 1;
225 225
226 char buf[16384];
227 const char *style, *decor, *mon; 226 const char *style, *decor, *mon;
228 int g_xsize, g_ysize; 227 int g_xsize, g_ysize;
229 228
230 switch (hole_type) 229 switch (hole_type)
231 { 230 {
268 * code will generate new size values which are too large. 267 * code will generate new size values which are too large.
269 */ 268 */
270 max_it (g_xsize, MIN_RANDOM_MAP_SIZE); 269 max_it (g_xsize, MIN_RANDOM_MAP_SIZE);
271 max_it (g_ysize, MIN_RANDOM_MAP_SIZE); 270 max_it (g_ysize, MIN_RANDOM_MAP_SIZE);
272 271
272 dynbuf_text buf;
273
273 { 274 {
274 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...
275 276
277 rp.hv = (HV *)SvREFCNT_inc_NN ((SV *)RP->hv);
278 rp.hv_clone ();
279
276 rp.xsize = g_xsize; 280 rp.xsize = g_xsize;
277 rp.ysize = g_ysize; 281 rp.ysize = g_ysize;
278 282
279 assign (rp.wallstyle , RP->wallstyle); 283 rp.set ("treasurestyle", "none");
280 assign (rp.floorstyle , RP->floorstyle); 284 rp.set ("decorstyle" , decor);
285 rp.set ("decoroptions" , (IV)-1);
286
281 assign (rp.monsterstyle , mon); 287 assign (rp.monsterstyle, mon);
282 assign (rp.treasurestyle, "none");
283 assign (rp.layoutstyle , style); 288 assign (rp.layoutstyle , style);
284 assign (rp.decorstyle , decor);
285 assign (rp.exitstyle , RP->exitstyle);
286 289
287 rp.layoutoptions1 = RMOPT_WALLS_ONLY; 290 rp.layoutoptions1 = RMOPT_WALLS_ONLY;
288 rp.symmetry = SYMMETRY_NONE; 291 rp.symmetry = SYMMETRY_NONE;
289 rp.dungeon_depth = RP->dungeon_level; 292 rp.dungeon_depth = RP->dungeon_level;
290 rp.dungeon_level = RP->dungeon_level; 293 rp.dungeon_level = RP->dungeon_level;
291 rp.difficulty = RP->difficulty; 294 rp.difficulty = RP->difficulty;
292 rp.difficulty_given = RP->difficulty; 295 rp.difficulty_given = RP->difficulty;
293 rp.difficulty_increase = RP->difficulty_increase; 296 rp.difficulty_increase = RP->difficulty_increase;
294 rp.decoroptions = -1;
295 rp.orientation = 1; 297 rp.orientation = 1;
296 rp.random_seed = RP->random_seed ^ 0xdeadbeef; 298 rp.random_seed = uint32_t (RP->random_seed + 0xdeadbeef);
297 rp.region = RP->region; 299 rp.region = RP->region;
298 300
299 write_map_parameters_to_string (buf, &rp); 301 the_exit->slaying = shstr_random_map_exit;
302 the_exit->msg = rp.as_shstr ();
303
300 delete &rp; 304 delete &rp;
301 } 305 }
302
303 the_exit->slaying = shstr_random_map_exit;
304 the_exit->msg = buf;
305 306
306 insert_ob_in_map (the_exit, map, NULL, 0); 307 insert_ob_in_map (the_exit, map, NULL, 0);
307} 308}
308 309
309void 310void
337 place_fountain_with_specials (map); 338 place_fountain_with_specials (map);
338 break; 339 break;
339 340
340 case SPECIAL_EXIT: 341 case SPECIAL_EXIT:
341 /* Make an exit to another random map, e.g. a gloryhole. */ 342 /* Make an exit to another random map, e.g. a gloryhole. */
342 //place_special_exit (map, 0, RP); 343 place_special_exit (map, 0, RP);
343 place_special_exit (map, GLORY_HOLE, RP);
344 break; 344 break;
345 } 345 }
346} 346}
347 347

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines