Make LOADSYMSETS unconditional.

There are some bugs here, but this functionality should make it into the release
in some form.
This commit is contained in:
Sean Hunt
2015-03-17 18:46:39 +02:00
committed by Pasi Kallinen
parent 3481ec6589
commit 11d11c5de3
11 changed files with 3 additions and 118 deletions
-1
View File
@@ -412,7 +412,6 @@ typedef unsigned char uchar;
*/ */
/* display features */ /* display features */
#define LOADSYMSETS /* loadable symbol sets; only default symbols w/o this */
/* dungeon features */ /* dungeon features */
/* dungeon levels */ /* dungeon levels */
#define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */
-6
View File
@@ -515,11 +515,9 @@ E void NDECL(init_r_symbols);
E void NDECL(init_symbols); E void NDECL(init_symbols);
E void NDECL(init_showsyms); E void NDECL(init_showsyms);
E void NDECL(init_l_symbols); E void NDECL(init_l_symbols);
#ifdef LOADSYMSETS
E void FDECL(clear_symsetentry, (int,BOOLEAN_P)); E void FDECL(clear_symsetentry, (int,BOOLEAN_P));
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));
#endif
E boolean FDECL(cursed_object_at, (int, int)); E boolean FDECL(cursed_object_at, (int, int));
/* ### dungeon.c ### */ /* ### dungeon.c ### */
@@ -733,11 +731,9 @@ E boolean FDECL(can_read_file, (const char *));
E boolean FDECL(read_config_file, (const char *, int)); E boolean FDECL(read_config_file, (const char *, int));
E void FDECL(check_recordfile, (const char *)); E void FDECL(check_recordfile, (const char *));
E void NDECL(read_wizkit); E void NDECL(read_wizkit);
#ifdef LOADSYMSETS
E int FDECL(read_sym_file, (int)); E int FDECL(read_sym_file, (int));
E int FDECL(parse_sym_line, (char *,int)); E int FDECL(parse_sym_line, (char *,int));
E int FDECL(sym_val, (const char *)); E int FDECL(sym_val, (const char *));
#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 *));
#ifdef SELECTSAVED #ifdef SELECTSAVED
@@ -1589,11 +1585,9 @@ E void FDECL(set_wc2_option_mod_status, (unsigned long, int));
E void FDECL(set_option_mod_status, (const char *,int)); E void FDECL(set_option_mod_status, (const char *,int));
E int FDECL(add_autopickup_exception, (const char *)); E int FDECL(add_autopickup_exception, (const char *));
E void NDECL(free_autopickup_exceptions); E void NDECL(free_autopickup_exceptions);
#ifdef LOADSYMSETS
E int FDECL(load_symset, (const char *,int)); 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 *));
#endif
E void NDECL(set_playmode); E void NDECL(set_playmode);
/* ### pager.c ### */ /* ### pager.c ### */
-4
View File
@@ -278,12 +278,8 @@ extern const struct symdef def_warnsyms[WARNCOUNT];
extern int currentgraphics; /* from drawing.c */ extern int currentgraphics; /* from drawing.c */
extern nhsym showsyms[]; extern nhsym showsyms[];
#ifdef LOADSYMSETS
extern struct symsetentry symset[NUM_GRAPHICS]; /* from drawing.c */ extern struct symsetentry symset[NUM_GRAPHICS]; /* from drawing.c */
#define SYMHANDLING(ht) (symset[currentgraphics].handling == (ht)) #define SYMHANDLING(ht) (symset[currentgraphics].handling == (ht))
#else
#define SYMHANDLING(ht) ((ht) == H_UNK)
#endif
/* /*
* The 5 possible states of doors * The 5 possible states of doors
-8
View File
@@ -19,9 +19,7 @@
#define C(n) #define C(n)
#endif #endif
#ifdef LOADSYMSETS
struct symsetentry symset[NUM_GRAPHICS]; struct symsetentry symset[NUM_GRAPHICS];
#endif
int currentgraphics = 0; int currentgraphics = 0;
@@ -399,9 +397,7 @@ init_l_symbols()
l_syms[i + SYM_OFF_X] = DEF_INVISIBLE; l_syms[i + SYM_OFF_X] = DEF_INVISIBLE;
} }
#ifdef LOADSYMSETS
clear_symsetentry(PRIMARY, FALSE); clear_symsetentry(PRIMARY, FALSE);
#endif
} }
void void
@@ -433,13 +429,11 @@ init_r_symbols()
r_syms[i + SYM_OFF_X] = DEF_INVISIBLE; r_syms[i + SYM_OFF_X] = DEF_INVISIBLE;
} }
# ifdef LOADSYMSETS
clear_symsetentry(ROGUESET, FALSE); clear_symsetentry(ROGUESET, FALSE);
symset[ROGUESET].nocolor = 1; /* default on Rogue level is no color symset[ROGUESET].nocolor = 1; /* default on Rogue level is no color
* but some symbol sets can * but some symbol sets can
* override that * override that
*/ */
# endif
} }
void void
@@ -499,7 +493,6 @@ int nondefault;
init_symbols(); init_symbols();
} }
#ifdef LOADSYMSETS
void void
update_l_symset(symp, val) update_l_symset(symp, val)
struct symparse *symp; struct symparse *symp;
@@ -755,7 +748,6 @@ struct symparse loadsyms[] = {
{SYM_OTH, SYM_INVISIBLE + SYM_OFF_X, "S_invisible"}, {SYM_OTH, SYM_INVISIBLE + SYM_OFF_X, "S_invisible"},
{0,0,(const char *)0} /* fence post */ {0,0,(const char *)0} /* fence post */
}; };
#endif /*LOADSYMSETS*/
/*drawing.c*/ /*drawing.c*/
-12
View File
@@ -190,10 +190,8 @@ STATIC_DCL FILE *FDECL(fopen_config_file, (const char *, int));
STATIC_DCL int FDECL(get_uchars, STATIC_DCL int FDECL(get_uchars,
(FILE *,char *,char *,uchar *,BOOLEAN_P,int,const char *)); (FILE *,char *,char *,uchar *,BOOLEAN_P,int,const char *));
int FDECL(parse_config_line, (FILE *,char *,int)); int FDECL(parse_config_line, (FILE *,char *,int));
#ifdef LOADSYMSETS
STATIC_DCL FILE *NDECL(fopen_sym_file); STATIC_DCL FILE *NDECL(fopen_sym_file);
STATIC_DCL void FDECL(set_symhandling, (char *,int)); STATIC_DCL void FDECL(set_symhandling, (char *,int));
#endif
#ifdef NOCWD_ASSUMPTIONS #ifdef NOCWD_ASSUMPTIONS
STATIC_DCL void FDECL(adjust_prefix, (char *, int)); STATIC_DCL void FDECL(adjust_prefix, (char *, int));
#endif #endif
@@ -2202,10 +2200,6 @@ int src;
WARNCOUNT, "WARNINGS"); WARNCOUNT, "WARNINGS");
assign_warnings(translate); assign_warnings(translate);
} else if (match_varname(buf, "SYMBOLS", 4)) { } else if (match_varname(buf, "SYMBOLS", 4)) {
/* This part is not ifdef LOADSYMSETS because we want to be able
* to silently ignore its presence in a config file if that is
* not defined.
*/
char *op, symbuf[BUFSZ]; char *op, symbuf[BUFSZ];
boolean morelines; boolean morelines;
do { do {
@@ -2224,10 +2218,8 @@ int src;
/* strip trailing space now that '\' is gone */ /* strip trailing space now that '\' is gone */
while (--op >= bufp && isspace(*op)) *op = '\0'; while (--op >= bufp && isspace(*op)) *op = '\0';
} }
#ifdef LOADSYMSETS
/* parse here */ /* parse here */
parsesymbols(bufp); parsesymbols(bufp);
#endif
if (morelines) if (morelines)
do { do {
*symbuf = '\0'; *symbuf = '\0';
@@ -2238,9 +2230,7 @@ int src;
bufp = symbuf; bufp = symbuf;
} while (*bufp == '#'); } while (*bufp == '#');
} while (morelines); } while (morelines);
#ifdef LOADSYMSETS
switch_symbols(TRUE); switch_symbols(TRUE);
#endif
} else if (match_varname(buf, "WIZKIT", 6)) { } else if (match_varname(buf, "WIZKIT", 6)) {
(void) strncpy(wizkit, bufp, WIZKIT_MAX-1); (void) strncpy(wizkit, bufp, WIZKIT_MAX-1);
#ifdef AMIGA #ifdef AMIGA
@@ -2561,7 +2551,6 @@ read_wizkit()
return; return;
} }
#ifdef LOADSYMSETS
extern struct symsetentry *symset_list; /* options.c */ extern struct symsetentry *symset_list; /* options.c */
extern struct symparse loadsyms[]; /* drawing.c */ extern struct symparse loadsyms[]; /* drawing.c */
extern const char *known_handling[]; /* drawing.c */ extern const char *known_handling[]; /* drawing.c */
@@ -2897,7 +2886,6 @@ const char *cp;
} }
return cval; return cval;
} }
#endif /*LOADSYMSETS*/
/* ---------- END CONFIG FILE HANDLING ----------- */ /* ---------- END CONFIG FILE HANDLING ----------- */
+1 -37
View File
@@ -34,9 +34,6 @@ int explcolors[] = {
#define pet_color(n) color = iflags.use_color ? mons[n].mcolor : NO_COLOR #define pet_color(n) color = iflags.use_color ? mons[n].mcolor : NO_COLOR
#define warn_color(n) color = iflags.use_color ? def_warnsyms[n].color : NO_COLOR #define warn_color(n) color = iflags.use_color ? def_warnsyms[n].color : NO_COLOR
#define explode_color(n) color = iflags.use_color ? explcolors[n] : NO_COLOR #define explode_color(n) color = iflags.use_color ? explcolors[n] : NO_COLOR
#ifdef LOADSYMSETS
# define ROGUE_COLOR
#endif
#else /* no text color */ #else /* no text color */
@@ -66,17 +63,13 @@ int *ochar;
unsigned *ospecial; unsigned *ospecial;
{ {
register int offset, idx; register int offset, idx;
#if defined(TEXTCOLOR) || defined(ROGUE_COLOR)
int color = NO_COLOR; int color = NO_COLOR;
#endif
nhsym ch; nhsym ch;
unsigned special = 0; unsigned special = 0;
/* condense multiple tests in macro version down to single */ /* condense multiple tests in macro version down to single */
boolean has_rogue_ibm_graphics = HAS_ROGUE_IBM_GRAPHICS; boolean has_rogue_ibm_graphics = HAS_ROGUE_IBM_GRAPHICS;
#ifdef ROGUE_COLOR
boolean has_rogue_color = (has_rogue_ibm_graphics && boolean has_rogue_color = (has_rogue_ibm_graphics &&
(symset[currentgraphics].nocolor == 0)); (symset[currentgraphics].nocolor == 0));
#endif
/* /*
* Map the glyph back to a character and color. * Map the glyph back to a character and color.
@@ -86,45 +79,36 @@ unsigned *ospecial;
*/ */
if ((offset = (glyph - GLYPH_STATUE_OFF)) >= 0) { /* a statue */ if ((offset = (glyph - GLYPH_STATUE_OFF)) >= 0) { /* a statue */
idx = mons[offset].mlet + SYM_OFF_M; idx = mons[offset].mlet + SYM_OFF_M;
# ifdef ROGUE_COLOR
if (has_rogue_color) if (has_rogue_color)
color = CLR_RED; color = CLR_RED;
else else
# endif
obj_color(STATUE); obj_color(STATUE);
special |= MG_STATUE; special |= MG_STATUE;
} else if ((offset = (glyph - GLYPH_WARNING_OFF)) >= 0) { /* a warning flash */ } else if ((offset = (glyph - GLYPH_WARNING_OFF)) >= 0) { /* a warning flash */
idx = offset + SYM_OFF_W; idx = offset + SYM_OFF_W;
# ifdef ROGUE_COLOR
if (has_rogue_color) if (has_rogue_color)
color = NO_COLOR; color = NO_COLOR;
else else
# endif
warn_color(offset); warn_color(offset);
} else if ((offset = (glyph - GLYPH_SWALLOW_OFF)) >= 0) { /* swallow */ } else if ((offset = (glyph - GLYPH_SWALLOW_OFF)) >= 0) { /* swallow */
/* see swallow_to_glyph() in display.c */ /* see swallow_to_glyph() in display.c */
idx = (S_sw_tl + (offset & 0x7)) + SYM_OFF_P; idx = (S_sw_tl + (offset & 0x7)) + SYM_OFF_P;
#ifdef ROGUE_COLOR
if (has_rogue_color && iflags.use_color) if (has_rogue_color && iflags.use_color)
color = NO_COLOR; color = NO_COLOR;
else else
#endif
mon_color(offset >> 3); mon_color(offset >> 3);
} else if ((offset = (glyph - GLYPH_ZAP_OFF)) >= 0) { /* zap beam */ } else if ((offset = (glyph - GLYPH_ZAP_OFF)) >= 0) { /* zap beam */
/* see zapdir_to_glyph() in display.c */ /* see zapdir_to_glyph() in display.c */
idx = (S_vbeam + (offset & 0x3)) + SYM_OFF_P; idx = (S_vbeam + (offset & 0x3)) + SYM_OFF_P;
#ifdef ROGUE_COLOR
if (has_rogue_color && iflags.use_color) if (has_rogue_color && iflags.use_color)
color = NO_COLOR; color = NO_COLOR;
else else
#endif
zap_color((offset >> 2)); zap_color((offset >> 2));
} else if ((offset = (glyph - GLYPH_EXPLODE_OFF)) >= 0) { /* explosion */ } else if ((offset = (glyph - GLYPH_EXPLODE_OFF)) >= 0) { /* explosion */
idx = ((offset % MAXEXPCHARS) + S_explode1) + SYM_OFF_P; idx = ((offset % MAXEXPCHARS) + S_explode1) + SYM_OFF_P;
explode_color(offset / MAXEXPCHARS); explode_color(offset / MAXEXPCHARS);
} else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) { /* cmap */ } else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) { /* cmap */
idx = offset + SYM_OFF_P; idx = offset + SYM_OFF_P;
#ifdef ROGUE_COLOR
if (has_rogue_color && iflags.use_color) { if (has_rogue_color && iflags.use_color) {
if (offset >= S_vwall && offset <= S_hcdoor) if (offset >= S_vwall && offset <= S_hcdoor)
color = CLR_BROWN; color = CLR_BROWN;
@@ -137,7 +121,6 @@ unsigned *ospecial;
else else
color = NO_COLOR; color = NO_COLOR;
} else } else
#endif
#ifdef TEXTCOLOR #ifdef TEXTCOLOR
/* provide a visible difference if normal and lit corridor /* provide a visible difference if normal and lit corridor
* use the same symbol */ * use the same symbol */
@@ -151,7 +134,6 @@ unsigned *ospecial;
idx = objects[offset].oc_class + SYM_OFF_O; idx = objects[offset].oc_class + SYM_OFF_O;
if (offset == BOULDER && iflags.bouldersym) if (offset == BOULDER && iflags.bouldersym)
idx = SYM_BOULDER + SYM_OFF_X; idx = SYM_BOULDER + SYM_OFF_X;
#ifdef ROGUE_COLOR
if (has_rogue_color && iflags.use_color) { if (has_rogue_color && iflags.use_color) {
switch(objects[offset].oc_class) { switch(objects[offset].oc_class) {
case COIN_CLASS: color = CLR_YELLOW; break; case COIN_CLASS: color = CLR_YELLOW; break;
@@ -159,70 +141,56 @@ unsigned *ospecial;
default: color = CLR_BRIGHT_BLUE; break; default: color = CLR_BRIGHT_BLUE; break;
} }
} else } else
#endif
obj_color(offset); obj_color(offset);
} else if ((offset = (glyph - GLYPH_RIDDEN_OFF)) >= 0) { /* mon ridden */ } else if ((offset = (glyph - GLYPH_RIDDEN_OFF)) >= 0) { /* mon ridden */
idx = mons[offset].mlet + SYM_OFF_M; idx = mons[offset].mlet + SYM_OFF_M;
#ifdef ROGUE_COLOR
if (has_rogue_color) if (has_rogue_color)
/* This currently implies that the hero is here -- monsters */ /* This currently implies that the hero is here -- monsters */
/* don't ride (yet...). Should we set it to yellow like in */ /* don't ride (yet...). Should we set it to yellow like in */
/* the monster case below? There is no equivalent in rogue. */ /* the monster case below? There is no equivalent in rogue. */
color = NO_COLOR; /* no need to check iflags.use_color */ color = NO_COLOR; /* no need to check iflags.use_color */
else else
#endif
mon_color(offset); mon_color(offset);
special |= MG_RIDDEN; special |= MG_RIDDEN;
} else if ((offset = (glyph - GLYPH_BODY_OFF)) >= 0) { /* a corpse */ } else if ((offset = (glyph - GLYPH_BODY_OFF)) >= 0) { /* a corpse */
idx = objects[CORPSE].oc_class + SYM_OFF_O; idx = objects[CORPSE].oc_class + SYM_OFF_O;
#ifdef ROGUE_COLOR
if (has_rogue_color && iflags.use_color) if (has_rogue_color && iflags.use_color)
color = CLR_RED; color = CLR_RED;
else else
#endif
mon_color(offset); mon_color(offset);
special |= MG_CORPSE; special |= MG_CORPSE;
} else if ((offset = (glyph - GLYPH_DETECT_OFF)) >= 0) { /* mon detect */ } else if ((offset = (glyph - GLYPH_DETECT_OFF)) >= 0) { /* mon detect */
idx = mons[offset].mlet + SYM_OFF_M; idx = mons[offset].mlet + SYM_OFF_M;
#ifdef ROGUE_COLOR
if (has_rogue_color) if (has_rogue_color)
color = NO_COLOR; /* no need to check iflags.use_color */ color = NO_COLOR; /* no need to check iflags.use_color */
else else
#endif
mon_color(offset); mon_color(offset);
/* Disabled for now; anyone want to get reverse video to work? */ /* Disabled for now; anyone want to get reverse video to work? */
/* is_reverse = TRUE; */ /* is_reverse = TRUE; */
special |= MG_DETECT; special |= MG_DETECT;
} else if ((offset = (glyph - GLYPH_INVIS_OFF)) >= 0) { /* invisible */ } else if ((offset = (glyph - GLYPH_INVIS_OFF)) >= 0) { /* invisible */
idx = SYM_INVISIBLE + SYM_OFF_X; idx = SYM_INVISIBLE + SYM_OFF_X;
#ifdef ROGUE_COLOR
if (has_rogue_color) if (has_rogue_color)
color = NO_COLOR; /* no need to check iflags.use_color */ color = NO_COLOR; /* no need to check iflags.use_color */
else else
#endif
invis_color(offset); invis_color(offset);
special |= MG_INVIS; special |= MG_INVIS;
} else if ((offset = (glyph - GLYPH_PET_OFF)) >= 0) { /* a pet */ } else if ((offset = (glyph - GLYPH_PET_OFF)) >= 0) { /* a pet */
idx = mons[offset].mlet + SYM_OFF_M; idx = mons[offset].mlet + SYM_OFF_M;
#ifdef ROGUE_COLOR
if (has_rogue_color) if (has_rogue_color)
color = NO_COLOR; /* no need to check iflags.use_color */ color = NO_COLOR; /* no need to check iflags.use_color */
else else
#endif
pet_color(offset); pet_color(offset);
special |= MG_PET; special |= MG_PET;
} else { /* a monster */ } else { /* a monster */
idx = mons[glyph].mlet + SYM_OFF_M; idx = mons[glyph].mlet + SYM_OFF_M;
#ifdef ROGUE_COLOR
if (has_rogue_color && iflags.use_color) { if (has_rogue_color && iflags.use_color) {
if (x == u.ux && y == u.uy) if (x == u.ux && y == u.uy)
/* actually player should be yellow-on-gray if in a corridor */ /* actually player should be yellow-on-gray if in a corridor */
color = CLR_YELLOW; color = CLR_YELLOW;
else else
color = NO_COLOR; color = NO_COLOR;
} else } else {
#endif
{
mon_color(glyph); mon_color(glyph);
/* special case the hero for `showrace' option */ /* special case the hero for `showrace' option */
#ifdef TEXTCOLOR #ifdef TEXTCOLOR
@@ -236,11 +204,7 @@ unsigned *ospecial;
ch = showsyms[idx]; ch = showsyms[idx];
#ifdef TEXTCOLOR #ifdef TEXTCOLOR
/* Turn off color if no color defined, or rogue level w/o PC graphics. */ /* Turn off color if no color defined, or rogue level w/o PC graphics. */
# ifdef ROGUE_COLOR
if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_color)) if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_color))
# else
if (!has_color(color) || Is_rogue_level(&u.uz))
# endif
color = NO_COLOR; color = NO_COLOR;
#endif #endif
-32
View File
@@ -350,17 +350,9 @@ static struct Comp_Opt
{ "soundcard", "type of sound card to use", 20, SET_IN_FILE }, { "soundcard", "type of sound card to use", 20, SET_IN_FILE },
#endif #endif
{ "symset", "load a set of display symbols from the symbols file", 70, { "symset", "load a set of display symbols from the symbols file", 70,
#ifdef LOADSYMSETS
SET_IN_GAME }, SET_IN_GAME },
#else
DISP_IN_GAME},
#endif
{ "roguesymset", "load a set of rogue display symbols from the symbols file", 70, { "roguesymset", "load a set of rogue display symbols from the symbols file", 70,
#ifdef LOADSYMSETS
SET_IN_GAME }, SET_IN_GAME },
#else
DISP_IN_GAME},
#endif
{ "suppress_alert", "suppress alerts about version-specific features", { "suppress_alert", "suppress alerts about version-specific features",
8, SET_IN_GAME }, 8, SET_IN_GAME },
{ "tile_width", "width of tiles", 20, DISP_IN_GAME}, /*WC*/ { "tile_width", "width of tiles", 20, DISP_IN_GAME}, /*WC*/
@@ -654,11 +646,9 @@ initoptions_init()
*/ */
/* 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 LOADSYMSETS
if (!symset[PRIMARY].name) load_symset("IBMGraphics", PRIMARY); if (!symset[PRIMARY].name) load_symset("IBMGraphics", PRIMARY);
if (!symset[ROGUESET].name) load_symset("RogueIBM", ROGUESET); if (!symset[ROGUESET].name) load_symset("RogueIBM", ROGUESET);
switch_symbols(TRUE); switch_symbols(TRUE);
#endif
# ifdef TEXTCOLOR # ifdef TEXTCOLOR
iflags.use_color = TRUE; iflags.use_color = TRUE;
# endif # endif
@@ -670,10 +660,8 @@ initoptions_init()
if ((opts = nh_getenv("TERM")) && if ((opts = nh_getenv("TERM")) &&
!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 LOADSYMSETS
if (!symset[PRIMARY].name) load_symset("DECGraphics", PRIMARY); if (!symset[PRIMARY].name) load_symset("DECGraphics", PRIMARY);
switch_symbols(TRUE); switch_symbols(TRUE);
# endif /*LOADSYMSETS*/
} }
# endif # endif
#endif /* UNIX || VMS */ #endif /* UNIX || VMS */
@@ -1406,7 +1394,6 @@ boolean tinitial, tfrom_file;
fullname = "symset"; fullname = "symset";
if (match_optname(opts, fullname, 6, TRUE)) { if (match_optname(opts, fullname, 6, TRUE)) {
#ifdef LOADSYMSETS
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) {
@@ -1422,7 +1409,6 @@ boolean tinitial, tfrom_file;
need_redraw = TRUE; need_redraw = TRUE;
} }
} }
#endif
return; return;
} }
@@ -2505,7 +2491,6 @@ goodfruit:
fullname = "DECgraphics"; fullname = "DECgraphics";
if (match_optname(opts, fullname, 10, TRUE)) { if (match_optname(opts, fullname, 10, TRUE)) {
boolean badflag = FALSE; boolean badflag = FALSE;
# ifdef LOADSYMSETS
if (duplicate) complain_about_duplicate(opts,1); if (duplicate) complain_about_duplicate(opts,1);
if (!negated) { if (!negated) {
/* There is no rogue level DECgraphics-specific set */ /* There is no rogue level DECgraphics-specific set */
@@ -2525,14 +2510,12 @@ goodfruit:
wait_synch(); wait_synch();
} }
} }
# endif /*LOADSYMSETS*/
return; return;
} }
fullname = "IBMgraphics"; fullname = "IBMgraphics";
if (match_optname(opts, fullname, 10, TRUE)) { if (match_optname(opts, fullname, 10, TRUE)) {
const char *sym_name = fullname; const char *sym_name = fullname;
boolean badflag = FALSE; boolean badflag = FALSE;
# ifdef LOADSYMSETS
if (duplicate) complain_about_duplicate(opts,1); if (duplicate) complain_about_duplicate(opts,1);
if (!negated) { if (!negated) {
for (i = PRIMARY; i <= ROGUESET; ++i) { for (i = PRIMARY; i <= ROGUESET; ++i) {
@@ -2559,7 +2542,6 @@ goodfruit:
assign_graphics(ROGUESET); assign_graphics(ROGUESET);
} }
} }
# endif /*LOADSYMSETS*/
return; return;
} }
#endif #endif
@@ -2567,7 +2549,6 @@ goodfruit:
fullname = "MACgraphics"; fullname = "MACgraphics";
if (match_optname(opts, fullname, 11, TRUE)) { if (match_optname(opts, fullname, 11, TRUE)) {
boolean badflag = FALSE; boolean badflag = FALSE;
# ifdef LOADSYMSETS
if (duplicate) complain_about_duplicate(opts,1); if (duplicate) complain_about_duplicate(opts,1);
if (!negated) { if (!negated) {
if (symset[PRIMARY]).name badflag = TRUE; if (symset[PRIMARY]).name badflag = TRUE;
@@ -2589,7 +2570,6 @@ goodfruit:
assign_graphics(ROGUESET); assign_graphics(ROGUESET);
} }
} }
# endif /*LOADSYMSETS*/
return; return;
} }
#endif #endif
@@ -2997,10 +2977,8 @@ doset()
return 0; return 0;
} }
#ifdef LOADSYMSETS
struct symsetentry *symset_list = 0; /* files.c will populate this with struct symsetentry *symset_list = 0; /* files.c will populate this with
list of available sets */ list of available sets */
#endif
STATIC_OVL boolean STATIC_OVL boolean
special_handling(optname, setinitial, setfromfile) special_handling(optname, setinitial, setfromfile)
@@ -3390,19 +3368,16 @@ boolean setinitial,setfromfile;
rogueflag = (*optname == 'r'), rogueflag = (*optname == 'r'),
ready_to_switch = FALSE, ready_to_switch = FALSE,
nothing_to_do = FALSE; nothing_to_do = FALSE;
#ifdef LOADSYMSETS
int res; int res;
char *symset_name, fmtstr[20]; char *symset_name, fmtstr[20];
struct symsetentry *sl; struct symsetentry *sl;
int setcount = 0; int setcount = 0;
#endif
int chosen = -2, which_set; int chosen = -2, which_set;
if (rogueflag) which_set = ROGUESET; if (rogueflag) which_set = ROGUESET;
else else
which_set = PRIMARY; which_set = PRIMARY;
#ifdef LOADSYMSETS
/* clear symset[].name as a flag to read_sym_file() to build list */ /* clear symset[].name as a flag to read_sym_file() to build list */
symset_name = symset[which_set].name; symset_name = symset[which_set].name;
symset[which_set].name = (char *)0; symset[which_set].name = (char *)0;
@@ -3551,7 +3526,6 @@ boolean setinitial,setfromfile;
assign_graphics(ROGUESET); assign_graphics(ROGUESET);
} else if (!rogueflag) assign_graphics(PRIMARY); } else if (!rogueflag) assign_graphics(PRIMARY);
need_redraw = TRUE; need_redraw = TRUE;
#endif /*LOADSYMSETS*/
return TRUE; return TRUE;
} else { } else {
@@ -3772,10 +3746,8 @@ char *buf;
Sprintf(buf, "%s", rolestring(flags.initrace, races, noun)); Sprintf(buf, "%s", rolestring(flags.initrace, races, noun));
else if (!strcmp(optname, "roguesymset")) { else if (!strcmp(optname, "roguesymset")) {
Sprintf(buf, "%s", Sprintf(buf, "%s",
#ifdef LOADSYMSETS
symset[ROGUESET].name ? symset[ROGUESET].name ?
symset[ROGUESET].name : symset[ROGUESET].name :
#endif
"default"); "default");
if (currentgraphics == ROGUESET && symset[ROGUESET].name) if (currentgraphics == ROGUESET && symset[ROGUESET].name)
Strcat(buf, ", active"); Strcat(buf, ", active");
@@ -3813,10 +3785,8 @@ char *buf;
} }
else if (!strcmp(optname, "symset")) { else if (!strcmp(optname, "symset")) {
Sprintf(buf, "%s", Sprintf(buf, "%s",
#ifdef LOADSYMSETS
symset[PRIMARY].name ? symset[PRIMARY].name ?
symset[PRIMARY].name : symset[PRIMARY].name :
#endif
"default"); "default");
if (currentgraphics == PRIMARY && symset[PRIMARY].name) if (currentgraphics == PRIMARY && symset[PRIMARY].name)
Strcat(buf, ", active"); Strcat(buf, ", active");
@@ -3992,7 +3962,6 @@ free_autopickup_exceptions()
} }
} }
#ifdef LOADSYMSETS
/* 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, which_set) load_symset(s, which_set)
@@ -4070,7 +4039,6 @@ char *buf;
} }
return (struct symparse *)0; return (struct symparse *)0;
} }
#endif /*LOADSYMSETS*/
/* data for option_help() */ /* data for option_help() */
static const char *opt_intro[] = { static const char *opt_intro[] = {
+2 -8
View File
@@ -303,8 +303,7 @@ char *argv[];
process_options(argc, argv); process_options(argc, argv);
#endif #endif
#ifdef LOADSYMSETS #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[PRIMARY].name) { if (!symset[PRIMARY].name) {
load_symset("IBMGraphics_2", PRIMARY); load_symset("IBMGraphics_2", PRIMARY);
@@ -312,8 +311,7 @@ char *argv[];
if (!symset[ROGUESET].name) { if (!symset[ROGUESET].name) {
load_symset("RogueEpyx", ROGUESET); load_symset("RogueEpyx", ROGUESET);
} }
# endif #endif
#endif /*LOADSYMSETS*/
#ifdef MSDOS #ifdef MSDOS
init_nhwindows(&argc,argv); init_nhwindows(&argc,argv);
@@ -536,20 +534,16 @@ char *argv[];
case 'I': case 'I':
case 'i': case 'i':
if (!strncmpi(argv[0]+1, "IBM", 3)) { if (!strncmpi(argv[0]+1, "IBM", 3)) {
# ifdef LOADSYMSETS
load_symset("IBMGraphics", PRIMARY); load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET); load_symset("RogueIBM", ROGUESET);
switch_symbols(TRUE); switch_symbols(TRUE);
# endif
} }
break; break;
/* case 'D': */ /* case 'D': */
case 'd': case 'd':
if (!strncmpi(argv[0]+1, "DEC", 3)) { if (!strncmpi(argv[0]+1, "DEC", 3)) {
# ifdef LOADSYMSETS
load_symset("DECGraphics", PRIMARY); load_symset("DECGraphics", PRIMARY);
switch_symbols(TRUE); switch_symbols(TRUE);
# endif
} }
break; break;
#endif #endif
-2
View File
@@ -364,11 +364,9 @@ init_sco_cons()
if (!strcmp(windowprocs.name, "tty") && sco_flag_console) { if (!strcmp(windowprocs.name, "tty") && sco_flag_console) {
atexit(sco_mapon); atexit(sco_mapon);
sco_mapoff(); sco_mapoff();
# ifdef LOADSYMSETS
load_symset("IBMGraphics", PRIMARY); load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET); load_symset("RogueIBM", ROGUESET);
switch_symbols(TRUE); switch_symbols(TRUE);
# endif
# ifdef TEXTCOLOR # ifdef TEXTCOLOR
if (has_colors()) if (has_colors())
iflags.use_color = TRUE; iflags.use_color = TRUE;
-4
View File
@@ -357,20 +357,16 @@ char *argv[];
case 'I': case 'I':
case 'i': case 'i':
if (!strncmpi(argv[0]+1, "IBM", 3)) { if (!strncmpi(argv[0]+1, "IBM", 3)) {
#ifdef LOADSYMSETS
load_symset("IBMGraphics", PRIMARY); load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET); load_symset("RogueIBM", ROGUESET);
switch_symbols(TRUE); switch_symbols(TRUE);
#endif
} }
break; break;
/* case 'D': */ /* case 'D': */
case 'd': case 'd':
if (!strncmpi(argv[0]+1, "DEC", 3)) { if (!strncmpi(argv[0]+1, "DEC", 3)) {
#ifdef LOADSYMSETS
load_symset("DECGraphics", PRIMARY); load_symset("DECGraphics", PRIMARY);
switch_symbols(TRUE); switch_symbols(TRUE);
#endif
} }
break; break;
case 'p': /* profession (role) */ case 'p': /* profession (role) */
-4
View File
@@ -266,20 +266,16 @@ char *argv[];
case 'I': case 'I':
case 'i': case 'i':
if (!strncmpi(argv[0]+1, "IBM", 3)) { if (!strncmpi(argv[0]+1, "IBM", 3)) {
#ifdef LOADSYMSETS
load_symset("IBMGraphics", PRIMARY); load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET); load_symset("RogueIBM", ROGUESET);
switch_symbols(TRUE); switch_symbols(TRUE);
#endif
} }
break; break;
/* case 'D': */ /* case 'D': */
case 'd': case 'd':
if (!strncmpi(argv[0]+1, "DEC", 3)) { if (!strncmpi(argv[0]+1, "DEC", 3)) {
#ifdef LOADSYMSETS
load_symset("DECGraphics", PRIMARY); load_symset("DECGraphics", PRIMARY);
switch_symbols(TRUE); switch_symbols(TRUE);
#endif
} }
break; break;
case 'p': /* profession (role) */ case 'p': /* profession (role) */