some tty updates
Add a note about NO_TERMS to include/wintty.h for clarity. Rename tty_startup and tty_shutdown to term_startup() and term_shutdown(). They are found in termcap.c for !NO_TERMS like most of the other term_ routines, as well as having versions for several of the NO_TERMS platforms. They aren't part of the tty_interface called from the core. The tty implementation does call and rely on them. Remove some conditional #ifdef's around term_shutdown() (formerly tty_shutdown()) and just ensure that all the tty platforms have an implementation that they can link with, even if it is just a stub presently. Put the protype for nethack_exit in extern.h to reduce maintenance to a single spot, and remove it from other locations. A warning in the msdos cross-compile led to this change.
This commit is contained in:
+58
-3
@@ -146,6 +146,61 @@ boolean traditional = FALSE; /* traditional TTY character mode */
|
||||
boolean inmap = FALSE; /* in the map window */
|
||||
char ttycolors[CLR_MAX]; /* also used/set in options.c */
|
||||
|
||||
/* for linkage from wintty.c */
|
||||
|
||||
void
|
||||
term_shutdown(void)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef ASCIIGRAPH
|
||||
void
|
||||
graph_on(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
graph_off(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
term_curs_set(int visibility)
|
||||
{
|
||||
static int vis = -1;
|
||||
|
||||
if (vis == visibility)
|
||||
return;
|
||||
|
||||
if (!visibility) {
|
||||
if (!iflags.grmode) {
|
||||
txt_hide_cursor();
|
||||
#ifdef SCREEN_VGA
|
||||
} else if (iflags.usevga) {
|
||||
vga_hide_cursor();
|
||||
#endif
|
||||
#ifdef SCREEN_VESA
|
||||
} else if (iflags.usevesa) {
|
||||
vesa_hide_cursor();
|
||||
}
|
||||
#endif
|
||||
} else if (visibility) {
|
||||
if (!iflags.grmode) {
|
||||
txt_show_cursor();
|
||||
#ifdef SCREEN_VGA
|
||||
} else if (iflags.usevga) {
|
||||
vga_show_cursor();
|
||||
#endif
|
||||
#ifdef SCREEN_VESA
|
||||
} else if (iflags.usevesa) {
|
||||
vesa_show_cursor();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
vis = visibility;
|
||||
}
|
||||
|
||||
void
|
||||
backsp(void)
|
||||
{
|
||||
@@ -447,7 +502,7 @@ tty_number_pad(int state)
|
||||
}
|
||||
|
||||
void
|
||||
tty_startup(int *wid, int *hgt)
|
||||
term_startup(int *wid, int *hgt)
|
||||
{
|
||||
/* code to sense display adapter is required here - MJA */
|
||||
|
||||
@@ -461,12 +516,12 @@ tty_startup(int *wid, int *hgt)
|
||||
|
||||
#ifdef SCREEN_VGA
|
||||
if (iflags.usevga) {
|
||||
vga_tty_startup(wid, hgt);
|
||||
vga_term_startup(wid, hgt);
|
||||
} else
|
||||
#endif
|
||||
#ifdef SCREEN_VESA
|
||||
if (iflags.usevesa) {
|
||||
vesa_tty_startup(wid, hgt);
|
||||
vesa_term_startup(wid, hgt);
|
||||
} else
|
||||
#endif
|
||||
txt_startup(wid, hgt);
|
||||
|
||||
Reference in New Issue
Block a user