cycle 'getpos_hilite_state' to its next state; when 'bgcolors' is Off, it will alternate between not showing valid positions and showing them via temporary S_goodpos symbol; when 'bgcolors' is On, there are three states and showing them via setting background color becomes the default */
| 69 | when 'bgcolors' is On, there are three states and showing them via |
| 70 | setting background color becomes the default */ |
| 71 | staticfn void |
| 72 | getpos_toggle_hilite_state(void) |
| 73 | { |
| 74 | /* getpos_hilitefunc isn't Null */ |
| 75 | if (getpos_hilite_state == HiliteGoodposSymbol) { |
| 76 | /* currently on, finish */ |
| 77 | (*getpos_hilitefunc)(FALSE); /* tmp_at(DISP_END) */ |
| 78 | } |
| 79 | |
| 80 | getpos_hilite_state = (getpos_hilite_state + 1) |
| 81 | % (iflags.bgcolors ? 3 : 2); |
| 82 | /* resetting the callback functions to their current values will draw |
| 83 | valid-spots with background color if that is the new state and turn |
| 84 | off that color if it was the previous state */ |
| 85 | getpos_sethilite(getpos_hilitefunc, getpos_getvalid); |
| 86 | |
| 87 | if (getpos_hilite_state == HiliteGoodposSymbol) { |
| 88 | /* now on, begin */ |
| 89 | (*getpos_hilitefunc)(TRUE); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | boolean |
| 94 | mapxy_valid(coordxy x, coordxy y) |
no test coverage detected