bundle the display-related hints, that tell bot() and others

that an update is required, into a struct. Remove it from
context since there is no reason to save those.
This commit is contained in:
nhmall
2024-01-04 23:16:27 -05:00
parent 9bcff7b896
commit 22e52ee905
46 changed files with 246 additions and 238 deletions

View File

@@ -183,19 +183,19 @@ more_experienced(register int exper, register int rexp)
if (newexp != oldexp) {
u.uexp = newexp;
if (flags.showexp)
gc.context.botl = TRUE;
display.botl = TRUE;
/* even when experience points aren't being shown, experience level
might be highlighted with a percentage highlight rule and that
percentage depends upon experience points */
if (!gc.context.botl && exp_percent_changing())
gc.context.botl = TRUE;
if (!display.botl && exp_percent_changing())
display.botl = TRUE;
}
/* newrexp will always differ from oldrexp unless they're LONG_MAX */
if (newrexp != oldrexp) {
u.urexp = newrexp;
#ifdef SCORE_ON_BOTL
if (flags.showscore)
gc.context.botl = TRUE;
display.botl = TRUE;
#endif
}
if (u.urexp >= (Role_if(PM_WIZARD) ? 1000 : 2000))
@@ -283,7 +283,7 @@ losexp(
rehumanize();
}
gc.context.botl = TRUE;
display.botl = TRUE;
}
/*
@@ -362,7 +362,7 @@ pluslvl(
if (u.ulevel > u.ulevelpeak)
u.ulevelpeak = u.ulevel;
}
gc.context.botl = TRUE;
display.botl = TRUE;
}
/* compute a random amount of experience points suitable for the hero's