summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/directn.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-06 20:39:11 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-06 20:41:29 +0100
commitceb51161c896f17a951b0ba2bbd4b48f8fead13a (patch)
tree6fb22b76e7cda0eeb93e82db1d853f664765fc13 /crawl-ref/source/directn.cc
parentf858cfc60235a5cfb86dd2a2c510dde5e130a4bf (diff)
downloadcrawl-ref-ceb51161c896f17a951b0ba2bbd4b48f8fead13a.tar.gz
crawl-ref-ceb51161c896f17a951b0ba2bbd4b48f8fead13a.zip
Replace global see_cell by observe_cell and disambiguate old uses.
Calls to plain see_cell(pos) were replaced with either observe_cell(pos) or you.see_cell(pos). observe_cell where related to drawing the interface and messaging, you.see_cell for game mechanics, and one or the other in less clear cases (targetting, say).
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r--crawl-ref/source/directn.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index abd2fc1b13..a182b19556 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -308,7 +308,7 @@ static bool _mon_submerged_in_water(const monsters *mon)
return (false);
return (grd(mon->pos()) == DNGN_SHALLOW_WATER
- && see_cell(mon->pos())
+ && you.see_cell(mon->pos())
&& !mon->visible_to(&you)
&& !mons_flies(mon));
}
@@ -390,7 +390,7 @@ static void _direction_again(dist& moves, targetting_type restricts,
if (you.prev_grd_targ != coord_def(0, 0))
{
- if (!see_cell(you.prev_grd_targ))
+ if (!you.see_cell(you.prev_grd_targ))
{
moves.isCancel = true;
@@ -924,7 +924,7 @@ bool _dist_ok(const dist& moves, int range, targ_mode_type mode,
{
if (!moves.isCancel && moves.isTarget)
{
- if (!see_cell(moves.target))
+ if (!you.see_cell(moves.target))
{
mpr("Sorry, you can't target what you can't see.",
MSGCH_EXAMINE_FILTER);
@@ -1773,7 +1773,7 @@ std::string get_terse_square_desc(const coord_def &gc)
desc = you.your_name;
else if (!map_bounds(gc))
desc = unseen_desc;
- else if (!see_cell(gc))
+ else if (!observe_cell(gc))
{
if (is_terrain_seen(gc))
{
@@ -1809,7 +1809,7 @@ std::string get_terse_square_desc(const coord_def &gc)
void terse_describe_square(const coord_def &c, bool in_range)
{
- if (!see_cell(c))
+ if (!observe_cell(c))
_describe_oos_square(c);
else if (in_bounds(c) )
_describe_cell(c, in_range);
@@ -1821,7 +1821,7 @@ void get_square_desc(const coord_def &c, describe_info &inf,
// NOTE: Keep this function in sync with full_describe_square.
// Don't give out information for things outside LOS
- if (!see_cell(c))
+ if (!observe_cell(c))
return;
const monsters* mons = monster_at(c);
@@ -1864,7 +1864,7 @@ void full_describe_square(const coord_def &c)
// NOTE: Keep this function in sync with get_square_desc.
// Don't give out information for things outside LOS
- if (!see_cell(c))
+ if (!observe_cell(c))
return;
const monsters* mons = monster_at(c);