summaryrefslogtreecommitdiff
path: root/src/newgrf_industries.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-06-28 02:14:40 +0000
committerbelugas <belugas@openttd.org>2007-06-28 02:14:40 +0000
commitc1218e88e1a15f1c759868aff7d93d2faf61bcf7 (patch)
tree9b1d3192acc092506476fa6fe6ae2b0d81f0c30b /src/newgrf_industries.cpp
parent191f4be3e78c47339b89020a6bbc478c0f087f8f (diff)
downloadopenttd-c1218e88e1a15f1c759868aff7d93d2faf61bcf7.tar.xz
(svn r10369) -Codechange: Add the IndustryType parameter to the GetIndustryCallback function.
Sometimes, the industry might not be able to provide its type, since it does not exists at all
Diffstat (limited to 'src/newgrf_industries.cpp')
-rw-r--r--src/newgrf_industries.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp
index 402bccccb..61f3ae224 100644
--- a/src/newgrf_industries.cpp
+++ b/src/newgrf_industries.cpp
@@ -248,7 +248,7 @@ static void NewIndustryResolver(ResolverObject *res, TileIndex tile, Industry *i
res->reseed = 0;
}
-uint16 GetIndustryCallback(uint16 callback, uint32 param1, uint32 param2, Industry *industry, TileIndex tile)
+uint16 GetIndustryCallback(uint16 callback, uint32 param1, uint32 param2, Industry *industry, IndustryType type, TileIndex tile)
{
ResolverObject object;
const SpriteGroup *group;
@@ -258,7 +258,7 @@ uint16 GetIndustryCallback(uint16 callback, uint32 param1, uint32 param2, Indust
object.callback_param1 = param1;
object.callback_param2 = param2;
- group = Resolve(GetIndustrySpec(industry->type)->grf_prop.spritegroup, &object);
+ group = Resolve(GetIndustrySpec(type)->grf_prop.spritegroup, &object);
if (group == NULL || group->type != SGT_CALLBACK) return CALLBACK_FAILED;
return group->g.callback.result;