tty: S_unexplored
Screen erasure leaves the map set to spaces. If S_unexplored is something other than <space>, tty wasn't drawing with S_unexplored after a menu or long message line got erased following temporary overwrite of part of the map. This seems to work but is not the correct way to do things. clear_screen(), cl_eos(), and cl_end() should all be taught to flag the map as needing to be refreshed after they erase part of it. tty_clear_nhwindow(WIN_BASE) is also lacking since it erases the message line, full map, and status lines but leaves their internal windows with stale data about what is shown instead of marking them blank.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 wintty.c $NHDT-Date: 1580252140 2020/01/28 22:55:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.248 $ */
|
||||
/* NetHack 3.6 wintty.c $NHDT-Date: 1587110794 2020/04/17 08:06:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.256 $ */
|
||||
/* Copyright (c) David Cohrs, 1991 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1652,13 +1652,16 @@ winid window;
|
||||
g.context.botlx = 1;
|
||||
break;
|
||||
case NHW_MAP:
|
||||
/* cheap -- clear the whole thing and tell nethack to redraw botl */
|
||||
g.context.botlx = 1;
|
||||
/*FALLTHRU*/
|
||||
/* the full map isn't erased often so the benefit of clearing the
|
||||
whole screen and then redrawing status would be minimal here */
|
||||
docorner(1, ROWNO - 1); /* sets map cells to S_unexplored
|
||||
* which might not be <space> */
|
||||
break;
|
||||
case NHW_BASE:
|
||||
clear_screen();
|
||||
/*for (i = 0; i < cw->maxrow; ++i) */
|
||||
/* finalx[i][NOW] = finalx[i][BEFORE] = 0;*/
|
||||
if (!g.program_state.gameover)
|
||||
g.context.botlx = 1;
|
||||
/* [this sould also reset state for MESSAGE, MAP, and STATUS] */
|
||||
break;
|
||||
case NHW_MENU:
|
||||
case NHW_TEXT:
|
||||
|
||||
Reference in New Issue
Block a user