summaryrefslogtreecommitdiff
path: root/src/newgrf_industrytiles.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_industrytiles.cpp
parent515b55c635199db71a41ff2bd9959b9844d0dfa1 (diff)
downloadopenttd-93d0ca873163cee121cc481357670c06b5cccde2.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.cpp15
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)