getpos() reformatting

Some miscellaneous reformatting done while looking over getpos() usage
rather than reformatting of getpos() itself.
This commit is contained in:
PatR
2022-10-20 10:33:38 -07:00
parent 5226c9633d
commit fc0f05398e
3 changed files with 38 additions and 21 deletions

View File

@@ -3294,9 +3294,11 @@ use_pole(struct obj *obj, boolean autohit)
cc.y = hitm->my;
}
if (!autohit) {
getpos_sethilite(display_polearm_positions, get_valid_polearm_position);
getpos_sethilite(display_polearm_positions,
get_valid_polearm_position);
if (getpos(&cc, TRUE, "the spot to hit") < 0)
return (res|ECMD_CANCEL); /* ESC; uses turn iff polearm became wielded */
/* ESC; uses turn iff polearm became wielded */
return (res | ECMD_CANCEL);
}
glyph = glyph_at(cc.x, cc.y);
@@ -3537,7 +3539,8 @@ use_grapple(struct obj *obj)
cc.y = u.uy;
getpos_sethilite(NULL, can_grapple_location);
if (getpos(&cc, TRUE, "the spot to hit") < 0)
return (res|ECMD_CANCEL); /* ESC; uses turn iff grapnel became wielded */
/* ESC; uses turn iff grapnel became wielded */
return (res | ECMD_CANCEL);
/* Calculate range; unlike use_pole(), there's no minimum for range */
typ = uwep_skill_type();