From 5f7dbb1623f8ed4c8fdf2a1a5a7427d9fe78f88a Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sat, 6 Sep 2008 14:52:40 +0000 Subject: Fixing assertions from tileidx_unseen due to separation of tiles into different textures. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6893 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/libgui.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/libgui.cc') diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc index 2c2befc188..9176d7df09 100644 --- a/crawl-ref/source/libgui.cc +++ b/crawl-ref/source/libgui.cc @@ -56,9 +56,12 @@ int tile_idx_unseen_terrain(int x, int y, int what) unsigned short grid_color; get_item_symbol(feature, &grid_symbol, &grid_color); - int t = tileidx_feature(feature, gc.x, gc.y); + unsigned int t = tileidx_feature(feature, gc.x, gc.y); if (t == TILE_ERROR || what == ' ') - t = tileidx_unseen(what, gc); + { + unsigned int fg_dummy; + tileidx_unseen(fg_dummy, t, what, gc); + } t |= tile_unseen_flag(gc); @@ -146,7 +149,7 @@ void get_input_line_gui(char *const buff, int len) len = 1; /* Restrict the length */ - if (x + len > r->mx) + if (x + len > (int)r->mx) len = r->mx - x; if (len > 40) len = 40; -- cgit v1.2.3-54-g00ecf