be more consistent with coordinates
This commit is contained in:
@@ -19,14 +19,14 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static void get_wall_for_db(int *, int *);
|
||||
static struct entity *e_at(int, int);
|
||||
static void m_to_e(struct monst *, int, int, struct entity *);
|
||||
static void get_wall_for_db(coordxy *, coordxy *);
|
||||
static struct entity *e_at(coordxy, coordxy);
|
||||
static void m_to_e(struct monst *, coordxy, coordxy, struct entity *);
|
||||
static void u_to_e(struct entity *);
|
||||
static void set_entity(int, int, struct entity *);
|
||||
static void set_entity(coordxy, coordxy, struct entity *);
|
||||
static const char *e_nam(struct entity *);
|
||||
static const char *E_phrase(struct entity *, const char *);
|
||||
static boolean e_survives_at(struct entity *, int, int);
|
||||
static boolean e_survives_at(struct entity *, coordxy, coordxy);
|
||||
static void e_died(struct entity *, int, int);
|
||||
static boolean automiss(struct entity *);
|
||||
static boolean e_missed(struct entity *, boolean);
|
||||
@@ -42,7 +42,7 @@ is_waterwall(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
boolean
|
||||
is_pool(int x, int y)
|
||||
is_pool(coordxy x, coordxy y)
|
||||
{
|
||||
schar ltyp;
|
||||
|
||||
@@ -58,7 +58,7 @@ is_pool(int x, int y)
|
||||
}
|
||||
|
||||
boolean
|
||||
is_lava(int x, int y)
|
||||
is_lava(coordxy x, coordxy y)
|
||||
{
|
||||
schar ltyp;
|
||||
|
||||
@@ -73,7 +73,7 @@ is_lava(int x, int y)
|
||||
}
|
||||
|
||||
boolean
|
||||
is_pool_or_lava(int x, int y)
|
||||
is_pool_or_lava(coordxy x, coordxy y)
|
||||
{
|
||||
if (is_pool(x, y) || is_lava(x, y))
|
||||
return TRUE;
|
||||
@@ -82,7 +82,7 @@ is_pool_or_lava(int x, int y)
|
||||
}
|
||||
|
||||
boolean
|
||||
is_ice(int x, int y)
|
||||
is_ice(coordxy x, coordxy y)
|
||||
{
|
||||
schar ltyp;
|
||||
|
||||
@@ -96,7 +96,7 @@ is_ice(int x, int y)
|
||||
}
|
||||
|
||||
boolean
|
||||
is_moat(int x, int y)
|
||||
is_moat(coordxy x, coordxy y)
|
||||
{
|
||||
schar ltyp;
|
||||
|
||||
@@ -134,7 +134,7 @@ db_under_typ(int mask)
|
||||
*/
|
||||
|
||||
int
|
||||
is_drawbridge_wall(int x, int y)
|
||||
is_drawbridge_wall(coordxy x, coordxy y)
|
||||
{
|
||||
struct rm *lev;
|
||||
|
||||
@@ -164,7 +164,7 @@ is_drawbridge_wall(int x, int y)
|
||||
* (instead of UP or DOWN, as with is_drawbridge_wall).
|
||||
*/
|
||||
boolean
|
||||
is_db_wall(int x, int y)
|
||||
is_db_wall(coordxy x, coordxy y)
|
||||
{
|
||||
return (boolean) (levl[x][y].typ == DBWALL);
|
||||
}
|
||||
@@ -174,7 +174,7 @@ is_db_wall(int x, int y)
|
||||
* a drawbridge or drawbridge wall.
|
||||
*/
|
||||
boolean
|
||||
find_drawbridge(int *x, int *y)
|
||||
find_drawbridge(coordxy *x, coordxy *y)
|
||||
{
|
||||
int dir;
|
||||
|
||||
@@ -205,7 +205,7 @@ find_drawbridge(int *x, int *y)
|
||||
* Find the drawbridge wall associated with a drawbridge.
|
||||
*/
|
||||
static void
|
||||
get_wall_for_db(int *x, int *y)
|
||||
get_wall_for_db(coordxy *x, coordxy *y)
|
||||
{
|
||||
switch (levl[*x][*y].drawbridgemask & DB_DIR) {
|
||||
case DB_NORTH:
|
||||
@@ -229,9 +229,9 @@ get_wall_for_db(int *x, int *y)
|
||||
* flag must be put to TRUE if we want the drawbridge to be opened.
|
||||
*/
|
||||
boolean
|
||||
create_drawbridge(int x, int y, int dir, boolean flag)
|
||||
create_drawbridge(coordxy x, coordxy y, int dir, boolean flag)
|
||||
{
|
||||
int x2, y2;
|
||||
coordxy x2, y2;
|
||||
boolean horiz;
|
||||
boolean lava = levl[x][y].typ == LAVAPOOL; /* assume initialized map */
|
||||
|
||||
@@ -279,7 +279,7 @@ create_drawbridge(int x, int y, int dir, boolean flag)
|
||||
}
|
||||
|
||||
static struct entity *
|
||||
e_at(int x, int y)
|
||||
e_at(coordxy x, coordxy y)
|
||||
{
|
||||
int entitycnt;
|
||||
|
||||
@@ -296,7 +296,7 @@ e_at(int x, int y)
|
||||
}
|
||||
|
||||
static void
|
||||
m_to_e(struct monst *mtmp, int x, int y, struct entity *etmp)
|
||||
m_to_e(struct monst *mtmp, coordxy x, coordxy y, struct entity *etmp)
|
||||
{
|
||||
etmp->emon = mtmp;
|
||||
if (mtmp) {
|
||||
@@ -320,7 +320,7 @@ u_to_e(struct entity *etmp)
|
||||
}
|
||||
|
||||
static void
|
||||
set_entity(int x, int y, struct entity *etmp)
|
||||
set_entity(coordxy x, coordxy y, struct entity *etmp)
|
||||
{
|
||||
if (u_at(x, y))
|
||||
u_to_e(etmp);
|
||||
@@ -371,7 +371,7 @@ E_phrase(struct entity *etmp, const char *verb)
|
||||
* Simple-minded "can it be here?" routine
|
||||
*/
|
||||
static boolean
|
||||
e_survives_at(struct entity *etmp, int x, int y)
|
||||
e_survives_at(struct entity *etmp, coordxy x, coordxy y)
|
||||
{
|
||||
if (noncorporeal(etmp->edata))
|
||||
return TRUE;
|
||||
@@ -525,7 +525,8 @@ e_jumps(struct entity *etmp)
|
||||
static void
|
||||
do_entity(struct entity *etmp)
|
||||
{
|
||||
int newx, newy, at_portcullis, oldx, oldy;
|
||||
coordxy newx, newy, oldx, oldy;
|
||||
int at_portcullis;
|
||||
boolean must_jump = FALSE, relocates = FALSE, e_inview;
|
||||
struct rm *crm;
|
||||
|
||||
@@ -732,11 +733,11 @@ do_entity(struct entity *etmp)
|
||||
* Close the drawbridge located at x,y
|
||||
*/
|
||||
void
|
||||
close_drawbridge(int x, int y)
|
||||
close_drawbridge(coordxy x, coordxy y)
|
||||
{
|
||||
register struct rm *lev1, *lev2;
|
||||
struct trap *t;
|
||||
int x2, y2;
|
||||
coordxy x2, y2;
|
||||
|
||||
lev1 = &levl[x][y];
|
||||
if (lev1->typ != DRAWBRIDGE_DOWN)
|
||||
@@ -793,11 +794,11 @@ close_drawbridge(int x, int y)
|
||||
* Open the drawbridge located at x,y
|
||||
*/
|
||||
void
|
||||
open_drawbridge(int x, int y)
|
||||
open_drawbridge(coordxy x, coordxy y)
|
||||
{
|
||||
register struct rm *lev1, *lev2;
|
||||
struct trap *t;
|
||||
int x2, y2;
|
||||
coordxy x2, y2;
|
||||
|
||||
lev1 = &levl[x][y];
|
||||
if (lev1->typ != DRAWBRIDGE_UP)
|
||||
@@ -839,12 +840,13 @@ open_drawbridge(int x, int y)
|
||||
* Let's destroy the drawbridge located at x,y
|
||||
*/
|
||||
void
|
||||
destroy_drawbridge(int x, int y)
|
||||
destroy_drawbridge(coordxy x, coordxy y)
|
||||
{
|
||||
register struct rm *lev1, *lev2;
|
||||
struct trap *t;
|
||||
struct obj *otmp;
|
||||
int x2, y2, i;
|
||||
coordxy x2, y2;
|
||||
int i;
|
||||
boolean e_inview;
|
||||
struct entity *etmp1 = &(g.occupants[0]), *etmp2 = &(g.occupants[1]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user