summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-22 20:21:15 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-22 20:21:15 +0000
commit9a160b380b94ce9b89c93214fe7b9de3f36ed01f (patch)
tree53d1992a132d6e3178b427bbaca2510120233173 /crawl-ref/source/effects.cc
parent23e8c7a07f9ea71e683fa748940cc7447e5a8aa1 (diff)
downloadcrawl-ref-9a160b380b94ce9b89c93214fe7b9de3f36ed01f.tar.gz
crawl-ref-9a160b380b94ce9b89c93214fe7b9de3f36ed01f.zip
Massive change from using x and y to using coord_defs(). Not quite tested,
most likely broken in some places and might break tiles. Will fix in the near future. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6636 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc27
1 files changed, 14 insertions, 13 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 86df6e4b0f..06f85b3318 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1677,7 +1677,7 @@ bool acquirement(object_class_type class_wanted, int agent,
randart_name(thing, false);
}
}
- move_item_to_grid( &thing_created, you.x_pos, you.y_pos );
+ move_item_to_grid( &thing_created, you.pos() );
// This should never actually be NON_ITEM because of the way
// move_item_to_grid works (doesn't create a new item ever),
@@ -1890,7 +1890,7 @@ void yell(bool force)
if (force)
{
mprf("A %s rips itself from your throat!", shout_verb.c_str());
- noisy(noise_level, you.x_pos, you.y_pos);
+ noisy(noise_level, you.pos());
return;
}
@@ -1926,7 +1926,7 @@ void yell(bool force)
case '!': // for players using the old keyset
case 't':
mprf(MSGCH_SOUND, "You %s for attention!", shout_verb.c_str());
- noisy(noise_level, you.x_pos, you.y_pos);
+ noisy(noise_level, you.pos());
you.turn_is_over = true;
return;
@@ -2011,7 +2011,7 @@ void yell(bool force)
if (mons_targd != MHITNOT && mons_targd != MHITYOU)
mpr("Attack!");
- noisy(10, you.x_pos, you.y_pos);
+ noisy(10, you.pos());
} // end yell()
bool forget_inventory(bool quiet)
@@ -2099,7 +2099,7 @@ bool vitrify_area(int radius)
static void _hell_effects()
{
- if (is_sanctuary(you.x_pos, you.y_pos))
+ if (is_sanctuary(you.pos()))
{
mpr("Zin's power protects you from Hell's scourges!", MSGCH_GOD);
return;
@@ -2475,7 +2475,7 @@ void handle_time(long time_delta)
// the original roll of 150 for 4.1.2, but I think players are
// sufficiently used to beta 26's unkindness that we can use a lower
// roll.)
- if (is_sanctuary(you.x_pos, you.y_pos)
+ if (is_sanctuary(you.pos())
&& you.magic_contamination >= 5
&& x_chance_in_y(you.magic_contamination + 1, 25))
{
@@ -2890,20 +2890,21 @@ static void _maybe_restart_fountain_flow(const int x, const int y,
set_envmap_obj(x, y, grd[x][y]);
// Clean bloody floor.
- if (is_bloodcovered(x,y))
+ if (is_bloodcovered(coord_def(x,y)))
env.map[x][y].property = FPROP_NONE;
// Chance of cleaning adjacent squares.
for (int i = -1; i <= 1; i++)
+ {
for (int j = -1; j <= 1; j++)
{
- if (is_bloodcovered(x+i,y+j)
- && one_chance_in(5))
- {
- env.map[x+i][y+j].property = FPROP_NONE;
- }
+ if (is_bloodcovered(coord_def(x+i,y+j))
+ && one_chance_in(5))
+ {
+ env.map[x+i][y+j].property = FPROP_NONE;
+ }
}
-
+ }
return;
}
}