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