symset properties (trunk only)

Pat Rankin wrote:
> Symbol set definitions need a description attribute, above and
> beyond allowing comments in the file, for inclusion in the 'O'
> command's menu entries for selecting them.
[...]
> mapglyph.c isn't the proper place to decide whether to define
> ROGUE_COLOR.  That may need to become a symbol attribute,
> which we'd then specify on the Epyx rogue set(s).

Implement both of the suggestions above.
This commit is contained in:
nethack.allison
2006-09-24 02:45:34 +00:00
parent 13559f1ad8
commit 6e1c1dba92
8 changed files with 207 additions and 120 deletions

View File

@@ -499,6 +499,7 @@ E void NDECL(init_r_symbols);
E void NDECL(init_symbols);
E void NDECL(init_disp_symbols);
E void NDECL(init_l_symbols);
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));

View File

@@ -234,11 +234,15 @@ struct symparse {
const char *name;
};
/* general linked list of text pointers */
struct textlist {
char *text; /* the text */
int idx; /* an index value */
struct textlist *next; /* next in list */
/* linked list of symsets and their characteristics */
struct symsetentry {
struct symsetentry *next; /* next in list */
char *name; /* ptr to symset name */
char *desc; /* ptr to description */
int idx; /* an index value */
int handling; /* known handlers value */
Bitfield(nocolor,1); /* don't use color if set */
/* 7 free bits */
};
/*
@@ -261,10 +265,10 @@ struct textlist {
extern const struct symdef defsyms[MAXPCHARS]; /* defaults */
extern uchar showsyms[MAXPCHARS];
extern const struct symdef def_warnsyms[WARNCOUNT];
extern char *symset[NUM_GRAPHICS]; /* from drawing.c */
extern int symhandling[NUM_GRAPHICS], currentgraphics; /* from drawing.c */
extern struct symsetentry symset[NUM_GRAPHICS]; /* from drawing.c */
extern int currentgraphics; /* from drawing.c */
#define SYMHANDLING(ht) (symhandling[currentgraphics] == (ht))
#define SYMHANDLING(ht) (symset[currentgraphics].handling == (ht))
/*
* The 5 possible states of doors