summaryrefslogtreecommitdiff
path: root/src/birth.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2017-09-07 12:53:57 +0200
committerBardur Arantsson <bardur@scientician.net>2017-09-07 12:53:57 +0200
commit39e1689130e87732cf410aaea7458dfdc399d50e (patch)
tree1dab000e95f28816522ea0997f022ec8ca64ef40 /src/birth.cc
parentb4dafbb7604b8840c702455022096e8c17c8726b (diff)
Move special_level[] to Game struct
Refactor into a multi_array<> to make it more robust.
Diffstat (limited to 'src/birth.cc')
-rw-r--r--src/birth.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/birth.cc b/src/birth.cc
index 7d54d3a3..f677e6e1 100644
--- a/src/birth.cc
+++ b/src/birth.cc
@@ -571,6 +571,7 @@ static void player_wipe()
auto &r_info = game->edit_data.r_info;
auto &k_info = game->edit_data.k_info;
auto &a_info = game->edit_data.a_info;
+ auto &level_markers = game->level_markers;
/* Wipe special levels */
wipe_saved();
@@ -585,11 +586,11 @@ static void player_wipe()
p_ptr->lives = 0;
/* Wipe the towns */
- for (std::size_t i = 0; i < d_info.size(); i++)
+ for (auto &&i: level_markers)
{
- for (std::size_t j = 0; j < MAX_DUNGEON_DEPTH; j++)
+ for (auto &&j: i)
{
- special_lvl[j][i] = 0;
+ j = level_marker::NORMAL;
}
}