be more consistent with coordinates
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static boolean goodpos_onscary(int, int, struct permonst *);
|
||||
static boolean tele_jump_ok(int, int, int, int);
|
||||
static boolean teleok(int, int, boolean);
|
||||
static boolean goodpos_onscary(coordxy, coordxy, struct permonst *);
|
||||
static boolean tele_jump_ok(coordxy, coordxy, coordxy, coordxy);
|
||||
static boolean teleok(coordxy, coordxy, boolean);
|
||||
static void vault_tele(void);
|
||||
static boolean rloc_pos_ok(int, int, struct monst *);
|
||||
static void rloc_to_core(struct monst *, int, int, unsigned);
|
||||
static boolean rloc_pos_ok(coordxy, coordxy, struct monst *);
|
||||
static void rloc_to_core(struct monst *, coordxy, coordxy, unsigned);
|
||||
static void mvault_tele(struct monst *);
|
||||
static boolean m_blocks_teleporting(struct monst *);
|
||||
|
||||
@@ -43,7 +43,7 @@ noteleport_level(struct monst* mon)
|
||||
fields aside from 'monst->data' */
|
||||
static boolean
|
||||
goodpos_onscary(
|
||||
int x, int y,
|
||||
coordxy x, coordxy y,
|
||||
struct permonst *mptr)
|
||||
{
|
||||
/* onscary() checks Angels and lawful minions; this oversimplifies */
|
||||
@@ -75,7 +75,7 @@ goodpos_onscary(
|
||||
*/
|
||||
boolean
|
||||
goodpos(
|
||||
int x, int y,
|
||||
coordxy x, coordxy y,
|
||||
struct monst *mtmp,
|
||||
mmflags_nht gpflags)
|
||||
{
|
||||
@@ -196,8 +196,8 @@ enexto_core(
|
||||
{
|
||||
#define MAX_GOOD 15
|
||||
coord good[MAX_GOOD], *good_ptr;
|
||||
int x, y, range, i;
|
||||
int xmin, xmax, ymin, ymax, rangemax;
|
||||
coordxy x, y, range, i;
|
||||
coordxy xmin, xmax, ymin, ymax, rangemax;
|
||||
struct monst fakemon; /* dummy monster */
|
||||
boolean allow_xx_yy = (boolean) ((entflags & GP_ALLOW_XY) != 0);
|
||||
|
||||
@@ -278,7 +278,7 @@ enexto_core(
|
||||
|
||||
full:
|
||||
/* we've got between 1 and SIZE(good) candidates; choose one */
|
||||
i = rn2((int) (good_ptr - good));
|
||||
i = (coordxy) rn2((int) (good_ptr - good));
|
||||
cc->x = good[i].x;
|
||||
cc->y = good[i].y;
|
||||
return TRUE;
|
||||
@@ -290,7 +290,7 @@ enexto_core(
|
||||
* only for explicitly chosen destinations.)
|
||||
*/
|
||||
static boolean
|
||||
tele_jump_ok(int x1, int y1, int x2, int y2)
|
||||
tele_jump_ok(coordxy x1, coordxy y1, coordxy x2, coordxy y2)
|
||||
{
|
||||
if (!isok(x2, y2))
|
||||
return FALSE;
|
||||
@@ -324,7 +324,7 @@ tele_jump_ok(int x1, int y1, int x2, int y2)
|
||||
}
|
||||
|
||||
static boolean
|
||||
teleok(register int x, register int y, boolean trapok)
|
||||
teleok(coordxy x, coordxy y, boolean trapok)
|
||||
{
|
||||
if (!trapok) {
|
||||
/* allow teleportation onto vibrating square, it's not a real trap;
|
||||
@@ -352,7 +352,7 @@ teleok(register int x, register int y, boolean trapok)
|
||||
}
|
||||
|
||||
void
|
||||
teleds(int nux, int nuy, int teleds_flags)
|
||||
teleds(coordxy nux, coordxy nuy, int teleds_flags)
|
||||
{
|
||||
boolean ball_active, ball_still_in_range = FALSE,
|
||||
allow_drag = (teleds_flags & TELEDS_ALLOW_DRAG) != 0,
|
||||
@@ -479,7 +479,8 @@ teleds(int nux, int nuy, int teleds_flags)
|
||||
boolean
|
||||
safe_teleds(int teleds_flags)
|
||||
{
|
||||
register int nux, nuy, tcnt = 0;
|
||||
coordxy nux, nuy;
|
||||
int tcnt = 0;
|
||||
|
||||
do {
|
||||
nux = rnd(COLNO - 1);
|
||||
@@ -1208,10 +1209,10 @@ level_tele_trap(struct trap* trap, unsigned int trflags)
|
||||
/* check whether monster can arrive at location <x,y> via Tport (or fall) */
|
||||
static boolean
|
||||
rloc_pos_ok(
|
||||
int x, int y, /* coordinates of candidate location */
|
||||
coordxy x, coordxy y, /* coordinates of candidate location */
|
||||
struct monst *mtmp)
|
||||
{
|
||||
register int xx, yy;
|
||||
coordxy xx, yy;
|
||||
|
||||
if (!goodpos(x, y, mtmp, GP_CHECKSCARY))
|
||||
return FALSE;
|
||||
@@ -1276,10 +1277,10 @@ rloc_pos_ok(
|
||||
static void
|
||||
rloc_to_core(
|
||||
struct monst* mtmp,
|
||||
int x, int y,
|
||||
coordxy x, coordxy y,
|
||||
unsigned rlocflags)
|
||||
{
|
||||
register int oldx = mtmp->mx, oldy = mtmp->my;
|
||||
coordxy oldx = mtmp->mx, oldy = mtmp->my;
|
||||
boolean resident_shk = mtmp->isshk && inhishop(mtmp);
|
||||
boolean preventmsg = (rlocflags & RLOC_NOMSG) != 0;
|
||||
boolean vanishmsg = (rlocflags & RLOC_MSG) != 0;
|
||||
@@ -1370,13 +1371,13 @@ rloc_to_core(
|
||||
}
|
||||
|
||||
void
|
||||
rloc_to(struct monst *mtmp, int x, int y)
|
||||
rloc_to(struct monst *mtmp, coordxy x, coordxy y)
|
||||
{
|
||||
rloc_to_core(mtmp, x, y, RLOC_NOMSG);
|
||||
}
|
||||
|
||||
void
|
||||
rloc_to_flag(struct monst *mtmp, int x, int y, unsigned int rlocflags)
|
||||
rloc_to_flag(struct monst *mtmp, coordxy x, coordxy y, unsigned int rlocflags)
|
||||
{
|
||||
rloc_to_core(mtmp, x, y, rlocflags);
|
||||
}
|
||||
@@ -1400,7 +1401,8 @@ rloc(
|
||||
struct monst *mtmp, /* mx==0 implies migrating monster arrival */
|
||||
unsigned int rlocflags)
|
||||
{
|
||||
register int x, y, trycount;
|
||||
coordxy x, y;
|
||||
int trycount;
|
||||
|
||||
if (mtmp == u.usteed) {
|
||||
tele();
|
||||
@@ -1600,7 +1602,7 @@ mlevel_tele_trap(
|
||||
boolean
|
||||
rloco(register struct obj* obj)
|
||||
{
|
||||
register coordxy tx, ty, otx, oty;
|
||||
coordxy tx, ty, otx, oty;
|
||||
boolean restricted_fall;
|
||||
int try_limit = 4000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user