Files
nethack/src/drawing.c
nethack.allison 253bf359af drawing overhaul (trunk only)
This is an overhaul to the NetHack drawing mechanism.

- eliminates the need to have separate lists in drawing.c
for the things and their associated explanations by grouping
those thing together on the same inializer in a struct.

- replaces all of these options: IBMgraphics, DECgraphics, MACgraphics,
graphics, monsters, objects, boulder, traps, effects

- drawing.c contains only the set of NetHack standard symbols for
the main game and a set of NetHack standard symbols for the
roguelevel.

- introduces a symbols file that contains named sets of
symbols that can be loaded at run time making it extensible
for situations like multinational code pages like those reported
by <Someone>, without hardcoding additional sets into the game code.

- symbols file uses names for the symbols, so offsets will not break
when new things are introduced into the game, the way the older
config file uchar load routines did.

- symbols file only contains exceptions to the standard NetHack
set, not entire sets so they are much less verbose than all of
the g_FILLER() entries that were previously in drawing.c

- 'symset' and 'roguesymset' config file options for
preselecting a symbol set from the file called 'symbols'
at startup time. The name of the symbols file is not under the
users control, only the symbol set name desired from within the
symbols file is.

- 'symset' config file option loads a desired symbol set for
everything but the rogue level.

- 'roguesymset' config file option loads a desired symbol set
for the rogue level.

- 'SYMBOLS' config file option allows the user to specify replacement
symbols on a per symbol basis. You can specify as many or as few symbols
as you wish. The symbols are identified by a name:value pair, and line
continuation is supported. Multiple symbol assignments can be made on
the same line if each name:value pair is separated by a comma.
For example:
SYMBOLS = S_bars:\xf0, S_tree: \xf1, S_room:\xfa \
	  S_fountain:\xf4 \
	  S_boulder:0

- 'symbols' file has the following structure:
start: DECgraphics
	Handling: DEC
	S_vwall: \xf8			# meta-x, vertical rule
	S_hwall: \xf1			# meta-q, horizontal rule
finish
start: IBMgraphics
	Handling: IBM
	S_vwall: \xb3			# meta-3, vertical rule
	S_hwall: \xc4			# meta-D, horizontal rule
finish

- 'symbols' file added to the source tree in the dat directory

- Port Makefiles/scripts will need to be adjusted to move them into
HACKDIR destination
2006-09-21 01:46:15 +00:00

737 lines
23 KiB
C

/* SCCS Id: @(#)drawing.c 3.5 2006/09/16 */
/* Copyright (c) NetHack Development Team 1992. */
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "tcap.h"
/* Relevent header information in rm.h and objclass.h. */
#ifdef C
#undef C
#endif
#ifdef TEXTCOLOR
#define C(n) n
#else
#define C(n)
#endif
char *symset = 0, *symhandling = 0; /* from drawing.c */
char *roguesymset = 0, *roguehandling = 0; /* from drawing.c */
uchar oc_syms[MAXOCLASSES] = DUMMY; /* the current object display symbols */
uchar showsyms[MAXPCHARS] = DUMMY; /* the current feature display symbols */
uchar monsyms[MAXMCLASSES] = DUMMY; /* the current monster display symbols */
/* loaded primary syms */
uchar l_oc_syms[MAXOCLASSES] = DUMMY;
uchar l_showsyms[MAXPCHARS] = DUMMY;
uchar l_monsyms[MAXMCLASSES] = DUMMY;
#ifdef REINCARNATION
/* rogue syms */
uchar r_oc_syms[MAXOCLASSES] = DUMMY;
uchar r_showsyms[MAXPCHARS] = DUMMY;
uchar r_monsyms[MAXMCLASSES] = DUMMY;
#endif
uchar warnsyms[WARNCOUNT] = DUMMY; /* the current warning display symbols */
const char invisexplain[] = "remembered, unseen, creature";
/* Default object class symbols. See objclass.h.
* {symbol, name explain}
* name: used in object_detect().
* explain: used in do_look().
*/
const struct class_sym def_oc_syms[MAXOCLASSES] = {
{ '\0', "", ""}, /* placeholder for the "random class" */
{ ILLOBJ_SYM, "illegal objects", "strange object"},
{ WEAPON_SYM, "weapons", "weapon"},
{ ARMOR_SYM, "armor", "suit or piece of armor"},
{ RING_SYM, "rings", "ring"},
{ AMULET_SYM, "amulets", "amulet"},
{ TOOL_SYM, "tools", "useful item (pick-axe, key, lamp...)"},
{ FOOD_SYM, "food", "piece of food"},
{ POTION_SYM, "potions", "potion"},
{ SCROLL_SYM, "scrolls", "scroll"},
{ SPBOOK_SYM, "spellbooks", "spellbook"},
{ WAND_SYM, "wands", "wand"},
{ GOLD_SYM, "coins", "pile of coins"},
{ GEM_SYM, "rocks", "gem or rock"},
{ ROCK_SYM, "large stones", "boulder or statue"},
{ BALL_SYM, "iron balls", "iron ball"},
{ CHAIN_SYM, "chains", "iron chain"},
{ VENOM_SYM, "venoms", "splash of venom"}
};
/* Default monster class symbols. See monsym.h. */
const struct class_sym def_monsyms[MAXMCLASSES] = {
{ '\0', "", ""},
{ DEF_ANT, "", "ant or other insect"},
{ DEF_BLOB, "", "blob"},
{ DEF_COCKATRICE, "", "cockatrice"},
{ DEF_DOG, "", "dog or other canine"},
{ DEF_EYE, "", "eye or sphere"},
{ DEF_FELINE, "", "cat or other feline"},
{ DEF_GREMLIN, "", "gremlin"},
{ DEF_HUMANOID, "", "humanoid"},
{ DEF_IMP, "", "imp or minor demon"},
{ DEF_JELLY, "", "jelly"},
{ DEF_KOBOLD, "", "kobold"},
{ DEF_LEPRECHAUN, "", "leprechaun"},
{ DEF_MIMIC, "", "mimic"},
{ DEF_NYMPH, "", "nymph"},
{ DEF_ORC, "", "orc"},
{ DEF_PIERCER, "", "piercer"},
{ DEF_QUADRUPED, "", "quadruped"},
{ DEF_RODENT, "", "rodent"},
{ DEF_SPIDER, "", "arachnid or centipede"},
{ DEF_TRAPPER, "", "trapper or lurker above"},
{ DEF_UNICORN, "", "unicorn or horse"},
{ DEF_VORTEX, "", "vortex"},
{ DEF_WORM, "", "worm"},
{ DEF_XAN, "", "xan or other mythical/fantastic insect"},
{ DEF_LIGHT, "", "light"},
{ DEF_ZRUTY, "", "zruty"},
{ DEF_ANGEL, "", "angelic being"},
{ DEF_BAT, "", "bat or bird"},
{ DEF_CENTAUR, "", "centaur"},
{ DEF_DRAGON, "", "dragon"},
{ DEF_ELEMENTAL, "", "elemental"},
{ DEF_FUNGUS, "", "fungus or mold"},
{ DEF_GNOME, "", "gnome"},
{ DEF_GIANT, "", "giant humanoid"},
{ '\0', "", ""},
{ DEF_JABBERWOCK, "", "jabberwock"},
{ DEF_KOP, "", "Keystone Kop"},
{ DEF_LICH, "", "lich"},
{ DEF_MUMMY, "", "mummy"},
{ DEF_NAGA, "", "naga"},
{ DEF_OGRE, "", "ogre"},
{ DEF_PUDDING, "", "pudding or ooze"},
{ DEF_QUANTMECH, "", "quantum mechanic"},
{ DEF_RUSTMONST, "", "rust monster or disenchanter"},
{ DEF_SNAKE, "", "snake"},
{ DEF_TROLL, "", "troll"},
{ DEF_UMBER, "", "umber hulk"},
{ DEF_VAMPIRE, "", "vampire"},
{ DEF_WRAITH, "", "wraith"},
{ DEF_XORN, "", "xorn"},
{ DEF_YETI, "", "apelike creature"},
{ DEF_ZOMBIE, "", "zombie"},
{ DEF_HUMAN, "", "human or elf"},
{ DEF_GHOST, "", "ghost"},
{ DEF_GOLEM, "", "golem"},
{ DEF_DEMON, "", "major demon"},
{ DEF_EEL, "", "sea monster"},
{ DEF_LIZARD, "", "lizard"},
{ DEF_WORM_TAIL, "", "long worm tail"},
{ DEF_MIMIC_DEF, "", "mimic"},
};
const struct symdef def_warnsyms[WARNCOUNT] = {
{'0', "unknown creature causing you worry", C(CLR_WHITE)}, /* white warning */
{'1', "unknown creature causing you concern", C(CLR_RED)}, /* pink warning */
{'2', "unknown creature causing you anxiety", C(CLR_RED)}, /* red warning */
{'3', "unknown creature causing you disquiet", C(CLR_RED)}, /* ruby warning */
{'4', "unknown creature causing you alarm",
C(CLR_MAGENTA)}, /* purple warning */
{'5', "unknown creature causing you dread",
C(CLR_BRIGHT_MAGENTA)} /* black warning */
};
/*
* Default screen symbols with explanations and colors.
*/
const struct symdef defsyms[MAXPCHARS] = {
/* 0*/ {' ', "dark part of a room",C(NO_COLOR)}, /* stone */
{'|', "wall", C(CLR_GRAY)}, /* vwall */
{'-', "wall", C(CLR_GRAY)}, /* hwall */
{'-', "wall", C(CLR_GRAY)}, /* tlcorn */
{'-', "wall", C(CLR_GRAY)}, /* trcorn */
{'-', "wall", C(CLR_GRAY)}, /* blcorn */
{'-', "wall", C(CLR_GRAY)}, /* brcorn */
{'-', "wall", C(CLR_GRAY)}, /* crwall */
{'-', "wall", C(CLR_GRAY)}, /* tuwall */
{'-', "wall", C(CLR_GRAY)}, /* tdwall */
/*10*/ {'|', "wall", C(CLR_GRAY)}, /* tlwall */
{'|', "wall", C(CLR_GRAY)}, /* trwall */
{'.', "doorway", C(CLR_GRAY)}, /* ndoor */
{'-', "open door", C(CLR_BROWN)}, /* vodoor */
{'|', "open door", C(CLR_BROWN)}, /* hodoor */
{'+', "closed door", C(CLR_BROWN)}, /* vcdoor */
{'+', "closed door", C(CLR_BROWN)}, /* hcdoor */
{'#', "iron bars", C(HI_METAL)}, /* bars */
{'#', "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 (see mapglyph.c) */
{'<', "staircase up", C(CLR_GRAY)}, /* upstair */
{'>', "staircase down", C(CLR_GRAY)}, /* dnstair */
{'<', "ladder up", C(CLR_BROWN)}, /* upladder */
{'>', "ladder down", C(CLR_BROWN)}, /* dnladder */
{'_', "altar", C(CLR_GRAY)}, /* altar */
{'|', "grave", C(CLR_GRAY)}, /* grave */
{'\\', "opulent throne",C(HI_GOLD)}, /* throne */
#ifdef SINKS
{'#', "sink", C(CLR_GRAY)}, /* sink */
#else
{'#', "", C(CLR_GRAY)}, /* sink */
#endif
/*30*/ {'{', "fountain", C(CLR_BLUE)}, /* fountain */
{'}', "water", C(CLR_BLUE)}, /* pool */
{'.', "ice", C(CLR_CYAN)}, /* ice */
{'}', "molten lava", C(CLR_RED)}, /* lava */
{'.', "lowered drawbridge",C(CLR_BROWN)}, /* vodbridge */
{'.', "lowered drawbridge",C(CLR_BROWN)}, /* hodbridge */
{'#', "raised drawbridge",C(CLR_BROWN)}, /* vcdbridge */
{'#', "raised drawbridge",C(CLR_BROWN)}, /* hcdbridge */
{' ', "air", C(CLR_CYAN)}, /* open air */
{'#', "cloud", C(CLR_GRAY)}, /* [part of] a cloud */
/*40*/ {'}', "water", C(CLR_BLUE)}, /* under water */
{'^', "arrow trap", C(HI_METAL)}, /* trap */
{'^', "dart trap", C(HI_METAL)}, /* trap */
{'^', "falling rock trap",C(CLR_GRAY)}, /* trap */
{'^', "squeaky board", C(CLR_BROWN)}, /* trap */
{'^', "bear trap", C(HI_METAL)}, /* trap */
{'^', "land mine", C(CLR_RED)}, /* trap */
{'^', "rolling boulder trap", C(CLR_GRAY)}, /* trap */
{'^', "sleeping gas trap",C(HI_ZAP)}, /* trap */
{'^', "rust trap", C(CLR_BLUE)}, /* trap */
/*50*/ {'^', "fire trap", C(CLR_ORANGE)}, /* trap */
{'^', "pit", C(CLR_BLACK)}, /* trap */
{'^', "spiked pit", C(CLR_BLACK)}, /* trap */
{'^', "hole", C(CLR_BROWN)}, /* trap */
{'^', "trap door", C(CLR_BROWN)}, /* trap */
{'^', "teleportation trap", C(CLR_MAGENTA)}, /* trap */
{'^', "level teleporter", C(CLR_MAGENTA)}, /* trap */
{'^', "magic portal", C(CLR_BRIGHT_MAGENTA)}, /* trap */
{'"', "web", C(CLR_GRAY)}, /* web */
{'^', "statue trap", C(CLR_GRAY)}, /* trap */
/*60*/ {'^', "magic trap", C(HI_ZAP)}, /* trap */
{'^', "anti-magic field", C(HI_ZAP)}, /* trap */
{'^', "polymorph trap", C(CLR_BRIGHT_GREEN)}, /* trap */
{'|', "wall", C(CLR_GRAY)}, /* vbeam */
{'-', "wall", C(CLR_GRAY)}, /* hbeam */
{'\\',"wall", C(CLR_GRAY)}, /* lslant */
{'/', "wall", C(CLR_GRAY)}, /* rslant */
{'*', "", C(CLR_WHITE)}, /* dig beam */
{'!', "", C(CLR_WHITE)}, /* camera flash beam */
{')', "", C(HI_WOOD)}, /* boomerang open left */
/*70*/ {'(', "", C(HI_WOOD)}, /* boomerang open right */
{'0', "", C(HI_ZAP)}, /* 4 magic shield symbols */
{'#', "", C(HI_ZAP)},
{'@', "", C(HI_ZAP)},
{'*', "", C(HI_ZAP)},
{'/', "", C(CLR_GREEN)}, /* swallow top left */
{'-', "", C(CLR_GREEN)}, /* swallow top center */
{'\\', "", C(CLR_GREEN)}, /* swallow top right */
{'|', "", C(CLR_GREEN)}, /* swallow middle left */
{'|', "", C(CLR_GREEN)}, /* swallow middle right */
/*80*/ {'\\', "", C(CLR_GREEN)}, /* swallow bottom left */
{'-', "", C(CLR_GREEN)}, /* swallow bottom center*/
{'/', "", C(CLR_GREEN)}, /* swallow bottom right */
{'/', "", C(CLR_ORANGE)}, /* explosion top left */
{'-', "", C(CLR_ORANGE)}, /* explosion top center */
{'\\', "", C(CLR_ORANGE)}, /* explosion top right */
{'|', "", C(CLR_ORANGE)}, /* explosion middle left */
{' ', "", C(CLR_ORANGE)}, /* explosion middle center*/
{'|', "", C(CLR_ORANGE)}, /* explosion middle right */
{'\\', "", C(CLR_ORANGE)}, /* explosion bottom left */
/*90*/ {'-', "", C(CLR_ORANGE)}, /* explosion bottom center*/
{'/', "", C(CLR_ORANGE)}, /* explosion bottom right */
};
#ifdef REINCARNATION
/* default rogue level symbols */
static const uchar def_r_oc_syms[MAXOCLASSES] = {
/* 0*/ '\0',
ILLOBJ_SYM,
WEAPON_SYM,
']', /* armor */
RING_SYM,
/* 5*/ ',', /* amulet */
TOOL_SYM,
':', /* food */
POTION_SYM,
SCROLL_SYM,
/*10*/ SPBOOK_SYM,
WAND_SYM,
GEM_SYM, /* gold -- yes it's the same as gems */
GEM_SYM,
ROCK_SYM,
/*15*/ BALL_SYM,
CHAIN_SYM,
VENOM_SYM
};
#endif
#undef C
#ifdef TERMLIB
void NDECL((*decgraphics_mode_callback)) = 0; /* set in tty_start_screen() */
#endif /* TERMLIB */
#ifdef PC9800
void NDECL((*ibmgraphics_mode_callback)) = 0; /* set in tty_start_screen() */
void NDECL((*ascgraphics_mode_callback)) = 0; /* set in tty_start_screen() */
#endif
/*
* Convert the given character to an object class. If the character is not
* recognized, then MAXOCLASSES is returned. Used in detect.c invent.c,
* options.c, pickup.c, sp_lev.c, and lev_main.c.
*/
int
def_char_to_objclass(ch)
char ch;
{
int i;
for (i = 1; i < MAXOCLASSES; i++)
if (ch == def_oc_syms[i].sym) break;
return i;
}
/*
* Convert a character into a monster class. This returns the _first_
* match made. If there are are no matches, return MAXMCLASSES.
*/
int
def_char_to_monclass(ch)
char ch;
{
int i;
for (i = 1; i < MAXMCLASSES; i++)
if (def_monsyms[i].sym == ch) break;
return i;
}
/*
* Explanations of the functions found below:
*
* switch_graphics(arg)
* Called to swap the current display symbols
* (monsyms, showsyms, oc_syms).
*
* If !arg then the display symbols are
* taken from def_monsyms, defsyms, def_oc_syms
* default NetHack symbols.
*
* If arg then the display symbols are
* taken from the adjustable display symbols
* found in l_monsyms, l_showsyms, l_oc_syms.
* Those symbols may have been loaded from an
* external symfile by config file options or
* interactively in the options menu.
*
* init_symbols()
* Sets the current display symbols, the
* loadable symbols to the default NetHack
* symbols, including the r_* rogue level
* symbols if REINCARNATION is defined.
* This would typically be done immediately
* after execution begins. Any previously
* loaded external symbol sets are discarded.
*
* assign_rogue_graphics(arg)
*
* This is used in the game core to toggle in and
* out of rogue level display mode.
*
* If arg is TRUE, this places the rogue level
* symbols from r_monsyms, r_showsyms, and r_oc_syms
* into the current display symbols: monsyms, showsyms,
* and oc_syms.
*
* If arg is FALSE, this places the symbols from
* l_monsyms, l_showsyms, l_oc_syms into the current
* display symbols: monsyms, showsyms, oc_syms.
*
* update_l_symset()
* Update a member of the loadable (l_*) symbol set.
*
* update_r_symset()
* Update a member of the rogue (r_*) symbol set.
*
*/
void
switch_graphics(nondefault)
int nondefault;
{
#ifdef ASCIIGRAPH
register int i;
if (nondefault) {
for (i = 0; i < MAXMCLASSES; i++)
monsyms[i] = l_monsyms[i];
for (i = 0; i < MAXPCHARS; i++)
showsyms[i] = l_showsyms[i];
for (i = 0; i < MAXOCLASSES; i++)
oc_syms[i] = l_oc_syms[i];
#ifdef PC9800
if (symset && !strncmpi(symset,"IBM",3)
&& ibmgraphics_mode_callback)
(*ibmgraphics_mode_callback)();
else if (!symset && ascgraphics_mode_callback)
(*ascgraphics_mode_callback)();
#endif
#ifdef TERMLIB
if (symset && !strncmpi(symset,"DEC",3)
&& decgraphics_mode_callback)
(*decgraphics_mode_callback)();
#endif
} else
#endif
init_symbols();
}
void
init_symbols()
{
init_l_symbols();
init_disp_symbols();
#ifdef REINCARNATION
init_r_symbols();
#endif
}
void
init_disp_symbols()
{
register int i;
for (i = 0; i < MAXMCLASSES; i++)
monsyms[i] = def_monsyms[i].sym;
for (i = 0; i < MAXPCHARS; i++)
showsyms[i] = defsyms[i].sym;
for (i = 0; i < MAXOCLASSES; i++)
oc_syms[i] = def_oc_syms[i].sym;
}
/* initialize defaults for the loadable symset */
void
init_l_symbols()
{
register int i;
for (i = 0; i < MAXMCLASSES; i++)
l_monsyms[i] = def_monsyms[i].sym;
for (i = 0; i < MAXPCHARS; i++)
l_showsyms[i] = defsyms[i].sym;
for (i = 0; i < MAXOCLASSES; i++)
l_oc_syms[i] = def_oc_syms[i].sym;
}
#ifdef REINCARNATION
void
init_r_symbols()
{
register int i;
/* These are defaults that can get overwritten
later by the roguesymbols option */
for (i = 0; i < MAXMCLASSES; i++)
r_monsyms[i] = def_monsyms[i].sym;
for (i = 0; i < MAXPCHARS; i++)
r_showsyms[i] = defsyms[i].sym;
r_showsyms[S_vodoor] = r_showsyms[S_hodoor] = r_showsyms[S_ndoor] = '+';
r_showsyms[S_upstair] = r_showsyms[S_dnstair] = '%';
for (i = 0; i < MAXOCLASSES; i++)
r_oc_syms[i] = def_r_oc_syms[i];
}
void
assign_rogue_graphics(is_rlevel)
boolean is_rlevel;
{
/* Adjust graphics display characters on Rogue levels */
register int i;
if (is_rlevel) {
register int i;
for (i = 0; i < MAXMCLASSES; i++)
monsyms[i] = r_monsyms[i];
for (i = 0; i < MAXPCHARS; i++)
showsyms[i] = r_showsyms[i];
for (i = 0; i < MAXOCLASSES; i++)
oc_syms[i] = r_oc_syms[i];
# if defined(MSDOS) && defined(USE_TILES)
if (iflags.grmode) tileview(FALSE);
# endif
} else {
for (i = 0; i < MAXMCLASSES; i++)
monsyms[i] = l_monsyms[i];
for (i = 0; i < MAXPCHARS; i++)
showsyms[i] = l_showsyms[i];
for (i = 0; i < MAXOCLASSES; i++)
oc_syms[i] = l_oc_syms[i];
# if defined(MSDOS) && defined(USE_TILES)
if (iflags.grmode) tileview(TRUE);
# endif
}
}
void
update_r_symset(symp, val)
struct symparse *symp;
int val;
{
switch (symp->range) {
case SYM_PCHAR: /* index into r_showsyms */
r_showsyms[symp->idx] = val;
break;
case SYM_MON: /* index into r_monsyms */
r_monsyms[symp->idx] = val;
break;
case SYM_OC: /* index into r_oc_syms */
r_oc_syms[symp->idx] = val;
break;
case SYM_OBJ: /* index into objects */
if (symp->idx == BOULDER)
iflags.bouldersym = val;
break;
}
}
#endif /* REINCARNATION */
#ifdef ASCIIGRAPH
void
update_l_symset(symp, val)
struct symparse *symp;
int val;
{
switch (symp->range) {
case SYM_PCHAR: /* index into l_showsyms */
l_showsyms[symp->idx] = val;
break;
case SYM_MON: /* index into l_monsyms */
l_monsyms[symp->idx] = val;
break;
case SYM_OC: /* index into l_oc_syms */
l_oc_syms[symp->idx] = val;
break;
case SYM_OBJ: /* index into objects */
if (symp->idx == BOULDER)
iflags.bouldersym = val;
break;
}
}
struct symparse loadsyms[] = {
{SYM_CONTROL, 0, "start"},
{SYM_CONTROL, 0, "begin"},
{SYM_CONTROL, 1, "finish"},
{SYM_CONTROL, 2, "handling"},
{SYM_PCHAR, S_stone, "S_stone"},
{SYM_PCHAR, S_vwall, "S_vwall"},
{SYM_PCHAR, S_hwall, "S_hwall"},
{SYM_PCHAR, S_tlcorn, "S_tlcorn"},
{SYM_PCHAR, S_trcorn, "S_trcorn"},
{SYM_PCHAR, S_blcorn, "S_blcorn"},
{SYM_PCHAR, S_brcorn, "S_brcorn"},
{SYM_PCHAR, S_crwall, "S_crwall"},
{SYM_PCHAR, S_tuwall, "S_tuwall"},
{SYM_PCHAR, S_tdwall, "S_tdwall"},
{SYM_PCHAR, S_tlwall, "S_tlwall"},
{SYM_PCHAR, S_trwall, "S_trwall"},
{SYM_PCHAR, S_ndoor, "S_ndoor"},
{SYM_PCHAR, S_vodoor, "S_vodoor"},
{SYM_PCHAR, S_hodoor, "S_hodoor"},
{SYM_PCHAR, S_vcdoor, "S_vcdoor"},
{SYM_PCHAR, S_hcdoor, "S_hcdoor"},
{SYM_PCHAR, S_bars, "S_bars"},
{SYM_PCHAR, S_tree, "S_tree"},
{SYM_PCHAR, S_room, "S_room"},
{SYM_PCHAR, S_corr, "S_corr"},
{SYM_PCHAR, S_litcorr, "S_litcorr"},
{SYM_PCHAR, S_upstair, "S_upstair"},
{SYM_PCHAR, S_dnstair, "S_dnstair"},
{SYM_PCHAR, S_upladder, "S_upladder"},
{SYM_PCHAR, S_dnladder, "S_dnladder"},
{SYM_PCHAR, S_altar, "S_altar"},
{SYM_PCHAR, S_grave, "S_grave"},
{SYM_PCHAR, S_throne, "S_throne"},
{SYM_PCHAR, S_sink, "S_sink"},
{SYM_PCHAR, S_fountain, "S_fountain"},
{SYM_PCHAR, S_pool, "S_pool"},
{SYM_PCHAR, S_ice, "S_ice"},
{SYM_PCHAR, S_lava, "S_lava"},
{SYM_PCHAR, S_vodbridge, "S_vodbridge"},
{SYM_PCHAR, S_hodbridge, "S_hodbridge"},
{SYM_PCHAR, S_vcdbridge, "S_vcdbridge"},
{SYM_PCHAR, S_hcdbridge, "S_hcdbridge"},
{SYM_PCHAR, S_air, "S_air"},
{SYM_PCHAR, S_cloud, "S_cloud"},
{SYM_PCHAR, S_water, "S_water"},
{SYM_PCHAR, S_arrow_trap, "S_arrow_trap"},
{SYM_PCHAR, S_dart_trap, "S_dart_trap"},
{SYM_PCHAR, S_falling_rock_trap, "S_falling_rock_trap"},
{SYM_PCHAR, S_squeaky_board, "S_squeaky_board"},
{SYM_PCHAR, S_bear_trap, "S_bear_trap"},
{SYM_PCHAR, S_land_mine, "S_land_mine"},
{SYM_PCHAR, S_rolling_boulder_trap, "S_rolling_boulder_trap"},
{SYM_PCHAR, S_sleeping_gas_trap, "S_sleeping_gas_trap"},
{SYM_PCHAR, S_rust_trap, "S_rust_trap"},
{SYM_PCHAR, S_fire_trap, "S_fire_trap"},
{SYM_PCHAR, S_pit, "S_pit"},
{SYM_PCHAR, S_spiked_pit, "S_spiked_pit"},
{SYM_PCHAR, S_hole, "S_hole"},
{SYM_PCHAR, S_trap_door, "S_trap_door"},
{SYM_PCHAR, S_teleportation_trap, "S_teleportation_trap"},
{SYM_PCHAR, S_level_teleporter, "S_level_teleporter"},
{SYM_PCHAR, S_magic_portal, "S_magic_portal"},
{SYM_PCHAR, S_web, "S_web"},
{SYM_PCHAR, S_statue_trap, "S_statue_trap"},
{SYM_PCHAR, S_magic_trap, "S_magic_trap"},
{SYM_PCHAR, S_anti_magic_trap, "S_anti_magic_trap"},
{SYM_PCHAR, S_polymorph_trap, "S_polymorph_trap"},
{SYM_PCHAR, S_vbeam, "S_vbeam"},
{SYM_PCHAR, S_hbeam, "S_hbeam"},
{SYM_PCHAR, S_lslant, "S_lslant"},
{SYM_PCHAR, S_rslant, "S_rslant"},
{SYM_PCHAR, S_digbeam, "S_digbeam"},
{SYM_PCHAR, S_flashbeam, "S_flashbeam"},
{SYM_PCHAR, S_boomleft, "S_boomleft"},
{SYM_PCHAR, S_boomright, "S_boomright"},
{SYM_PCHAR, S_ss1, "S_ss1"},
{SYM_PCHAR, S_ss2, "S_ss2"},
{SYM_PCHAR, S_ss3, "S_ss3"},
{SYM_PCHAR, S_ss4, "S_ss4"},
{SYM_PCHAR, S_sw_tl, "S_sw_tl"},
{SYM_PCHAR, S_sw_tc, "S_sw_tc"},
{SYM_PCHAR, S_sw_tr, "S_sw_tr"},
{SYM_PCHAR, S_sw_ml, "S_sw_ml"},
{SYM_PCHAR, S_sw_mr, "S_sw_mr"},
{SYM_PCHAR, S_sw_bl, "S_sw_bl"},
{SYM_PCHAR, S_sw_bc, "S_sw_bc"},
{SYM_PCHAR, S_sw_br, "S_sw_br"},
{SYM_PCHAR, S_explode1, "S_explode1"},
{SYM_PCHAR, S_explode2, "S_explode2"},
{SYM_PCHAR, S_explode3, "S_explode3"},
{SYM_PCHAR, S_explode4, "S_explode4"},
{SYM_PCHAR, S_explode5, "S_explode5"},
{SYM_PCHAR, S_explode6, "S_explode6"},
{SYM_PCHAR, S_explode7, "S_explode7"},
{SYM_PCHAR, S_explode8, "S_explode8"},
{SYM_PCHAR, S_explode9, "S_explode9"},
{SYM_MON, S_ANT, "S_ant"},
{SYM_MON, S_BLOB, "S_blob"},
{SYM_MON, S_COCKATRICE, "S_cockatrice"},
{SYM_MON, S_DOG, "S_dog"},
{SYM_MON, S_EYE, "S_eye"},
{SYM_MON, S_FELINE, "S_feline"},
{SYM_MON, S_GREMLIN, "S_gremlin"},
{SYM_MON, S_HUMANOID, "S_humanoid"},
{SYM_MON, S_IMP, "S_imp"},
{SYM_MON, S_JELLY, "S_jelly"},
{SYM_MON, S_KOBOLD, "S_kobold"},
{SYM_MON, S_LEPRECHAUN, "S_leprechaun"},
{SYM_MON, S_MIMIC, "S_mimic"},
{SYM_MON, S_NYMPH, "S_nymph"},
{SYM_MON, S_ORC, "S_orc"},
{SYM_MON, S_PIERCER, "S_piercer"},
{SYM_MON, S_QUADRUPED, "S_quadruped"},
{SYM_MON, S_RODENT, "S_rodent"},
{SYM_MON, S_SPIDER, "S_spider"},
{SYM_MON, S_TRAPPER, "S_trapper"},
{SYM_MON, S_UNICORN, "S_unicorn"},
{SYM_MON, S_VORTEX, "S_vortex"},
{SYM_MON, S_WORM, "S_worm"},
{SYM_MON, S_XAN, "S_xan"},
{SYM_MON, S_LIGHT, "S_light"},
{SYM_MON, S_ZRUTY, "S_zruty"},
{SYM_MON, S_ANGEL, "S_angel"},
{SYM_MON, S_BAT, "S_bat"},
{SYM_MON, S_CENTAUR, "S_centaur"},
{SYM_MON, S_DRAGON, "S_dragon"},
{SYM_MON, S_ELEMENTAL, "S_elemental"},
{SYM_MON, S_FUNGUS, "S_fungus"},
{SYM_MON, S_GNOME, "S_gnome"},
{SYM_MON, S_GIANT, "S_giant"},
{SYM_MON, S_JABBERWOCK, "S_jabberwock"},
{SYM_MON, S_KOP, "S_kop"},
{SYM_MON, S_LICH, "S_lich"},
{SYM_MON, S_MUMMY, "S_mummy"},
{SYM_MON, S_NAGA, "S_naga"},
{SYM_MON, S_OGRE, "S_ogre"},
{SYM_MON, S_PUDDING, "S_pudding"},
{SYM_MON, S_QUANTMECH, "S_quantmech"},
{SYM_MON, S_RUSTMONST, "S_rustmonst"},
{SYM_MON, S_SNAKE, "S_snake"},
{SYM_MON, S_TROLL, "S_troll"},
{SYM_MON, S_UMBER, "S_umber"},
{SYM_MON, S_VAMPIRE, "S_vampire"},
{SYM_MON, S_WRAITH, "S_wraith"},
{SYM_MON, S_XORN, "S_xorn"},
{SYM_MON, S_YETI, "S_yeti"},
{SYM_MON, S_ZOMBIE, "S_zombie"},
{SYM_MON, S_HUMAN, "S_human"},
{SYM_MON, S_GHOST, "S_ghost"},
{SYM_MON, S_GOLEM, "S_golem"},
{SYM_MON, S_DEMON, "S_demon"},
{SYM_MON, S_EEL, "S_eel"},
{SYM_MON, S_LIZARD, "S_lizard"},
{SYM_MON, S_WORM_TAIL, "S_worm_tail"},
{SYM_MON, S_MIMIC_DEF, "S_mimic_def"},
{SYM_OC, WEAPON_CLASS, "S_weapon"},
{SYM_OC, ARMOR_CLASS, "S_armor"},
{SYM_OC, ARMOR_CLASS, "S_armour"},
{SYM_OC, RING_CLASS, "S_ring"},
{SYM_OC, AMULET_CLASS, "S_amulet"},
{SYM_OC, TOOL_CLASS, "S_tool"},
{SYM_OC, FOOD_CLASS, "S_food"},
{SYM_OC, POTION_CLASS, "S_potion"},
{SYM_OC, SCROLL_CLASS, "S_scroll"},
{SYM_OC, SPBOOK_CLASS, "S_book"},
{SYM_OC, WAND_CLASS, "S_wand"},
{SYM_OC, COIN_CLASS, "S_coin"},
{SYM_OC, GEM_CLASS, "S_gem"},
{SYM_OC, ROCK_CLASS,"S_rock"},
{SYM_OC, BALL_CLASS, "S_ball"},
{SYM_OC, CHAIN_CLASS, "S_chain"},
{SYM_OC, VENOM_CLASS, "S_venom"},
{SYM_OBJ, BOULDER, "S_boulder"},
{0,0,(const char *)0} /* fence post */
};
#endif /*ASCIIGRAPH*/
/* OBSOLETE */
#if 0
STATIC_OVL void
graphics_opts(opts, optype, maxlen, offset)
register char *opts;
const char *optype;
int maxlen, offset;
{
uchar translate[MAXPCHARS+1];
int length, i;
if (!(opts = string_for_env_opt(optype, opts, FALSE)))
return;
escapes(opts, opts);
length = strlen(opts);
if (length > maxlen) length = maxlen;
/* match the form obtained from PC configuration files */
for (i = 0; i < length; i++)
translate[i] = (uchar) opts[i];
assign_graphics(translate, length, maxlen, offset);
}
#endif
/*drawing.c*/