OSDN Git Service

#37287 #37353 (2.2.0.89) BACT_IDX, BACT_RESTRICT_IDX 型を定義し、型の置換を継続中。LNK4075を修正。 ...
[hengband/hengband.git] / src / init1.c
index da537df..998e188 100644 (file)
@@ -1603,7 +1603,7 @@ static errr grab_one_feat_flag(feature_type *f_ptr, cptr what)
  */
 static errr grab_one_feat_action(feature_type *f_ptr, cptr what, int count)
 {
-       int i;
+       FF_FLAGS_IDX i;
 
        /* Check flags */
        for (i = 0; i < FF_FLAG_MAX; i++)
@@ -1821,7 +1821,7 @@ errr parse_f_info(char *buf, header *head)
                        if (1 == sscanf(s, "SUBTYPE_%d", &i))
                        {
                                /* Extract a "subtype" */
-                               f_ptr->subtype =  i;
+                               f_ptr->subtype = (FEAT_SUBTYPE)i;
 
                                /* Start at next entry */
                                s = t;
@@ -1860,7 +1860,7 @@ errr parse_f_info(char *buf, header *head)
                if (1 != sscanf(buf+2, "%d", &priority)) return (PARSE_ERROR_GENERIC);
 
                /* Save the value */
-               f_ptr->priority = priority;
+               f_ptr->priority = (FEAT_PRIORITY)priority;
        }
 
        /* Process 'K' for "States" (up to four lines + default (which cannot be last)) */
@@ -3497,7 +3497,7 @@ errr parse_d_info(char *buf, header *head)
                        if (1 == sscanf(s, "MONSTER_DIV_%d", &monst))
                        {
                                /* Extract a "Special %" */
-                               d_ptr->special_div = monst;
+                               d_ptr->special_div = (PROB)monst;
 
                                /* Start at next entry */
                                s = t;
@@ -3864,10 +3864,10 @@ static errr parse_line_building(char *buf)
                                building[index].letters[action_index] = zz[4][0];
 
                                /* Action code */
-                               building[index].actions[action_index] = atoi(zz[5]);
+                               building[index].actions[action_index] = (BACT_IDX)atoi(zz[5]);
 
                                /* Action restriction */
-                               building[index].action_restr[action_index] = atoi(zz[6]);
+                               building[index].action_restr[action_index] = (BACT_RESTRICT_IDX)atoi(zz[6]);
 
                                break;
                        }