diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-03 21:30:28 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-03 21:30:28 +0000 |
commit | 8d59ecb644b434baad4575f55bd66d93b4f3a4c1 (patch) | |
tree | 59fe16599b03406a95de1bf9c0ee01079fef5830 /crawl-ref/source/libunix.cc | |
parent | 38e77f4ea4395ed90f12e880224e5bd378113602 (diff) | |
download | crawl-ref-8d59ecb644b434baad4575f55bd66d93b4f3a4c1.tar.gz crawl-ref-8d59ecb644b434baad4575f55bd66d93b4f3a4c1.zip |
Merged fix for IBM graphics glitches on Unix from 0.3 (2990-2991).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2992 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libunix.cc')
-rw-r--r-- | crawl-ref/source/libunix.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc index 0792189fd0..ba28a4039c 100644 --- a/crawl-ref/source/libunix.cc +++ b/crawl-ref/source/libunix.cc @@ -600,7 +600,7 @@ int window(int x1, int y1, int x2, int y2) // textcolour and drawing a character and call set_altcharset(false) // after you're done drawing. // -int cset_adjust(int raw) +unsigned cset_adjust(unsigned raw) { if (Options.char_set != CSET_ASCII && Options.char_set != CSET_UNICODE) { @@ -617,6 +617,13 @@ int cset_adjust(int raw) return (raw); } +void put_colour_ch(int colour, unsigned ch) +{ + ch = cset_adjust(ch); + textattr(colour); + putwch(ch); +} + void puttext(int x1, int y1, int x2, int y2, const screen_buffer_t *buf) { const bool will_scroll = (x2 == get_number_of_cols()); @@ -635,7 +642,6 @@ void puttext(int x1, int y1, int x2, int y2, const screen_buffer_t *buf) buf += 2; } } - set_altcharset(false); update_screen(); if (will_scroll) @@ -649,6 +655,7 @@ void puttext(int x1, int y1, int x2, int y2, const screen_buffer_t *buf) // C++ string class. -- bwr void update_screen(void) { + set_altcharset(false); refresh(); } |