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:
@@ -1325,14 +1325,14 @@ dog_move(
|
||||
if (goodpos(cc.x, cc.y, mtmp, 0))
|
||||
goto dognext;
|
||||
|
||||
i = xytod(nx, ny);
|
||||
i = xytodir(nx, ny);
|
||||
for (j = DIR_LEFT(i); j < DIR_RIGHT(i); j++) {
|
||||
dtoxy(&cc, j);
|
||||
dirtocoord(&cc, j);
|
||||
if (goodpos(cc.x, cc.y, mtmp, 0))
|
||||
goto dognext;
|
||||
}
|
||||
for (j = DIR_LEFT2(i); j < DIR_RIGHT2(i); j++) {
|
||||
dtoxy(&cc, j);
|
||||
dirtocoord(&cc, j);
|
||||
if (goodpos(cc.x, cc.y, mtmp, 0))
|
||||
goto dognext;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user