summaryrefslogtreecommitdiff
path: root/src/gen_evol.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-06-21 21:17:20 +0200
committerBardur Arantsson <bardur@scientician.net>2016-06-21 21:17:20 +0200
commit3966bfb2f6836d13c1a93bfab1e9fa61ec4fff35 (patch)
tree589a331cab87e338882269d257048e6792f2c072 /src/gen_evol.cc
parentebc402cfa4182a50f46ac2d56e3b74c5372eed84 (diff)
Rework FF1_* flags to flags_set<>
Diffstat (limited to 'src/gen_evol.cc')
-rw-r--r--src/gen_evol.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gen_evol.cc b/src/gen_evol.cc
index 6f3fbcba..889e7a01 100644
--- a/src/gen_evol.cc
+++ b/src/gen_evol.cc
@@ -10,6 +10,7 @@
#include "cave.hpp"
#include "cave_type.hpp"
+#include "feature_flag.hpp"
#include "feature_type.hpp"
#include "generate.hpp"
#include "levels.hpp"
@@ -34,8 +35,8 @@ void evolve_level(bool_ noise)
{
for (j = 1; j < cur_hgt - 1; j++)
{
- if (f_info[cave[j][i].feat].flags1 & FF1_WALL) cw++;
- if (f_info[cave[j][i].feat].flags1 & FF1_FLOOR) cf++;
+ if (f_info[cave[j][i].feat].flags & FF_WALL) cw++;
+ if (f_info[cave[j][i].feat].flags & FF_FLOOR) cf++;
}
}
@@ -49,7 +50,7 @@ void evolve_level(bool_ noise)
c_ptr = &cave[j][i];
/* Permanent features should stay */
- if (f_info[c_ptr->feat].flags1 & FF1_PERMANENT) continue;
+ if (f_info[c_ptr->feat].flags & FF_PERMANENT) continue;
/* Avoid evolving grids with object or monster */
if ((!c_ptr->o_idxs.empty()) || c_ptr->m_idx) continue;
@@ -83,7 +84,7 @@ void evolve_level(bool_ noise)
c_ptr = &cave[j][i];
/* Permanent features should stay */
- if (f_info[c_ptr->feat].flags1 & FF1_PERMANENT) continue;
+ if (f_info[c_ptr->feat].flags & FF_PERMANENT) continue;
/* Avoid evolving grids with object or monster */
if ((!c_ptr->o_idxs.empty()) || c_ptr->m_idx) continue;
@@ -101,7 +102,7 @@ void evolve_level(bool_ noise)
for (y = j - 1; y <= j + 1; y++)
{
if ((x == i) && (y == j)) continue;
- if (f_info[cave[y][x].feat].flags1 & FF1_WALL) c++;
+ if (f_info[cave[y][x].feat].flags & FF_WALL) c++;
}
}
@@ -112,7 +113,7 @@ void evolve_level(bool_ noise)
/* Starved or suffocated */
if ((c < 4) || (c >= 7))
{
- if (f_info[c_ptr->feat].flags1 & FF1_WALL)
+ if (f_info[c_ptr->feat].flags & FF_WALL)
{
place_floor(j, i);
}
@@ -121,7 +122,7 @@ void evolve_level(bool_ noise)
/* Spawned */
else if ((c == 4) || (c == 5))
{
- if (!(f_info[c_ptr->feat].flags1 & FF1_WALL))
+ if (!(f_info[c_ptr->feat].flags & FF_WALL))
{
place_filler(j, i);
}