resolve a couple of build failures when STATUS_HILITES is not defined
This addresses the build failures but it is unknown whether the logic remains sound.
This commit is contained in:
18
src/botl.c
18
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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user