status gold vs symset:Blank
Symset:Blank sets all the map symbols (except STRANGE_OBJECT) to <space>. The status lines for !STATUS_HILITES force status to use '$' instead of ' ' for the prefix before ":1234" for gold, but the status lines for STATUS_HILITES did not. tty ended up with ":1234" for gold. win32 and curses both ignore the prefix and construct their own, but since win32 uses the map symbol for that it must also be ending up with ":1234" (I assume; I haven't seen it). curses is forcing '$' for the prefix, even on the rogue level. This attempts to fix win32 without be able to test the result. I've left curses alone.
This commit is contained in:
31
src/botl.c
31
src/botl.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 botl.c $NHDT-Date: 1544917592 2018/12/15 23:46:32 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.131 $ */
|
||||
/* NetHack 3.6 botl.c $NHDT-Date: 1545705812 2018/12/25 02:43:32 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.132 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2006. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -38,6 +38,14 @@ get_strength_str()
|
||||
return buf;
|
||||
}
|
||||
|
||||
void
|
||||
check_gold_symbol()
|
||||
{
|
||||
nhsym goldch = showsyms[COIN_CLASS + SYM_OFF_O];
|
||||
|
||||
iflags.invis_goldsym = (goldch <= (nhsym) ' ');
|
||||
}
|
||||
|
||||
char *
|
||||
do_statusline1()
|
||||
{
|
||||
@@ -87,17 +95,6 @@ do_statusline1()
|
||||
return newbot1;
|
||||
}
|
||||
|
||||
void
|
||||
check_gold_symbol()
|
||||
{
|
||||
int goldch, goldoc;
|
||||
unsigned int goldos;
|
||||
int goldglyph = objnum_to_glyph(GOLD_PIECE);
|
||||
|
||||
(void) mapglyph(goldglyph, &goldch, &goldoc, &goldos, 0, 0);
|
||||
iflags.invis_goldsym = ((char) goldch <= ' ');
|
||||
}
|
||||
|
||||
char *
|
||||
do_statusline2()
|
||||
{
|
||||
@@ -126,7 +123,7 @@ do_statusline2()
|
||||
money = 0L; /* ought to issue impossible() and then discard gold */
|
||||
Sprintf(eos(dloc), "%s:%-2ld", /* strongest hero can lift ~300000 gold */
|
||||
(iflags.in_dumplog || iflags.invis_goldsym) ? "$"
|
||||
: encglyph(objnum_to_glyph(GOLD_PIECE)),
|
||||
: encglyph(objnum_to_glyph(GOLD_PIECE)),
|
||||
min(money, 999999L));
|
||||
dln = strlen(dloc);
|
||||
/* '$' encoded as \GXXXXNNNN is 9 chars longer than display will need */
|
||||
@@ -623,7 +620,8 @@ bot_via_windowport()
|
||||
* sequence.
|
||||
*/
|
||||
Sprintf(blstats[idx][BL_GOLD].val, "%s:%ld",
|
||||
encglyph(objnum_to_glyph(GOLD_PIECE)),
|
||||
(iflags.in_dumplog || iflags.invis_goldsym) ? "$"
|
||||
: encglyph(objnum_to_glyph(GOLD_PIECE)),
|
||||
blstats[idx][BL_GOLD].a.a_long);
|
||||
valset[BL_GOLD] = TRUE; /* indicate val already set */
|
||||
|
||||
@@ -727,8 +725,7 @@ boolean *valsetlist;
|
||||
*
|
||||
* 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.
|
||||
* encoding may have changed if a new symset was put into effect.
|
||||
*
|
||||
* \GXXXXNNNN:25
|
||||
* XXXX = the context.rndencode portion
|
||||
@@ -751,7 +748,7 @@ boolean *valsetlist;
|
||||
if (!update_all && !chg) {
|
||||
reset = hilite_reset_needed(prev, bl_hilite_moves);
|
||||
if (reset)
|
||||
curr->time = prev->time = 0L;
|
||||
curr->time = prev->time = 0L;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user