diff options
author | belugas <belugas@openttd.org> | 2007-06-13 02:29:08 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2007-06-13 02:29:08 +0000 |
commit | 30863358f9f2bd0951fe46103e0fb9fa6a2c97d8 (patch) | |
tree | 78473d469c840ab5e2dc2370e2a644fab596c171 /src/newgrf_industries.cpp | |
parent | da1743e98062a3b64fa2730727d86a94a6869121 (diff) | |
download | openttd-30863358f9f2bd0951fe46103e0fb9fa6a2c97d8.tar.xz |
(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)
Diffstat (limited to 'src/newgrf_industries.cpp')
-rw-r--r-- | src/newgrf_industries.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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; |