From ee653d2656b747a8b8426fafc55c7c1cff008871 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 7 Jun 2007 17:32:26 +0000 Subject: Added support for Unicode characters in the map display with ncursesw (enabled by setting UNICODE_GLYPHS=y in makefile.unix). Removed the (1,1) offset between map and grid. Both map and grid are now in sync. Store object indexes instead of raw characters in env.map so that players can change charsets and have the display update immediately. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1552 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/format.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/format.cc') diff --git a/crawl-ref/source/format.cc b/crawl-ref/source/format.cc index d8942e5d08..390133f3d5 100644 --- a/crawl-ref/source/format.cc +++ b/crawl-ref/source/format.cc @@ -236,7 +236,8 @@ int formatted_string::find_last_colour() const void formatted_string::add_glyph(const item_def *item) { const int last_col = find_last_colour(); - unsigned short ch, col; + unsigned ch; + unsigned short col; get_item_glyph(item, &ch, &col); this->textcolor(col); this->cprintf("%c", ch); @@ -246,7 +247,8 @@ void formatted_string::add_glyph(const item_def *item) void formatted_string::add_glyph(const monsters *mons) { const int last_col = find_last_colour(); - unsigned short ch, col; + unsigned ch; + unsigned short col; get_mons_glyph(mons, &ch, &col); this->textcolor(col); this->cprintf("%c", ch); -- cgit v1.2.3-54-g00ecf