summaryrefslogtreecommitdiff
path: root/src/init1.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
committerBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
commit1e045ed09258e6c7fff63ef829759c6c8f06f441 (patch)
tree89a8737e5d33ccf2723a199efdf0aa8eb2d175e4 /src/init1.cc
parent86fba667d4aaf01b0efc47e26b8e482f13349038 (diff)
Separate skill values from skill descriptions
Diffstat (limited to 'src/init1.cc')
-rw-r--r--src/init1.cc27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/init1.cc b/src/init1.cc
index 028e6b14..5395ed70 100644
--- a/src/init1.cc
+++ b/src/init1.cc
@@ -3085,12 +3085,12 @@ errr init_set_info_txt(FILE *fp)
*/
errr init_s_info_txt(FILE *fp)
{
- int i, z, order = 1;
+ int i, order = 1;
char buf[1024];
char *s;
/* Current entry */
- skill_type *s_ptr = NULL;
+ skill_descriptor *s_ptr = NULL;
/* Just before the first record */
@@ -3131,8 +3131,8 @@ errr init_s_info_txt(FILE *fp)
s2 = find_skill(sec);
if (s2 == -1) return (1);
- s_info[s2].father = s1;
- s_info[s2].order = order++;
+ s_descriptors[s2].father = s1;
+ s_descriptors[s2].order = order++;
/* Next... */
continue;
@@ -3157,8 +3157,8 @@ errr init_s_info_txt(FILE *fp)
s2 = find_skill(sec);
if ((s1 == -1) || (s2 == -1)) return (1);
- s_info[s1].action[s2] = SKILL_EXCLUSIVE;
- s_info[s2].action[s1] = SKILL_EXCLUSIVE;
+ s_descriptors[s1].action[s2] = SKILL_EXCLUSIVE;
+ s_descriptors[s2].action[s1] = SKILL_EXCLUSIVE;
/* Next... */
continue;
@@ -3191,7 +3191,7 @@ errr init_s_info_txt(FILE *fp)
s2 = find_skill(sec);
if ((s1 == -1) || (s2 == -1)) return (1);
- s_info[s1].action[s2] = -atoi(cval);
+ s_descriptors[s1].action[s2] = -atoi(cval);
/* Next... */
continue;
@@ -3223,7 +3223,7 @@ errr init_s_info_txt(FILE *fp)
s2 = find_skill(sec);
if ((s1 == -1) || (s2 == -1)) return (1);
- s_info[s1].action[s2] = atoi(cval);
+ s_descriptors[s1].action[s2] = atoi(cval);
/* Next... */
continue;
@@ -3254,21 +3254,12 @@ errr init_s_info_txt(FILE *fp)
error_idx = i;
/* Point at the "info" */
- s_ptr = &s_info[i];
+ s_ptr = &s_descriptors[i];
/* Copy name */
assert(!s_ptr->name);
s_ptr->name = my_strdup(s);
- /* Init */
- s_ptr->action_mkey = 0;
- s_ptr->dev = FALSE;
- s_ptr->random_gain_chance = 100;
- for (z = 0; z < max_s_idx; z++)
- {
- s_ptr->action[z] = 0;
- }
-
/* Next... */
continue;
}