MCPcopy Create free account
hub / github.com/NetHack/NetHack / reglyph_darkroom

Function reglyph_darkroom

src/display.c:1817–1854  ·  view source on GitHub ↗

* ======================================================= */

Source from the content-addressed store, hash-verified

1815 * =======================================================
1816 */
1817void
1818reglyph_darkroom(void)
1819{
1820 coordxy x, y;
1821
1822 for (x = 1; x < COLNO; x++)
1823 for (y = 0; y < ROWNO; y++) {
1824 struct rm *lev = &levl[x][y];
1825
1826 if (!flags.dark_room) {
1827 if (lev->glyph == cmap_to_glyph(S_corr)
1828 && lev->waslit)
1829 lev->glyph = cmap_to_glyph(S_litcorr);
1830 } else {
1831 if (lev->glyph == cmap_to_glyph(S_litcorr)
1832 && !cansee(x, y))
1833 lev->glyph = cmap_to_glyph(S_corr);
1834 }
1835
1836 if (!flags.dark_room || !iflags.use_color
1837 || Is_rogue_level(&u.uz)) {
1838 if (lev->glyph == cmap_to_glyph(S_darkroom))
1839 lev->glyph = lev->waslit ? cmap_to_glyph(S_room)
1840 : GLYPH_NOTHING;
1841 } else {
1842 if (lev->glyph == cmap_to_glyph(S_room) && lev->seenv
1843 && lev->waslit && !cansee(x, y))
1844 lev->glyph = cmap_to_glyph(S_darkroom);
1845 else if (lev->glyph == GLYPH_NOTHING
1846 && lev->typ == ROOM && lev->seenv && !cansee(x, y))
1847 lev->glyph = cmap_to_glyph(S_darkroom);
1848 }
1849 }
1850 if (flags.dark_room && iflags.use_color)
1851 gs.showsyms[S_darkroom] = gs.showsyms[S_room];
1852 else
1853 gs.showsyms[S_darkroom] = gs.showsyms[SYM_NOTHING + SYM_OFF_X];
1854}
1855
1856/* ======================================================================== */
1857/* Glyph Buffering (3rd screen) =========================================== */

Callers 4

initoptions_finishFunction · 0.85
reset_needed_visualsFunction · 0.85
goto_levelFunction · 0.85
dorecoverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected