summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
committerBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
commit0630934308c31d6c459bbf3a2c07e6f142dcbcb8 (patch)
tree14e589469b79e3f03524c11edef97ff7c56ba5fa
parent1d45c4a36e0e757120ba69a38b3f8e96749a65ee (diff)
Remove effectively dead TERM_XTRA_* handling code
- We remove TERM_XTRA_ALIVE and the corresponding code because there's no code which actually invokes this hook. - We remove TERM_XTRA_SHAPE since there's no actual handler code for this in any of the front ends -- therefore invoking these hooks can have no effect in the existing code.
-rw-r--r--src/main-gcu.c64
-rw-r--r--src/main-gtk2.c4
-rw-r--r--src/main-sdl.c83
-rw-r--r--src/z-term.cc15
-rw-r--r--src/z-term.h2
5 files changed, 0 insertions, 168 deletions
diff --git a/src/main-gcu.c b/src/main-gcu.c
index d31beb21..ac7c5f94 100644
--- a/src/main-gcu.c
+++ b/src/main-gcu.c
@@ -431,62 +431,6 @@ static void keymap_game_prepare(void)
/*
- * Suspend/Resume
- */
-static void Term_xtra_gcu_alive(int v)
-{
- int x, y;
-
-
- /* Suspend */
- if (!v)
- {
- /* Go to normal keymap mode */
- keymap_norm();
-
- /* Restore modes */
- noraw();
- echo();
- nl();
-
- /* Hack -- make sure the cursor is visible */
- Term_xtra(TERM_XTRA_SHAPE, 1);
-
- /* Flush the curses buffer */
- (void)refresh();
-
- /* Get current cursor position */
- getyx(curscr, y, x);
-
- /* Move the cursor to bottom right corner */
- mvcur(y, x, LINES - 1, 0);
-
- /* Exit curses */
- endwin();
-
- /* Flush the output */
- (void)fflush(stdout);
- }
-
- /* Resume */
- else
- {
- /* Refresh */
- /* (void)touchwin(curscr); */
- /* (void)wrefresh(curscr); */
-
- /* Restore the settings */
- raw();
- noecho();
- nonl();
-
- /* Go to angband keymap mode */
- keymap_game();
- }
-}
-
-
-/*
* Init the "curses" system
*/
static void Term_init_gcu(void *data)
@@ -524,9 +468,6 @@ static void Term_nuke_gcu(void *data)
/* Count nuke's, handle last */
if (--active != 0) return;
- /* Hack -- make sure the cursor is visible */
- Term_xtra(TERM_XTRA_SHAPE, 1);
-
#ifdef A_COLOR
/* Reset colors to defaults */
start_color();
@@ -657,11 +598,6 @@ static void Term_xtra_gcu(void *data, int n, int v)
(void)wrefresh(td->win);
return;
- /* Suspend/Resume curses */
- case TERM_XTRA_ALIVE:
- Term_xtra_gcu_alive(v);
- return;
-
/* Process events */
case TERM_XTRA_EVENT:
Term_xtra_gcu_event(v);
diff --git a/src/main-gtk2.c b/src/main-gtk2.c
index 5be979be..5c67ca4d 100644
--- a/src/main-gtk2.c
+++ b/src/main-gtk2.c
@@ -480,10 +480,6 @@ static void Term_xtra_gtk(void *term_data_ctx, int n, int v)
return;
}
- /* Handle change in the "level" */
- case TERM_XTRA_LEVEL:
- return;
-
/* Clear the screen */
case TERM_XTRA_CLEAR:
Term_clear_gtk(td);
diff --git a/src/main-sdl.c b/src/main-sdl.c
index ea6adea1..af54708c 100644
--- a/src/main-sdl.c
+++ b/src/main-sdl.c
@@ -551,21 +551,6 @@ static void Term_xtra_sdl(void *data, int n, int v)
return;
}
- case TERM_XTRA_SHAPE:
- {
- /*
- * Set the cursor visibility XXX XXX XXX
- *
- * This action should change the visibility of the cursor,
- * if possible, to the requested value (0=off, 1=on)
- *
- * This action is optional, but can improve both the
- * efficiency (and attractiveness) of the program.
- */
-
- return;
- }
-
case TERM_XTRA_FRESH:
{
/*
@@ -590,18 +575,6 @@ static void Term_xtra_sdl(void *data, int n, int v)
return;
}
- case TERM_XTRA_NOISE:
- {
- /*
- * Make a noise XXX XXX XXX
- *
- * This action should produce a "beep" noise.
- *
- * This action is optional, but convenient.
- */
- return;
- }
-
case TERM_XTRA_BORED:
{
/* Perform event checking without blocking */
@@ -611,62 +584,6 @@ static void Term_xtra_sdl(void *data, int n, int v)
}
return;
}
-
- case TERM_XTRA_REACT:
- {
- /*
- * React to global changes XXX XXX XXX
- *
- * For example, this action can be used to react to
- * changes in the global "color_table[256][4]" array.
- *
- * This action is optional, but can be very useful for
- * handling "color changes" and the "arg_sound" and/or
- * "arg_graphics" options.
- */
- return;
- }
-
- case TERM_XTRA_ALIVE:
- {
- /*
- * Change the "hard" level XXX XXX XXX
- *
- * This action is used if the program changes "aliveness"
- * by being either "suspended" (v=0) or "resumed" (v=1)
- * This action is optional, unless the computer uses the
- * same "physical screen" for multiple programs, in which
- * case this action should clean up to let other programs
- * use the screen, or resume from such a cleaned up state.
- *
- * This action is currently only used by "main-gcu.c",
- * on UNIX machines, to allow proper "suspending".
- */
-
- return;
- }
-
- case TERM_XTRA_LEVEL:
- {
- /*
- * Change the "soft" level XXX XXX XXX
- *
- * This action is used when the term window changes "activation"
- * either by becoming "inactive" (v=0) or "active" (v=1)
- *
- * This action can be used to do things like activate the proper
- * font / drawing mode for the newly active term window. This
- * action should NOT change which window has the "focus", which
- * window is "raised", or anything like that.
- *
- * This action is optional if all the other things which depend
- * on what term is active handle activation themself, or if only
- * one "term_data" structure is supported by this file.
- */
-
- return;
- }
-
}
}
diff --git a/src/z-term.cc b/src/z-term.cc
index 459430c3..d187a7ff 100644
--- a/src/z-term.cc
+++ b/src/z-term.cc
@@ -1006,18 +1006,6 @@ void Term_fresh()
}
}
- /* Cursor Update -- Erase old Cursor */
- else
- {
- /* Cursor will be invisible */
- if (scr->cu || !scr->cv)
- {
- /* Make the cursor invisible */
- Term_xtra(TERM_XTRA_SHAPE, 0);
- }
- }
-
-
/* Something to update */
if (y1 <= y2)
{
@@ -1100,9 +1088,6 @@ void Term_fresh()
{
/* Put the cursor where it belongs */
do_curs_hook(scr->cx, scr->cy);
-
- /* Make the cursor visible */
- Term_xtra(TERM_XTRA_SHAPE, 1);
}
}
diff --git a/src/z-term.h b/src/z-term.h
index 81ce76be..20512357 100644
--- a/src/z-term.h
+++ b/src/z-term.h
@@ -105,12 +105,10 @@ typedef void(resize_hook_t)();
#define TERM_XTRA_EVENT 1 /* Process some pending events */
#define TERM_XTRA_FLUSH 2 /* Flush all pending events */
#define TERM_XTRA_CLEAR 3 /* Clear the entire window */
-#define TERM_XTRA_SHAPE 4 /* Set cursor shape (optional) */
#define TERM_XTRA_FRESH 6 /* Flush all rows (optional) */
#define TERM_XTRA_NOISE 7 /* Make a noise (optional) */
#define TERM_XTRA_BORED 9 /* Handle stuff when bored (optional) */
#define TERM_XTRA_REACT 10 /* React to global changes (optional) */
-#define TERM_XTRA_ALIVE 11 /* Change the "hard" level (optional) */
#define TERM_XTRA_LEVEL 12 /* Change the "soft" level (optional) */
#define TERM_XTRA_RENAME_MAIN_WIN 16 /* Rename the main game window */