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

@@ -1046,7 +1046,7 @@ test_move(
else
Sprintf(buf, "impossible [background glyph=%d]",
glyph);
pline_dir(xytod(dx, dy), "It's %s.", buf);
pline_dir(xytodir(dx, dy), "It's %s.", buf);
}
}
return FALSE;
@@ -1197,7 +1197,7 @@ test_move(
if (mode != TEST_TRAV && svc.context.run >= 2
&& !(Blind || Hallucination) && !could_move_onto_boulder(x, y)) {
if (mode == DO_MOVE && flags.mention_walls)
pline_dir(xytod(dx,dy), "A boulder blocks your path.");
pline_dir(xytodir(dx,dy), "A boulder blocks your path.");
return FALSE;
}
if (mode == DO_MOVE) {
@@ -2582,7 +2582,7 @@ move_out_of_bounds(coordxy x, coordxy y)
dy = 0;
}
You("have already gone as far %s as possible.",
directionname(xytod(dx, dy)));
directionname(xytodir(dx, dy)));
}
nomul(0);
svc.context.move = 0;