summaryrefslogtreecommitdiff
path: root/src/init1.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/init1.cc
parent89e75b855662b1dcc86a6dc3789fa496aafbb0a2 (diff)
Move t_info into GameEditData
Diffstat (limited to 'src/init1.cc')
-rw-r--r--src/init1.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/init1.cc b/src/init1.cc
index 185548ea..105aadda 100644
--- a/src/init1.cc
+++ b/src/init1.cc
@@ -4836,6 +4836,8 @@ static errr grab_one_trap_type_flag(trap_type *t_ptr, cptr what)
*/
errr init_t_info_txt(FILE *fp)
{
+ auto &t_info = game->edit_data.t_info;
+
int i;
char buf[1024];
char *s, *t;
@@ -4882,14 +4884,11 @@ errr init_t_info_txt(FILE *fp)
/* Verify information */
if (i <= error_idx) return (4);
- /* Verify information */
- if (i >= max_t_idx) return (2);
-
/* Save the index */
error_idx = i;
/* Point at the "info" */
- t_ptr = &t_info[i];
+ t_ptr = &expand_to_fit_index(t_info, i);
/* Copy name */
t_ptr->name = my_strdup(s);
@@ -6786,12 +6785,6 @@ static errr process_dungeon_file_aux(char *buf, int *yval, int *xval, int xvalst
max_m_idx = atoi(zz[1]);
}
- /* Maximum tr_idx */
- else if (zz[0][0] == 'U')
- {
- max_t_idx = atoi(zz[1]);
- }
-
/* Maximum wilderness x size */
else if (zz[0][0] == 'X')
{