MCPcopy Index your code
hub / github.com/NetHack/NetHack / getpos_refresh

Function getpos_refresh

src/getpos.c:752–766  ·  view source on GitHub ↗

called when ^R typed; if '$' is being shown for valid spots, remove that; if alternate background color is being shown for that, redraw it */

Source from the content-addressed store, hash-verified

750/* called when ^R typed; if '$' is being shown for valid spots, remove that;
751 if alternate background color is being shown for that, redraw it */
752staticfn void
753getpos_refresh(void)
754{
755 if (getpos_hilitefunc && getpos_hilite_state == HiliteGoodposSymbol) {
756 (*getpos_hilitefunc)(FALSE); /* tmp_at(DISP_END) */
757 getpos_hilite_state = defaultHiliteState;
758 }
759
760 docrt_flags(docrtRefresh);
761
762 if (getpos_hilitefunc && getpos_hilite_state == HiliteBackground) {
763 /* resetting to current values will draw valid-spots highlighting */
764 getpos_sethilite(getpos_hilitefunc, getpos_getvalid);
765 }
766}
767
768/* have the player use movement keystrokes to position the cursor at a
769 particular map location, then use one of [.,:;] to pick the spot */

Callers 1

getposFunction · 0.85

Calls 2

docrt_flagsFunction · 0.85
getpos_sethiliteFunction · 0.85

Tested by

no test coverage detected