summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/los.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/los.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/los.cc')
-rw-r--r--crawl-ref/source/los.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc
index 408d5e9ff0..6c0eb0936a 100644
--- a/crawl-ref/source/los.cc
+++ b/crawl-ref/source/los.cc
@@ -696,7 +696,7 @@ dungeon_feature_type ray_blocker(const coord_def& source,
if (!find_ray(source, target, ray, opc_default))
{
ASSERT (false);
- return (NUM_REAL_FEATURES);
+ return (NUM_FEATURES);
}
ray.advance();
@@ -709,7 +709,7 @@ dungeon_feature_type ray_blocker(const coord_def& source,
ray.advance();
}
ASSERT (false);
- return (NUM_REAL_FEATURES);
+ return (NUM_FEATURES);
}
// Returns a straight ray from source to target.
@@ -1001,7 +1001,7 @@ void calc_show_los()
{
if (!crawl_state.arena && !crawl_state.arena_suspended)
{
- losight(env.show, you.pos());
+ losight(env.show_los, you.pos());
// What would be visible, if all of the translucent walls were
// made opaque.
@@ -1010,7 +1010,7 @@ void calc_show_los()
}
else
{
- losight_permissive(env.show, crawl_view.glosc());
+ losight_permissive(env.show_los, crawl_view.glosc());
}
}
@@ -1036,7 +1036,7 @@ bool see_cell(const coord_def &p)
{
return (((crawl_state.arena || crawl_state.arena_suspended)
&& crawl_view.in_grid_los(p))
- || see_cell(env.show, you.pos(), p));
+ || see_cell(env.show_los, you.pos(), p));
}
// Answers the question: "Would a cell be within character's line of sight,