more symbol set stuff (trunk only)

- Instead of checking for the Rogue level, check which
  graphics are engaged (PRIMARY or ROGUESET) in the
  SYMHANDLING() macro.

- track which graphics are active through 'currentgraphics'.

- Instead of symset and roguesymset and symhandling and roguehandling
  variables, have symset and symhandling be arrays of two, with the
  following indexes:
	PRIMARY
	ROGUESET
  That reduced the amount of repeated code.
  (Not to be confused with the 'symset' and 'roguesymset' config file options
   both of which still exist)

- the symbol routines were adjusted to pass
the index , rather than 'rogueflag' and coding to roguesymset etc.

Other than fixing bugs that are encountered, this is probably
the last of the symbol stuff, with the exception of
making the symset and roguesymset config file options
accept the keyword value "default".
This commit is contained in:
nethack.allison
2006-09-22 02:00:30 +00:00
parent a3e0bf97b1
commit 719721e017
14 changed files with 251 additions and 314 deletions
+5 -6
View File
@@ -491,9 +491,9 @@ E boolean FDECL(hurtle_step, (genericptr_t, int, int));
E int FDECL(def_char_to_objclass, (CHAR_P)); E int FDECL(def_char_to_objclass, (CHAR_P));
E int FDECL(def_char_to_monclass, (CHAR_P)); E int FDECL(def_char_to_monclass, (CHAR_P));
#if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C) #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C)
E void FDECL(switch_graphics, (int)); E void FDECL(switch_symbols, (int));
E void FDECL(assign_graphics, (int));
#ifdef REINCARNATION #ifdef REINCARNATION
E void FDECL(assign_rogue_graphics, (BOOLEAN_P));
E void NDECL(init_r_symbols); E void NDECL(init_r_symbols);
#endif #endif
E void NDECL(init_symbols); E void NDECL(init_symbols);
@@ -502,7 +502,6 @@ E void NDECL(init_l_symbols);
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
E void FDECL(update_l_symset, (struct symparse *,int)); E void FDECL(update_l_symset, (struct symparse *,int));
E void FDECL(update_r_symset, (struct symparse *,int)); E void FDECL(update_r_symset, (struct symparse *,int));
E void FDECL(switch_graphics, (int));
#endif #endif
#ifdef BARGETHROUGH #ifdef BARGETHROUGH
E boolean FDECL(cursed_object_at, (int, int)); E boolean FDECL(cursed_object_at, (int, int));
@@ -719,8 +718,8 @@ E void FDECL(check_recordfile, (const char *));
E void NDECL(read_wizkit); E void NDECL(read_wizkit);
#endif #endif
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
E int FDECL(read_sym_file, (BOOLEAN_P)); E int FDECL(read_sym_file, (int));
E int FDECL(parse_sym_line, (char *,BOOLEAN_P)); E int FDECL(parse_sym_line, (char *,int));
#endif #endif
E void FDECL(paniclog, (const char *, const char *)); E void FDECL(paniclog, (const char *, const char *));
E int FDECL(validate_prefix_locations, (char *)); E int FDECL(validate_prefix_locations, (char *));
@@ -1537,7 +1536,7 @@ E int FDECL(add_autopickup_exception, (const char *));
E void NDECL(free_autopickup_exceptions); E void NDECL(free_autopickup_exceptions);
#endif /* AUTOPICKUP_EXCEPTIONS */ #endif /* AUTOPICKUP_EXCEPTIONS */
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
E int FDECL(load_symset, (const char *,BOOLEAN_P)); E int FDECL(load_symset, (const char *,int));
E void FDECL(parsesymbols, (char *)); E void FDECL(parsesymbols, (char *));
E struct symparse *FDECL(match_sym, (char *)); E struct symparse *FDECL(match_sym, (char *));
E int FDECL(sym_val, (char *)); E int FDECL(sym_val, (char *));
+12 -20
View File
@@ -242,7 +242,15 @@ struct textlist {
}; };
/* /*
* special symbol set handling types (callbacks, etc.) * Graphics sets for display symbols
*/
#define DEFAULT_GRAPHICS 0 /* regular characters: '-', '+', &c */
#define PRIMARY 0 /* primary graphics */
#define ROGUESET 1 /* rogue graphics */
#define NUM_GRAPHICS 2
/*
* special symbol set handling types ( for invoking callbacks, etc.)
* Must match the order of the known_handlers strings * Must match the order of the known_handlers strings
* in drawing.c * in drawing.c
*/ */
@@ -250,29 +258,13 @@ struct textlist {
#define H_IBM 1 #define H_IBM 1
#define H_DEC 2 #define H_DEC 2
#ifdef REINCARNATION
#define ROGUEHANDLING(ht) (Is_rogue_level(&u.uz) && \
rogue_level.dlevel != 0 && roguehandling == (ht))
#define SYMHANDLING(ht) \
(ROGUEHANDLING(ht) || \
((!Is_rogue_level(&u.uz) || rogue_level.dlevel == 0) && \
symhandling == (ht)))
#else
#define SYMHANDLING(ht) (symhandling == (ht))
#endif
extern const struct symdef defsyms[MAXPCHARS]; /* defaults */ extern const struct symdef defsyms[MAXPCHARS]; /* defaults */
extern uchar showsyms[MAXPCHARS]; extern uchar showsyms[MAXPCHARS];
extern const struct symdef def_warnsyms[WARNCOUNT]; extern const struct symdef def_warnsyms[WARNCOUNT];
extern char *symset, *roguesymset; /* from drawing.c */ extern char *symset[NUM_GRAPHICS]; /* from drawing.c */
extern int symhandling, roguehandling; /* from drawing.c */ extern int symhandling[NUM_GRAPHICS], currentgraphics; /* from drawing.c */
/* #define SYMHANDLING(ht) (symhandling[currentgraphics] == (ht))
* Graphics sets for display symbols
*/
#define DEFAULT_GRAPHICS 0 /* regular characters: '-', '+', &c */
#define ROGUESET 1 /* useful for load_symset() */
#define PRIMARY 0
/* /*
* The 5 possible states of doors * The 5 possible states of doors
+1 -1
View File
@@ -1104,7 +1104,7 @@ boolean at_stairs, falling, portal;
#ifdef REINCARNATION #ifdef REINCARNATION
if (Is_rogue_level(newlevel) || Is_rogue_level(&u.uz)) if (Is_rogue_level(newlevel) || Is_rogue_level(&u.uz))
assign_rogue_graphics(Is_rogue_level(newlevel)); assign_graphics(Is_rogue_level(newlevel) ? ROGUESET : PRIMARY);
#endif #endif
#ifdef USE_TILES #ifdef USE_TILES
substitute_tiles(newlevel); substitute_tiles(newlevel);
+72 -91
View File
@@ -17,8 +17,8 @@
#define C(n) #define C(n)
#endif #endif
char *symset = 0, *roguesymset = 0; char *symset[NUM_GRAPHICS] = {0,0};
int symhandling = 0, roguehandling = 0; int symhandling[NUM_GRAPHICS] = {0,0}, currentgraphics = 0;
uchar oc_syms[MAXOCLASSES] = DUMMY; /* the current object display symbols */ uchar oc_syms[MAXOCLASSES] = DUMMY; /* the current object display symbols */
uchar showsyms[MAXPCHARS] = DUMMY; /* the current feature display symbols */ uchar showsyms[MAXPCHARS] = DUMMY; /* the current feature display symbols */
@@ -310,21 +310,6 @@ def_char_to_monclass(ch)
/* /*
* Explanations of the functions found below: * 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() * init_symbols()
* Sets the current display symbols, the * Sets the current display symbols, the
* loadable symbols to the default NetHack * loadable symbols to the default NetHack
@@ -334,18 +319,36 @@ def_char_to_monclass(ch)
* after execution begins. Any previously * after execution begins. Any previously
* loaded external symbol sets are discarded. * loaded external symbol sets are discarded.
* *
* assign_rogue_graphics(arg) * switch_symbols(arg)
* Called to swap in new current display symbols
* (monsyms, showsyms, oc_syms) from either
* the default symbols, or from the loadable
* symbols.
*
* If (arg == 0) then the display symbols are
* taken from def_monsyms, defsyms, def_oc_syms
* default NetHack symbols.
*
* If (arg != 0), which is the expected usage,
* 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 symbol file by
* config file options or interactively in the
* options menu.
*
* assign_graphics(arg)
* *
* This is used in the game core to toggle in and * This is used in the game core to toggle in and
* out of rogue level display mode. * out of rogue level display mode.
* *
* If arg is TRUE, this places the rogue level * If arg is ROGUESET, this places the rogue level
* symbols from r_monsyms, r_showsyms, and r_oc_syms * symbols from r_monsyms, r_showsyms, and r_oc_syms
* into the current display symbols: monsyms, showsyms, * into the current display symbols: monsyms, showsyms,
* and oc_syms. * and oc_syms.
* *
* If arg is FALSE, this places the symbols from * If arg is PRIMARY, this places the symbols
* l_monsyms, l_showsyms, l_oc_syms into the current * from l_monsyms, l_showsyms, l_oc_syms into the current
* display symbols: monsyms, showsyms, oc_syms. * display symbols: monsyms, showsyms, oc_syms.
* *
* update_l_symset() * update_l_symset()
@@ -357,7 +360,7 @@ def_char_to_monclass(ch)
*/ */
void void
switch_graphics(nondefault) switch_symbols(nondefault)
int nondefault; int nondefault;
{ {
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
@@ -372,22 +375,15 @@ int nondefault;
for (i = 0; i < MAXOCLASSES; i++) for (i = 0; i < MAXOCLASSES; i++)
oc_syms[i] = l_oc_syms[i]; oc_syms[i] = l_oc_syms[i];
/*
* We can't use the SYMHANDLING or ROGUEHANDLING
* macros in this file (drawing.c) because doing
* so would cause link errors during some util
* program builds because of the presence of
* the Is_Roguelevel checks in those macros.
*/
#ifdef PC9800 #ifdef PC9800
if (symhandling == H_IBM if (SYMHANDLING(H_IBM)
&& ibmgraphics_mode_callback) && ibmgraphics_mode_callback)
(*ibmgraphics_mode_callback)(); (*ibmgraphics_mode_callback)();
else if (!symset && ascgraphics_mode_callback) else if (!symset[currentgraphics] && ascgraphics_mode_callback)
(*ascgraphics_mode_callback)(); (*ascgraphics_mode_callback)();
#endif #endif
#ifdef TERMLIB #ifdef TERMLIB
if (symhandling == H_DEC if (SYMHANDLING(H_DEC)
&& decgraphics_mode_callback) && decgraphics_mode_callback)
(*decgraphics_mode_callback)(); (*decgraphics_mode_callback)();
#endif #endif
@@ -433,6 +429,49 @@ init_l_symbols()
for (i = 0; i < MAXOCLASSES; i++) for (i = 0; i < MAXOCLASSES; i++)
l_oc_syms[i] = def_oc_syms[i].sym; l_oc_syms[i] = def_oc_syms[i].sym;
symhandling[PRIMARY] = H_UNK;
}
void
assign_graphics(whichset)
int whichset;
{
/* Adjust graphics display characters on Rogue levels */
register int i;
switch(whichset) {
case ROGUESET:
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
currentgraphics = ROGUESET;
break;
case PRIMARY:
default:
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
currentgraphics = PRIMARY;
break;
}
} }
#ifdef REINCARNATION #ifdef REINCARNATION
@@ -453,43 +492,8 @@ init_r_symbols()
for (i = 0; i < MAXOCLASSES; i++) for (i = 0; i < MAXOCLASSES; i++)
r_oc_syms[i] = def_r_oc_syms[i]; r_oc_syms[i] = def_r_oc_syms[i];
}
void symhandling[ROGUESET] = H_UNK;
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 void
@@ -730,28 +734,5 @@ struct symparse loadsyms[] = {
}; };
#endif /*ASCIIGRAPH*/ #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*/ /*drawing.c*/
+26 -48
View File
@@ -187,7 +187,7 @@ STATIC_DCL int FDECL(get_uchars, (FILE *,char *,char *,uchar *,BOOLEAN_P,int,con
int FDECL(parse_config_line, (FILE *,char *,char *,char *)); int FDECL(parse_config_line, (FILE *,char *,char *,char *));
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
STATIC_DCL FILE *NDECL(fopen_sym_file); STATIC_DCL FILE *NDECL(fopen_sym_file);
STATIC_DCL void FDECL(set_symhandling, (char *,BOOLEAN_P)); STATIC_DCL void FDECL(set_symhandling, (char *,int));
#endif #endif
#ifdef NOCWD_ASSUMPTIONS #ifdef NOCWD_ASSUMPTIONS
STATIC_DCL void FDECL(adjust_prefix, (char *, int)); STATIC_DCL void FDECL(adjust_prefix, (char *, int));
@@ -2089,7 +2089,7 @@ char *tmp_levels;
bufp = symbuf; bufp = symbuf;
} while (*bufp == '#'); } while (*bufp == '#');
} while (morelines); } while (morelines);
switch_graphics(TRUE); switch_symbols(TRUE);
#endif /*ASCIIGRAPH*/ #endif /*ASCIIGRAPH*/
#ifdef WIZARD #ifdef WIZARD
} else if (match_varname(buf, "WIZKIT", 6)) { } else if (match_varname(buf, "WIZKIT", 6)) {
@@ -2442,8 +2442,8 @@ fopen_sym_file()
* 0 if it wasn't found in the sym file or other problem. * 0 if it wasn't found in the sym file or other problem.
*/ */
int int
read_sym_file(rogueflag) read_sym_file(which_set)
boolean rogueflag; int which_set;
{ {
char buf[4*BUFSZ]; char buf[4*BUFSZ];
FILE *fp; FILE *fp;
@@ -2453,19 +2453,17 @@ boolean rogueflag;
symset_count = 0; symset_count = 0;
chosen_symset_start = chosen_symset_end = FALSE; chosen_symset_start = chosen_symset_end = FALSE;
while (fgets(buf, 4*BUFSZ, fp)) { while (fgets(buf, 4*BUFSZ, fp)) {
if (!parse_sym_line(buf, rogueflag)) { if (!parse_sym_line(buf, which_set)) {
raw_printf("Bad symbol line: \"%.50s\"", buf); raw_printf("Bad symbol line: \"%.50s\"", buf);
wait_synch(); wait_synch();
} }
} }
(void) fclose(fp); (void) fclose(fp);
if (!chosen_symset_end && !chosen_symset_start) return 0; if (!chosen_symset_end && !chosen_symset_start)
return (symset[which_set] == 0) ? 1 : 0;
if (!chosen_symset_end) { if (!chosen_symset_end) {
raw_printf("Missing finish for symset \"%s\"", raw_printf("Missing finish for symset \"%s\"",
#ifdef REINCARNATION symset[which_set] ? symset[which_set] : "unknown");
rogueflag ? roguesymset :
#endif
symset);
wait_synch(); wait_synch();
} }
return 1; return 1;
@@ -2473,18 +2471,13 @@ boolean rogueflag;
/* returns 0 on error */ /* returns 0 on error */
int int
parse_sym_line(buf, rogueflag) parse_sym_line(buf, which_set)
char *buf; char *buf;
boolean rogueflag; int which_set;
{ {
int val; int val;
struct symparse *symp = (struct symparse *)0; struct symparse *symp = (struct symparse *)0;
char *bufp, *commentp, *altp; char *bufp, *commentp, *altp;
char *symsetname =
#ifdef REINCARNATION
rogueflag ? roguesymset :
#endif
symset;
if (*buf == '#') if (*buf == '#')
return 1; return 1;
@@ -2516,8 +2509,9 @@ boolean rogueflag;
if (!bufp) { if (!bufp) {
if (strncmpi(buf, "finish", 6) == 0) { if (strncmpi(buf, "finish", 6) == 0) {
/* end current graphics set */ /* end current graphics set */
if (chosen_symset_start)
chosen_symset_end = TRUE;
chosen_symset_start = FALSE; chosen_symset_start = FALSE;
chosen_symset_end = TRUE;
return 1; return 1;
} }
return 0; return 0;
@@ -2530,8 +2524,8 @@ boolean rogueflag;
if (!symp) if (!symp)
return 0; return 0;
if (!symsetname) { if (!symset[which_set]) {
/* A null symsetname indicates that we're just /* A null symset name indicates that we're just
building a pick-list of possible symset building a pick-list of possible symset
values from the file, so only do that */ values from the file, so only do that */
if (symp->range == SYM_CONTROL && symp->idx == 0) { if (symp->range == SYM_CONTROL && symp->idx == 0) {
@@ -2557,36 +2551,31 @@ boolean rogueflag;
switch(symp->idx) { switch(symp->idx) {
case 0: case 0:
/* start of symset */ /* start of symset */
if (!strcmpi(bufp, symsetname)) { /* desired one? */ if (!strcmpi(bufp, symset[which_set])) { /* desired one? */
chosen_symset_start = TRUE; chosen_symset_start = TRUE;
#ifdef REINCARNATION #ifdef REINCARNATION
if (rogueflag) { if (which_set == ROGUESET) init_r_symbols();
init_r_symbols();
roguehandling = H_UNK;
}
#endif #endif
if (!rogueflag) { if (which_set == PRIMARY) init_l_symbols();
init_l_symbols();
symhandling = H_UNK;
}
} }
break; break;
case 1: case 1:
/* finish symset */ /* finish symset */
if (chosen_symset_start)
chosen_symset_end = TRUE;
chosen_symset_start = FALSE; chosen_symset_start = FALSE;
chosen_symset_end = TRUE;
break; break;
case 2: case 2:
/* handler type identified */ /* handler type identified */
if (chosen_symset_start) if (chosen_symset_start)
set_symhandling(bufp, rogueflag); set_symhandling(bufp, which_set);
break; break;
} }
} else { /* !SYM_CONTROL */ } else { /* !SYM_CONTROL */
val = sym_val(bufp); val = sym_val(bufp);
if (chosen_symset_start) { if (chosen_symset_start) {
#ifdef REINCARNATION #ifdef REINCARNATION
if (rogueflag) if (which_set == ROGUESET)
update_r_symset(symp, val); update_r_symset(symp, val);
else else
#endif #endif
@@ -2598,28 +2587,17 @@ boolean rogueflag;
} }
STATIC_OVL void STATIC_OVL void
set_symhandling(handling, rogueflag) set_symhandling(handling, which_set)
char *handling; char *handling;
boolean rogueflag; int which_set;
{ {
int i = 0; int i = 0;
#ifdef REINCARNATION symhandling[which_set] = H_UNK;
if (rogueflag) roguehandling = H_UNK;
#endif
if (!rogueflag) symhandling = H_UNK;
while (known_handling[i]) { while (known_handling[i]) {
if (!strcmpi(known_handling[i], handling)) { if (!strcmpi(known_handling[i], handling)) {
#ifdef REINCARNATION symhandling[which_set] = i;
if (rogueflag) { return;
roguehandling = i;
return;
}
#endif
if (!rogueflag) {
symhandling = i;
return;
}
} }
i++; i++;
} }
+4 -2
View File
@@ -50,9 +50,11 @@ int explcolors[] = {
#ifdef ROGUE_COLOR #ifdef ROGUE_COLOR
# if defined(USE_TILES) && defined(MSDOS) # if defined(USE_TILES) && defined(MSDOS)
#define HAS_ROGUE_IBM_GRAPHICS (ROGUEHANDLING(H_IBM) && !iflags.grmode) #define HAS_ROGUE_IBM_GRAPHICS (currentgraphics == ROGUESET && \
SYMHANDLING(H_IBM) && !iflags.grmode)
# else # else
#define HAS_ROGUE_IBM_GRAPHICS (ROGUEHANDLING(H_IBM)) #define HAS_ROGUE_IBM_GRAPHICS (currentgraphics == ROGUESET && \
SYMHANDLING(H_IBM))
# endif # endif
#endif #endif
+118 -133
View File
@@ -364,10 +364,10 @@ static struct Comp_Opt
80, DISP_IN_GAME }, 80, DISP_IN_GAME },
{ "windowtype", "windowing system to use", WINTYPELEN, DISP_IN_GAME }, { "windowtype", "windowing system to use", WINTYPELEN, DISP_IN_GAME },
#ifdef BACKWARD_COMPAT #ifdef BACKWARD_COMPAT
{"DECgraphics", "deprecated", 70, SET_IN_FILE}, {"DECgraphics", "load DECGraphics display symbols", 70, SET_IN_FILE},
{"IBMgraphics", "deprecated", 70, SET_IN_FILE}, {"IBMgraphics", "load IBMGraphics display symbols", 70, SET_IN_FILE},
# ifdef MAC_GRAPHICS_ENV # ifdef MAC_GRAPHICS_ENV
{"Macgraphics", "deprecated", 70, SET_IN_FILE}, {"Macgraphics", "load MACGraphics display symbols", 70, SET_IN_FILE},
# endif # endif
#endif #endif
{ (char *)0, (char *)0, 0, 0 } { (char *)0, (char *)0, 0, 0 }
@@ -597,7 +597,7 @@ initoptions()
for (i = 0; i < NUM_DISCLOSURE_OPTIONS; i++) for (i = 0; i < NUM_DISCLOSURE_OPTIONS; i++)
flags.end_disclose[i] = DISCLOSE_PROMPT_DEFAULT_NO; flags.end_disclose[i] = DISCLOSE_PROMPT_DEFAULT_NO;
switch_graphics(DEFAULT_GRAPHICS); /* set default characters */ switch_symbols(FALSE); /* set default characters */
#if defined(UNIX) && defined(TTY_GRAPHICS) #if defined(UNIX) && defined(TTY_GRAPHICS)
/* /*
* Set defaults for some options depending on what we can * Set defaults for some options depending on what we can
@@ -609,11 +609,11 @@ initoptions()
/* this detects the IBM-compatible console on most 386 boxes */ /* this detects the IBM-compatible console on most 386 boxes */
if ((opts = nh_getenv("TERM")) && !strncmp(opts, "AT", 2)) { if ((opts = nh_getenv("TERM")) && !strncmp(opts, "AT", 2)) {
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
if (!symset) load_symset("IBMGraphics", PRIMARY); if (!symset[PRIMARY]) load_symset("IBMGraphics", PRIMARY);
if (!roguesymset) load_symset("RogueIBM", ROGUESET); if (!symset[ROGUESET]) load_symset("RogueIBM", ROGUESET);
switch_graphics(TRUE); switch_symbols(TRUE);
#endif #endif
# ifdef TEXTCOLOR # ifdef TEXTCOLOR
iflags.use_color = TRUE; iflags.use_color = TRUE;
@@ -627,19 +627,19 @@ initoptions()
!strncmpi(opts, "vt", 2) && AS && AE && !strncmpi(opts, "vt", 2) && AS && AE &&
index(AS, '\016') && index(AE, '\017')) { index(AS, '\016') && index(AE, '\017')) {
# ifdef ASCIIGRAPH # ifdef ASCIIGRAPH
if (!symset) load_symset("DECGraphics", PRIMARY); if (!symset[PRIMARY]) load_symset("DECGraphics", PRIMARY);
switch_graphics(TRUE); switch_symbols(TRUE);
# endif /*ASCIIGRAPH*/ # endif /*ASCIIGRAPH*/
} }
# endif # endif
#endif /* UNIX || VMS */ #endif /* UNIX || VMS */
#ifdef MAC_GRAPHICS_ENV #ifdef MAC_GRAPHICS_ENV
if (!symset) load_symset("MACGraphics", PRIMARY); if (!symset[PRIMARY]) load_symset("MACGraphics", PRIMARY);
switch_graphics(TRUE); switch_symbols(TRUE);
#endif /* MAC_GRAPHICS_ENV */ #endif /* MAC_GRAPHICS_ENV */
flags.menu_style = MENU_FULL; flags.menu_style = MENU_FULL;
@@ -1301,15 +1301,15 @@ boolean tinitial, tfrom_file;
if (duplicate) complain_about_duplicate(opts,1); if (duplicate) complain_about_duplicate(opts,1);
if (negated) bad_negation(fullname, FALSE); if (negated) bad_negation(fullname, FALSE);
else if ((op = string_for_opt(opts, FALSE)) != 0) { else if ((op = string_for_opt(opts, FALSE)) != 0) {
roguesymset = (char *)alloc(strlen(op) + 1); symset[ROGUESET] = (char *)alloc(strlen(op) + 1);
Strcpy(roguesymset, op); Strcpy(symset[ROGUESET], op);
if (!read_sym_file(TRUE)) { if (!read_sym_file(ROGUESET)) {
badoption(opts); badoption(opts);
free((char *)roguesymset); free((char *)symset[ROGUESET]);
roguesymset = (char *)0; symset[ROGUESET] = (char *)0;
} else { } else {
if (!initial && Is_rogue_level(&u.uz)) if (!initial && Is_rogue_level(&u.uz))
assign_rogue_graphics(TRUE); assign_graphics(ROGUESET);
need_redraw = TRUE; need_redraw = TRUE;
} }
} }
@@ -1323,14 +1323,14 @@ boolean tinitial, tfrom_file;
if (duplicate) complain_about_duplicate(opts,1); if (duplicate) complain_about_duplicate(opts,1);
if (negated) bad_negation(fullname, FALSE); if (negated) bad_negation(fullname, FALSE);
else if ((op = string_for_opt(opts, FALSE)) != 0) { else if ((op = string_for_opt(opts, FALSE)) != 0) {
symset = (char *)alloc(strlen(op) + 1); symset[PRIMARY] = (char *)alloc(strlen(op) + 1);
Strcpy(symset, op); Strcpy(symset[PRIMARY], op);
if (!read_sym_file(FALSE)) { if (!read_sym_file(PRIMARY)) {
badoption(opts); badoption(opts);
free((char *)symset); free((char *)symset[PRIMARY]);
symset = (char *)0; symset[PRIMARY] = (char *)0;
} else { } else {
switch_graphics(TRUE); switch_symbols(TRUE);
need_redraw = TRUE; need_redraw = TRUE;
} }
} }
@@ -2288,15 +2288,17 @@ goodfruit:
boolean badflag = FALSE; boolean badflag = FALSE;
if (duplicate) complain_about_duplicate(opts,1); if (duplicate) complain_about_duplicate(opts,1);
if (!negated) { if (!negated) {
if (symset) badflag = TRUE; /* There is no rogue level DECgraphics-specific set */
if (symset[PRIMARY])
badflag = TRUE;
else { else {
symset = (char *)alloc(strlen(fullname) + 1); symset[PRIMARY] = (char *)alloc(strlen(fullname) + 1);
Strcpy(symset, fullname); Strcpy(symset[PRIMARY], fullname);
if (!read_sym_file(FALSE)) { if (!read_sym_file(PRIMARY)) {
badflag = TRUE; badflag = TRUE;
free((char *)symset); free((char *)symset[PRIMARY]);
symset = (char *)0; symset[PRIMARY] = (char *)0;
} else switch_graphics(TRUE); } else switch_symbols(TRUE);
} }
if (badflag) { if (badflag) {
pline("Failure to load symbol set %s.", pline("Failure to load symbol set %s.",
@@ -2308,37 +2310,33 @@ goodfruit:
} }
fullname = "IBMgraphics"; fullname = "IBMgraphics";
if (match_optname(opts, fullname, 10, TRUE)) { if (match_optname(opts, fullname, 10, TRUE)) {
const char *sym_name = fullname;
boolean badflag = FALSE; boolean badflag = FALSE;
if (duplicate) complain_about_duplicate(opts,1); if (duplicate) complain_about_duplicate(opts,1);
if (!negated) { if (!negated) {
if (symset) badflag = TRUE; for (i = 0; i < NUM_GRAPHICS; ++i) {
else { if (symset[i])
symset = (char *)alloc(strlen(fullname) + 1); badflag = TRUE;
Strcpy(symset, fullname); else {
if (!read_sym_file(FALSE)) { if (i == ROGUESET) sym_name = "RogueIBM";
symset[i] = (char *)alloc(strlen(sym_name) + 1);
Strcpy(symset[i], sym_name);
if (!read_sym_file(i)) {
badflag = TRUE; badflag = TRUE;
free((char *)symset); free((char *)symset[i]);
symset = (char *)0; symset[i] = (char *)0;
} else switch_graphics(TRUE); break;
}
}
} }
#ifdef REINCARNATION
if (roguesymset) badflag = TRUE;
else {
roguesymset = (char *)alloc(strlen(fullname) + 1);
Strcpy(roguesymset, fullname);
if (!read_sym_file(TRUE)) {
badflag = TRUE;
free((char *)roguesymset);
roguesymset = (char *)0;
}
if (!initial && Is_rogue_level(&u.uz))
assign_rogue_graphics(TRUE);
}
#endif
if (badflag) { if (badflag) {
pline("Failure to load symbol set %s.", pline("Failure to load symbol set %s.",
fullname); sym_name);
wait_synch(); wait_synch();
} else {
switch_symbols(TRUE);
if (!initial && Is_rogue_level(&u.uz))
assign_graphics(ROGUESET);
} }
} }
return; return;
@@ -2349,20 +2347,24 @@ goodfruit:
boolean badflag = FALSE; boolean badflag = FALSE;
if (duplicate) complain_about_duplicate(opts,1); if (duplicate) complain_about_duplicate(opts,1);
if (!negated) { if (!negated) {
if (symset) badflag = TRUE; if (symset[PRIMARY]) badflag = TRUE;
else { else {
symset = (char *)alloc(strlen(fullname) + 1); symset[PRIMARY] = (char *)alloc(strlen(fullname) + 1);
Strcpy(symset, fullname); Strcpy(symset[PRIMARY], fullname);
if (!read_sym_file(FALSE)) { if (!read_sym_file(PRIMARY)) {
badflag = TRUE; badflag = TRUE;
free((char *)symset); free((char *)symset[PRIMARY]);
symset = (char *)0; symset[PRIMARY] = (char *)0;
} else switch_graphics(TRUE); }
} }
if (badflag) { if (badflag) {
pline("Failure to load symbol set %s.", pline("Failure to load symbol set %s.",
fullname); fullname);
wait_synch(); wait_synch();
} else {
switch_symbols(TRUE);
if (!initial && Is_rogue_level(&u.uz))
assign_graphics(ROGUESET);
} }
} }
return; return;
@@ -2777,7 +2779,8 @@ doset()
return 0; return 0;
} }
struct textlist *symset_list; /* files.c will populate this wil list of available sets */ struct textlist *symset_list = 0; /* files.c will populate this with
list of available sets */
STATIC_OVL boolean STATIC_OVL boolean
special_handling(optname, setinitial, setfromfile) special_handling(optname, setinitial, setfromfile)
@@ -3136,34 +3139,29 @@ boolean setinitial,setfromfile;
if (pick_cnt >= 0) goto ape_again; if (pick_cnt >= 0) goto ape_again;
} }
#endif /* AUTOPICKUP_EXCEPTIONS */ #endif /* AUTOPICKUP_EXCEPTIONS */
#ifdef ASCIIGRAPH
} else if (!strcmp("symset", optname) || } else if (!strcmp("symset", optname) ||
!strcmp("roguesymset", optname)) { !strcmp("roguesymset", optname)) {
menu_item *symset_pick = (menu_item *)0; menu_item *symset_pick = (menu_item *)0;
boolean rogueflag = (*optname == 'r'); boolean rogueflag = (*optname == 'r');
char *symset_name; char *symset_name;
int chosen = -2; int chosen = -2, which_set =
/* clear symset/roguesymset as a flag to read_sym_file() to build list */
if (!rogueflag) {
symset_name = symset;
symset = (char *)0;
}
#ifdef REINCARNATION #ifdef REINCARNATION
if (rogueflag) { rogueflag ? ROGUESET :
symset_name = roguesymset;
roguesymset = (char *)0;
}
#endif #endif
PRIMARY;
#ifdef ASCIIGRAPH
/* clear symset as a flag to read_sym_file() to build list */
symset_name = symset[which_set];
symset[which_set] = (char *)0;
if (read_sym_file(rogueflag) && symset_list) { if (read_sym_file(which_set) && symset_list) {
int let = 'a'; int let = 'a';
struct textlist *sl; struct textlist *sl;
tmpwin = create_nhwindow(NHW_MENU); tmpwin = create_nhwindow(NHW_MENU);
start_menu(tmpwin); start_menu(tmpwin);
any.a_int = 1; any.a_int = 1;
add_menu(tmpwin, NO_GLYPH, &any, let++, 0, add_menu(tmpwin, NO_GLYPH, &any, let++, 0,
ATR_NONE, "NetHack default", MENU_UNSELECTED); ATR_NONE, "Default Symbols", MENU_UNSELECTED);
sl = symset_list; sl = symset_list;
while (sl) { while (sl) {
if (sl->text) { if (sl->text) {
@@ -3182,54 +3180,55 @@ boolean setinitial,setfromfile;
} }
destroy_nhwindow(tmpwin); destroy_nhwindow(tmpwin);
if (chosen > -1) { if (chosen > -1) {
/* chose an actual symset name from file */
sl = symset_list; sl = symset_list;
while (sl) { while (sl) {
if (sl->idx == chosen) { if (sl->idx == chosen) {
if (symset_name) if (symset_name) {
free((genericptr_t)symset_name); free((genericptr_t)symset_name);
symset_name = (char *)alloc(strlen(sl->text)+1); symset_name = (char *)0;
Strcpy(symset_name, sl->text); }
symset[which_set] = (char *)alloc(strlen(sl->text)+1);
Strcpy(symset[which_set], sl->text);
} }
sl = sl->next; sl = sl->next;
} }
} else if (chosen == -1) {
/* explicit selection of defaults */
if (symset_name) free ((genericptr_t)symset_name);
symset_name = (char *)0;
} }
/* clean up */ /* clean up */
while (symset_list) { while (symset_list) {
sl = symset_list; sl = symset_list;
if (sl->text) free((genericptr_t)sl->text); if (sl->text) free((genericptr_t)sl->text);
symset_list = sl->next; symset_list = sl->next;
free((genericptr_t)sl);
} }
symset_list = (struct textlist *)0; symset_list = (struct textlist *)0;
} }
if(!rogueflag) {
init_l_symbols(); /* these set default symbols and clear the handling value */
if (chosen >= 0) { if(rogueflag) init_r_symbols();
symset = symset_name; else init_l_symbols();
if (!read_sym_file(FALSE)) {
free((genericptr_t)symset); if (!symset[which_set] && symset_name)
symset = (char *)0; symset[which_set] = symset_name;
}
} if (symset[which_set]) {
} if (read_sym_file(which_set))
# ifdef REINCARNATION switch_symbols(TRUE);
if (rogueflag) { else {
init_r_symbols(); free((genericptr_t)symset[which_set]);
if (chosen >= 0) { symset[which_set] = (char *)0;
roguesymset = symset_name; return 0;
if (!read_sym_file(TRUE)) {
free((genericptr_t)roguesymset);
roguesymset = (char *)0;
}
} }
} }
switch_symbols(TRUE);
if (Is_rogue_level(&u.uz)) if (Is_rogue_level(&u.uz))
assign_rogue_graphics(TRUE); assign_graphics(ROGUESET);
else else
assign_rogue_graphics(FALSE); assign_graphics(PRIMARY);
#else
switch_graphics(TRUE);
# endif
need_redraw = TRUE; need_redraw = TRUE;
#endif /*ASCIIGRAPH*/ #endif /*ASCIIGRAPH*/
} else { } else {
@@ -3431,7 +3430,8 @@ char *buf;
Sprintf(buf, "%s", rolestring(flags.initrace, races, noun)); Sprintf(buf, "%s", rolestring(flags.initrace, races, noun));
#ifdef REINCARNATION #ifdef REINCARNATION
else if (!strcmp(optname, "roguesymset")) else if (!strcmp(optname, "roguesymset"))
Sprintf(buf, "%s", roguesymset ? roguesymset : "default"); Sprintf(buf, "%s",
symset[ROGUESET] ? symset[ROGUESET] : "default");
#endif #endif
else if (!strcmp(optname, "role")) else if (!strcmp(optname, "role"))
Sprintf(buf, "%s", rolestring(flags.initrole, roles, name.m)); Sprintf(buf, "%s", rolestring(flags.initrole, roles, name.m));
@@ -3465,7 +3465,8 @@ char *buf;
FEATURE_NOTICE_VER_PATCH); FEATURE_NOTICE_VER_PATCH);
} }
else if (!strcmp(optname, "symset")) else if (!strcmp(optname, "symset"))
Sprintf(buf, "%s", symset ? symset : "default"); Sprintf(buf, "%s",
symset[PRIMARY] ? symset[PRIMARY] : "default");
else if (!strcmp(optname, "tile_file")) else if (!strcmp(optname, "tile_file"))
Sprintf(buf, "%s", iflags.wc_tile_file ? iflags.wc_tile_file : defopt); Sprintf(buf, "%s", iflags.wc_tile_file ? iflags.wc_tile_file : defopt);
else if (!strcmp(optname, "tile_height")) { else if (!strcmp(optname, "tile_height")) {
@@ -3643,35 +3644,19 @@ free_autopickup_exceptions()
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
/* bundle some common usage into one easy-to-use routine */ /* bundle some common usage into one easy-to-use routine */
int int
load_symset(s, rogueflag) load_symset(s, which_set)
const char *s; const char *s;
boolean rogueflag; int which_set;
{ {
#ifdef REINCARNATION if (symset[which_set]) free((genericptr_t)symset[which_set]);
if (rogueflag) { symset[which_set] = (char *)alloc(strlen(s)+1);
if (roguesymset) free((genericptr_t)roguesymset); Strcpy(symset[which_set],s);
roguesymset = (char *)alloc(strlen(s)+1); if (read_sym_file(which_set))
Strcpy(roguesymset,s); switch_symbols(TRUE);
if (read_sym_file(TRUE)) else {
switch_graphics(TRUE); free((genericptr_t)symset[which_set]);
else { symset[which_set] = (char *)0;
free((genericptr_t)roguesymset); return 0;
roguesymset = (char *)0;
return 0;
}
}
#endif
if (!rogueflag) {
if (symset) free((genericptr_t)symset);
symset = (char *)alloc(strlen(s)+1);
Strcpy(symset,s);
if (read_sym_file(FALSE))
switch_graphics(TRUE);
else {
free((genericptr_t)symset);
symset = (char *)0;
return 0;
}
} }
return 1; return 1;
} }
+1 -1
View File
@@ -822,7 +822,7 @@ register int fd;
if (!wizard && !discover) if (!wizard && !discover)
(void) delete_savefile(); (void) delete_savefile();
#ifdef REINCARNATION #ifdef REINCARNATION
if (Is_rogue_level(&u.uz)) assign_rogue_graphics(TRUE); if (Is_rogue_level(&u.uz)) assign_graphics(ROGUESET);
#endif #endif
#ifdef USE_TILES #ifdef USE_TILES
substitute_tiles(&u.uz); substitute_tiles(&u.uz);
+2 -2
View File
@@ -37,7 +37,7 @@ functions:11 _align_gname
functions:12 _altar_wrath _Amonnam _amulet _Amulet_off _Amulet_on _An _an _angry_guards functions:12 _altar_wrath _Amonnam _amulet _Amulet_off _Amulet_on _An _an _angry_guards
functions:13 _angry_priest _angry_shk_exists _any_light_source _aobjnam _append_slash _append_str _Armor_gone _Armor_off functions:13 _angry_priest _angry_shk_exists _any_light_source _aobjnam _append_slash _append_str _Armor_gone _Armor_off
functions:14 _Armor_on _armor_to_dragon _armoroff _arti_invoke _artifact_exists _artifact_hit _artifact_name _artiname functions:14 _Armor_on _armor_to_dragon _armoroff _arti_invoke _artifact_exists _artifact_hit _artifact_name _artiname
functions:15 _artitouch _askchain _assign_graphics _assign_level _assign_rnd_level _assign_rogue_graphics _assign_soundcard _assign_video functions:15 _artitouch _askchain _assign_level _assign_rnd_level _assign_graphics _assign_soundcard _assign_video
functions:16 _assign_videocolors _assign_videoshades _assigninvlet _at_dgn_entrance _attach_egg_hatch_timeout _attack _attack_checks _attacks functions:16 _assign_videocolors _assign_videoshades _assigninvlet _at_dgn_entrance _attach_egg_hatch_timeout _attack _attack_checks _attacks
functions:17 _awaken_monsters _awaken_soldiers functions:17 _awaken_monsters _awaken_soldiers
functions:18 _backfire _backsp _bad_location _bad_negation _bad_rock _badoption _bail _ballfall functions:18 _backfire _backsp _bad_location _bad_negation _bad_rock _badoption _bail _ballfall
@@ -246,7 +246,7 @@ functions:220 _spoteffects _squadmon _srandom _stackobj _standoutbeg _standouten
functions:221 _start_engulf _start_timer _start_tin _steal _steal_it _stealamulet _stealarm _stealgold functions:221 _start_engulf _start_timer _start_tin _steal _steal_it _stealamulet _stealarm _stealgold
functions:223 _stop_timer _store_version _strange_feeling _strategy _string_for_env_opt _string_for_opt _strncmpi _strprepend functions:223 _stop_timer _store_version _strange_feeling _strategy _string_for_env_opt _string_for_opt _strncmpi _strprepend
functions:224 _strstri _study_book _stumble_onto_mimic _sub_one_frombill _subfrombill _substitute_tiles _summon_minion _surface functions:224 _strstri _study_book _stumble_onto_mimic _sub_one_frombill _subfrombill _substitute_tiles _summon_minion _surface
functions:225 _swallow_to_glyph _swapin_file _swapout_oldest _switch_graphics _switchar _t_warn functions:225 _swallow_to_glyph _swapin_file _swapout_oldest _switch_symbols _switchar _t_warn
functions:226 _tabexpand _tactics _take_gold _take_off _tamedog _target_on _tele _tele_jump_ok functions:226 _tabexpand _tactics _take_gold _take_off _tamedog _target_on _tele _tele_jump_ok
functions:227 _tele_restrict _tele_trap _teleds _teleok _teleport_pet _temple_occupied _tended_shop _term_end_attr functions:227 _tele_restrict _tele_trap _teleds _teleok _teleport_pet _temple_occupied _tended_shop _term_end_attr
functions:228 _term_end_color functions:228 _term_end_color
+1 -1
View File
@@ -547,7 +547,7 @@ boolean on;
{ {
/* vga_HideCursor(); */ /* vga_HideCursor(); */
if (on) { if (on) {
/* switch_graphics(DEFAULT_GRAPHICS); */ /* switch_symbols(FALSE); */
iflags.traditional_view = TRUE; iflags.traditional_view = TRUE;
clipx = 0; clipx = 0;
clipxmax = CO - 1; clipxmax = CO - 1;
+4 -4
View File
@@ -307,11 +307,11 @@ char *argv[];
#if defined(MSDOS) || defined(WIN32) #if defined(MSDOS) || defined(WIN32)
/* Player didn't specify any symbol set so use IBM defaults */ /* Player didn't specify any symbol set so use IBM defaults */
if (!symset) { if (!symset[PRIMARY]) {
load_symset("IBMGraphics_2", PRIMARY); load_symset("IBMGraphics_2", PRIMARY);
} }
# ifdef REINCARNATION # ifdef REINCARNATION
if (!roguesymset) { if (!symset[ROGUESET]) {
load_symset("RogueEpyx", ROGUESET); load_symset("RogueEpyx", ROGUESET);
} }
# endif # endif
@@ -551,7 +551,7 @@ char *argv[];
# ifdef ASCIIGRAPH # ifdef ASCIIGRAPH
load_symset("IBMGraphics", PRIMARY); load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET); load_symset("RogueIBM", ROGUESET);
switch_graphics(TRUE); switch_symbols(TRUE);
# endif # endif
} }
break; break;
@@ -560,7 +560,7 @@ char *argv[];
if (!strncmpi(argv[0]+1, "DEC", 3)) { if (!strncmpi(argv[0]+1, "DEC", 3)) {
# ifdef ASCIIGRAPH # ifdef ASCIIGRAPH
load_symset("DECGraphics", PRIMARY); load_symset("DECGraphics", PRIMARY);
switch_graphics(TRUE); switch_symbols(TRUE);
# endif # endif
} }
break; break;
+1 -1
View File
@@ -368,7 +368,7 @@ init_sco_cons()
# ifdef ASCIIGRAPH # ifdef ASCIIGRAPH
load_symset("IBMGraphics", PRIMARY); load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET); load_symset("RogueIBM", ROGUESET);
switch_graphics(TRUE); switch_symbols(TRUE);
# endif # endif
# ifdef TEXTCOLOR # ifdef TEXTCOLOR
if (has_colors()) if (has_colors())
+2 -2
View File
@@ -373,7 +373,7 @@ char *argv[];
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
load_symset("IBMGraphics", PRIMARY); load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET); load_symset("RogueIBM", ROGUESET);
switch_graphics(TRUE); switch_symbols(TRUE);
#endif #endif
} }
break; break;
@@ -382,7 +382,7 @@ char *argv[];
if (!strncmpi(argv[0]+1, "DEC", 3)) { if (!strncmpi(argv[0]+1, "DEC", 3)) {
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
load_symset("DECGraphics", PRIMARY); load_symset("DECGraphics", PRIMARY);
switch_graphics(TRUE); switch_symbols(TRUE);
#endif #endif
} }
break; break;
+2 -2
View File
@@ -272,7 +272,7 @@ char *argv[];
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
load_symset("IBMGraphics", PRIMARY); load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET); load_symset("RogueIBM", ROGUESET);
switch_graphics(TRUE); switch_symbols(TRUE);
#endif #endif
} }
break; break;
@@ -281,7 +281,7 @@ char *argv[];
if (!strncmpi(argv[0]+1, "DEC", 3)) { if (!strncmpi(argv[0]+1, "DEC", 3)) {
#ifdef ASCIIGRAPH #ifdef ASCIIGRAPH
load_symset("DECGraphics", PRIMARY); load_symset("DECGraphics", PRIMARY);
switch_graphics(TRUE); switch_symbols(TRUE);
#endif #endif
} }
break; break;