src/newgrf_industries.cpp
changeset 6884 a931841e9df4
parent 6868 abaf9e30691e
child 7000 603a41cb93f8
equal deleted inserted replaced
6883:a7be3fb54737 6884:a931841e9df4
   225 {
   225 {
   226 	/* IndustryTile do not have 'real' groups */
   226 	/* IndustryTile do not have 'real' groups */
   227 	return NULL;
   227 	return NULL;
   228 }
   228 }
   229 
   229 
   230 static void NewIndustryResolver(ResolverObject *res, IndustryType ind_id, TileIndex tile, Industry *indus)
   230 static void NewIndustryResolver(ResolverObject *res, TileIndex tile, Industry *indus)
   231 {
   231 {
   232 	res->GetRandomBits = NULL;//IndustryTileGetRandomBits;
   232 	res->GetRandomBits = IndustryTileGetRandomBits;
   233 	res->GetTriggers   = NULL;//IndustryTileGetTriggers;
   233 	res->GetTriggers   = IndustryTileGetTriggers;
   234 	res->SetTriggers   = NULL;//IndustryTileSetTriggers;
   234 	res->SetTriggers   = IndustryTileSetTriggers;
   235 	res->GetVariable   = IndustryGetVariable;
   235 	res->GetVariable   = IndustryGetVariable;
   236 	res->ResolveReal   = IndustryResolveReal;
   236 	res->ResolveReal   = IndustryResolveReal;
   237 
   237 
   238 	res->u.industry.tile = tile;
   238 	res->u.industry.tile = tile;
   239 	res->u.industry.ind  = indus;
   239 	res->u.industry.ind  = indus;
       
   240 	res->u.industry.gfx  = INVALID_INDUSTRYTILE;
   240 
   241 
   241 	res->callback        = 0;
   242 	res->callback        = 0;
   242 	res->callback_param1 = 0;
   243 	res->callback_param1 = 0;
   243 	res->callback_param2 = 0;
   244 	res->callback_param2 = 0;
   244 	res->last_value      = 0;
   245 	res->last_value      = 0;
   249 uint16 GetIndustryCallback(uint16 callback, uint32 param1, uint32 param2, Industry *industry, TileIndex tile)
   250 uint16 GetIndustryCallback(uint16 callback, uint32 param1, uint32 param2, Industry *industry, TileIndex tile)
   250 {
   251 {
   251 	ResolverObject object;
   252 	ResolverObject object;
   252 	const SpriteGroup *group;
   253 	const SpriteGroup *group;
   253 
   254 
   254 	NewIndustryResolver(&object, industry->type, tile, industry);
   255 	NewIndustryResolver(&object, tile, industry);
   255 	object.callback = callback;
   256 	object.callback = callback;
   256 	object.callback_param1 = param1;
   257 	object.callback_param1 = param1;
   257 	object.callback_param2 = param2;
   258 	object.callback_param2 = param2;
   258 
   259 
   259 	group = Resolve(GetIndustrySpec(industry->type)->grf_prop.spritegroup, &object);
   260 	group = Resolve(GetIndustrySpec(industry->type)->grf_prop.spritegroup, &object);