]> granicus.if.org Git - nethack/commitdiff
lit and unlit corridors
authorcohrs <cohrs>
Sun, 23 Nov 2003 21:24:16 +0000 (21:24 +0000)
committercohrs <cohrs>
Sun, 23 Nov 2003 21:24:16 +0000 (21:24 +0000)
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
src/drawing.c
src/mapglyph.c

index d71dc8b9dac851642d31db12687553a84dbd2bc5..91bdfd7a6c0eb486442e3fd3cbac5eeff38e9894 100644 (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
 
 
index d926b8a7810ed62f3decb784c1afcde2e87aeb7e..da3961430ce10674b494ada73c9eca9b43512df6 100644 (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 */
index 718dc766001d95242411a85a407dbf5dcc3cfe52..4000ef8ac4c6e3d2672e9d20357d11f671f3ffe9 100644 (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 */