summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fprop.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/fprop.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/fprop.cc')
-rw-r--r--crawl-ref/source/fprop.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/crawl-ref/source/fprop.cc b/crawl-ref/source/fprop.cc
new file mode 100644
index 0000000000..50023409d0
--- /dev/null
+++ b/crawl-ref/source/fprop.cc
@@ -0,0 +1,25 @@
+/*
+ * File: envmap.cc
+ * Summary: Functions dealing with env.map_knowledge.
+ */
+
+#include "AppHdr.h"
+
+#include "fprop.h"
+
+#include "coord.h"
+#include "env.h"
+#include "stuff.h"
+
+bool is_sanctuary(const coord_def& p)
+{
+ if (!map_bounds(p))
+ return (false);
+ return (testbits(env.pgrid(p), FPROP_SANCTUARY_1)
+ || testbits(env.pgrid(p), FPROP_SANCTUARY_2));
+}
+
+bool is_bloodcovered(const coord_def& p)
+{
+ return (testbits(env.pgrid(p), FPROP_BLOODY));
+}