From 62f7040f14b39e67042be98f951575fbc819e84e Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sat, 5 Jan 2008 01:33:53 +0000 Subject: Tiles! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells2.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'crawl-ref/source/spells2.cc') diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 80dbdbb276..ac94743fda 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -49,6 +49,7 @@ #include "spells4.h" #include "spl-cast.h" #include "stuff.h" +#include "tiles.h" #include "terrain.h" #include "traps.h" #include "view.h" @@ -119,6 +120,11 @@ unsigned char detect_items( int pow ) set_envmap_obj(i, j, DNGN_ITEM_DETECTED); set_envmap_detected_item(i, j); +#ifdef USE_TILE + // Don't replace previously seen items with an unseen one. + if (!is_terrain_seen(i,j)) + tile_place_tile_bk(i, j, TILE_UNSEEN_ITEM); +#endif } } } @@ -147,6 +153,11 @@ static void fuzz_detect_creatures(int pow, int *fuzz_radius, int *fuzz_chance) static bool mark_detected_creature(int gridx, int gridy, const monsters *mon, int fuzz_chance, int fuzz_radius) { +#ifdef USE_TILE + // Get monster index pre-fuzz + int idx = mgrd[gridx][gridy]; +#endif + bool found_good = false; if (fuzz_radius && fuzz_chance > random2(100)) @@ -177,6 +188,10 @@ static bool mark_detected_creature(int gridx, int gridy, const monsters *mon, set_envmap_obj(gridx, gridy, mon->type + DNGN_START_OF_MONSTERS); set_envmap_detected_mons(gridx, gridy); +#ifdef USE_TILE + tile_place_monster(gridx, gridy, idx, false); +#endif + return found_good; } -- cgit v1.2.3-54-g00ecf