make a distinction between rock and unexplored area

This adds a pair of new glyphs: GLYPH_UNEXPLORED and GLYPH_NOTHING

GLYPH_UNEXPLORED is meant to be the glyph for areas of the map that
haven't been explored yet.

GLYPH_NOTHING is a glyph that represents that which cannot be seen,
for instance the dark part of a room when the dark_room option is
not set.  Since the symbol for stone can now be overridden to
a players choice, it no longer made sense using S_stone for the
dark areas of the room with dark_room off. This allows the same
intended result even if S_stone symbol is mapped to something visible.

GLYPH_UNEXPLORED is what areas of the map get initialized to now
instead of STONE.

This adds a pair of new symbols: S_unexplored and S_nothing.

S_nothing is meant to be left as an unseen character (space) in
order to achieve the intended effect on the display.

S_unexplored is the symbol that is mapped to GLYPH_UNEXPLORED, and
is a distinct symbol from S_stone, even if they are set to the same
character. They don't have to be set to the same character.

Hopefully there are minimal bugs, but it is a deviation from a
fairly long-standing approach so there could be some unintended
glitches that will need repair.
This commit is contained in:
nhmall
2020-02-08 00:48:03 -05:00
parent 84daf75981
commit d37fa196b2
19 changed files with 248 additions and 126 deletions

View File

@@ -587,12 +587,12 @@ reglyph_darkroom()
|| Is_rogue_level(&u.uz)) {
if (lev->glyph == cmap_to_glyph(S_darkroom))
lev->glyph = lev->waslit ? cmap_to_glyph(S_room)
: cmap_to_glyph(S_stone);
: GLYPH_NOTHING;
} else {
if (lev->glyph == cmap_to_glyph(S_room) && lev->seenv
&& lev->waslit && !cansee(x, y))
lev->glyph = cmap_to_glyph(S_darkroom);
else if (lev->glyph == cmap_to_glyph(S_stone)
else if (lev->glyph == GLYPH_NOTHING
&& lev->typ == ROOM && lev->seenv && !cansee(x, y))
lev->glyph = cmap_to_glyph(S_darkroom);
}
@@ -600,7 +600,7 @@ reglyph_darkroom()
if (flags.dark_room && iflags.use_color)
g.showsyms[S_darkroom] = g.showsyms[S_room];
else
g.showsyms[S_darkroom] = g.showsyms[S_stone];
g.showsyms[S_darkroom] = g.showsyms[SYM_NOTHING + SYM_OFF_X];
}
/* check whether a user-supplied option string is a proper leading