change the type of xytod()'s return value to int
xytod()'s return value is an index, so its type should be int, not coordxy.
This commit is contained in:
@@ -414,7 +414,7 @@ extern int enter_explore_mode(void);
|
||||
extern boolean bind_mousebtn(int, const char *);
|
||||
extern boolean bind_key(uchar, const char *);
|
||||
extern void dokeylist(void);
|
||||
extern coordxy xytod(coordxy, coordxy);
|
||||
extern int xytod(coordxy, coordxy);
|
||||
extern void dtoxy(coord *, int);
|
||||
extern int movecmd(char, int);
|
||||
extern int dxdy_moveok(void);
|
||||
|
||||
@@ -3604,7 +3604,7 @@ rhack(int key)
|
||||
}
|
||||
|
||||
/* convert an x,y pair into a direction code */
|
||||
coordxy
|
||||
int
|
||||
xytod(coordxy x, coordxy y)
|
||||
{
|
||||
int dd;
|
||||
|
||||
@@ -6436,7 +6436,8 @@ conjoined_pits(
|
||||
struct trap *trap1,
|
||||
boolean u_entering_trap2)
|
||||
{
|
||||
coordxy dx, dy, diridx, adjidx;
|
||||
coordxy dx, dy;
|
||||
int diridx, adjidx;
|
||||
|
||||
if (!trap1 || !trap2)
|
||||
return FALSE;
|
||||
|
||||
@@ -4126,7 +4126,7 @@ boomhit(struct obj *obj, coordxy dx, coordxy dy)
|
||||
gb.bhitpos.x = u.ux;
|
||||
gb.bhitpos.y = u.uy;
|
||||
boom = counterclockwise ? S_boomleft : S_boomright;
|
||||
i = (int) xytod(dx, dy);
|
||||
i = xytod(dx, dy);
|
||||
tmp_at(DISP_FLASH, cmap_to_glyph(boom));
|
||||
for (ct = 0; ct < 10; ct++) {
|
||||
i = DIR_CLAMP(i);
|
||||
|
||||
Reference in New Issue
Block a user