diff --git a/src/botl.c b/src/botl.c index 37594ff7c..a9e9a9bcc 100644 --- a/src/botl.c +++ b/src/botl.c @@ -750,7 +750,11 @@ boolean *valsetlist; * [Affects exp_percent_changing() too.] */ if (((chg || g.update_all || fld == BL_XP) - && curr->percent_matters && curr->thresholds) + && curr->percent_matters +#ifdef STATUS_HILITES + && curr->thresholds +#endif + ) /* when 'hitpointbar' is On, percent matters even if HP hasn't changed and has no percentage rules (in case HPmax has changed when HP hasn't, where we ordinarily wouldn't @@ -1288,9 +1292,12 @@ exp_percentage() boolean exp_percent_changing() { - int pc, color_dummy; + int pc; anything a; +#ifdef STATUS_HILITES + int color_dummy; struct hilite_s *rule; +#endif struct istat_s *curr; /* if status update is already requested, skip this processing */ @@ -1302,14 +1309,19 @@ exp_percent_changing() curr = &g.blstats[g.now_or_before_idx][BL_XP]; /* TODO: [see eval_notify_windowport_field() about percent_matters and the check against 'thresholds'] */ - if (curr->percent_matters && curr->thresholds + if (curr->percent_matters +#ifdef STATUS_HILITES + && curr->thresholds +#endif && (pc = exp_percentage()) != curr->percent_value) { a = cg.zeroany; a.a_int = (int) u.ulevel; +#ifdef STATUS_HILITES rule = get_hilite(g.now_or_before_idx, BL_XP, (genericptr_t) &a, 0, pc, &color_dummy); if (rule != curr->hilite_rule) return TRUE; /* caller should set 'g.context.botl' to True */ +#endif } } return FALSE; diff --git a/win/share/safeproc.c b/win/share/safeproc.c index 5c54961ca..d506600c2 100644 --- a/win/share/safeproc.c +++ b/win/share/safeproc.c @@ -96,11 +96,7 @@ struct window_procs safe_procs = { safe_getmsghistory, safe_putmsghistory, safe_status_init, safe_status_finish, safe_status_enablefield, -#ifdef STATUS_HILITES safe_status_update, -#else - safe_status_update, -#endif safe_can_suspend, }; @@ -495,7 +491,6 @@ boolean enable; { } -#ifdef STATUS_HILITES /* call once for each field, then call with BL_FLUSH to output the result */ void safe_status_update(idx, ptr, chg, percent, color, colormasks) @@ -505,7 +500,6 @@ int chg UNUSED, percent UNUSED, color UNUSED; unsigned long *colormasks UNUSED; { } -#endif /* STATUS_HILITES */ /************************************************************** * These are some optionally selectable routines that add