From a6ba15c18bfc465daecb5390ad73f0a0f3df940b Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sat, 3 Jan 2009 19:08:20 +0000 Subject: [2483338] Fixing tiles crash during 'Detect Items' spell. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8174 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells2.cc | 2 +- crawl-ref/source/tilepick.cc | 9 --------- crawl-ref/source/tiles.h | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 217bb6164f..9577310ebb 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -102,7 +102,7 @@ int detect_items( int pow ) #ifdef USE_TILE // Don't replace previously seen items with an unseen one. if (!is_terrain_seen(*ri)) - tile_place_item_bk(ri->x, ri->y, TILE_UNSEEN_ITEM); + env.tile_bk_fg[ri->x][ri->y] = TILE_UNSEEN_ITEM; #endif } } diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 6132d33d30..3c9387a230 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -4297,15 +4297,6 @@ void tile_place_item(int x, int y, int idx) env.tile_bg[x-1][y-1] |= TILE_FLAG_CURSOR3; } -void tile_place_item_bk(int gx, int gy, int idx) -{ - int t = tileidx_item(mitm[idx]); - env.tile_bk_fg[gx][gy] = t; - - if (item_needs_autopickup(mitm[idx])) - env.tile_bk_bg[gx][gy] |= TILE_FLAG_CURSOR3; -} - // Called from item() in view.cc void tile_place_item_marker(int x, int y, int idx) { diff --git a/crawl-ref/source/tiles.h b/crawl-ref/source/tiles.h index b3ce5cf2cf..e1bbd5ff9d 100644 --- a/crawl-ref/source/tiles.h +++ b/crawl-ref/source/tiles.h @@ -79,7 +79,6 @@ void tile_draw_floor(); void tile_place_monster(int gx, int gy, int idx, bool foreground = true, bool detected = false); void tile_place_item(int x, int y, int idx); -void tile_place_item_bk(int gx, int gy, int idx); void tile_place_item_marker(int x, int y, int idx); void tile_place_cloud(int x, int y, int type, int decay); void tile_place_ray(const coord_def& gc, bool in_range); -- cgit v1.2.3-54-g00ecf