summaryrefslogtreecommitdiff
path: root/src/newgrf_house.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-06-15 23:55:52 +0000
committerbelugas <belugas@openttd.org>2007-06-15 23:55:52 +0000
commit0f0b58d429b1103687a2e4e9a51d2221ba0e8f01 (patch)
treeef79fa77b3b91584c234b33bb2995df7ed57ad55 /src/newgrf_house.cpp
parent77b29ea3bc59baaf8cb005b76464ab3951a93914 (diff)
downloadopenttd-0f0b58d429b1103687a2e4e9a51d2221ba0e8f01.tar.xz
(svn r10167) -Codechange: Change the flagging system of grf loaded feature from a bitset to a bool evaluation.
Like easier to read and faster to evaluate :)
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r--src/newgrf_house.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index d5d68e844..4ec663143 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -83,7 +83,7 @@ void IncreaseBuildingCount(Town *t, HouseID house_id)
{
HouseClassID class_id = GetHouseSpecs(house_id)->class_id;
- if (!HASBIT(_loaded_newgrf_features, GRFLOADED_NEWHOUSES)) return;
+ if (!_loaded_newgrf_features.has_newhouses) return;
/* If there are 255 buildings of this type in this town, there are also
* at least that many houses of the same class in the town, and
@@ -111,7 +111,7 @@ void DecreaseBuildingCount(Town *t, HouseID house_id)
{
HouseClassID class_id = GetHouseSpecs(house_id)->class_id;
- if (!HASBIT(_loaded_newgrf_features, GRFLOADED_NEWHOUSES)) return;
+ if (!_loaded_newgrf_features.has_newhouses) return;
if (t->building_counts.id_count[house_id] > 0) t->building_counts.id_count[house_id]--;
if (_building_counts.id_count[house_id] > 0) _building_counts.id_count[house_id]--;
@@ -129,7 +129,7 @@ void DecreaseBuildingCount(Town *t, HouseID house_id)
*/
void AfterLoadCountBuildings()
{
- if (!HASBIT(_loaded_newgrf_features, GRFLOADED_NEWHOUSES)) return;
+ if (!_loaded_newgrf_features.has_newhouses) return;
for (TileIndex t = 0; t < MapSize(); t++) {
if (!IsTileType(t, MP_HOUSE)) continue;