From 30863358f9f2bd0951fe46103e0fb9fa6a2c97d8 Mon Sep 17 00:00:00 2001 From: belugas Date: Wed, 13 Jun 2007 02:29:08 +0000 Subject: (svn r10127) -Add: Addition of basic structure for industry tiles callbacks (unfinished). -Codechange: ResolverObject receives member gfx, making it compatible for both industries and industry tiles -Codechange: NewIndustryResolver now has his randombits and triggers (even if not implemented) --- src/newgrf_industries.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/newgrf_industries.cpp') diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 91961b0db..5c0d74134 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -227,16 +227,17 @@ static const SpriteGroup *IndustryResolveReal(const ResolverObject *object, cons return NULL; } -static void NewIndustryResolver(ResolverObject *res, IndustryType ind_id, TileIndex tile, Industry *indus) +static void NewIndustryResolver(ResolverObject *res, TileIndex tile, Industry *indus) { - res->GetRandomBits = NULL;//IndustryTileGetRandomBits; - res->GetTriggers = NULL;//IndustryTileGetTriggers; - res->SetTriggers = NULL;//IndustryTileSetTriggers; + res->GetRandomBits = IndustryTileGetRandomBits; + res->GetTriggers = IndustryTileGetTriggers; + res->SetTriggers = IndustryTileSetTriggers; res->GetVariable = IndustryGetVariable; res->ResolveReal = IndustryResolveReal; res->u.industry.tile = tile; res->u.industry.ind = indus; + res->u.industry.gfx = INVALID_INDUSTRYTILE; res->callback = 0; res->callback_param1 = 0; @@ -251,7 +252,7 @@ uint16 GetIndustryCallback(uint16 callback, uint32 param1, uint32 param2, Indust ResolverObject object; const SpriteGroup *group; - NewIndustryResolver(&object, industry->type, tile, industry); + NewIndustryResolver(&object, tile, industry); object.callback = callback; object.callback_param1 = param1; object.callback_param2 = param2; -- cgit v1.2.3-54-g00ecf