From 8d59ecb644b434baad4575f55bd66d93b4f3a4c1 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Mon, 3 Dec 2007 21:30:28 +0000 Subject: 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 --- crawl-ref/source/libunix.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/libunix.cc') 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(); } -- cgit v1.2.3-54-g00ecf