Merge branch 'xytod' of https://github.com/argrath/NetHack into NetHack-3.7

This commit is contained in:
nhmall
2025-01-13 08:23:52 -05:00
4 changed files with 5 additions and 4 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -4124,7 +4124,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);