summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/overmap.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-30 10:53:06 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-30 10:53:06 +0000
commit262b8e18ed8cb58afb40a816ac0fdedfe3a7db5f (patch)
tree681a9cbb6c22669c6e8b7ab749228a3cd691a903 /crawl-ref/source/overmap.cc
parent51d8f1fc9cc8ed4280b9c53b135ccb0521e84889 (diff)
downloadcrawl-ref-262b8e18ed8cb58afb40a816ac0fdedfe3a7db5f.tar.gz
crawl-ref-262b8e18ed8cb58afb40a816ac0fdedfe3a7db5f.zip
Massive overhaul to move towards coord_def().
This might have introduced some bugs: I now get intermittent crashes on startup (this might have to do with the changes to special_room.) Sorry about that - committing before I need to do any more big conflict resolutions. Fixes coming later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6732 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/overmap.cc')
-rw-r--r--crawl-ref/source/overmap.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/crawl-ref/source/overmap.cc b/crawl-ref/source/overmap.cc
index cd121b4e1c..2286632ad0 100644
--- a/crawl-ref/source/overmap.cc
+++ b/crawl-ref/source/overmap.cc
@@ -59,16 +59,16 @@ static void seen_staircase(dungeon_feature_type which_staircase,
static void seen_other_thing(dungeon_feature_type which_thing,
const coord_def& pos);
-void seen_notable_thing( dungeon_feature_type which_thing, int x, int y )
+void seen_notable_thing( dungeon_feature_type which_thing,
+ const coord_def& pos )
{
// Tell the world first.
- dungeon_events.fire_position_event(DET_PLAYER_IN_LOS, coord_def(x, y));
+ dungeon_events.fire_position_event(DET_PLAYER_IN_LOS, pos);
// Don't record in temporary terrain
if (you.level_type != LEVEL_DUNGEON)
return;
- const coord_def pos(x, y);
const god_type god = grid_altar_god(which_thing);
if (god != GOD_NO_GOD)
seen_altar( god, pos );
@@ -525,8 +525,7 @@ void seen_altar( god_type god, const coord_def& pos )
void unnotice_altar()
{
- const coord_def pos(you.x_pos, you.y_pos);
- const level_pos curpos(level_id::current(), pos);
+ const level_pos curpos(level_id::current(), you.pos());
// Hmm, what happens when erasing a nonexistent key directly?
if (altars_present.find(curpos) != altars_present.end())
altars_present.erase(curpos);
@@ -613,7 +612,7 @@ void annotate_level()
level_id li = level_id::current();
level_id li2 = level_id::current();
- if (is_stair(grd[you.x_pos][you.y_pos]))
+ if (is_stair(grd(you.pos())))
{
li2 = level_id::get_next_level_id(you.pos());