summaryrefslogtreecommitdiff
path: root/src/z-term.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2014-06-05 21:03:45 +0200
committerBardur Arantsson <bardur@scientician.net>2014-06-27 08:01:59 +0200
commitf161bba68c00185721371cec291b2276f7daa04e (patch)
treea8e78f9453ca791f5b4cf8193e99aa2072e9a1b8 /src/z-term.c
parentf50ed5b5c1e3caa38a5409cc22ea53fefd5c1209 (diff)
Remove unused Term_exchange()
Diffstat (limited to 'src/z-term.c')
-rw-r--r--src/z-term.c90
1 files changed, 1 insertions, 89 deletions
diff --git a/src/z-term.c b/src/z-term.c
index ae8fc7ea..a2fb8fae 100644
--- a/src/z-term.c
+++ b/src/z-term.c
@@ -160,8 +160,7 @@
* The new formalism includes a "displayed" screen image (old) which
* is actually seen by the user, a "requested" screen image (scr)
* which is being prepared for display, a "memorized" screen image
- * (mem) which is used to save and restore screen images, and a
- * "temporary" screen image (tmp) which is currently unused.
+ * (mem) which is used to save and restore screen images.
*
*
* Several "flags" are available in each "term" to allow the underlying
@@ -2287,50 +2286,6 @@ errr Term_load_from(term_win *save, bool_ final)
}
/*
- * Exchange the "requested" screen with the "tmp" screen
- */
-errr Term_exchange(void)
-{
- int y;
-
- int w = Term->wid;
- int h = Term->hgt;
-
- term_win *exchanger;
-
-
- /* Create */
- if (!Term->tmp)
- {
- /* Allocate window */
- Term->tmp = safe_calloc(1, sizeof(struct term_win));
-
- /* Initialize window */
- term_win_init(Term->tmp, w, h);
- }
-
- /* Swap */
- exchanger = Term->scr;
- Term->scr = Term->tmp;
- Term->tmp = exchanger;
-
- /* Assume change */
- for (y = 0; y < h; y++)
- {
- /* Assume change */
- Term->x1[y] = 0;
- Term->x2[y] = w - 1;
- }
-
- /* Assume change */
- Term->y1 = 0;
- Term->y2 = h - 1;
-
- /* Success */
- return (0);
-}
-
-/*
* React to a new physical window size.
*/
errr Term_resize(int w, int h)
@@ -2345,7 +2300,6 @@ errr Term_resize(int w, int h)
term_win *hold_old;
term_win *hold_scr;
term_win *hold_mem;
- term_win *hold_tmp;
/* Resizing is forbidden */
if (Term->fixed_shape) return ( -1);
@@ -2375,9 +2329,6 @@ errr Term_resize(int w, int h)
/* Save old window */
hold_mem = Term->mem;
- /* Save old window */
- hold_tmp = Term->tmp;
-
/* Create new scanners */
Term->x1 = safe_calloc(h, sizeof(byte));
Term->x2 = safe_calloc(h, sizeof(byte));
@@ -2413,19 +2364,6 @@ errr Term_resize(int w, int h)
term_win_copy(Term->mem, hold_mem, wid, hgt);
}
- /* If needed */
- if (hold_tmp)
- {
- /* Create new window */
- Term->tmp = safe_calloc(1, sizeof(struct term_win));
-
- /* Initialize new window */
- term_win_init(Term->tmp, w, h);
-
- /* Save the contents */
- term_win_copy(Term->tmp, hold_tmp, wid, hgt);
- }
-
/* Free some arrays */
free(hold_x1);
hold_x1 = NULL;
@@ -2469,21 +2407,6 @@ errr Term_resize(int w, int h)
if (Term->mem->cy >= h) Term->mem->cu = 1;
}
- /* If needed */
- if (hold_tmp)
- {
- /* Nuke */
- term_win_nuke(hold_tmp, Term->wid, Term->hgt);
-
- /* Kill */
- free(hold_tmp);
- hold_tmp = NULL;
-
- /* Illegal cursor */
- if (Term->tmp->cx >= w) Term->tmp->cu = 1;
- if (Term->tmp->cy >= h) Term->tmp->cu = 1;
- }
-
/* Save new size */
Term->wid = w;
Term->hgt = h;
@@ -2604,17 +2527,6 @@ errr term_nuke(term *t)
t->mem = NULL;
}
- /* If needed */
- if (t->tmp)
- {
- /* Nuke "temporary" */
- term_win_nuke(t->tmp, w, h);
-
- /* Kill "temporary" */
- free(t->tmp);
- t->tmp = NULL;
- }
-
/* Free some arrays */
free(t->x1);
t->x1 = NULL;