map updating change to fix tty
This commit is contained in:
@@ -186,6 +186,8 @@ teleport feedback "you materialize at another location" was given too soon
|
|||||||
moving around underwater
|
moving around underwater
|
||||||
tty: redraw unexplored locations as S_unexplored rather than <space> after
|
tty: redraw unexplored locations as S_unexplored rather than <space> after
|
||||||
map has been partially overwritten by popup menu or text display
|
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
|
X11: was still initializing map to 'stone' instead of 'unexplored' after they
|
||||||
became separate glyphs
|
became separate glyphs
|
||||||
X11: for text map without color, add support for black&white ice; draw it in
|
X11: for text map without color, add support for black&white ice; draw it in
|
||||||
|
|||||||
+7
-15
@@ -1606,9 +1606,9 @@ int x, y, glyph;
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
void
|
||||||
clear_glyph_buffer()
|
clear_glyph_buffer()
|
||||||
@@ -1621,11 +1621,13 @@ clear_glyph_buffer()
|
|||||||
for (x = COLNO; x; x--) {
|
for (x = COLNO; x; x--) {
|
||||||
*gptr++ = nul_gbuf;
|
*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
|
void
|
||||||
row_refresh(start, stop, y)
|
row_refresh(start, stop, y)
|
||||||
int start, stop, y;
|
int start, stop, y;
|
||||||
@@ -1649,7 +1651,6 @@ void
|
|||||||
cls()
|
cls()
|
||||||
{
|
{
|
||||||
static boolean in_cls = 0;
|
static boolean in_cls = 0;
|
||||||
int y, x, force_unexplored;
|
|
||||||
|
|
||||||
if (in_cls)
|
if (in_cls)
|
||||||
return;
|
return;
|
||||||
@@ -1658,16 +1659,7 @@ cls()
|
|||||||
g.context.botlx = 1; /* force update of botl window */
|
g.context.botlx = 1; /* force update of botl window */
|
||||||
clear_nhwindow(WIN_MAP); /* clear physical screen */
|
clear_nhwindow(WIN_MAP); /* clear physical screen */
|
||||||
|
|
||||||
clear_glyph_buffer(); /* this is sort of an extra effort, but OK */
|
clear_glyph_buffer(); /* force gbuf[][].glyph to unexplored */
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
in_cls = FALSE;
|
in_cls = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user