… | |
… | |
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 | //TODO: deep copy |
|
|
278 | rp.hv = (HV *)SvREFCNT_inc_NN ((SV *)RP->hv); |
277 | rp.hv = (HV *)SvREFCNT_inc_NN ((SV *)RP->hv); |
|
|
278 | rp.hv_clone (); |
279 | |
279 | |
280 | rp.xsize = g_xsize; |
280 | rp.xsize = g_xsize; |
281 | rp.ysize = g_ysize; |
281 | rp.ysize = g_ysize; |
282 | |
282 | |
|
|
283 | rp.set ("treasurestyle", "none"); |
|
|
284 | rp.set ("decorstyle" , decor); |
|
|
285 | rp.set ("decoroptions" , (IV)-1); |
|
|
286 | |
283 | assign (rp.monsterstyle , mon); |
287 | assign (rp.monsterstyle, mon); |
284 | assign (rp.treasurestyle, "none"); |
|
|
285 | assign (rp.layoutstyle , style); |
288 | assign (rp.layoutstyle , style); |
286 | assign (rp.decorstyle , decor); |
|
|
287 | |
289 | |
288 | rp.layoutoptions1 = RMOPT_WALLS_ONLY; |
290 | rp.layoutoptions1 = RMOPT_WALLS_ONLY; |
289 | rp.symmetry = SYMMETRY_NONE; |
291 | rp.symmetry = SYMMETRY_NONE; |
290 | rp.dungeon_depth = RP->dungeon_level; |
292 | rp.dungeon_depth = RP->dungeon_level; |
291 | rp.dungeon_level = RP->dungeon_level; |
293 | rp.dungeon_level = RP->dungeon_level; |
292 | rp.difficulty = RP->difficulty; |
294 | rp.difficulty = RP->difficulty; |
293 | rp.difficulty_given = RP->difficulty; |
295 | rp.difficulty_given = RP->difficulty; |
294 | rp.difficulty_increase = RP->difficulty_increase; |
296 | rp.difficulty_increase = RP->difficulty_increase; |
295 | rp.decoroptions = -1; |
|
|
296 | rp.orientation = 1; |
297 | rp.orientation = 1; |
297 | rp.random_seed = RP->random_seed + 0xdeadbeef; |
298 | rp.random_seed = uint32_t (RP->random_seed + 0xdeadbeef); |
298 | rp.region = RP->region; |
299 | rp.region = RP->region; |
299 | |
300 | |
300 | write_map_parameters_to_string (buf, &rp); |
301 | the_exit->slaying = shstr_random_map_exit; |
|
|
302 | the_exit->msg = rp.as_shstr (); |
|
|
303 | |
301 | delete &rp; |
304 | delete &rp; |
302 | } |
305 | } |
303 | |
|
|
304 | the_exit->slaying = shstr_random_map_exit; |
|
|
305 | the_exit->msg = buf; |
|
|
306 | |
306 | |
307 | insert_ob_in_map (the_exit, map, NULL, 0); |
307 | insert_ob_in_map (the_exit, map, NULL, 0); |
308 | } |
308 | } |
309 | |
309 | |
310 | void |
310 | void |