summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-04 10:04:17 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-04 16:50:18 +0100
commit6f10cd2574eeb8a1417eff84718edd309287ac0d (patch)
tree69a45fe0e35cb559a3285b08697c96c230fc0c0f /crawl-ref/source/spells2.cc
parent9ad85435681ad82c7ef07d2083e40e525e2b0f55 (diff)
downloadcrawl-ref-6f10cd2574eeb8a1417eff84718edd309287ac0d.tar.gz
crawl-ref-6f10cd2574eeb8a1417eff84718edd309287ac0d.zip
Get rid of multiple-meaning "int object" in env.show.
env.show is now a class show_def that stores tagged unions of type show_type. For the moment, there's also env.show_los for use in LOS determination, but that should become an array of boolean at some point. This breaks save compatibility. Tiles and console version build and appear to work fine, but this kind of change is likely to have some side-effects.
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 660c5de06f..8d857c3f10 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -68,7 +68,7 @@ int detect_traps(int pow)
{
traps_found++;
trap.reveal();
- set_envmap_obj(trap.pos, grd(trap.pos));
+ set_envmap_obj(trap.pos, show_type(grd(trap.pos)));
set_terrain_mapped(trap.pos);
}
}
@@ -95,7 +95,7 @@ int detect_items(int pow)
{
items_found++;
- set_envmap_obj(*ri, DNGN_ITEM_DETECTED);
+ set_envmap_obj(*ri, show_type(SHOW_ITEM_DETECTED));
set_envmap_detected_item(*ri);
#ifdef USE_TILE
// Don't replace previously seen items with an unseen one.
@@ -170,7 +170,7 @@ static bool _mark_detected_creature(coord_def where, const monsters *mon,
where = place;
}
- set_envmap_obj(where, mon->type + DNGN_START_OF_MONSTERS);
+ set_envmap_obj(where, show_type(mon));
set_envmap_detected_mons(where);
#ifdef USE_TILE