Merge branch 'NetHack-3.7' into win-wip3.7

This commit is contained in:
nhmall
2018-12-25 16:35:45 -05:00
6 changed files with 69 additions and 67 deletions

View File

@@ -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. */
@@ -37,6 +37,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()
{
@@ -86,17 +94,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()
{
@@ -125,7 +122,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 */
@@ -586,7 +583,8 @@ bot_via_windowport()
* sequence.
*/
Sprintf(g.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)),
g.blstats[idx][BL_GOLD].a.a_long);
g.valset[BL_GOLD] = TRUE; /* indicate val already set */
@@ -690,8 +688,7 @@ boolean *valsetlist;
*
* Also, even if g.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 g.context.rndencode portion
@@ -714,7 +711,7 @@ boolean *valsetlist;
if (!g.update_all && !chg) {
reset = hilite_reset_needed(prev, g.bl_hilite_moves);
if (reset)
curr->time = prev->time = 0L;
curr->time = prev->time = 0L;
}
#endif

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 end.c $NHDT-Date: 1545646111 2018/12/24 10:08:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.160 $ */
/* NetHack 3.6 end.c $NHDT-Date: 1545771927 2018/12/25 21:05:27 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.161 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1534,12 +1534,7 @@ boolean identified, all_containers, reportempty;
{
register struct obj *box, *obj;
char buf[BUFSZ];
boolean cat,
dumping =
#ifdef DUMPLOG
iflags.in_dumplog ? TRUE :
#endif
FALSE;
boolean cat, dumping = iflags.in_dumplog;
for (box = list; box; box = box->nobj) {
if (Is_container(box) || box->otyp == STATUE) {

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 files.c $NHDT-Date: 1543395733 2018/11/28 09:02:13 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.244 $ */
/* NetHack 3.6 files.c $NHDT-Date: 1545702598 2018/12/25 01:49:58 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.248 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2994,7 +2994,8 @@ boolean FDECL((*proc), (char *));
*ep = '\0';
/* trim off spaces at end of line */
while (--ep >= inbuf && (*ep == ' ' || *ep == '\t' || *ep == '\r'))
while (--ep >= inbuf
&& (*ep == ' ' || *ep == '\t' || *ep == '\r'))
*ep = '\0';
if (!config_error_nextline(inbuf)) {
@@ -3132,9 +3133,7 @@ int which_set;
config_error_add("Missing finish for symset \"%s\"",
g.symset[which_set].name ? g.symset[which_set].name
: "unknown");
config_error_done();
return 1;
}