int x1, y1;
int table_size = sizeof(terrain_table[0]) / sizeof(s16b);
int roughness = 1; /* The roughness of the level. */
+ u32b state_backup[4];
/* Unused */
(void)border;
}
- /* Hack -- Use the "simple" RNG */
- Rand_quick = TRUE;
+ /* Hack -- Backup the RNG state */
+ Rand_state_backup(state_backup);
- /* Hack -- Induce consistant town layout */
- Rand_value = seed;
+ /* Hack -- Induce consistant flavors */
+ Rand_state_init(seed);
if (!corner)
{
cave[MAX_HGT - 2][MAX_WID - 2].feat = terrain_table[terrain][cave[MAX_HGT - 2][MAX_WID - 2].feat];
}
- /* Use the complex RNG */
- Rand_quick = FALSE;
+ /* Hack -- Restore the RNG state */
+ Rand_state_restore(state_backup);
}
if (wilderness[y][x].entrance && !wilderness[y][x].town && (p_ptr->total_winner || !(d_info[wilderness[y][x].entrance].flags1 & DF1_WINNER)))
{
int dy, dx;
+ u32b state_backup[4];
- /* Hack -- Use the "simple" RNG */
- Rand_quick = TRUE;
+ /* Hack -- Backup the RNG state */
+ Rand_state_backup(state_backup);
- /* Hack -- Induce consistant town layout */
- Rand_value = wilderness[y][x].seed;
+ /* Hack -- Induce consistant flavors */
+ Rand_state_init(wilderness[y][x].seed);
dy = rand_range(6, cur_hgt - 6);
dx = rand_range(6, cur_wid - 6);
cave[dy][dx].feat = feat_entrance;
cave[dy][dx].special = wilderness[y][x].entrance;
- /* Use the complex RNG */
- Rand_quick = FALSE;
+ /* Hack -- Restore the RNG state */
+ Rand_state_restore(state_backup);
}
}