* magic_map_background() * * This function is similar to map_background (see below) except we pay * attention to and correct unexplored, lit ROOM and CORR spots. */
| 230 | * attention to and correct unexplored, lit ROOM and CORR spots. |
| 231 | */ |
| 232 | void |
| 233 | magic_map_background(coordxy x, coordxy y, int show) |
| 234 | { |
| 235 | int glyph = back_to_glyph(x, y); /* assumes hero can see x,y */ |
| 236 | struct rm *lev = &levl[x][y]; |
| 237 | |
| 238 | /* |
| 239 | * Correct for out of sight lit corridors and rooms that the hero |
| 240 | * doesn't remember as lit. |
| 241 | */ |
| 242 | if (!cansee(x, y) && !lev->waslit) { |
| 243 | /* Floor spaces are dark if unlit. Corridors are dark if unlit. */ |
| 244 | if (lev->typ == ROOM && glyph == cmap_to_glyph(S_room)) |
| 245 | glyph = (flags.dark_room && iflags.use_color) |
| 246 | ? cmap_to_glyph(DARKROOMSYM) |
| 247 | : GLYPH_NOTHING; |
| 248 | else if (lev->typ == CORR && glyph == cmap_to_glyph(S_litcorr)) |
| 249 | glyph = cmap_to_glyph(S_corr); |
| 250 | } |
| 251 | if (svl.level.flags.hero_memory |
| 252 | && (glyph_is_unexplored(lev->glyph) || glyph_is_cmap(lev->glyph))) |
| 253 | lev->glyph = glyph; |
| 254 | if (show) |
| 255 | show_glyph(x, y, glyph); |
| 256 | |
| 257 | update_lastseentyp(x, y); |
| 258 | } |
| 259 | |
| 260 | /* |
| 261 | * The routines map_background(), map_object(), and map_trap() could just |
no test coverage detected