moving around underwater
tty: redraw unexplored locations as S_unexplored rather than <space> after
map has been partially overwritten by popup menu or text display
+tty: previous change resulted in remnants of previous level being shown on
+ new level after level change when S_unexplored is <space>
X11: was still initializing map to 'stone' instead of 'unexplored' after they
became separate glyphs
X11: for text map without color, add support for black&white ice; draw it in
} \
}
-static const gbuf_entry nul_gbuf = { 0, GLYPH_UNEXPLORED };
+static const gbuf_entry nul_gbuf = { 1, GLYPH_UNEXPLORED };
/*
- * Turn the 3rd screen into UNEXPLORED.
+ * Turn the 3rd screen into UNEXPLORED that needs to be refreshed.
*/
void
clear_glyph_buffer()
for (x = COLNO; x; x--) {
*gptr++ = nul_gbuf;
}
+ g.gbuf_start[y] = 1;
+ g.gbuf_stop[y] = COLNO - 1;
}
- reset_glyph_bbox();
}
-/* used by tty after menu or text popup has temporarily overwritten the map */
+/* used by tty after menu or text popup has temporarily overwritten the map
+ and it has been erased so shows spaces, not necessarily S_unexplored */
void
row_refresh(start, stop, y)
int start, stop, y;
cls()
{
static boolean in_cls = 0;
- int y, x, force_unexplored;
if (in_cls)
return;
g.context.botlx = 1; /* force update of botl window */
clear_nhwindow(WIN_MAP); /* clear physical screen */
- clear_glyph_buffer(); /* this is sort of an extra effort, but OK */
- force_unexplored = (g.showsyms[SYM_UNEXPLORED + SYM_OFF_X] != ' ');
- for (y = 0; y < ROWNO; y++) {
- g.gbuf_start[y] = 1;
- g.gbuf_stop[y] = COLNO - 1;
- if (force_unexplored) {
- for (x = 1; x < COLNO; x++)
- g.gbuf[y][x].gnew = 1;
- }
- }
+ clear_glyph_buffer(); /* force gbuf[][].glyph to unexplored */
in_cls = FALSE;
}