summaryrefslogtreecommitdiff
path: root/src/object1.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-10-05 18:45:08 +0200
committerBardur Arantsson <bardur@scientician.net>2016-10-05 18:49:38 +0200
commitc25b265c056a4512b0fb0e1789927e6c4b7b32cf (patch)
tree42bc01558926aba40452ef49215399eabb25228d /src/object1.cc
parent89e75b855662b1dcc86a6dc3789fa496aafbb0a2 (diff)
Move t_info into GameEditData
Diffstat (limited to 'src/object1.cc')
-rw-r--r--src/object1.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/object1.cc b/src/object1.cc
index 3c7da36e..d04c7ab2 100644
--- a/src/object1.cc
+++ b/src/object1.cc
@@ -636,8 +636,7 @@ void reset_visuals(void)
auto &r_info = game->edit_data.r_info;
auto &f_info = game->edit_data.f_info;
auto &k_info = game->edit_data.k_info;
-
- int i;
+ auto &t_info = game->edit_data.t_info;
/* Extract some info about terrain features */
for (auto &f_ref: f_info)
@@ -687,13 +686,11 @@ void reset_visuals(void)
}
/* Reset attr/char code for trap overlay graphics */
- for (i = 0; i < max_t_idx; i++)
+ for (auto &t_ref: t_info)
{
- trap_type *t_ptr = &t_info[i];
-
/* Default attr/char */
- t_ptr->g_attr = 0;
- t_ptr->g_char = 0;
+ t_ref.g_attr = 0;
+ t_ref.g_char = 0;
}
@@ -1036,6 +1033,7 @@ static std::string object_desc_aux(object_type const *o_ptr, int pref, int mode)
auto const &k_info = game->edit_data.k_info;
auto const &a_info = game->edit_data.a_info;
auto const &e_info = game->edit_data.e_info;
+ auto const &t_info = game->edit_data.t_info;
static auto const TR_PVAL_MASK = compute_pval_mask();
bool_ hack_name = FALSE;