summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.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/misc.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/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 3c96ec0319..39271c1592 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -43,7 +43,8 @@
#include "dgnevent.h"
#include "directn.h"
#include "dungeon.h"
-#include "envmap.h"
+#include "map_knowledge.h"
+#include "fprop.h"
#include "fight.h"
#include "files.h"
#include "food.h"
@@ -1107,7 +1108,7 @@ static void _maybe_bloodify_square(const coord_def& where, int amount,
where.x, where.y, amount);
#endif
if (allow_bleeding_on_square(where))
- env.map(where).property |= FPROP_BLOODY;
+ env.pgrid(where) |= FPROP_BLOODY;
if (smell_alert)
blood_smell(12, where);
@@ -1194,7 +1195,7 @@ static void _spatter_neighbours(const coord_def& where, int chance)
if (one_chance_in(chance))
{
- env.map(*ai).property |= FPROP_BLOODY;
+ env.pgrid(*ai) |= FPROP_BLOODY;
_spatter_neighbours(*ai, chance+1);
}
}
@@ -1234,7 +1235,7 @@ void generate_random_blood_spatter_on_level()
startprob = min_prob + random2(max_prob);
if (allow_bleeding_on_square(c))
- env.map(c).property |= FPROP_BLOODY;
+ env.pgrid(c) |= FPROP_BLOODY;
_spatter_neighbours(c, startprob);
}
@@ -3021,7 +3022,7 @@ static void apply_environment_effect(const coord_def &c)
{
const dungeon_feature_type grid = grd(c);
// Don't apply if if the feature doesn't want it.
- if (testbits(env.map(c).property, FPROP_NO_CLOUD_GEN))
+ if (testbits(env.pgrid(c), FPROP_NO_CLOUD_GEN))
return;
if (grid == DNGN_LAVA)
check_place_cloud(CLOUD_BLACK_SMOKE, c, random_range(4, 8), KC_OTHER);