some coordxy follow-up

Return a couple of variables that actually held a direction back
to int from coordxy.

bhit() takes int params instead of coordxy.

boomhit() takes int params instead of coordxy.

xytod() renamed to xytodir(), and takes int params (promotion will handle
coordxy params).

dtoxy(coord *, int) renamed to dirtocoord(coord *, int).
This commit is contained in:
nhmall
2026-02-11 09:40:25 -05:00
parent db36ee35de
commit fcd9f5468c
12 changed files with 36 additions and 36 deletions

View File

@@ -6473,7 +6473,7 @@ conjoined_pits(
return FALSE;
dx = sgn(trap2->tx - trap1->tx);
dy = sgn(trap2->ty - trap1->ty);
diridx = xytod(dx, dy);
diridx = xytodir(dx, dy);
if (diridx != DIR_ERR) {
adjidx = DIR_180(diridx);
if ((trap1->conjoined & (1 << diridx))
@@ -6514,7 +6514,7 @@ adj_nonconjoined_pit(struct trap *adjtrap)
if (trap_with_u && adjtrap && u.utrap && u.utraptype == TT_PIT
&& is_pit(trap_with_u->ttyp) && is_pit(adjtrap->ttyp)) {
if (xytod(u.dx, u.dy) != DIR_ERR)
if (xytodir(u.dx, u.dy) != DIR_ERR)
return TRUE;
}
return FALSE;