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:
@@ -48,7 +48,6 @@ int explcolors[] = {
|
||||
#define explode_color(n)
|
||||
#endif
|
||||
|
||||
#ifdef ROGUE_COLOR
|
||||
# if defined(USE_TILES) && defined(MSDOS)
|
||||
#define HAS_ROGUE_IBM_GRAPHICS (currentgraphics == ROGUESET && \
|
||||
SYMHANDLING(H_IBM) && !iflags.grmode)
|
||||
@@ -56,7 +55,6 @@ int explcolors[] = {
|
||||
#define HAS_ROGUE_IBM_GRAPHICS (currentgraphics == ROGUESET && \
|
||||
SYMHANDLING(H_IBM))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
@@ -71,9 +69,11 @@ unsigned *ospecial;
|
||||
#endif
|
||||
uchar ch;
|
||||
unsigned special = 0;
|
||||
#ifdef ROGUE_COLOR
|
||||
/* condense multiple tests in macro version down to single */
|
||||
boolean has_rogue_ibm_graphics = HAS_ROGUE_IBM_GRAPHICS;
|
||||
#ifdef ROGUE_COLOR
|
||||
boolean has_rogue_color = (has_rogue_ibm_graphics &&
|
||||
(symset[currentgraphics].nocolor == 0));
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -85,7 +85,7 @@ unsigned *ospecial;
|
||||
if ((offset = (glyph - GLYPH_WARNING_OFF)) >= 0) { /* a warning flash */
|
||||
ch = warnsyms[offset];
|
||||
# ifdef ROGUE_COLOR
|
||||
if (has_rogue_ibm_graphics)
|
||||
if (has_rogue_color)
|
||||
color = NO_COLOR;
|
||||
else
|
||||
# endif
|
||||
@@ -94,7 +94,7 @@ unsigned *ospecial;
|
||||
/* see swallow_to_glyph() in display.c */
|
||||
ch = (uchar) showsyms[S_sw_tl + (offset & 0x7)];
|
||||
#ifdef ROGUE_COLOR
|
||||
if (has_rogue_ibm_graphics && iflags.use_color)
|
||||
if (has_rogue_color && iflags.use_color)
|
||||
color = NO_COLOR;
|
||||
else
|
||||
#endif
|
||||
@@ -103,7 +103,7 @@ unsigned *ospecial;
|
||||
/* see zapdir_to_glyph() in display.c */
|
||||
ch = showsyms[S_vbeam + (offset & 0x3)];
|
||||
#ifdef ROGUE_COLOR
|
||||
if (has_rogue_ibm_graphics && iflags.use_color)
|
||||
if (has_rogue_color && iflags.use_color)
|
||||
color = NO_COLOR;
|
||||
else
|
||||
#endif
|
||||
@@ -114,7 +114,7 @@ unsigned *ospecial;
|
||||
} else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) { /* cmap */
|
||||
ch = showsyms[offset];
|
||||
#ifdef ROGUE_COLOR
|
||||
if (has_rogue_ibm_graphics && iflags.use_color) {
|
||||
if (has_rogue_color && iflags.use_color) {
|
||||
if (offset >= S_vwall && offset <= S_hcdoor)
|
||||
color = CLR_BROWN;
|
||||
else if (offset >= S_arrow_trap && offset <= S_polymorph_trap)
|
||||
@@ -140,7 +140,7 @@ unsigned *ospecial;
|
||||
if (offset == BOULDER && iflags.bouldersym) ch = iflags.bouldersym;
|
||||
else ch = oc_syms[(int)objects[offset].oc_class];
|
||||
#ifdef ROGUE_COLOR
|
||||
if (has_rogue_ibm_graphics && iflags.use_color) {
|
||||
if (has_rogue_color && iflags.use_color) {
|
||||
switch(objects[offset].oc_class) {
|
||||
case COIN_CLASS: color = CLR_YELLOW; break;
|
||||
case FOOD_CLASS: color = CLR_RED; break;
|
||||
@@ -152,7 +152,7 @@ unsigned *ospecial;
|
||||
} else if ((offset = (glyph - GLYPH_RIDDEN_OFF)) >= 0) { /* mon ridden */
|
||||
ch = monsyms[(int)mons[offset].mlet];
|
||||
#ifdef ROGUE_COLOR
|
||||
if (has_rogue_ibm_graphics)
|
||||
if (has_rogue_color)
|
||||
/* This currently implies that the hero is here -- monsters */
|
||||
/* don't ride (yet...). Should we set it to yellow like in */
|
||||
/* the monster case below? There is no equivalent in rogue. */
|
||||
@@ -164,7 +164,7 @@ unsigned *ospecial;
|
||||
} else if ((offset = (glyph - GLYPH_BODY_OFF)) >= 0) { /* a corpse */
|
||||
ch = oc_syms[(int)objects[CORPSE].oc_class];
|
||||
#ifdef ROGUE_COLOR
|
||||
if (has_rogue_ibm_graphics && iflags.use_color)
|
||||
if (has_rogue_color && iflags.use_color)
|
||||
color = CLR_RED;
|
||||
else
|
||||
#endif
|
||||
@@ -173,7 +173,7 @@ unsigned *ospecial;
|
||||
} else if ((offset = (glyph - GLYPH_DETECT_OFF)) >= 0) { /* mon detect */
|
||||
ch = monsyms[(int)mons[offset].mlet];
|
||||
#ifdef ROGUE_COLOR
|
||||
if (has_rogue_ibm_graphics)
|
||||
if (has_rogue_color)
|
||||
color = NO_COLOR; /* no need to check iflags.use_color */
|
||||
else
|
||||
#endif
|
||||
@@ -184,7 +184,7 @@ unsigned *ospecial;
|
||||
} else if ((offset = (glyph - GLYPH_INVIS_OFF)) >= 0) { /* invisible */
|
||||
ch = DEF_INVISIBLE;
|
||||
#ifdef ROGUE_COLOR
|
||||
if (has_rogue_ibm_graphics)
|
||||
if (has_rogue_color)
|
||||
color = NO_COLOR; /* no need to check iflags.use_color */
|
||||
else
|
||||
#endif
|
||||
@@ -193,7 +193,7 @@ unsigned *ospecial;
|
||||
} else if ((offset = (glyph - GLYPH_PET_OFF)) >= 0) { /* a pet */
|
||||
ch = monsyms[(int)mons[offset].mlet];
|
||||
#ifdef ROGUE_COLOR
|
||||
if (has_rogue_ibm_graphics)
|
||||
if (has_rogue_color)
|
||||
color = NO_COLOR; /* no need to check iflags.use_color */
|
||||
else
|
||||
#endif
|
||||
@@ -202,7 +202,7 @@ unsigned *ospecial;
|
||||
} else { /* a monster */
|
||||
ch = monsyms[(int)mons[glyph].mlet];
|
||||
#ifdef ROGUE_COLOR
|
||||
if (has_rogue_ibm_graphics && iflags.use_color) {
|
||||
if (has_rogue_color && iflags.use_color) {
|
||||
if (x == u.ux && y == u.uy)
|
||||
/* actually player should be yellow-on-gray if in a corridor */
|
||||
color = CLR_YELLOW;
|
||||
@@ -225,7 +225,7 @@ unsigned *ospecial;
|
||||
/* Turn off color if no color defined, or rogue level w/o PC graphics. */
|
||||
# ifdef REINCARNATION
|
||||
# ifdef ROGUE_COLOR
|
||||
if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_ibm_graphics))
|
||||
if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_color))
|
||||
# else
|
||||
if (!has_color(color) || Is_rogue_level(&u.uz))
|
||||
# endif
|
||||
|
||||
Reference in New Issue
Block a user