summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main-gcu.c4
-rw-r--r--src/main-gtk2.c5
-rw-r--r--src/main-sdl.c4
-rw-r--r--src/main-win.c4
-rw-r--r--src/main-x11.c4
-rw-r--r--src/z-term.c24
-rw-r--r--src/z-term.h9
7 files changed, 13 insertions, 41 deletions
diff --git a/src/main-gcu.c b/src/main-gcu.c
index 3e1d1ff0..b129770d 100644
--- a/src/main-gcu.c
+++ b/src/main-gcu.c
@@ -784,10 +784,6 @@ static errr term_data_init_gcu(term_data *td, int rows, int cols, int y, int x)
/* Avoid bottom right corner */
t->icky_corner = TRUE;
- /* Erase with "white space" */
- t->attr_blank = TERM_WHITE;
- t->char_blank = ' ';
-
/* Set some hooks */
t->init_hook = Term_init_gcu;
t->nuke_hook = Term_nuke_gcu;
diff --git a/src/main-gtk2.c b/src/main-gtk2.c
index bdf7f6a4..7bb1b14d 100644
--- a/src/main-gtk2.c
+++ b/src/main-gtk2.c
@@ -1271,10 +1271,7 @@ static errr term_data_init(term_data *td, int i)
/* Use a "soft" cursor */
t->soft_cursor = TRUE;
- /* Erase with "white space" */
- t->attr_blank = TERM_WHITE;
- t->char_blank = ' ';
-
+ /* Hooks */
t->xtra_hook = Term_xtra_gtk;
t->text_hook = Term_text_gtk;
t->wipe_hook = Term_wipe_gtk;
diff --git a/src/main-sdl.c b/src/main-sdl.c
index 7a534ad5..1ab89545 100644
--- a/src/main-sdl.c
+++ b/src/main-sdl.c
@@ -1767,10 +1767,6 @@ static errr term_data_init(term_data *td, int i)
/* Picture routine flags */
t->always_text = FALSE;
- /* Erase with "white space" */
- t->attr_blank = TERM_WHITE;
- t->char_blank = ' ';
-
/* Hooks */
t->xtra_hook = Term_xtra_sdl;
t->curs_hook = Term_curs_sdl;
diff --git a/src/main-win.c b/src/main-win.c
index 05742c86..2ca6704b 100644
--- a/src/main-win.c
+++ b/src/main-win.c
@@ -1697,10 +1697,6 @@ static void term_data_link(term_data *td)
/* Use a "software" cursor */
t->soft_cursor = TRUE;
- /* Erase with "white space" */
- t->attr_blank = TERM_WHITE;
- t->char_blank = ' ';
-
/* Prepare the template hooks */
t->xtra_hook = Term_xtra_win;
t->curs_hook = Term_curs_win;
diff --git a/src/main-x11.c b/src/main-x11.c
index 6d122744..ef828555 100644
--- a/src/main-x11.c
+++ b/src/main-x11.c
@@ -2476,10 +2476,6 @@ static errr term_data_init(term_data *td, int i)
/* Use a "soft" cursor */
t->soft_cursor = TRUE;
- /* Erase with "white space" */
- t->attr_blank = TERM_WHITE;
- t->char_blank = ' ';
-
/* Hooks */
t->xtra_hook = Term_xtra_x11;
t->curs_hook = Term_curs_x11;
diff --git a/src/z-term.c b/src/z-term.c
index de4a7b47..1a16b093 100644
--- a/src/z-term.c
+++ b/src/z-term.c
@@ -477,6 +477,11 @@ void Term_queue_chars(int x, int y, int n, byte a, cptr s)
}
+/*
+ * Blank attribute/character
+ */
+static const byte ATTR_BLANK = TERM_WHITE;
+static const char CHAR_BLANK = ' ';
/*
* Flush a row of the current window (see "Term_fresh")
@@ -503,7 +508,7 @@ static void Term_fresh_row_text(int y, int x1, int x2)
int fx = 0;
/* Pending attr */
- byte fa = Term->attr_blank;
+ byte fa = ATTR_BLANK;
byte oa;
char oc;
@@ -727,8 +732,8 @@ errr Term_fresh(void)
/* Handle "total erase" */
if (Term->total_erase)
{
- byte na = Term->attr_blank;
- char nc = Term->char_blank;
+ byte na = ATTR_BLANK;
+ char nc = CHAR_BLANK;
/* Physically erase the entire window */
Term_xtra(TERM_XTRA_CLEAR, 0);
@@ -1130,8 +1135,8 @@ errr Term_erase(int x, int y, int n)
int x1 = -1;
int x2 = -1;
- int na = Term->attr_blank;
- int nc = Term->char_blank;
+ int na = ATTR_BLANK;
+ int nc = CHAR_BLANK;
byte *scr_aa;
char *scr_cc;
@@ -1201,8 +1206,8 @@ errr Term_clear(void)
int w = Term->wid;
int h = Term->hgt;
- byte na = Term->attr_blank;
- char nc = Term->char_blank;
+ byte na = ATTR_BLANK;
+ char nc = CHAR_BLANK;
/* Cursor usable */
Term->scr->cu = 0;
@@ -1954,11 +1959,6 @@ errr term_init(term *t, int w, int h, int k)
t->total_erase = TRUE;
- /* Default "blank" */
- t->attr_blank = 0;
- t->char_blank = ' ';
-
-
/* Success */
return (0);
}
diff --git a/src/z-term.h b/src/z-term.h
index f4f52527..875f13bb 100644
--- a/src/z-term.h
+++ b/src/z-term.h
@@ -76,12 +76,6 @@ struct term_win
*
*
*
- * - Value "attr_blank"
- * Use this "attr" value for "blank" grids
- *
- * - Value "char_blank"
- * Use this "char" value for "blank" grids
- *
*
* - Ignore this pointer
*
@@ -134,9 +128,6 @@ struct term
bool_ soft_cursor;
bool_ always_text;
- byte attr_blank;
- char char_blank;
-
char *key_queue;
u16b key_head;
u16b key_tail;