From f8d6b1d41ff39083a44447dffc54d23209b841b2 Mon Sep 17 00:00:00 2001 From: cohrs Date: Sun, 23 Nov 2003 21:24:16 +0000 Subject: [PATCH] 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). --- doc/fixes34.3 | 1 + src/drawing.c | 2 +- src/mapglyph.c | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.3 b/doc/fixes34.3 index d71dc8b9d..91bdfd7a6 100644 --- a/doc/fixes34.3 +++ b/doc/fixes34.3 @@ -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 diff --git a/src/drawing.c b/src/drawing.c index d926b8a78..da3961430 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -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 */ diff --git a/src/mapglyph.c b/src/mapglyph.c index 718dc7660..4000ef8ac 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -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 */ -- 2.40.0