stale gold symbol displayed after symset change
a stale gold symbol could be displayed on the status line following a switch
to a new symset, as observed and reported for Windows RogueEpyx symset.
An update is required for gold in the status line for a change to
any of the following:
context.rndencode value
the encoded glyph value for COIN_CLASS
the gold amount
This commit is contained in:
@@ -198,6 +198,8 @@ clairvoyance would show trap instead of a monster on/in that trap, which was
|
||||
intentional, but when clairvoyance finished the monster wasn't shown
|
||||
nurse corpse/tin chance to convey poison resistance when eaten was not honored
|
||||
make tame vampires be more aggressive when shifted to bat/fog/wolf form
|
||||
a stale gold symbol could be displayed on the status line following a switch
|
||||
to a new symset, as observed and reported for Windows RogueEpyx symset
|
||||
|
||||
|
||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||
|
||||
25
src/botl.c
25
src/botl.c
@@ -698,6 +698,7 @@ int fld, idx, idx_p;
|
||||
boolean *valsetlist;
|
||||
{
|
||||
static int oldrndencode = 0;
|
||||
static nhsym oldgoldsym = 0;
|
||||
int pc, chg, color = NO_COLOR;
|
||||
unsigned anytype;
|
||||
boolean updated = FALSE, reset;
|
||||
@@ -719,10 +720,28 @@ boolean *valsetlist;
|
||||
* so $:0 has already been encoded and cached by the window
|
||||
* port. Without this hack, gold's \G sequence won't be
|
||||
* recognized and ends up being displayed as-is for 'update_all'.
|
||||
*
|
||||
* Also, even if context.rndencode hasn't changed and the
|
||||
* gold amount itself hasn't changed, the glyph portion of the
|
||||
* encoding may have changed if a new symset was put into
|
||||
* effect.
|
||||
*
|
||||
* \GXXXXNNNN:25
|
||||
* XXXX = the context.rndencode portion
|
||||
* NNNN = the glyph portion
|
||||
* 25 = the gold amount
|
||||
*
|
||||
*/
|
||||
if (context.rndencode != oldrndencode && fld == BL_GOLD) {
|
||||
chg = 2;
|
||||
oldrndencode = context.rndencode;
|
||||
|
||||
if (fld == BL_GOLD) {
|
||||
if (context.rndencode != oldrndencode && fld == BL_GOLD) {
|
||||
chg = 2;
|
||||
oldrndencode = context.rndencode;
|
||||
}
|
||||
if (oldgoldsym != showsyms[COIN_CLASS + SYM_OFF_O]) {
|
||||
chg = 2;
|
||||
oldgoldsym = showsyms[COIN_CLASS + SYM_OFF_O];
|
||||
}
|
||||
}
|
||||
|
||||
reset = FALSE;
|
||||
|
||||
Reference in New Issue
Block a user