-$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.288 $ $NHDT-Date: 1553885439 2019/03/29 18:50:39 $
+$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.289 $ $NHDT-Date: 1553895318 2019/03/29 21:35:18 $
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,
tty: when encumbrance state was abbreviated due to lack of room, there was no
separation from preceding status field and the value would not update
when the state changed (except for removal on change to unencumbered)
+tty: when clipping was used to show a subset of the map on a small display,
+ panning into a new subset while using the cursor to pick a location
+ would ask the core to generate a new view of the map rather than use
+ whatever was currently shown, bringing back suppressed monsters/
+ objects/traps for #terrain and new hallucinatory monsters for farlook
X11: its use of genl_status_update exposed a negative index use that could
lead to a segfault
X11: rollback disabling of keystroke input for PICK_NONE menus (for scrolling)
-/* NetHack 3.6 extern.h $NHDT-Date: 1552945074 2019/03/18 21:37:54 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.695 $ */
+/* 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 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
E void NDECL(curs_on_u);
E int NDECL(doredraw);
E void NDECL(docrt);
+E void NDECL(redraw_map);
E void FDECL(show_glyph, (int, int, int));
E void NDECL(clear_glyph_buffer);
E void FDECL(row_refresh, (int, int, int));
-/* NetHack 3.6 display.c $NHDT-Date: 1551138503 2019/02/25 23:48:23 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.97 $ */
+/* 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 $ */
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
/* and Dave Cohrs, 1990. */
/* NetHack may be freely redistributed. See license for details. */
}
}
-/* =========================================================================
- */
+/* ======================================================================== */
/*
* Loop through all of the monsters and update them. Called when:
context.botlx = 1; /* force a redraw of the bottom line */
}
-/* =========================================================================
- */
-/* Glyph Buffering (3rd screen) ============================================
- */
+/* for panning beyond a clipped region; resend the current map data to
+ the interface rather than use docrt()'s regeneration of that data */
+void
+redraw_map()
+{
+ int x, y, glyph;
+
+ /*
+ * Not sure whether this is actually necessary; save and restore did
+ * used to get much too involved with each dungeon level as it was
+ * read and written.
+ *
+ * !u.ux: display isn't ready yet; (restoring || !on_level()): was part
+ * of cliparound() but interface shouldn't access this much internals
+ */
+ if (!u.ux || restoring || !on_level(&u.uz0, &u.uz))
+ return;
+
+ /*
+ * This yields sensible clipping when #terrain+getpos is in
+ * progress and the screen displays something other than what
+ * the map would currently be showing.
+ */
+ for (y = 0; y < ROWNO; ++y)
+ for (x = 1; x < COLNO; ++x) {
+ glyph = glyph_at(x, y); /* not levl[x][y].glyph */
+ print_glyph(WIN_MAP, x, y, glyph, get_bk_glyph(x, y));
+ }
+ flush_screen(1);
+}
+
+/* ======================================================================== */
+/* Glyph Buffering (3rd screen) =========================================== */
typedef struct {
xchar new; /* perhaps move this bit into the rm structure. */
for (x = start; x <= stop; x++)
if (gbuf[y][x].glyph != cmap_to_glyph(S_stone))
- print_glyph(WIN_MAP, x, y, gbuf[y][x].glyph, get_bk_glyph(x,y));
+ print_glyph(WIN_MAP, x, y, gbuf[y][x].glyph, get_bk_glyph(x, y));
}
void
bot();
}
-/* =========================================================================
- */
+/* ======================================================================== */
/*
* back_to_glyph()
/*
* This will be used to get the glyph for the background so that
- * it can potentially be merged into graphical window ports
- * to improve the appearance of stuff on dark room
- * squares and the plane of air etc.
+ * it can potentially be merged into graphical window ports to
+ * improve the appearance of stuff on dark room squares and the
+ * plane of air etc.
*
* Until that is working correctly in the branch, however, for now
* we just return NO_GLYPH as an indicator to ignore it.
+ *
+ * [This should be using background as recorded for #overview rather
+ * than current data from the map.]
*/
STATIC_OVL int
-get_bk_glyph(x,y)
+get_bk_glyph(x, y)
xchar x, y;
{
int idx, bkglyph = NO_GLYPH;
-/* NetHack 3.6 winfuncs.c $NHDT-Date: 1433806596 2015/06/08 23:36:36 $ $NHDT-Branch: master $:$NHDT-Revision: 1.15 $ */
+/* NetHack 3.6 winfuncs.c $NHDT-Date: 1553895320 2019/03/29 21:35:20 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.16 $ */
/* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993,1996.
*/
/* NetHack may be freely redistributed. See license for details. */
amii_cliparound(x, y)
register int x, y;
{
- extern boolean restoring;
#ifdef CLIPPING
int oldx = clipx, oldy = clipy;
int oldxmax = clipxmax, oldymax = clipymax;
int COx, LIx;
#define SCROLLCNT 1 /* Get there in 3 moves... */
int scrollcnt = SCROLLCNT; /* ...or 1 if we changed level */
+
if (!clipping) /* And 1 in anycase, cleaner, simpler, quicker */
return;
clipymax += incy;
/* Draw the exposed portion */
- if (on_level(&u.uz0, &u.uz) && !restoring)
- (void) doredraw();
+ redraw_map();
flush_glyph_buffer(amii_wins[WIN_MAP]->win);
}
}
clipymax = saveymax;
clipxmax = savexmax;
#endif
- if (on_level(&u.uz0, &u.uz) && !restoring && moves > 1)
- (void) doredraw();
+ redraw_map();
flush_glyph_buffer(amii_wins[WIN_MAP]->win);
}
reclip = 0;
-/* NetHack 3.6 wintty.c $NHDT-Date: 1553858474 2019/03/29 11:21:14 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.199 $ */
+/* NetHack 3.6 wintty.c $NHDT-Date: 1553895321 2019/03/29 21:35:21 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.200 $ */
/* Copyright (c) David Cohrs, 1991 */
/* NetHack may be freely redistributed. See license for details. */
tty_cliparound(x, y)
int x, y;
{
- extern boolean restoring;
int oldx = clipx, oldy = clipy;
HUPSKIP();
clipy = clipymax - (LI - 1 - iflags.wc2_statuslines);
}
if (clipx != oldx || clipy != oldy) {
- if (on_level(&u.uz0, &u.uz) && !restoring)
- (void) doredraw();
+ redraw_map(); /* ask the core to resend the map window's data */
}
}
#endif /* CLIPPING */