]> granicus.if.org Git - nethack/commitdiff
more follow-up (trunk only)
authornethack.allison <nethack.allison>
Thu, 21 Sep 2006 03:47:00 +0000 (03:47 +0000)
committernethack.allison <nethack.allison>
Thu, 21 Sep 2006 03:47:00 +0000 (03:47 +0000)
Based on feedback, make the load_symset() call easier
to follow.

include/rm.h
src/options.c
sys/share/pcmain.c
sys/share/unixtty.c
sys/unix/unixmain.c
sys/vms/vmsmain.c

index 40f0658fd701ea6e635c18428f2a4026ad0ffbf7..0ad57f9274602217cb10bc5d92391bb09963a1e6 100644 (file)
@@ -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
index 28f40add5cad5c6b07178753d485a6f06eeb3706..bb0f9773618d165ace91bc567df74cb43fc94c78 100644 (file)
@@ -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;
index 1d89eb6aa45abb3b47cb4643491715be421a40c8..680224d340a3fcec966b43f9a875da11c3eeb35f 100644 (file)
@@ -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
                        }
index c6ff7a6b9dabd0a318a304ca7114da990b591370..133cb6ea167da598fd36882d8920296bc47b862c 100644 (file)
@@ -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
index 214eaa9389e6befb62c229b1e666a404053c32ff..29e270f94448e66460cd737baa07e23a3f24575e 100644 (file)
@@ -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
                        }
index a3fec4d8f6e7b197c758fadf4f50fde9e8d6ab9a..a3701aa89306a6d9bd4047843f3edda5bde910a5 100644 (file)
@@ -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
                        }