object at same spot, so skip it for locations where monster refresh
is going to immediately redisplay a monster
take holes that you avoided into consideration when you're on the brink
+update window port spec to include a color-availability table that the window
+ port can set; merge all has_color() implementations into one central
+ function in src/windows.c which uses a few data checks only and
+ elminates multiple string function calls for each map cell update
+ that were being done in some cases previously
unix: fix double DLB definition in linux hints file
windows: fix --showpaths output for the data file which relies on being
constructed programmatically to incorporate the version suffix
Your window port identifies what options it will react to and support
by setting bits in the window_procs wincap mask and/or wincap2 mask.
+Your window port can also fill in the color-availability table for
+the window port, has_color[CLR_MAX] to flag the colors it supports
+1 it does, or 0 it doesn't. [CLR_MAX is 16 as of 3.6.3.]
+
See section IX for details of where the wincap masks reside.
Two things control whether any preference setting appears in the
#if 0
int
-has_color(int color)
+has_color(int color) /* this function is commented out */
{
#ifdef TEXTCOLOR
if ((color >= 0) && (color < CLR_MAX))
xputs(hilites[color]);
}
-#if 0
-/* Replaced by src/windows.c general proc or a macro in 3.6.3 */
-
-/* not to be confused with has_colors() in unixtty.c */
-int
-has_color(color)
-int color;
-{
-#ifdef X11_GRAPHICS
- /* XXX has_color() should be added to windowprocs */
- if (windowprocs.name != NULL && !strcmpi(windowprocs.name, "X11"))
- return 1;
-#endif
-#ifdef GEM_GRAPHICS
- /* XXX has_color() should be added to windowprocs */
- if (windowprocs.name != NULL && !strcmpi(windowprocs.name, "Gem"))
- return 1;
-#endif
-#ifdef QT_GRAPHICS
- /* XXX has_color() should be added to windowprocs */
- if (windowprocs.name != NULL && !strcmpi(windowprocs.name, "Qt"))
- return 1;
-#endif
-#ifdef CURSES_GRAPHICS
- /* XXX has_color() should be added to windowprocs */
- /* iflags.wc_color is set to false and the option disabled if the
- terminal cannot display color */
- if (windowprocs.name != NULL && !strcmpi(windowprocs.name, "curses"))
- return iflags.wc_color;
-#endif
-#ifdef AMII_GRAPHICS
- /* hilites[] not used */
- return iflags.use_color ? 1 : 0;
-#else
- return hilites[color] != (char *) 0;
-#endif
-}
-#endif /* 0 */
#endif /* TEXTCOLOR */
#endif /* TTY_GRAPHICS && !NO_TERMS */