symbol preprocessing (trunk only)

Clean up the preprocessing associated with the
loadable symbol stuff.

Base it on new LOADSYMSETS, rather than on the
previously existing ASCIIGRAPH preprocessor define.
This commit is contained in:
nethack.allison
2006-10-02 13:15:50 +00:00
parent 58a1828f18
commit 084dce82d0
14 changed files with 119 additions and 83 deletions

View File

@@ -355,6 +355,8 @@ typedef unsigned char uchar;
* complexity of the game but also to the size of the load module.
*/
/* display features */
#define LOADSYMSETS /* loadable symbol sets; only default symbols w/o this */
/* dungeon features */
#define SINKS /* Kitchen sinks - Janet Walz */
/* dungeon levels */

View File

@@ -499,8 +499,8 @@ E void NDECL(init_r_symbols);
E void NDECL(init_symbols);
E void NDECL(init_showsyms);
E void NDECL(init_l_symbols);
#ifdef LOADSYMSETS
E void FDECL(clear_symsetentry, (int,BOOLEAN_P));
#ifdef ASCIIGRAPH
E void FDECL(update_l_symset, (struct symparse *,int));
E void FDECL(update_r_symset, (struct symparse *,int));
#endif
@@ -718,7 +718,7 @@ E void FDECL(check_recordfile, (const char *));
#if defined(WIZARD)
E void NDECL(read_wizkit);
#endif
#ifdef ASCIIGRAPH
#ifdef LOADSYMSETS
E int FDECL(read_sym_file, (int));
E int FDECL(parse_sym_line, (char *,int));
#endif
@@ -1536,7 +1536,7 @@ E void FDECL(set_option_mod_status, (const char *,int));
E int FDECL(add_autopickup_exception, (const char *));
E void NDECL(free_autopickup_exceptions);
#endif /* AUTOPICKUP_EXCEPTIONS */
#ifdef ASCIIGRAPH
#ifdef LOADSYMSETS
E int FDECL(load_symset, (const char *,int));
E void FDECL(parsesymbols, (char *));
E struct symparse *FDECL(match_sym, (char *));

View File

@@ -273,7 +273,11 @@ extern struct symsetentry symset[NUM_GRAPHICS]; /* from drawing.c */
extern int currentgraphics; /* from drawing.c */
extern uchar showsyms[];
#ifdef LOADSYMSETS
#define SYMHANDLING(ht) (symset[currentgraphics].handling == (ht))
#else
#define SYMHANDLING(ht) ((ht) == H_UNK)
#endif
/*
* The 5 possible states of doors

View File

@@ -12,7 +12,7 @@
#endif
/* might display need graphics code? */
#if !defined(AMIGA) && !defined(TOS) && !defined(MAC) && !defined(ASCIIGRAPH)
#if !defined(AMIGA) && !defined(TOS) && !defined(MAC)
# if defined(TERMLIB) || defined(OS2) || defined(MSDOS)
# define ASCIIGRAPH
# endif

View File

@@ -56,7 +56,6 @@
#define TEXTCOLOR /* Use System V r3.2 terminfo color support */
/* and/or ANSI color support on termcap systems */
/* and/or X11 color */
#define ASCIIGRAPH /* ASCII graphics support on terminals */
#define POSIX_JOB_CONTROL /* use System V / Solaris 2.x / POSIX job control */
/* (e.g., VSUSP) */
#define POSIX_TYPES /* use POSIX types for system calls and termios */

View File

@@ -74,11 +74,6 @@
*/
#define DLB /* use data librarian code */
/*
* Needed to support DECgraphics and/or IBMgraphics display styles.
*/
#define ASCIIGRAPH /* ASCII graphics support on terminals */
/*
* You may define TEXTCOLOR if your system has any terminals that recognize
* ANSI color sequences of the form ``<ESCAPE>[#;#m'', where the first # is