* 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;
*/
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;
{
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;
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);
*/
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;