Fix: SE002 Problem: Compilation fails if TEXTCOLOR is not defined. Reported by: vcolaco@esoterica.pt Compatible with: Slash'EM 0.0.5E3 (and some earlier) Obsoleted by: Slash'EM 0.0.5E4 Author: J. Ali Harlow, ali@avrc.city.ac.uk Date: 29 Jul 1999 *** win/tty/wintty.c.orig Tue Jul 27 16:27:04 1999 --- win/tty/wintty.c Thu Jul 29 19:18:19 1999 *************** *** 2457,2462 **** --- 2457,2470 ---- #define zap_color(n) color = iflags.use_color ? zapcolors[n] : NO_COLOR #define cmap_color(n) color = iflags.use_color ? defsyms[n].color : NO_COLOR + #define altar_color(n) if (iflags.use_color) \ + switch(a_align(x,y)) { \ + case A_LAWFUL: color = CLR_WHITE; break; \ + case A_NEUTRAL: color = CLR_GRAY; break; \ + case A_CHAOTIC: color = CLR_BLACK; break; \ + default: color = CLR_RED; break; \ + } else color = NO_COLOR + #define trap_color(n) color = iflags.use_color ? colorful_trap[n] : NO_COLOR #define obj_color(n) color = iflags.use_color ? objects[n].oc_color : NO_COLOR #define mon_color(n) color = iflags.use_color ? mons[n].mcolor : NO_COLOR #define pet_color(n) color = iflags.use_color ? mons[n].mcolor : \ *************** *** 2469,2474 **** --- 2477,2484 ---- #define zap_color(n) #define cmap_color(n) + #define altar_color(n) + #define trap_color(n) #define obj_color(n) #define mon_color(n) #define pet_color(c) *************** *** 2496,2509 **** zap_color((offset >> 2)); } else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) { /* cmap */ ch = showsyms[offset]; ! if (glyph_is_trap(offset)) color = colorful_trap[offset]; else if (offset != S_altar) cmap_color(offset); ! else { ! if (a_align(x,y) == A_LAWFUL) color = CLR_WHITE; ! else if (a_align(x,y) == A_NEUTRAL) color = CLR_GRAY; ! else if (a_align(x,y) == A_CHAOTIC) color = CLR_BLACK; ! else if (a_align(x,y) == A_NONE) color = CLR_RED; ! } /* } else if ((offset = (glyph - GLYPH_TRAP_OFF)) >= 0) { * trap * ch = (offset == WEB) ? showsyms[S_web] : showsyms[S_trap]; color = colorful_trap[offset]; --- 2506,2514 ---- zap_color((offset >> 2)); } else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) { /* cmap */ ch = showsyms[offset]; ! if (glyph_is_trap(offset)) trap_color(offset); else if (offset != S_altar) cmap_color(offset); ! else altar_color(offset); /* } else if ((offset = (glyph - GLYPH_TRAP_OFF)) >= 0) { * trap * ch = (offset == WEB) ? showsyms[S_web] : showsyms[S_trap]; color = colorful_trap[offset];