TEXTCOLOR removal followup

Macros to conditionally include color fields in defsyms[] and objects[]
are no longer needed.  The one for mons[] was already gone but traces
were present in a comment.
This commit is contained in:
PatR
2023-11-22 23:58:13 -08:00
parent aa026e0f89
commit 4fc88f3cbc
3 changed files with 112 additions and 129 deletions

View File

@@ -30,12 +30,6 @@
(define PCHAR_TILES prior to #include defsym.h).
*/
#ifdef CLR
#undef CLR
#endif
#define CLR(n) n
#if defined(PCHAR_S_ENUM) || defined(PCHAR_PARSE) \
|| defined(PCHAR_DRAWING) || defined(PCHAR_TILES)
@@ -72,111 +66,104 @@
#elif defined(PCHAR_TILES)
/* win/share/tilemap.c */
#define PCHAR(idx, ch, sym, desc, clr) { sym, desc, desc },
#define PCHAR2(idx, ch, sym, tilenm, desc, clr) { sym, tilenm, desc },
#endif
/* PCHAR with extra arg */
#if defined(PCHAR_TILES)
#define PCHAR2(idx, ch, sym, tilenm, desc, clr) { sym, tilenm, desc },
#else
#ifndef PCHAR2
#define PCHAR2(idx, ch, sym, tilenm, desc, clr) PCHAR(idx, ch, sym, desc, clr)
#endif
PCHAR2( 0, ' ', S_stone, "dark part of a room", "stone", CLR(NO_COLOR))
PCHAR2( 1, '|', S_vwall, "vertical wall", "wall", CLR(CLR_GRAY))
PCHAR2( 2, '-', S_hwall, "horizontal wall", "wall", CLR(CLR_GRAY))
PCHAR2( 3, '-', S_tlcorn, "top left corner wall", "wall", CLR(CLR_GRAY))
PCHAR2( 4, '-', S_trcorn, "top right corner wall", "wall", CLR(CLR_GRAY))
PCHAR2( 5, '-', S_blcorn, "bottom left corner wall",
"wall", CLR(CLR_GRAY))
PCHAR2( 6, '-', S_brcorn, "bottom right corner wall",
"wall", CLR(CLR_GRAY))
PCHAR2( 7, '-', S_crwall, "cross wall", "wall", CLR(CLR_GRAY))
PCHAR2( 8, '-', S_tuwall, "tuwall", "wall", CLR(CLR_GRAY))
PCHAR2( 9, '-', S_tdwall, "tdwall", "wall", CLR(CLR_GRAY))
PCHAR2(10, '|', S_tlwall, "tlwall", "wall", CLR(CLR_GRAY))
PCHAR2(11, '|', S_trwall, "trwall", "wall", CLR(CLR_GRAY))
PCHAR2( 0, ' ', S_stone, "dark part of a room", "stone", NO_COLOR)
PCHAR2( 1, '|', S_vwall, "vertical wall", "wall", CLR_GRAY)
PCHAR2( 2, '-', S_hwall, "horizontal wall", "wall", CLR_GRAY)
PCHAR2( 3, '-', S_tlcorn, "top left corner wall", "wall", CLR_GRAY)
PCHAR2( 4, '-', S_trcorn, "top right corner wall", "wall", CLR_GRAY)
PCHAR2( 5, '-', S_blcorn, "bottom left corner wall", "wall", CLR_GRAY)
PCHAR2( 6, '-', S_brcorn, "bottom right corner wall", "wall", CLR_GRAY)
PCHAR2( 7, '-', S_crwall, "cross wall", "wall", CLR_GRAY)
PCHAR2( 8, '-', S_tuwall, "tuwall", "wall", CLR_GRAY)
PCHAR2( 9, '-', S_tdwall, "tdwall", "wall", CLR_GRAY)
PCHAR2(10, '|', S_tlwall, "tlwall", "wall", CLR_GRAY)
PCHAR2(11, '|', S_trwall, "trwall", "wall", CLR_GRAY)
/* start cmap A */
PCHAR2(12, '.', S_ndoor, "no door", "doorway", CLR(CLR_GRAY))
PCHAR2(13, '-', S_vodoor, "vertical open door",
"open door", CLR(CLR_BROWN))
PCHAR2(14, '|', S_hodoor, "horizontal open door",
"open door", CLR(CLR_BROWN))
PCHAR2(12, '.', S_ndoor, "no door", "doorway", CLR_GRAY)
PCHAR2(13, '-', S_vodoor, "vertical open door", "open door", CLR_BROWN)
PCHAR2(14, '|', S_hodoor, "horizontal open door", "open door", CLR_BROWN)
PCHAR2(15, '+', S_vcdoor, "vertical closed door",
"closed door", CLR(CLR_BROWN))
"closed door", CLR_BROWN)
PCHAR2(16, '+', S_hcdoor, "horizontal closed door",
"closed door", CLR(CLR_BROWN))
PCHAR( 17, '#', S_bars, "iron bars", CLR(HI_METAL))
PCHAR( 18, '#', S_tree, "tree", CLR(CLR_GREEN))
PCHAR( 19, '.', S_room, "floor of a room", CLR(CLR_GRAY))
PCHAR( 20, '.', S_darkroom, "dark part of a room", CLR(CLR_BLACK))
"closed door", CLR_BROWN)
PCHAR( 17, '#', S_bars, "iron bars", HI_METAL)
PCHAR( 18, '#', S_tree, "tree", CLR_GREEN)
PCHAR( 19, '.', S_room, "floor of a room", CLR_GRAY)
PCHAR( 20, '.', S_darkroom, "dark part of a room", CLR_BLACK)
PCHAR2(21, '`', S_engroom, "engraving in a room", "engraving",
CLR(CLR_BRIGHT_BLUE))
PCHAR2(22, '#', S_corr, "dark corridor", "corridor", CLR(CLR_GRAY))
PCHAR( 23, '#', S_litcorr, "lit corridor", CLR(CLR_GRAY))
CLR_BRIGHT_BLUE)
PCHAR2(22, '#', S_corr, "dark corridor", "corridor", CLR_GRAY)
PCHAR( 23, '#', S_litcorr, "lit corridor", CLR_GRAY)
PCHAR2(24, '#', S_engrcorr, "engraving in a corridor", "engraving",
CLR(CLR_BRIGHT_BLUE))
PCHAR2(25, '<', S_upstair, "up stairs", "staircase up", CLR(CLR_GRAY))
PCHAR2(26, '>', S_dnstair, "down stairs", "staircase down", CLR(CLR_GRAY))
PCHAR2(27, '<', S_upladder, "up ladder", "ladder up", CLR(CLR_BROWN))
PCHAR2(28, '>', S_dnladder, "down ladder", "ladder down", CLR(CLR_BROWN))
PCHAR( 29, '<', S_brupstair, "branch staircase up", CLR(CLR_YELLOW))
PCHAR( 30, '>', S_brdnstair, "branch staircase down", CLR(CLR_YELLOW))
PCHAR( 31, '<', S_brupladder, "branch ladder up", CLR(CLR_YELLOW))
PCHAR( 32, '>', S_brdnladder, "branch ladder down", CLR(CLR_YELLOW))
CLR_BRIGHT_BLUE)
PCHAR2(25, '<', S_upstair, "up stairs", "staircase up", CLR_GRAY)
PCHAR2(26, '>', S_dnstair, "down stairs", "staircase down", CLR_GRAY)
PCHAR2(27, '<', S_upladder, "up ladder", "ladder up", CLR_BROWN)
PCHAR2(28, '>', S_dnladder, "down ladder", "ladder down", CLR_BROWN)
PCHAR( 29, '<', S_brupstair, "branch staircase up", CLR_YELLOW)
PCHAR( 30, '>', S_brdnstair, "branch staircase down", CLR_YELLOW)
PCHAR( 31, '<', S_brupladder, "branch ladder up", CLR_YELLOW)
PCHAR( 32, '>', S_brdnladder, "branch ladder down", CLR_YELLOW)
/* end cmap A */
PCHAR( 33, '_', S_altar, "altar", CLR(CLR_GRAY))
PCHAR( 33, '_', S_altar, "altar", CLR_GRAY)
/* start cmap B */
PCHAR( 34, '|', S_grave, "grave", CLR(CLR_WHITE))
PCHAR2(35, '\\', S_throne, "throne", "opulent throne", CLR(HI_GOLD))
PCHAR( 36, '{', S_sink, "sink", CLR(CLR_WHITE))
PCHAR( 37, '{', S_fountain, "fountain", CLR(CLR_BRIGHT_BLUE))
PCHAR2(38, '}', S_pool, "pool", "water", CLR(CLR_BLUE))
PCHAR( 39, '.', S_ice, "ice", CLR(CLR_CYAN))
PCHAR( 40, '}', S_lava, "molten lava", CLR(CLR_RED))
PCHAR( 41, '}', S_lavawall, "wall of lava", CLR(CLR_ORANGE))
PCHAR( 34, '|', S_grave, "grave", CLR_WHITE)
PCHAR2(35, '\\', S_throne, "throne", "opulent throne", HI_GOLD)
PCHAR( 36, '{', S_sink, "sink", CLR_WHITE)
PCHAR( 37, '{', S_fountain, "fountain", CLR_BRIGHT_BLUE)
PCHAR2(38, '}', S_pool, "pool", "water", CLR_BLUE)
PCHAR( 39, '.', S_ice, "ice", CLR_CYAN)
PCHAR( 40, '}', S_lava, "molten lava", CLR_RED)
PCHAR( 41, '}', S_lavawall, "wall of lava", CLR_ORANGE)
PCHAR2(42, '.', S_vodbridge, "vertical open drawbridge",
"lowered drawbridge", CLR(CLR_BROWN))
"lowered drawbridge", CLR_BROWN)
PCHAR2(43, '.', S_hodbridge, "horizontal open drawbridge",
"lowered drawbridge", CLR(CLR_BROWN))
"lowered drawbridge", CLR_BROWN)
PCHAR2(44, '#', S_vcdbridge, "vertical closed drawbridge",
"raised drawbridge", CLR(CLR_BROWN))
"raised drawbridge", CLR_BROWN)
PCHAR2(45, '#', S_hcdbridge, "horizontal closed drawbridge",
"raised drawbridge", CLR(CLR_BROWN))
PCHAR( 46, ' ', S_air, "air", CLR(CLR_CYAN))
PCHAR( 47, '#', S_cloud, "cloud", CLR(CLR_GRAY))
PCHAR( 48, '}', S_water, "water", CLR(CLR_BRIGHT_BLUE))
"raised drawbridge", CLR_BROWN)
PCHAR( 46, ' ', S_air, "air", CLR_CYAN)
PCHAR( 47, '#', S_cloud, "cloud", CLR_GRAY)
PCHAR( 48, '}', S_water, "water", CLR_BRIGHT_BLUE)
/* end dungeon characters */
/* */
/* begin traps */
/* */
PCHAR( 49, '^', S_arrow_trap, "arrow trap", CLR(HI_METAL))
PCHAR( 50, '^', S_dart_trap, "dart trap", CLR(HI_METAL))
PCHAR( 51, '^', S_falling_rock_trap, "falling rock trap", CLR(CLR_GRAY))
PCHAR( 52, '^', S_squeaky_board, "squeaky board", CLR(CLR_BROWN))
PCHAR( 53, '^', S_bear_trap, "bear trap", CLR(HI_METAL))
PCHAR( 54, '^', S_land_mine, "land mine", CLR(CLR_RED))
PCHAR( 55, '^', S_rolling_boulder_trap, "rolling boulder trap",
CLR(CLR_GRAY))
PCHAR( 56, '^', S_sleeping_gas_trap, "sleeping gas trap", CLR(HI_ZAP))
PCHAR( 57, '^', S_rust_trap, "rust trap", CLR(CLR_BLUE))
PCHAR( 58, '^', S_fire_trap, "fire trap", CLR(CLR_ORANGE))
PCHAR( 59, '^', S_pit, "pit", CLR(CLR_BLACK))
PCHAR( 60, '^', S_spiked_pit, "spiked pit", CLR(CLR_BLACK))
PCHAR( 61, '^', S_hole, "hole", CLR(CLR_BROWN))
PCHAR( 62, '^', S_trap_door, "trap door", CLR(CLR_BROWN))
PCHAR( 63, '^', S_teleportation_trap, "teleportation trap",
CLR(CLR_MAGENTA))
PCHAR( 64, '^', S_level_teleporter, "level teleporter", CLR(CLR_MAGENTA))
PCHAR( 65, '^', S_magic_portal, "magic portal", CLR(CLR_BRIGHT_MAGENTA))
PCHAR( 66, '"', S_web, "web", CLR(CLR_GRAY))
PCHAR( 67, '^', S_statue_trap, "statue trap", CLR(CLR_GRAY))
PCHAR( 68, '^', S_magic_trap, "magic trap", CLR(HI_ZAP))
PCHAR( 49, '^', S_arrow_trap, "arrow trap", HI_METAL)
PCHAR( 50, '^', S_dart_trap, "dart trap", HI_METAL)
PCHAR( 51, '^', S_falling_rock_trap, "falling rock trap", CLR_GRAY)
PCHAR( 52, '^', S_squeaky_board, "squeaky board", CLR_BROWN)
PCHAR( 53, '^', S_bear_trap, "bear trap", HI_METAL)
PCHAR( 54, '^', S_land_mine, "land mine", CLR_RED)
PCHAR( 55, '^', S_rolling_boulder_trap, "rolling boulder trap", CLR_GRAY)
PCHAR( 56, '^', S_sleeping_gas_trap, "sleeping gas trap", HI_ZAP)
PCHAR( 57, '^', S_rust_trap, "rust trap", CLR_BLUE)
PCHAR( 58, '^', S_fire_trap, "fire trap", CLR_ORANGE)
PCHAR( 59, '^', S_pit, "pit", CLR_BLACK)
PCHAR( 60, '^', S_spiked_pit, "spiked pit", CLR_BLACK)
PCHAR( 61, '^', S_hole, "hole", CLR_BROWN)
PCHAR( 62, '^', S_trap_door, "trap door", CLR_BROWN)
PCHAR( 63, '^', S_teleportation_trap, "teleportation trap", CLR_MAGENTA)
PCHAR( 64, '^', S_level_teleporter, "level teleporter", CLR_MAGENTA)
PCHAR( 65, '^', S_magic_portal, "magic portal", CLR_BRIGHT_MAGENTA)
PCHAR( 66, '"', S_web, "web", CLR_GRAY)
PCHAR( 67, '^', S_statue_trap, "statue trap", CLR_GRAY)
PCHAR( 68, '^', S_magic_trap, "magic trap", HI_ZAP)
PCHAR2(69, '^', S_anti_magic_trap, "anti magic trap", "anti-magic field",
CLR(HI_ZAP))
PCHAR( 70, '^', S_polymorph_trap, "polymorph trap", CLR(CLR_BRIGHT_GREEN))
PCHAR( 71, '~', S_vibrating_square, "vibrating square", CLR(CLR_MAGENTA))
PCHAR( 72, '^', S_trapped_door, "trapped door", CLR(CLR_ORANGE))
PCHAR( 73, '^', S_trapped_chest, "trapped chest", CLR(CLR_ORANGE))
HI_ZAP)
PCHAR( 70, '^', S_polymorph_trap, "polymorph trap", CLR_BRIGHT_GREEN)
PCHAR( 71, '~', S_vibrating_square, "vibrating square", CLR_MAGENTA)
PCHAR( 72, '^', S_trapped_door, "trapped door", CLR_ORANGE)
PCHAR( 73, '^', S_trapped_chest, "trapped chest", CLR_ORANGE)
/* end traps */
/* end cmap B */
/* */
@@ -184,22 +171,22 @@
/* */
/* zap colors are changed by reset_glyphmap() to match type of beam */
/* */
PCHAR2(74, '|', S_vbeam, "vertical beam", "", CLR(CLR_GRAY))
PCHAR2(75, '-', S_hbeam, "horizontal beam", "", CLR(CLR_GRAY))
PCHAR2(76, '\\', S_lslant, "left slant beam", "", CLR(CLR_GRAY))
PCHAR2(77, '/', S_rslant, "right slant beam", "", CLR(CLR_GRAY))
PCHAR2(74, '|', S_vbeam, "vertical beam", "", CLR_GRAY)
PCHAR2(75, '-', S_hbeam, "horizontal beam", "", CLR_GRAY)
PCHAR2(76, '\\', S_lslant, "left slant beam", "", CLR_GRAY)
PCHAR2(77, '/', S_rslant, "right slant beam", "", CLR_GRAY)
/* start cmap C */
PCHAR2(78, '*', S_digbeam, "dig beam", "", CLR(CLR_WHITE))
PCHAR2(79, '!', S_flashbeam, "flash beam", "", CLR(CLR_WHITE))
PCHAR2(80, ')', S_boomleft, "boom left", "", CLR(HI_WOOD))
PCHAR2(81, '(', S_boomright, "boom right", "", CLR(HI_WOOD))
PCHAR2(78, '*', S_digbeam, "dig beam", "", CLR_WHITE)
PCHAR2(79, '!', S_flashbeam, "flash beam", "", CLR_WHITE)
PCHAR2(80, ')', S_boomleft, "boom left", "", HI_WOOD)
PCHAR2(81, '(', S_boomright, "boom right", "", HI_WOOD)
/* 4 magic shield symbols */
PCHAR2(82, '0', S_ss1, "shield1", "", CLR(HI_ZAP))
PCHAR2(83, '#', S_ss2, "shield2", "", CLR(HI_ZAP))
PCHAR2(84, '@', S_ss3, "shield3", "", CLR(HI_ZAP))
PCHAR2(85, '*', S_ss4, "shield4", "", CLR(HI_ZAP))
PCHAR( 86, '#', S_poisoncloud, "poison cloud", CLR(CLR_BRIGHT_GREEN))
PCHAR( 87, '?', S_goodpos, "valid position", CLR(CLR_BRIGHT_GREEN))
PCHAR2(82, '0', S_ss1, "shield1", "", HI_ZAP)
PCHAR2(83, '#', S_ss2, "shield2", "", HI_ZAP)
PCHAR2(84, '@', S_ss3, "shield3", "", HI_ZAP)
PCHAR2(85, '*', S_ss4, "shield4", "", HI_ZAP)
PCHAR( 86, '#', S_poisoncloud, "poison cloud", CLR_BRIGHT_GREEN)
PCHAR( 87, '?', S_goodpos, "valid position", CLR_BRIGHT_GREEN)
/* end cmap C */
/* */
/* The 8 swallow symbols. Do NOT separate. */
@@ -213,14 +200,14 @@
/* 4 5 6 */
/* 7 8 9 */
/* */
PCHAR2(88, '/', S_sw_tl, "swallow top left", "", CLR(CLR_GREEN)) /*1*/
PCHAR2(89, '-', S_sw_tc, "swallow top center", "", CLR(CLR_GREEN)) /*2*/
PCHAR2(90, '\\', S_sw_tr, "swallow top right", "", CLR(CLR_GREEN)) /*3*/
PCHAR2(91, '|', S_sw_ml, "swallow middle left", "", CLR(CLR_GREEN)) /*4*/
PCHAR2(92, '|', S_sw_mr, "swallow middle right", "", CLR(CLR_GREEN)) /*6*/
PCHAR2(93, '\\', S_sw_bl, "swallow bottom left", "", CLR(CLR_GREEN)) /*7*/
PCHAR2(94, '-', S_sw_bc, "swallow bottom center", "", CLR(CLR_GREEN))/*8*/
PCHAR2(95, '/', S_sw_br, "swallow bottom right", "", CLR(CLR_GREEN)) /*9*/
PCHAR2(88, '/', S_sw_tl, "swallow top left", "", CLR_GREEN) /*1*/
PCHAR2(89, '-', S_sw_tc, "swallow top center", "", CLR_GREEN) /*2*/
PCHAR2(90, '\\', S_sw_tr, "swallow top right", "", CLR_GREEN) /*3*/
PCHAR2(91, '|', S_sw_ml, "swallow middle left", "", CLR_GREEN) /*4*/
PCHAR2(92, '|', S_sw_mr, "swallow middle right", "", CLR_GREEN) /*6*/
PCHAR2(93, '\\', S_sw_bl, "swallow bottom left", "", CLR_GREEN) /*7*/
PCHAR2(94, '-', S_sw_bc, "swallow bottom center", "", CLR_GREEN) /*8*/
PCHAR2(95, '/', S_sw_br, "swallow bottom right", "", CLR_GREEN) /*9*/
/* */
/* explosion colors are changed by reset_glyphmap() to match */
/* the type of expl. */
@@ -231,15 +218,15 @@
/* |@| */
/* \-/ */
/* */
PCHAR2(96, '/', S_expl_tl, "explosion top left", "", CLR(CLR_ORANGE))
PCHAR2(97, '-', S_expl_tc, "explosion top center", "", CLR(CLR_ORANGE))
PCHAR2(98, '\\', S_expl_tr, "explosion top right", "", CLR(CLR_ORANGE))
PCHAR2(99, '|', S_expl_ml, "explosion middle left", "", CLR(CLR_ORANGE))
PCHAR2(100, ' ', S_expl_mc, "explosion middle center", "", CLR(CLR_ORANGE))
PCHAR2(101, '|', S_expl_mr, "explosion middle right", "", CLR(CLR_ORANGE))
PCHAR2(102, '\\', S_expl_bl, "explosion bottom left", "", CLR(CLR_ORANGE))
PCHAR2(103, '-', S_expl_bc, "explosion bottom center", "", CLR(CLR_ORANGE))
PCHAR2(104, '/', S_expl_br, "explosion bottom right", "", CLR(CLR_ORANGE))
PCHAR2(96, '/', S_expl_tl, "explosion top left", "", CLR_ORANGE)
PCHAR2(97, '-', S_expl_tc, "explosion top center", "", CLR_ORANGE)
PCHAR2(98, '\\', S_expl_tr, "explosion top right", "", CLR_ORANGE)
PCHAR2(99, '|', S_expl_ml, "explosion middle left", "", CLR_ORANGE)
PCHAR2(100, ' ', S_expl_mc, "explosion middle center", "", CLR_ORANGE)
PCHAR2(101, '|', S_expl_mr, "explosion middle right", "", CLR_ORANGE)
PCHAR2(102, '\\', S_expl_bl, "explosion bottom left", "", CLR_ORANGE)
PCHAR2(103, '-', S_expl_bc, "explosion bottom center", "", CLR_ORANGE)
PCHAR2(104, '/', S_expl_br, "explosion bottom right", "", CLR_ORANGE)
#undef PCHAR
#undef PCHAR2
#endif /* PCHAR_S_ENUM || PCHAR_PARSE || PCHAR_DRAWING || PCHAR_TILES */
@@ -439,8 +426,6 @@
#endif /* OBJCLASS_S_ENUM || OBJCLASS_DEFCHAR_ENUM || OBJCLASS_CLASS_ENUM
* || OBJCLASS_PARSE || OBJCLASS_DRAWING */
#undef CLR
#ifdef DEBUG
#if !defined(PCHAR_S_ENUM) && !defined(PCHAR_DRAWING) \
&& !defined(PCHAR_PARSE) && !defined(PCHAR_TILES) \
@@ -451,6 +436,6 @@
&& !defined (OBJCLASS_DRAWING)
#error Non-productive inclusion of defsym.h
#endif
#endif
#endif /* DEBUG */
/* end of defsym.h */