From ceb51161c896f17a951b0ba2bbd4b48f8fead13a Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Fri, 6 Nov 2009 20:39:11 +0100 Subject: 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). --- crawl-ref/source/terrain.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'crawl-ref/source/terrain.cc') diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc index 75b60c41c0..a094d03537 100644 --- a/crawl-ref/source/terrain.cc +++ b/crawl-ref/source/terrain.cc @@ -722,7 +722,7 @@ void dungeon_terrain_changed(const coord_def &pos, unnotice_feature(level_pos(level_id::current(), pos)); grd(pos) = nfeat; env.grid_colours(pos) = BLACK; - if (is_notable_terrain(nfeat) && see_cell(pos)) + if (is_notable_terrain(nfeat) && observe_cell(pos)) seen_notable_thing(nfeat, pos); // Don't destroy a trap which was just placed. @@ -745,7 +745,7 @@ static void _announce_swap_real(coord_def orig_pos, coord_def dest_pos) const std::string orig_name = feature_description(dest_pos, false, - see_cell(orig_pos) ? DESC_CAP_THE : DESC_CAP_A, + observe_cell(orig_pos) ? DESC_CAP_THE : DESC_CAP_A, false); std::string prep = feat_preposition(orig_feat, false); @@ -769,13 +769,13 @@ static void _announce_swap_real(coord_def orig_pos, coord_def dest_pos) std::ostringstream str; str << orig_name << " "; - if (see_cell(orig_pos) && !see_cell(dest_pos)) + if (observe_cell(orig_pos) && !observe_cell(dest_pos)) { str << "suddenly disappears"; if (!orig_actor.empty()) str << " from " << prep << " " << orig_actor; } - else if (!see_cell(orig_pos) && see_cell(dest_pos)) + else if (!observe_cell(orig_pos) && observe_cell(dest_pos)) { str << "suddenly appears"; if (!dest_actor.empty()) @@ -795,7 +795,7 @@ static void _announce_swap_real(coord_def orig_pos, coord_def dest_pos) static void _announce_swap(coord_def pos1, coord_def pos2) { - if (!see_cell(pos1) && !see_cell(pos2)) + if (!observe_cell(pos1) && !observe_cell(pos2)) return; const dungeon_feature_type feat1 = grd(pos1); @@ -804,8 +804,8 @@ static void _announce_swap(coord_def pos1, coord_def pos2) if (feat1 == feat2) return; - const bool notable_seen1 = is_notable_terrain(feat1) && see_cell(pos1); - const bool notable_seen2 = is_notable_terrain(feat2) && see_cell(pos2); + const bool notable_seen1 = is_notable_terrain(feat1) && observe_cell(pos1); + const bool notable_seen2 = is_notable_terrain(feat2) && observe_cell(pos2); coord_def orig_pos, dest_pos; if (notable_seen1 && notable_seen2) @@ -817,7 +817,7 @@ static void _announce_swap(coord_def pos1, coord_def pos2) _announce_swap_real(pos2, pos1); else if (notable_seen2) _announce_swap_real(pos1, pos2); - else if (see_cell(pos2)) + else if (observe_cell(pos2)) _announce_swap_real(pos1, pos2); else _announce_swap_real(pos2, pos1); @@ -835,13 +835,13 @@ bool swap_features(const coord_def &pos1, const coord_def &pos2, const dungeon_feature_type feat1 = grd(pos1); const dungeon_feature_type feat2 = grd(pos2); - if (is_notable_terrain(feat1) && !see_cell(pos1) + if (is_notable_terrain(feat1) && !observe_cell(pos1) && is_terrain_known(pos1)) { return (false); } - if (is_notable_terrain(feat2) && !see_cell(pos2) + if (is_notable_terrain(feat2) && !observe_cell(pos2) && is_terrain_known(pos2)) { return (false); -- cgit v1.2.3-54-g00ecf