summaryrefslogtreecommitdiff
path: root/src/newgrf_house.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-07-30 18:23:12 +0000
committerfrosch <frosch@openttd.org>2008-07-30 18:23:12 +0000
commit93d0ca873163cee121cc481357670c06b5cccde2 (patch)
treee8219f143ce84fdcf02b32f82e184cc7e156023d /src/newgrf_house.cpp
parent515b55c635199db71a41ff2bd9959b9844d0dfa1 (diff)
downloadopenttd-93d0ca873163cee121cc481357670c06b5cccde2.tar.xz
(svn r13885) -Fix [FS#2168]: Var 0x7F is not feature-specific.
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r--src/newgrf_house.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index 146a21682..5ef9089be 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -183,15 +183,6 @@ static uint32 GetNumHouses(HouseID house_id, const Town *town)
return map_class_count << 24 | town_class_count << 16 | map_id_count << 8 | town_id_count;
}
-static uint32 GetGRFParameter(HouseID house_id, byte parameter)
-{
- const HouseSpec *hs = GetHouseSpecs(house_id);
- const GRFFile *file = hs->grffile;
-
- if (parameter >= file->param_end) return 0;
- return file->param[parameter];
-}
-
uint32 GetNearbyTileInformation(byte parameter, TileIndex tile)
{
tile = GetNearbyTile(parameter, tile);
@@ -369,9 +360,6 @@ static uint32 HouseGetVariable(const ResolverObject *object, byte variable, byte
/* Distance test for some house types */
case 0x65: return GetDistanceFromNearbyHouse(parameter, tile, object->u.house.house_id);
-
- /* Read GRF parameter */
- case 0x7F: return GetGRFParameter(object->u.house.house_id, parameter);
}
DEBUG(grf, 1, "Unhandled house property 0x%X", variable);
@@ -410,6 +398,9 @@ static void NewHouseResolver(ResolverObject *res, HouseID house_id, TileIndex ti
res->trigger = 0;
res->reseed = 0;
res->count = 0;
+
+ const HouseSpec *hs = GetHouseSpecs(house_id);
+ res->grffile = (hs != NULL ? hs->grffile : NULL);
}
uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile)