summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-08 14:23:03 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-08 14:46:22 +0100
commit28f6c800df6bc63658b9c79e803bf81ac282aa1d (patch)
treedf593b87768f0324939f89ed6f4d7aea8c950de4 /crawl-ref/source/spells3.cc
parenta4eda3c37bb9ec6d9b847e827390a66062229b99 (diff)
downloadcrawl-ref-28f6c800df6bc63658b9c79e803bf81ac282aa1d.tar.gz
crawl-ref-28f6c800df6bc63658b9c79e803bf81ac282aa1d.zip
Split map knowledge and FPROPs.
map_cell no longer has the field "properties", which has been replaced by the unsigned long array env.pgrid. env.map has been renamed to env.map_knowledge. It should really be moved into player.
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index bd4df15d81..12ba4f2df9 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -25,7 +25,8 @@
#include "debug.h"
#include "delay.h"
#include "effects.h"
-#include "envmap.h"
+#include "map_knowledge.h"
+#include "fprop.h"
#include "food.h"
#include "goditem.h"
#include "itemname.h"
@@ -1579,7 +1580,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area)
|| monster_at(newpos)
|| env.cgrid(newpos) != EMPTY_CLOUD
|| need_distance_check && (newpos - centre).abs() < 34*34
- || testbits(env.map(newpos).property, FPROP_NO_RTELE_INTO));
+ || testbits(env.pgrid(newpos), FPROP_NO_RTELE_INTO));
if (newpos == you.pos())
mpr("Your surroundings flicker for a moment.");
@@ -1732,7 +1733,7 @@ static int _inside_circle(const coord_def& where, int radius)
static void _remove_sanctuary_property(const coord_def& where)
{
- env.map(where).property &= ~(FPROP_SANCTUARY_1 | FPROP_SANCTUARY_2);
+ env.pgrid(where) &= ~(FPROP_SANCTUARY_1 | FPROP_SANCTUARY_2);
}
bool remove_sanctuary(bool did_attack)
@@ -1862,7 +1863,7 @@ bool cast_sanctuary(const int power)
continue;
const coord_def pos = *ri;
- if (testbits(env.map(pos).property, FPROP_BLOODY) && observe_cell(pos))
+ if (testbits(env.pgrid(pos), FPROP_BLOODY) && observe_cell(pos))
blood_count++;
if (trap_def* ptrap = find_trap(pos))
@@ -1898,10 +1899,10 @@ bool cast_sanctuary(const int power)
break;
}
- env.map(pos).property |= (in_yellow ? FPROP_SANCTUARY_1
+ env.pgrid(pos) |= (in_yellow ? FPROP_SANCTUARY_1
: FPROP_SANCTUARY_2);
- env.map(pos).property &= ~(FPROP_BLOODY);
+ env.pgrid(pos) &= ~(FPROP_BLOODY);
// Scare all attacking monsters inside sanctuary, and make
// all friendly monsters inside sanctuary stop attacking and