From 42a13a119835992c4c20e2e9aec928c9df6b0a07 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 11:44:07 -0500 Subject: [PATCH 1/4] has_color() performance fixes Performance profiling showed that multiple strcmpi() calls were occurring each and every time a character was going to the map. This update: - honors the WC_COLOR capability - It allows a window-port to control individual color availability should the window-port wish to do so. - Makes checking on the individual colors for the active window-port is a straightforward table lookup at the CLR_ offset. iflags.use_color remains a master on/off switch for use of color, regardless of the capability compiled into the game (default TRUE). The has_color() routine, which is now a shared routine in src/windows.c, could likely be made into a simple macro to eliminate the function call, but this update does not go that far. This hits a lot of port files due to the window-port interface change, mostly cookie-cutter. --- include/winprocs.h | 1 + src/mapglyph.c | 7 +------ src/options.c | 6 +----- src/windows.c | 28 +++++++++++++++++++++++++++- sys/amiga/winami.c | 8 ++++++-- sys/mac/macwin.c | 4 +++- sys/wince/mswproc.c | 1 + sys/winnt/nttty.c | 2 ++ sys/winnt/stubs.c | 6 ------ win/Qt/qt_win.cpp | 1 + win/Qt4/qt4bind.cpp | 1 + win/X11/winX.c | 1 + win/curses/cursmain.c | 1 + win/gem/wingem.c | 4 +++- win/gnome/gnbind.c | 4 +++- win/share/safeproc.c | 1 + win/tty/termcap.c | 5 ++++- win/tty/wintty.c | 5 +++++ 18 files changed, 62 insertions(+), 24 deletions(-) diff --git a/include/winprocs.h b/include/winprocs.h index cc3b4046c..f68952765 100644 --- a/include/winprocs.h +++ b/include/winprocs.h @@ -14,6 +14,7 @@ struct window_procs { * '+' are reserved for processors. */ unsigned long wincap; /* window port capability options supported */ unsigned long wincap2; /* additional window port capability options */ + boolean has_color[CLR_MAX]; void FDECL((*win_init_nhwindows), (int *, char **)); void NDECL((*win_player_selection)); void NDECL((*win_askname)); diff --git a/src/mapglyph.c b/src/mapglyph.c index 388e318a0..cec7e2e80 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -245,16 +245,11 @@ unsigned mgflags; #ifdef TEXTCOLOR /* Turn off color if no color defined, or rogue level w/o PC graphics. */ if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_color)) - color = NO_COLOR; #endif - + color = NO_COLOR; *ochar = (int) ch; *ospecial = special; -#ifdef TEXTCOLOR *ocolor = color; -#else - nhUse(ocolor); -#endif return idx; } diff --git a/src/options.c b/src/options.c index 77fd14b79..e9071996a 100644 --- a/src/options.c +++ b/src/options.c @@ -106,11 +106,7 @@ static struct Bool_Opt { #endif { "clicklook", &iflags.clicklook, FALSE, SET_IN_GAME }, { "cmdassist", &iflags.cmdassist, TRUE, SET_IN_GAME }, -#if defined(MICRO) || defined(WIN32) || defined(CURSES_GRAPHICS) - { "color", &iflags.wc_color, TRUE, SET_IN_GAME }, /*WC*/ -#else /* systems that support multiple terminals, many monochrome */ - { "color", &iflags.wc_color, FALSE, SET_IN_GAME }, /*WC*/ -#endif + { "color", &iflags.wc_color, TRUE, SET_IN_GAME }, /* on/off: use WC or not */ { "confirm", &flags.confirm, TRUE, SET_IN_GAME }, { "dark_room", &flags.dark_room, TRUE, SET_IN_GAME }, { "eight_bit_tty", &iflags.wc_eight_bit_input, FALSE, SET_IN_GAME }, /*WC*/ diff --git a/src/windows.c b/src/windows.c index 7dac248a0..f310d555f 100644 --- a/src/windows.c +++ b/src/windows.c @@ -525,7 +525,9 @@ static void FDECL(hup_void_fdecl_winid, (winid)); static void FDECL(hup_void_fdecl_constchar_p, (const char *)); static struct window_procs hup_procs = { - "hup", 0L, 0L, hup_init_nhwindows, + "hup", 0L, 0L, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + hup_init_nhwindows, hup_void_ndecl, /* player_selection */ hup_void_ndecl, /* askname */ hup_void_ndecl, /* get_nh_event */ @@ -1373,4 +1375,28 @@ boolean onoff_flag; } } +#ifdef TTY_GRAPHICS +#ifdef TEXTCOLOR +#ifdef TOS +extern const char *hilites[CLR_MAX]; +#else +extern NEARDATA char *hilites[CLR_MAX]; +#endif +#endif +#endif + +int +has_color(color) +int color; +{ + return (iflags.use_color && windowprocs.name + && (windowprocs.wincap & WC_COLOR) && windowprocs.has_color[color] +#ifdef TTY_GRAPHICS +#if defined(TEXTCOLOR) && defined(TERMLIB) && !defined(NO_TERMS) + && (hilites[color] != 0) +#endif +#endif + ); +} + /*windows.c*/ diff --git a/sys/amiga/winami.c b/sys/amiga/winami.c index cd1854eb8..d445be286 100644 --- a/sys/amiga/winami.c +++ b/sys/amiga/winami.c @@ -28,7 +28,9 @@ long amii_scrnmode; * the intuition interface for the amiga... */ struct window_procs amii_procs = { - "amii", WC_COLOR | WC_HILITE_PET | WC_INVERSE, 0L, amii_init_nhwindows, + "amii", WC_COLOR | WC_HILITE_PET | WC_INVERSE, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + 0L, amii_init_nhwindows, amii_player_selection, amii_askname, amii_get_nh_event, amii_exit_nhwindows, amii_suspend_nhwindows, amii_resume_nhwindows, amii_create_nhwindow, amii_clear_nhwindow, amii_display_nhwindow, @@ -60,7 +62,9 @@ struct window_procs amii_procs = { * a shared library to allow the executable to be smaller. */ struct window_procs amiv_procs = { - "amitile", WC_COLOR | WC_HILITE_PET | WC_INVERSE, 0L, amii_init_nhwindows, + "amitile", WC_COLOR | WC_HILITE_PET | WC_INVERSE, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + 0L, amii_init_nhwindows, amii_player_selection, amii_askname, amii_get_nh_event, amii_exit_nhwindows, amii_suspend_nhwindows, amii_resume_nhwindows, amii_create_nhwindow, amii_clear_nhwindow, amii_display_nhwindow, diff --git a/sys/mac/macwin.c b/sys/mac/macwin.c index 210b13994..aec93d0b0 100644 --- a/sys/mac/macwin.c +++ b/sys/mac/macwin.c @@ -3251,7 +3251,9 @@ struct window_procs mac_procs = { WC_COLOR | WC_HILITE_PET | WC_FONT_MAP | WC_FONT_MENU | WC_FONT_MESSAGE | WC_FONT_STATUS | WC_FONT_TEXT | WC_FONTSIZ_MAP | WC_FONTSIZ_MENU | WC_FONTSIZ_MESSAGE | WC_FONTSIZ_STATUS | WC_FONTSIZ_TEXT, - 0L, mac_init_nhwindows, + 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + mac_init_nhwindows, mac_unimplemented, /* see macmenu.c:mac_askname() for player selection */ mac_askname, mac_get_nh_event, mac_exit_nhwindows, mac_suspend_nhwindows, mac_unimplemented, mac_create_nhwindow, mac_clear_nhwindow, diff --git a/sys/wince/mswproc.c b/sys/wince/mswproc.c index c140a8b58..acc0ec463 100644 --- a/sys/wince/mswproc.c +++ b/sys/wince/mswproc.c @@ -50,6 +50,7 @@ struct window_procs mswin_procs = { | WC_TILE_WIDTH | WC_TILE_HEIGHT | WC_TILE_FILE | WC_VARY_MSGCOUNT | WC_WINDOWCOLORS | WC_PLAYER_SELECTION, WC2_FULLSCREEN | WC2_SOFTKEYBOARD | WC2_WRAPTEXT, mswin_init_nhwindows, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ mswin_player_selection, mswin_askname, mswin_get_nh_event, mswin_exit_nhwindows, mswin_suspend_nhwindows, mswin_resume_nhwindows, mswin_create_nhwindow, mswin_clear_nhwindow, mswin_display_nhwindow, diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index cd79c1d82..df817e6c9 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -790,6 +790,7 @@ init_ttycolor() } #endif /* TEXTCOLOR */ +#if 0 int has_color(int color) { @@ -803,6 +804,7 @@ has_color(int color) else return 0; } +#endif int term_attr_fixup(int attrmask) diff --git a/sys/winnt/stubs.c b/sys/winnt/stubs.c index fa4a9361c..447b0dabb 100644 --- a/sys/winnt/stubs.c +++ b/sys/winnt/stubs.c @@ -114,12 +114,6 @@ backsp() return; } -int -has_color(int color) -{ - return 1; -} - #ifndef NO_MOUSE_ALLOWED void toggle_mouse_support() diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index ca2e59343..6d560f1ce 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -5229,6 +5229,7 @@ struct window_procs Qt_procs = { WC_FONT_MAP|WC_TILE_FILE|WC_TILE_WIDTH|WC_TILE_HEIGHT| WC_PLAYER_SELECTION|WC_SPLASH_SCREEN, 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ NetHackQtBind::qt_init_nhwindows, NetHackQtBind::qt_player_selection, NetHackQtBind::qt_askname, diff --git a/win/Qt4/qt4bind.cpp b/win/Qt4/qt4bind.cpp index b143b8e8d..86358d1de 100644 --- a/win/Qt4/qt4bind.cpp +++ b/win/Qt4/qt4bind.cpp @@ -730,6 +730,7 @@ struct window_procs Qt_procs = { | WC_FONT_MAP | WC_TILE_FILE | WC_TILE_WIDTH | WC_TILE_HEIGHT | WC_PLAYER_SELECTION | WC_SPLASH_SCREEN, 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ nethack_qt4::NetHackQtBind::qt_init_nhwindows, nethack_qt4::NetHackQtBind::qt_player_selection, nethack_qt4::NetHackQtBind::qt_askname, diff --git a/win/X11/winX.c b/win/X11/winX.c index c8af06a90..d5b7d263c 100644 --- a/win/X11/winX.c +++ b/win/X11/winX.c @@ -107,6 +107,7 @@ struct window_procs X11_procs = { WC2_FLUSH_STATUS | WC2_RESET_STATUS | WC2_HILITE_STATUS | #endif 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ X11_init_nhwindows, X11_player_selection, X11_askname, X11_get_nh_event, X11_exit_nhwindows, X11_suspend_nhwindows, X11_resume_nhwindows, X11_create_nhwindow, diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 447255343..e56f0e3ab 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -51,6 +51,7 @@ struct window_procs curses_procs = { | WC2_FLUSH_STATUS | WC2_TERM_SIZE | WC2_STATUSLINES | WC2_WINDOWBORDERS | WC2_PETATTR | WC2_GUICOLOR | WC2_SUPPRESS_HIST), + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ curses_init_nhwindows, curses_player_selection, curses_askname, diff --git a/win/gem/wingem.c b/win/gem/wingem.c index a83c7760f..ddd5f813c 100644 --- a/win/gem/wingem.c +++ b/win/gem/wingem.c @@ -43,7 +43,9 @@ struct window_procs Gem_procs = { | WC_FONT_TEXT | WC_FONT_MAP | WC_FONTSIZ_MESSAGE | WC_FONTSIZ_STATUS | WC_FONTSIZ_MENU | WC_FONTSIZ_TEXT | WC_FONTSIZ_MAP | WC_TILE_WIDTH | WC_TILE_HEIGHT | WC_TILE_FILE | WC_VARY_MSGCOUNT | WC_ASCII_MAP, - 0L, Gem_init_nhwindows, Gem_player_selection, Gem_askname, + 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + Gem_init_nhwindows, Gem_player_selection, Gem_askname, Gem_get_nh_event, Gem_exit_nhwindows, Gem_suspend_nhwindows, Gem_resume_nhwindows, Gem_create_nhwindow, Gem_clear_nhwindow, Gem_display_nhwindow, Gem_destroy_nhwindow, Gem_curs, Gem_putstr, diff --git a/win/gnome/gnbind.c b/win/gnome/gnbind.c index 43e067891..d23018cd8 100644 --- a/win/gnome/gnbind.c +++ b/win/gnome/gnbind.c @@ -24,7 +24,9 @@ extern NEARDATA winid WIN_STATUS; /* Interface definition, for windows.c */ struct window_procs Gnome_procs = { - "Gnome", WC_COLOR | WC_HILITE_PET | WC_INVERSE, 0L, gnome_init_nhwindows, + "Gnome", WC_COLOR | WC_HILITE_PET | WC_INVERSE, 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + gnome_init_nhwindows, gnome_player_selection, gnome_askname, gnome_get_nh_event, gnome_exit_nhwindows, gnome_suspend_nhwindows, gnome_resume_nhwindows, gnome_create_nhwindow, gnome_clear_nhwindow, gnome_display_nhwindow, diff --git a/win/share/safeproc.c b/win/share/safeproc.c index ab5cb1c5a..b0f75220a 100644 --- a/win/share/safeproc.c +++ b/win/share/safeproc.c @@ -67,6 +67,7 @@ struct window_procs safe_procs = { "safe-startup", 0L, 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ safe_init_nhwindows, safe_player_selection, safe_askname, safe_get_nh_event, safe_exit_nhwindows, safe_suspend_nhwindows, safe_resume_nhwindows, safe_create_nhwindow, safe_clear_nhwindow, safe_display_nhwindow, diff --git a/win/tty/termcap.c b/win/tty/termcap.c index 0e256ee91..4d2ac1f62 100644 --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -1282,6 +1282,9 @@ int color; 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) @@ -1316,7 +1319,7 @@ int color; return hilites[color] != (char *) 0; #endif } - +#endif /* 0 */ #endif /* TEXTCOLOR */ #endif /* TTY_GRAPHICS && !NO_TERMS */ diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 7c95bfc3f..475767ec4 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -97,6 +97,11 @@ struct window_procs tty_procs = { | WC2_RESET_STATUS #endif | WC2_DARKGRAY | WC2_SUPPRESS_HIST | WC2_STATUSLINES), +#ifdef TEXTCOLOR + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ +#else + {1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1}, +#endif tty_init_nhwindows, tty_player_selection, tty_askname, tty_get_nh_event, tty_exit_nhwindows, tty_suspend_nhwindows, tty_resume_nhwindows, tty_create_nhwindow, tty_clear_nhwindow, tty_display_nhwindow, From 0843c5d9225d43fe99478be33d4b2b2900081243 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 13:35:14 -0500 Subject: [PATCH 2/4] some dead code eliminations and a couple of documentation updates --- doc/fixes36.3 | 5 +++++ doc/window.doc | 4 ++++ sys/winnt/nttty.c | 2 +- win/tty/termcap.c | 38 -------------------------------------- 4 files changed, 10 insertions(+), 39 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 0f584ac0e..8fa4afc0a 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -315,6 +315,11 @@ clairvoyance showed all monsters in range, then after player viewed the map, 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 diff --git a/doc/window.doc b/doc/window.doc index da1790253..3758bf55b 100644 --- a/doc/window.doc +++ b/doc/window.doc @@ -663,6 +663,10 @@ port can access the fields directly. 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 diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index df817e6c9..8a52fb683 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -792,7 +792,7 @@ init_ttycolor() #if 0 int -has_color(int color) +has_color(int color) /* this function is commented out */ { #ifdef TEXTCOLOR if ((color >= 0) && (color < CLR_MAX)) diff --git a/win/tty/termcap.c b/win/tty/termcap.c index 4d2ac1f62..09a0be55e 100644 --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -1282,44 +1282,6 @@ int color; 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 */ From 31cfe76b67f37df3300f839c1e2193530e782a1d Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 15:05:48 -0500 Subject: [PATCH 3/4] build with TEXTCOLOR undef'd turned up a couple of things Also, one more has_color in obsolete sys/mac folder. Adjusted code. --- sys/mac/mttymain.c | 30 ++++++++++++++++++++++++++++++ sys/winnt/nttty.c | 2 -- win/tty/wintty.c | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/sys/mac/mttymain.c b/sys/mac/mttymain.c index 5231e84da..2cd59a9d2 100644 --- a/sys/mac/mttymain.c +++ b/sys/mac/mttymain.c @@ -269,6 +269,33 @@ _mt_init_stuff(void) clear_tty(_mt_window); InitMenuRes(); + + { + /* update the window proc has_color table */ + int i, setting = 0; + Rect r; +// Point p = {0, 0}; + GDHandle gh = (GDHandle) 0; + + if (_mt_in_color) { + GetWindowBounds(_mt_window, kWindowContentRgn, &r); +// SetPortWindowPort(_mt_window); +// LocalToGlobal (&p); +// OffsetRect (&r, p.h, p.v); + gh = GetMaxDevice(&r); + /* > 4 bpp */ + setting = ((*((*gh)->gdPMap))->pixelSize > 4) ? 1 : 0; + } + + for (i = 0; i < CLR_MAX ; ++i) { + tty_procs.has_color[i] = + (i == CLR_BLACK || i == NO_COLOR || i == CLR_WHITE) + ? 1 + : (_mt_in_color && gh) + ? setting + : 0; + } + } } int @@ -302,6 +329,8 @@ getreturn(char *str) (void) tgetch(); } +#if 0 /* this function is commented out */ +/* the tty has_color[] table is filled in during init above */ int has_color(int color) { @@ -327,6 +356,7 @@ has_color(int color) return (*((*gh)->gdPMap))->pixelSize > 4; /* > 4 bpp */ } +#endif void tty_delay_output(void) diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 8a52fb683..88aea5aad 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -715,7 +715,6 @@ tty_delay_output() } } -#ifdef TEXTCOLOR /* * CLR_BLACK 0 * CLR_RED 1 @@ -788,7 +787,6 @@ init_ttycolor() #endif init_ttycolor_completed = TRUE; } -#endif /* TEXTCOLOR */ #if 0 int diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 475767ec4..bcd039a71 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -4311,7 +4311,7 @@ unsigned long *bmarray; the condition where this gets used always has the same value */ #define condcolor(bm,bmarray) NO_COLOR #define term_start_color(color) /*empty*/ -#define term_end_color(color) /*empty*/ +#define term_end_color() /*empty*/ #endif /* TEXTCOLOR */ STATIC_OVL int From e8ef02d59764675e1fed04211f015c292666f905 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 30 Nov 2019 15:27:04 -0500 Subject: [PATCH 4/4] one more win_proc --- win/win32/mswproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 65a729891..f5da7136b 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -90,7 +90,9 @@ struct window_procs mswin_procs = { #ifdef STATUS_HILITES WC2_HITPOINTBAR | WC2_FLUSH_STATUS | WC2_RESET_STATUS | WC2_HILITE_STATUS | #endif - 0L, mswin_init_nhwindows, mswin_player_selection, mswin_askname, + 0L, + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + mswin_init_nhwindows, mswin_player_selection, mswin_askname, mswin_get_nh_event, mswin_exit_nhwindows, mswin_suspend_nhwindows, mswin_resume_nhwindows, mswin_create_nhwindow, mswin_clear_nhwindow, mswin_display_nhwindow, mswin_destroy_nhwindow, mswin_curs, mswin_putstr,