From: nethack.allison Date: Thu, 21 Sep 2006 03:47:00 +0000 (+0000) Subject: more follow-up (trunk only) X-Git-Tag: MOVE2GIT~899 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0bf6c7653fb0376ad448fc4effd1ff07b6c23ed;p=nethack more follow-up (trunk only) Based on feedback, make the load_symset() call easier to follow. --- diff --git a/include/rm.h b/include/rm.h index 40f0658fd..0ad57f927 100644 --- a/include/rm.h +++ b/include/rm.h @@ -261,11 +261,8 @@ extern char *roguesymset, *roguehandling; /* from drawing.c */ * Graphics sets for display symbols */ #define DEFAULT_GRAPHICS 0 /* regular characters: '-', '+', &c */ -#if 0 -#define IBM_GRAPHICS 1 /* PC graphic characters */ -#define DEC_GRAPHICS 2 /* VT100 line drawing characters */ -#define MAC_GRAPHICS 3 /* Macintosh drawing characters */ -#endif +#define ROGUESET 1 /* useful for load_symset() */ +#define PRIMARY 0 /* * The 5 possible states of doors diff --git a/src/options.c b/src/options.c index 28f40add5..bb0f97736 100644 --- a/src/options.c +++ b/src/options.c @@ -610,9 +610,9 @@ initoptions() /* this detects the IBM-compatible console on most 386 boxes */ if ((opts = nh_getenv("TERM")) && !strncmp(opts, "AT", 2)) { #ifdef ASCIIGRAPH - if (!symset) load_symset("IBMGraphics", FALSE); + if (!symset) load_symset("IBMGraphics", PRIMARY); - if (!roguesymset) load_symset("RogueIBM", TRUE); + if (!roguesymset) load_symset("RogueIBM", ROGUESET); switch_graphics(TRUE); #endif @@ -628,7 +628,7 @@ initoptions() !strncmpi(opts, "vt", 2) && AS && AE && index(AS, '\016') && index(AE, '\017')) { # ifdef ASCIIGRAPH - if (!symset) load_symset("DECGraphics", FALSE); + if (!symset) load_symset("DECGraphics", PRIMARY); @@ -639,7 +639,7 @@ initoptions() #endif /* UNIX || VMS */ #ifdef MAC_GRAPHICS_ENV - if (!symset) load_symset("MACGraphics", FALSE); + if (!symset) load_symset("MACGraphics", PRIMARY); switch_graphics(TRUE); #endif /* MAC_GRAPHICS_ENV */ flags.menu_style = MENU_FULL; diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index 1d89eb6aa..680224d34 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -308,11 +308,11 @@ char *argv[]; #if defined(MSDOS) || defined(WIN32) /* Player didn't specify any symbol set so use IBM defaults */ if (!symset) { - load_symset("IBMGraphics_2", FALSE); + load_symset("IBMGraphics_2", PRIMARY); } # ifdef REINCARNATION if (!roguesymset) { - load_symset("RogueEpyx", TRUE); + load_symset("RogueEpyx", ROGUESET); } # endif #endif @@ -549,8 +549,8 @@ char *argv[]; case 'i': if (!strncmpi(argv[0]+1, "IBM", 3)) { # ifdef ASCIIGRAPH - load_symset("IBMGraphics", FALSE); - load_symset("RogueIBM", TRUE); + load_symset("IBMGraphics", PRIMARY); + load_symset("RogueIBM", ROGUESET); switch_graphics(TRUE); # endif } @@ -559,7 +559,7 @@ char *argv[]; case 'd': if (!strncmpi(argv[0]+1, "DEC", 3)) { # ifdef ASCIIGRAPH - load_symset("DECGraphics", FALSE); + load_symset("DECGraphics", PRIMARY); switch_graphics(TRUE); # endif } diff --git a/sys/share/unixtty.c b/sys/share/unixtty.c index c6ff7a6b9..133cb6ea1 100644 --- a/sys/share/unixtty.c +++ b/sys/share/unixtty.c @@ -366,8 +366,8 @@ init_sco_cons() atexit(sco_mapon); sco_mapoff(); # ifdef ASCIIGRAPH - load_symset("IBMGraphics", FALSE); - load_symset("RogueIBM", TRUE); + load_symset("IBMGraphics", PRIMARY); + load_symset("RogueIBM", ROGUESET); switch_graphics(TRUE); # endif # ifdef TEXTCOLOR diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 214eaa938..29e270f94 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -371,8 +371,8 @@ char *argv[]; case 'i': if (!strncmpi(argv[0]+1, "IBM", 3)) { #ifdef ASCIIGRAPH - load_symset("IBMGraphics", FALSE); - load_symset("IBMGraphics", TRUE); + load_symset("IBMGraphics", PRIMARY); + load_symset("RogueIBM", ROGUESET); switch_graphics(TRUE); #endif } @@ -381,7 +381,7 @@ char *argv[]; case 'd': if (!strncmpi(argv[0]+1, "DEC", 3)) { #ifdef ASCIIGRAPH - load_symset("DECGraphics", FALSE); + load_symset("DECGraphics", PRIMARY); switch_graphics(TRUE); #endif } diff --git a/sys/vms/vmsmain.c b/sys/vms/vmsmain.c index a3fec4d8f..a3701aa89 100644 --- a/sys/vms/vmsmain.c +++ b/sys/vms/vmsmain.c @@ -270,8 +270,8 @@ char *argv[]; case 'i': if (!strncmpi(argv[0]+1, "IBM", 3)) { #ifdef ASCIIGRAPH - load_symset("IBMGraphics", FALSE); - load_symset("IBMGraphics", TRUE); + load_symset("IBMGraphics", PRIMARY); + load_symset("RogueIBM", ROGUESET); switch_graphics(TRUE); #endif } @@ -280,7 +280,7 @@ char *argv[]; case 'd': if (!strncmpi(argv[0]+1, "DEC", 3)) { #ifdef ASCIIGRAPH - load_symset("DECGraphics", FALSE); + load_symset("DECGraphics", PRIMARY); switch_graphics(TRUE); #endif }