windows console changes - eliminate *key.dll

Incorporate the functionality of the loadable DLL's (nhraykey.dll,
nhdefkey.dll, and nh340key.dll) into the consoletty.c code and
remove the dll building
This commit is contained in:
nhmall
2021-11-16 15:27:33 -05:00
parent 6c8a03aa44
commit 0a97cc5c5e
22 changed files with 1358 additions and 1928 deletions

View File

@@ -1746,6 +1746,7 @@ extern void set_output_mode(int);
extern void synch_cursor(void);
extern void nethack_enter_consoletty(void);
extern void consoletty_exit(void);
extern int set_keyhandling_via_option(void);
#endif /* WIN32 */
/* ### o_init.c ### */

View File

@@ -157,6 +157,14 @@ enum getloc_filters {
NUM_GFILTER
};
#ifdef WIN32
enum windows_key_handling {
default_keyhandling,
ray_keyhandling,
nh340_keyhandling
};
#endif
struct debug_flags {
boolean test;
#ifdef TTY_GRAPHICS
@@ -364,8 +372,9 @@ struct instance_flags {
int wc2_windowborders; /* display borders on NetHack windows */
int wc2_petattr; /* text attributes for pet */
#ifdef WIN32
#define MAX_ALTKEYHANDLER 25
char altkeyhandler[MAX_ALTKEYHANDLER];
#define MAX_ALTKEYHANDLING 25
char altkeyhandling[MAX_ALTKEYHANDLING];
enum windows_key_handling key_handling;
#endif
/* copies of values in struct u, used during detection when the
originals are temporarily cleared; kept here rather than

View File

@@ -88,8 +88,8 @@ opt_##a,
"message window alignment")
NHOPTC(align_status, 20, opt_in, set_gameview, No, Yes, No, Yes, NoAlias,
"status window alignment")
NHOPTC(altkeyhandler, 20, opt_in, set_in_game, No, Yes, No, No, NoAlias,
"alternate key handler")
NHOPTC(altkeyhandling, 20, opt_in, set_in_game, No, Yes, No, Yes,
"altkeyhandler", "alternative key handling")
#ifdef ALTMETA
NHOPTB(altmeta, 0, opt_out, set_in_game, Off, Yes, No, No, NoAlias,
&iflags.altmeta)

View File

@@ -229,7 +229,7 @@ extern void consoletty_preference_update(const char *);
extern void toggle_mouse_support(void);
extern void map_subkeyvalue(char *);
#if defined(WIN32CON)
extern void set_altkeyhandler(const char *);
extern void set_altkeyhandling(const char *);
#endif
extern void raw_clear_screen(void);