diff options
author | frosch <frosch@openttd.org> | 2008-07-30 18:23:12 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-07-30 18:23:12 +0000 |
commit | d54d8bf295fdc82580746a78c6feeb5e10d19047 (patch) | |
tree | e8219f143ce84fdcf02b32f82e184cc7e156023d /src/newgrf_industrytiles.cpp | |
parent | d4774bdbab816a442f57c58fa0eb49e6fc35dc20 (diff) | |
download | openttd-d54d8bf295fdc82580746a78c6feeb5e10d19047.tar.xz |
(svn r13885) -Fix [FS#2168]: Var 0x7F is not feature-specific.
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r-- | src/newgrf_industrytiles.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index 63c7cbf34..50d59f173 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -30,15 +30,6 @@ #include "table/sprites.h" #include "table/strings.h" -static uint32 GetGRFParameter(IndustryGfx indtile_id, byte parameter) -{ - const IndustryTileSpec *indtspec = GetIndustryTileSpec(indtile_id); - const GRFFile *file = indtspec->grf_prop.grffile; - - if (parameter >= file->param_end) return 0; - return file->param[parameter]; -} - /** * Based on newhouses equivalent, but adapted for newindustries * @param parameter from callback. It's in fact a pair of coordinates @@ -110,9 +101,6 @@ static uint32 IndustryTileGetVariable(const ResolverObject *object, byte variabl /* Get industry tile ID at offset */ case 0x62 : return GetIndustryIDAtOffset(GetNearbyTile(parameter, tile), inds); - - /* Read GRF parameter */ - case 0x7F: return GetGRFParameter(GetIndustryGfx(tile), parameter); } DEBUG(grf, 1, "Unhandled industry tile property 0x%X", variable); @@ -174,6 +162,9 @@ static void NewIndustryTileResolver(ResolverObject *res, IndustryGfx gfx, TileIn res->trigger = 0; res->reseed = 0; res->count = 0; + + const IndustryTileSpec *its = GetIndustryTileSpec(gfx); + res->grffile = (its != NULL ? its->grf_prop.grffile : NULL); } void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte rnd_color, byte stage, IndustryGfx gfx) |