-$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.292 $ $NHDT-Date: 1554041056 2019/03/31 14:04:16 $
+$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.293 $ $NHDT-Date: 1554045807 2019/03/31 15:23:27 $
This fixes36.2 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.1 in April 2018. Please note, however,
include isaac64 for pseudo random number generation
core prng and display prng use different contexts
when healing magic other than unicorn horn cures blindness, cure deafness too
+do less status updating when the 'time' option is on
curses: status display substantially revamped for both horizontal (via
'align_status:bottom' or 'top') and vertical (via 'align_status:left'
or 'right'); 3-line horizontal layout (via 'statuslines:3') added
-/* NetHack 3.6 extern.h $NHDT-Date: 1553895318 2019/03/29 21:35:18 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.696 $ */
+/* NetHack 3.6 extern.h $NHDT-Date: 1554045807 2019/03/31 15:23:27 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.697 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
E int FDECL(describe_level, (char *));
E const char *FDECL(rank_of, (int, SHORT_P, BOOLEAN_P));
E void NDECL(bot);
+E void NDECL(timebot);
E void FDECL(status_initialize, (BOOLEAN_P));
E void NDECL(status_finish);
E void FDECL(status_notify_windowport, (BOOLEAN_P));
-/* NetHack 3.6 flag.h $NHDT-Date: 1553204011 2019/03/21 21:33:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.148 $ */
+/* NetHack 3.6 flag.h $NHDT-Date: 1554045808 2019/03/31 15:23:28 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.149 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
#ifdef TTY_TILES_ESCCODES
boolean vt_tiledata; /* output console codes for tile support in TTY */
#endif
+ boolean clicklook; /* allow right-clicking for look */
+ boolean cmdassist; /* provide detailed assistance for some comnds */
+ boolean time_botl; /* context.botl for 'time' (moves) only */
boolean wizweight; /* display weight of everything in wizard mode */
- boolean cmdassist; /* provide detailed assistance for some commands */
- boolean clicklook; /* allow right-clicking for look */
/*
* Window capability support.
*/
-/* NetHack 3.6 allmain.c $NHDT-Date: 1553363414 2019/03/23 17:50:14 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.95 $ */
+/* NetHack 3.6 allmain.c $NHDT-Date: 1554045808 2019/03/31 15:23:28 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.96 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
if (u.ublesscnt)
u.ublesscnt--;
if (flags.time && !context.run)
- context.botl = TRUE;
+ iflags.time_botl = TRUE;
/* One possible result of prayer is healing. Whether or
* not you get healed depends on your current hit points.
: moves % 10)) {
if (Upolyd && u.mh > 1) {
u.mh--;
+ context.botl = TRUE;
} else if (!Upolyd && u.uhp > 1) {
u.uhp--;
+ context.botl = TRUE;
} else {
You("pass out from exertion!");
exercise(A_CON, FALSE);
if (!u.uinvulnerable) {
if (Teleportation && !rn2(85)) {
xchar old_ux = u.ux, old_uy = u.uy;
+
tele();
if (u.ux != old_ux || u.uy != old_uy) {
if (!next_to_u()) {
if (context.botl || context.botlx) {
bot();
curs_on_u();
+ } else if (iflags.time_botl) {
+ timebot();
+ curs_on_u();
}
context.move = 1;
-/* NetHack 3.6 botl.c $NHDT-Date: 1554017610 2019/03/31 07:33:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.139 $ */
+/* NetHack 3.6 botl.c $NHDT-Date: 1554045809 2019/03/31 15:23:29 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.140 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
STATIC_DCL const char *NDECL(rank);
#ifdef STATUS_HILITES
STATIC_DCL void NDECL(bot_via_windowport);
+STATIC_DCL void NDECL(stat_update_time);
#endif
static char *
putmixed(WIN_STATUS, 0, do_statusline2());
#endif
}
- context.botl = context.botlx = 0;
+ context.botl = context.botlx = iflags.time_botl = FALSE;
+}
+
+void
+timebot()
+{
+ if (flags.time) {
+#ifdef STATUS_HILITES
+ stat_update_time();
+#else
+ /* old status display updates everything */
+ bot();
+#endif
+ }
+ iflags.time_botl = FALSE;
}
/* convert experience level (1..30) to rank index (0..8) */
* without STATUS_HILITES.
*/
static unsigned long cond_hilites[BL_ATTCLR_MAX];
+static int now_or_before_idx = 0; /* 0..1 for array[2][] first index */
void
bot_via_windowport()
{
- static int idx = 0;
char buf[BUFSZ];
const char *titl;
register char *nb;
- int i, cap;
+ int i, idx, cap;
long money;
if (!blinit)
panic("bot before init.");
/* toggle from previous iteration */
- idx = 1 - idx; /* 0 -> 1, 1 -> 0 */
+ idx = 1 - now_or_before_idx; /* 0 -> 1, 1 -> 0 */
+ now_or_before_idx = idx;
/* clear the "value set" indicators */
(void) memset((genericptr_t) valset, 0, MAXBLSTATS * sizeof (boolean));
evaluate_and_notify_windowport(valset, idx);
}
+/* update just the status lines' 'time' field */
+STATIC_OVL void
+stat_update_time()
+{
+ int idx = now_or_before_idx; /* no 0/1 toggle */
+ int fld = BL_TIME;
+
+ /* Time (moves) */
+ blstats[idx][fld].a.a_long = moves;
+ valset[fld] = FALSE;
+
+ eval_notify_windowport_field(fld, valset, idx);
+ if ((windowprocs.wincap2 & WC2_FLUSH_STATUS) != 0L)
+ status_update(BL_FLUSH, (genericptr_t) 0, 0, 0,
+ NO_COLOR, (unsigned long *) 0);
+ return;
+}
+
STATIC_OVL boolean
eval_notify_windowport_field(fld, valsetlist, idx)
int fld, idx;
status_update(BL_FLUSH, (genericptr_t) 0, 0, 0,
NO_COLOR, (unsigned long *) 0);
- context.botl = context.botlx = FALSE;
+ context.botl = context.botlx = iflags.time_botl = FALSE;
update_all = FALSE;
}
-/* NetHack 3.6 display.c $NHDT-Date: 1553895319 2019/03/29 21:35:19 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.98 $ */
+/* NetHack 3.6 display.c $NHDT-Date: 1554045810 2019/03/31 15:23:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.99 $ */
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
/* and Dave Cohrs, 1990. */
/* NetHack may be freely redistributed. See license for details. */
flushing = 0;
if (context.botl || context.botlx)
bot();
+ else if (iflags.time_botl)
+ timebot();
}
/* ======================================================================== */
-/* NetHack 3.6 end.c $NHDT-Date: 1553652951 2019/03/27 02:15:51 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.166 $ */
+/* NetHack 3.6 end.c $NHDT-Date: 1554045810 2019/03/31 15:23:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.167 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
#endif
) {
/* skip status update if panicking or disconnected */
- context.botl = context.botlx = FALSE;
+ context.botl = context.botlx = iflags.time_botl = FALSE;
} else {
/* otherwise force full status update */
context.botlx = TRUE;