OSDN Git Service

[Refactor] #37287 #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Sat, 6 Oct 2018 06:23:48 +0000 (15:23 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sat, 6 Oct 2018 06:23:48 +0000 (15:23 +0900)
src/cave.c
src/cmd2.c
src/externs.h
src/spells2.c

index 8640ddc..49c3c16 100644 (file)
@@ -4840,9 +4840,9 @@ bool is_explosive_rune_grid(cave_type *c_ptr)
  * Calculate "incremental motion". Used by project() and shoot().
  * Assumes that (*y,*x) lies on the path from (y1,x1) to (y2,x2).
  */
-void mmove2(int *y, int *x, int y1, int x1, int y2, int x2)
+void mmove2(POSITION *y, POSITION *x, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 {
-       int dy, dx, dist, shift;
+       POSITION dy, dx, dist, shift;
 
        /* Extract the distance travelled */
        dy = (*y < y1) ? y1 - *y : *y - y1;
index 465386f..44cd167 100644 (file)
@@ -2836,8 +2836,9 @@ static s16b tot_dam_aux_shot(object_type *o_ptr, int tdam, monster_type *m_ptr)
  */
 void do_cmd_fire_aux(int item, object_type *j_ptr)
 {
-       int dir;
-       int i, y, x, ny, nx, ty, tx, prev_y, prev_x;
+       DIRECTION dir;
+       int i;
+       POSITION y, x, ny, nx, ty, tx, prev_y, prev_x;
        int tdam_base, tdis, thits, tmul;
        int bonus, chance;
        int cur_dis, visible;
@@ -3500,8 +3501,9 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
 {
        DIRECTION dir;
        OBJECT_IDX item;
-       int i, y, x, ty, tx, prev_y, prev_x;
-       int ny[19], nx[19];
+       int i;
+       POSITION y, x, ty, tx, prev_y, prev_x;
+       POSITION ny[19], nx[19];
        int chance, tdam, tdis;
        int mul, div, dd, ds;
        int cur_dis, visible;
index 5eed9b4..89153d5 100644 (file)
@@ -690,7 +690,7 @@ extern void remove_mirror(int y, int x);
 extern bool is_mirror_grid(cave_type *c_ptr);
 extern bool is_glyph_grid(cave_type *c_ptr);
 extern bool is_explosive_rune_grid(cave_type *c_ptr);
-extern void mmove2(int *y, int *x, int y1, int x1, int y2, int x2);
+extern void mmove2(POSITION *y, POSITION *x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern bool projectable(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern void scatter(POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode);
 extern void health_track(MONSTER_IDX m_idx);
index a5a36b2..3ef6ebe 100644 (file)
@@ -4484,9 +4484,10 @@ void cast_meteor(HIT_POINT dam, int rad)
 */
 bool cast_wrath_of_the_god(HIT_POINT dam, int rad)
 {
-       int x, y, tx, ty;
-       int nx, ny;
-       int dir, i;
+       POSITION x, y, tx, ty;
+       POSITION nx, ny;
+       DIRECTION dir;
+       int i;
        int b = 10 + randint1(10);
 
        if (!get_aim_dir(&dir)) return FALSE;