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 */
| 2144 | /* used by tty after menu or text popup has temporarily overwritten the map |
| 2145 | and it has been erased so shows spaces, not necessarily S_unexplored */ |
| 2146 | void |
| 2147 | row_refresh(coordxy start, coordxy stop, coordxy y) |
| 2148 | { |
| 2149 | coordxy x; |
| 2150 | int glyph; |
| 2151 | boolean force; |
| 2152 | gbuf_entry *gptr = &gg.gbuf[0][0]; |
| 2153 | glyph_info bkglyphinfo = nul_glyphinfo; |
| 2154 | glyph_info *giptr = |
| 2155 | #ifndef UNBUFFERED_GLYPHINFO |
| 2156 | &gptr->glyphinfo; |
| 2157 | #else |
| 2158 | &ginfo; |
| 2159 | |
| 2160 | map_glyphinfo(0, 0, GLYPH_UNEXPLORED, 0U, giptr); |
| 2161 | #endif |
| 2162 | #ifndef UNBUFFERED_GLYPHINFO |
| 2163 | force = (giptr->ttychar != nul_gbuf.glyphinfo.ttychar |
| 2164 | || giptr->gm.sym.color != nul_gbuf.glyphinfo.gm.sym.color |
| 2165 | || giptr->gm.glyphflags != nul_gbuf.glyphinfo.gm.glyphflags |
| 2166 | || giptr->gm.customcolor != nul_gbuf.glyphinfo.gm.customcolor |
| 2167 | || giptr->gm.tileidx != nul_gbuf.glyphinfo.gm.tileidx) |
| 2168 | #else |
| 2169 | force = (giptr->ttychar != ' ' |
| 2170 | || giptr->gm.sym.color != NO_COLOR |
| 2171 | || giptr->gm.gm.customcolor != 0 |
| 2172 | || (giptr->gm.glyphflags & ~MG_UNEXPL) != 0) |
| 2173 | #endif |
| 2174 | ? 1 : 0; |
| 2175 | for (x = start; x <= stop; x++) { |
| 2176 | gptr = &gg.gbuf[y][x]; |
| 2177 | glyph = gptr->glyphinfo.glyph; |
| 2178 | get_bkglyph_and_framecolor(x, y, &bkglyphinfo.glyph, |
| 2179 | &bkglyphinfo.framecolor); |
| 2180 | if (force || glyph != GLYPH_UNEXPLORED |
| 2181 | || bkglyphinfo.framecolor != NO_COLOR) { |
| 2182 | print_glyph(WIN_MAP, x, y, |
| 2183 | Glyphinfo_at(x, y, glyph), &bkglyphinfo); |
| 2184 | } |
| 2185 | } |
| 2186 | } |
| 2187 | |
| 2188 | void |
| 2189 | cls(void) |
| 2190 | { |
| 2191 | static boolean in_cls = 0; |
| 2192 | |
| 2193 | if (in_cls) |
| 2194 | return; |
| 2195 | in_cls = TRUE; |
| 2196 | display_nhwindow(WIN_MESSAGE, FALSE); /* flush messages */ |
| 2197 | disp.botlx = TRUE; /* force update of botl window */ |
| 2198 | clear_nhwindow(WIN_MAP); /* clear physical screen */ |
| 2199 | |
| 2200 | clear_glyph_buffer(); /* force gbuf[][].glyph to unexplored */ |
| 2201 | in_cls = FALSE; |
| 2202 | } |
| 2203 |
no test coverage detected