summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-15 10:02:19 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-15 10:02:19 +0000
commitcf4b68bb3c2e5d1955d41fff7284a7d56a484b3f (patch)
treefb403a4d82b266bec7478b92b75b513c55acdb59 /crawl-ref/source/travel.cc
parentbc30076f91a48a0e05a88317d2048f7bcafc06c7 (diff)
downloadcrawl-ref-cf4b68bb3c2e5d1955d41fff7284a7d56a484b3f.tar.gz
crawl-ref-cf4b68bb3c2e5d1955d41fff7284a7d56a484b3f.zip
Various cleanups, mostly having to do with coord_def().
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9086 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r--crawl-ref/source/travel.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 6452eaf2c4..6f981823da 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -224,7 +224,7 @@ bool is_altar(dungeon_feature_type grid)
bool is_altar(const coord_def &c)
{
- return is_altar(grd[c.x][c.y]);
+ return is_altar(grd(c));
}
inline bool is_player_altar(dungeon_feature_type grid)
@@ -236,7 +236,7 @@ inline bool is_player_altar(dungeon_feature_type grid)
inline bool is_player_altar(const coord_def &c)
{
- return is_player_altar(grd[c.x][c.y]);
+ return is_player_altar(grd(c));
}
#ifdef CLUA_BINDINGS
@@ -1031,10 +1031,8 @@ static void _explore_find_target_square()
// Auto-explore is only zigzagging if the prefered
// target (whereto) and the anti-zigzag target are
// close together.
- if (grid_distance(target.x, target.y,
- whereto.x, whereto.y) <= 5
- && distance(target.x, target.y,
- whereto.x, whereto.y) <= 34)
+ if (grid_distance(target, whereto) <= 5
+ && distance(target, whereto) <= 34)
{
_set_target_square(target);
return;
@@ -3064,7 +3062,7 @@ int level_id::absdepth() const
level_id level_id::get_next_level_id(const coord_def &pos)
{
- int gridc = grd[pos.x][pos.y];
+ int gridc = grd(pos);
level_id id = current();
for ( int i = 0; i < NUM_BRANCHES; ++i )