MCPcopy Create free account
hub / github.com/NetHack/NetHack / check_turn_events

Function check_turn_events

win/X11/winstat.c:2074–2101  ·  view source on GitHub ↗

* Turn off hilighted status values after a certain amount of turns. */

Source from the content-addressed store, hash-verified

2072 * Turn off hilighted status values after a certain amount of turns.
2073 */
2074void
2075check_turn_events(void)
2076{
2077 int i;
2078 struct X_status_value *sv;
2079 int hilight_time = 1;
2080
2081#ifdef STATUS_HILITES
2082 if (iflags.hilite_delta)
2083 hilight_time = (int) iflags.hilite_delta;
2084#endif
2085 for (sv = shown_stats, i = 0; i < NUM_STATS; i++, sv++) {
2086 if (!sv->set)
2087 continue;
2088
2089 if (sv->turn_count++ >= hilight_time) {
2090 /* unhighlights by toggling a highlighted item back off again,
2091 unless forced inverted by a status_hilite rule */
2092 if (!sv->inverted_hilite) {
2093 if (sv->type == SV_VALUE)
2094 hilight_value(sv->w);
2095 else
2096 hilight_label(sv->w);
2097 }
2098 sv->set = FALSE;
2099 }
2100 }
2101}
2102
2103/* Initialize alternate status ============================================ */
2104

Callers 1

input_eventFunction · 0.85

Calls 2

hilight_valueFunction · 0.85
hilight_labelFunction · 0.85

Tested by

no test coverage detected