OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Sat, 2 Dec 2017 09:41:58 +0000 (18:41 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sat, 2 Dec 2017 09:41:58 +0000 (18:41 +0900)
src/cmd2.c
src/externs.h
src/init1.c
src/init2.c
src/load.c
src/object1.c
src/types.h
src/wizard2.c
src/xtra2.c

index 16d2773..7d71998 100644 (file)
@@ -2512,7 +2512,7 @@ void do_cmd_walk(bool pickup)
        }
 
        /* Get a "repeated" direction */
-       if (get_rep_dir(&dir,FALSE))
+       if (get_rep_dir(&dir, FALSE))
        {
                /* Take a turn */
                p_ptr->energy_use = 100;
index 0b53eca..3f926f8 100644 (file)
@@ -1505,7 +1505,7 @@ extern bool target_set(int mode);
 extern void target_set_prepare_look(void);
 extern bool get_aim_dir(DIRECTION *dp);
 extern bool get_hack_dir(int *dp);
-extern bool get_rep_dir(int *dp, bool under);
+extern bool get_rep_dir(DIRECTION *dp, bool under);
 extern bool get_rep_dir2(int *dp);
 extern void gain_level_reward(int chosen_reward);
 extern bool tgt_pt(POSITION *x, POSITION *y);
index 1882d27..7167830 100644 (file)
@@ -3071,10 +3071,10 @@ errr parse_r_info(char *buf, header *head)
                if (*t == 'd') *t++ = '\0';
 
                /* Save the method */
-               r_ptr->blow[i].method = n1;
+               r_ptr->blow[i].method = (BLOW_METHOD)n1;
 
                /* Save the effect */
-               r_ptr->blow[i].effect = n2;
+               r_ptr->blow[i].effect = (BLOW_EFFECT)n2;
 
                /* Extract the damage dice and sides */
                r_ptr->blow[i].d_dice = atoi(s);
@@ -4230,13 +4230,13 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
                                if (num < 9) return (PARSE_ERROR_TOO_FEW_ARGUMENTS);
 
                                q_ptr->type    = atoi(zz[2]);
-                               q_ptr->num_mon = atoi(zz[3]);
-                               q_ptr->cur_num = atoi(zz[4]);
-                               q_ptr->max_num = atoi(zz[5]);
-                               q_ptr->level   = atoi(zz[6]);
+                               q_ptr->num_mon = (MONSTER_NUMBER)atoi(zz[3]);
+                               q_ptr->cur_num = (MONSTER_NUMBER)atoi(zz[4]);
+                               q_ptr->max_num = (MONSTER_NUMBER)atoi(zz[5]);
+                               q_ptr->level   = (DEPTH)atoi(zz[6]);
                                q_ptr->r_idx   = (IDX)atoi(zz[7]);
                                q_ptr->k_idx   = (IDX)atoi(zz[8]);
-                               q_ptr->dungeon = atoi(zz[9]);
+                               q_ptr->dungeon = (DUNGEON_IDX)atoi(zz[9]);
 
                                if (num > 10)
                                        q_ptr->flags  = atoi(zz[10]);
index ff4d1ce..1a182ee 100644 (file)
@@ -1978,7 +1978,7 @@ static errr init_object_alloc(void)
                                z = y + aux[x];
 
                                /* Load the entry */
-                               table[z].index = i;
+                               table[z].index = (KIND_OBJECT_IDX)i;
                                table[z].level = (DEPTH)x;
                                table[z].prob1 = (PROB)p;
                                table[z].prob2 = (PROB)p;
@@ -2047,7 +2047,7 @@ static errr init_alloc(void)
                        p = (100 / r_ptr->rarity);
 
                        /* Load the entry */
-                       alloc_race_table[i].index = elements[i].index;
+                       alloc_race_table[i].index = (KIND_OBJECT_IDX)elements[i].index;
                        alloc_race_table[i].level = (DEPTH)x;
                        alloc_race_table[i].prob1 = (PROB)p;
                        alloc_race_table[i].prob2 = (PROB)p;
index dfb4fe8..f2396f6 100644 (file)
@@ -3579,7 +3579,8 @@ static errr rd_savefile_new_aux(void)
                                }
                                else
                                {
-                                       rd_byte(&q_ptr->complev);
+                                       rd_byte(&tmp8u);
+                                       q_ptr->complev = tmp8u;
                                }
                                if(h_older_than(2, 1, 2, 2))
                                {
@@ -3615,7 +3616,8 @@ static errr rd_savefile_new_aux(void)
                                        if (q_ptr->k_idx)
                                                a_info[q_ptr->k_idx].gen_flags |= TRG_QUESTITEM;
 
-                                       rd_byte(&q_ptr->flags);
+                                       rd_byte(&tmp8u);
+                                       q_ptr->flags = tmp8u;
 
                                        if (z_older_than(10, 3, 11))
                                        {
@@ -3634,7 +3636,8 @@ static errr rd_savefile_new_aux(void)
                                        }
                                        else
                                        {
-                                               rd_byte(&q_ptr->dungeon);
+                                               rd_byte(&tmp8u);
+                                               q_ptr->dungeon = tmp8u;
                                        }
                                        /* Mark uniques */
                                        if (q_ptr->status == QUEST_STATUS_TAKEN || q_ptr->status == QUEST_STATUS_UNTAKEN)
index eecf2a4..eff1db8 100644 (file)
@@ -3631,8 +3631,8 @@ int scan_floor(int *items, POSITION y, POSITION x, int mode)
  */
 COMMAND_CODE show_floor(int target_item, POSITION y, POSITION x, TERM_POSITION *min_width)
 {
-       COMMAND_CODE i;
-       int j, k, l, m;
+       COMMAND_CODE i, m;
+       int j, k, l;
        int col, len;
 
        object_type *o_ptr;
index 937be57..2aa9ad1 100644 (file)
@@ -635,7 +635,7 @@ typedef struct alloc_entry alloc_entry;
 
 struct alloc_entry
 {
-       IDX index;              /* The actual index */
+       KIND_OBJECT_IDX index;          /* The actual index */
 
        DEPTH level;            /* Base dungeon level */
        PROB prob1;             /* Probability, pass 1 */
index f94fd98..a2afe69 100644 (file)
@@ -745,16 +745,17 @@ void strip_name(char *buf, KIND_OBJECT_IDX k_idx)
  * This function returns the k_idx of an object type, or zero if failed
  * List up to 50 choices in three columns
  */
-static IDX wiz_create_itemtype(void)
+static KIND_OBJECT_IDX wiz_create_itemtype(void)
 {
-       int i, num, max_num;
-       int col, row;
+       KIND_OBJECT_IDX i;
+       int num, max_num;
+       TERM_POSITION col, row;
        OBJECT_TYPE_VALUE tval;
 
        cptr tval_desc;
        char ch;
 
-       int choice[80];
+       KIND_OBJECT_IDX choice[80];
 
        char buf[160];
 
index 0b4b85e..9c046e0 100644 (file)
@@ -4235,9 +4235,9 @@ bool get_aim_dir(DIRECTION *dp)
  * This function tracks and uses the "global direction", and uses
  * that as the "desired direction", to which "confusion" is applied.
  */
-bool get_rep_dir(int *dp, bool under)
+bool get_rep_dir(DIRECTION *dp, bool under)
 {
-       int dir;
+       DIRECTION dir;
        cptr prompt;
 
        /* Initialize */