OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Sun, 15 Oct 2017 13:00:09 +0000 (22:00 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sun, 15 Oct 2017 13:00:09 +0000 (22:00 +0900)
src/externs.h
src/init1.c
src/init2.c
src/mspells3.c
src/object1.c
src/types.h
src/util.c

index 38fcd88..785cdfb 100644 (file)
@@ -1362,7 +1362,7 @@ extern bool get_string(cptr prompt, char *buf, int len);
 extern bool get_check(cptr prompt);
 extern bool get_check_strict(cptr prompt, int mode);
 extern bool get_com(cptr prompt, char *command, bool z_escape);
-extern s16b get_quantity(cptr prompt, int max);
+extern s16b get_quantity(cptr prompt, COMMAND_CODE max);
 extern void pause_line(int row);
 extern void request_command(int shopping);
 extern bool is_a_vowel(int ch);
index 4d66693..add6673 100644 (file)
@@ -2474,9 +2474,9 @@ errr parse_a_info(char *buf, header *head)
                                &tval, &sval, &pval)) return (1);
 
                /* Save the values */
-               a_ptr->tval = tval;
-               a_ptr->sval = sval;
-               a_ptr->pval = pval;
+               a_ptr->tval = (OBJECT_TYPE_VALUE)tval;
+               a_ptr->sval = (OBJECT_SUBTYPE_VALUE)sval;
+               a_ptr->pval = (PARAMETER_VALUE)pval;
        }
 
        /* Process 'W' for "More Info" (one line only) */
@@ -2490,10 +2490,10 @@ errr parse_a_info(char *buf, header *head)
                                &level, &rarity, &wgt, &cost)) return (1);
 
                /* Save the values */
-               a_ptr->level = level;
-               a_ptr->rarity = rarity;
-               a_ptr->weight = wgt;
-               a_ptr->cost = cost;
+               a_ptr->level = (DEPTH)level;
+               a_ptr->rarity = (RARITY)rarity;
+               a_ptr->weight = (WEIGHT)wgt;
+               a_ptr->cost = (PRICE)cost;
        }
 
        /* Hack -- Process 'P' for "power" and such */
@@ -3394,7 +3394,7 @@ errr parse_d_info(char *buf, header *head)
                        d_ptr->floor[i].feat = f_tag_to_index(zz[i * 2]);
                        if (d_ptr->floor[i].feat < 0) return PARSE_ERROR_UNDEFINED_TERRAIN_TAG;
 
-                       d_ptr->floor[i].percent = atoi(zz[i * 2 + 1]);
+                       d_ptr->floor[i].percent = (PERCENTAGE)atoi(zz[i * 2 + 1]);
                }
                d_ptr->tunnel_percent = atoi(zz[DUNGEON_FEAT_PROB_NUM * 2]);
        }
@@ -3413,7 +3413,7 @@ errr parse_d_info(char *buf, header *head)
                        d_ptr->fill[i].feat = f_tag_to_index(zz[i * 2]);
                        if (d_ptr->fill[i].feat < 0) return PARSE_ERROR_UNDEFINED_TERRAIN_TAG;
 
-                       d_ptr->fill[i].percent = atoi(zz[i * 2 + 1]);
+                       d_ptr->fill[i].percent = (PERCENTAGE)atoi(zz[i * 2 + 1]);
                }
 
                d_ptr->outer_wall = f_tag_to_index(zz[DUNGEON_FEAT_PROB_NUM * 2]);
index 734d34e..5e01a23 100644 (file)
@@ -1615,7 +1615,7 @@ s16b f_tag_to_index_in_init(cptr str)
  */
 static errr init_feat_variables(void)
 {
-       int i;
+       FEAT_IDX i;
 
        /* Nothing */
        feat_none = f_tag_to_index_in_init("NONE");
index be74dd6..a2748cd 100644 (file)
@@ -1463,7 +1463,7 @@ static bool cast_learned_spell(int spell, bool success)
  */
 bool do_cmd_cast_learned(void)
 {
-       int             n = 0;
+       SPELL_IDX n = 0;
        int             chance;
        int             minfail = 0;
        int             plev = p_ptr->lev;
index a05a4e7..0ed6548 100644 (file)
@@ -2988,7 +2988,7 @@ bool get_item(COMMAND_CODE *cp, cptr pmt, cptr str, int mode)
        /* Repeat until done */
        while (!done)
        {
-               int get_item_label = 0;
+               COMMAND_CODE get_item_label = 0;
 
                /* Show choices */
                int ni = 0;
index a23fe70..24eeab2 100644 (file)
@@ -219,17 +219,16 @@ struct ego_item_type
        DEPTH level;                    /* Minimum level */
        RARITY rarity;          /* Object rarity */
 
-       byte max_to_h;          /* Maximum to-hit bonus */
-       byte max_to_d;          /* Maximum to-dam bonus */
-       byte max_to_a;          /* Maximum to-ac bonus */
+       HIT_PROB max_to_h;              /* Maximum to-hit bonus */
+       HIT_POINT max_to_d;             /* Maximum to-dam bonus */
+       ARMOUR_CLASS max_to_a;          /* Maximum to-ac bonus */
 
        PARAMETER_VALUE max_pval;               /* Maximum pval */
 
-       s32b cost;                      /* Ego-item "cost" */
+       PRICE cost;                     /* Ego-item "cost" */
 
-       u32b flags[TR_FLAG_SIZE];       /* Ego-Item Flags */
-
-       u32b gen_flags;         /* flags for generate */
+       BIT_FLAGS flags[TR_FLAG_SIZE];  /* Ego-Item Flags */
+       BIT_FLAGS gen_flags;            /* flags for generate */
 
        IDX act_idx;            /* Activative ability index */
 };
@@ -1586,8 +1585,8 @@ struct high_score
 
 typedef struct
 {
-       s16b feat;    /* Feature tile */
-       byte percent; /* Chance of type */
+       FEAT_IDX feat;    /* Feature tile */
+       PERCENTAGE percent; /* Chance of type */
 }
 feat_prob;
 
@@ -1598,8 +1597,8 @@ struct dungeon_info_type {
        STR_OFFSET name;                /* Name */
        STR_OFFSET text;                /* Description */
 
-       byte dy;
-       byte dx;
+       POSITION dy;
+       POSITION dx;
 
        feat_prob floor[DUNGEON_FEAT_PROB_NUM]; /* Floor probability */
        feat_prob fill[DUNGEON_FEAT_PROB_NUM];  /* Cave wall probability */
index f3f85d4..2f75790 100644 (file)
@@ -3802,7 +3802,7 @@ bool get_com(cptr prompt, char *command, bool z_escape)
  *
  * Hack -- allow "command_arg" to specify a quantity
  */
-s16b get_quantity(cptr prompt, int max)
+s16b get_quantity(cptr prompt, COMMAND_CODE max)
 {
        bool res;
        COMMAND_CODE amt;