diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-05 01:33:53 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-05 01:33:53 +0000 |
commit | 62f7040f14b39e67042be98f951575fbc819e84e (patch) | |
tree | d4fa0598a1bee1d34fff81e2c150de08c2256753 /crawl-ref/source/spells2.cc | |
parent | 19155f1f85058ef9d65d11e60c63cc69c36d4e8a (diff) | |
download | crawl-ref-62f7040f14b39e67042be98f951575fbc819e84e.tar.gz crawl-ref-62f7040f14b39e67042be98f951575fbc819e84e.zip |
Tiles!
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r-- | crawl-ref/source/spells2.cc | 15 |
1 files changed, 15 insertions, 0 deletions
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; } |