diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-06-26 06:50:06 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-06-26 06:50:06 +0200 |
commit | ca71ccff098e4eec97480d2a08773a06629cc66e (patch) | |
tree | 631fad99f61bc6bdcd4ee516845a7d3791bc598d /src/util.cc | |
parent | 1f8b86786fd33ee3cbdc62bdf2f129dba793b429 (diff) |
Simplify PR_* redraw code and remove direct references to Term members
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/util.cc b/src/util.cc index e5f43ab6..bc539b5c 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1495,7 +1495,10 @@ void bell(void) Term_fresh(); /* Make a bell noise (if allowed) */ - if (ring_bell) Term_xtra(TERM_XTRA_NOISE, 0); + if (ring_bell) + { + Term_bell(); + } /* Flush the input (later!) */ flush(); @@ -2037,13 +2040,14 @@ void cmsg_print(byte color, cptr msg) static int p = 0; int n; + int wid; char *t; char buf[1024]; - int lim = Term->wid - 8; - + Term_get_size(&wid, nullptr); + int lim = wid - 8; /* Hack -- Reset */ if (!msg_flag) p = 0; @@ -2559,9 +2563,11 @@ void text_out_c(byte a, cptr str) void clear_from(int row) { int y; + int hgt; + Term_get_size(nullptr, &hgt); /* Erase requested rows */ - for (y = row; y < Term->hgt; y++) + for (y = row; y < hgt; y++) { /* Erase part of the screen */ Term_erase(0, y, 255); |