lit and unlit corridors

The default symbol for lit and unlit corridors are the same.  This makes
the lit_corridor option a no-op where the defaults are used and also means
that using a light scroll/spell a corridor has no obvious effect.  To
address that, I special-cased the lit corridor symbol and change its color
to bright white when its the same symbol as the unlit corridor symbol (I
didn't change the default color since I thought that made the lit corridor
look strange using the windows console interface).
This commit is contained in:
cohrs
2003-11-23 21:24:16 +00:00
parent 5993a8fdc7
commit f8d6b1d41f
3 changed files with 10 additions and 1 deletions

View File

@@ -117,6 +117,7 @@ Gnome: real extended command menu so all extended commands can be entered
Gnome: ignore interrupts to avoid infinite loop in gnome library
tty: avoid crash displaying quit inventory if inventory was already displayed
tty: use "bold" in menu heading if available and requested
tty: differentiate between default unlit and lit corridor symbols
winCE: ensure orphaned lockfile is always deleted on single-user handhelds

View File

@@ -225,7 +225,7 @@ const struct symdef defsyms[MAXPCHARS] = {
{'#', "tree", C(CLR_GREEN)}, /* tree */
{'.', "floor of a room",C(CLR_GRAY)}, /* room */
/*20*/ {'#', "corridor", C(CLR_GRAY)}, /* dark corr */
{'#', "lit corridor", C(CLR_GRAY)}, /* lit corr */
{'#', "lit corridor", C(CLR_GRAY)}, /* lit corr (see mapglyph.c) */
{'<', "staircase up", C(CLR_GRAY)}, /* upstair */
{'>', "staircase down", C(CLR_GRAY)}, /* dnstair */
{'<', "ladder up", C(CLR_BROWN)}, /* upladder */

View File

@@ -121,6 +121,14 @@ unsigned *ospecial;
else
color = NO_COLOR;
} else
#endif
#ifdef TEXTCOLOR
/* provide a visible difference if normal and lit corridor
* use the same symbol */
if (iflags.use_color &&
offset == S_litcorr && ch == showsyms[S_corr])
color = CLR_WHITE;
else
#endif
cmap_color(offset);
} else if ((offset = (glyph - GLYPH_OBJ_OFF)) >= 0) { /* object */