src/newgrf_industries.cpp
changeset 7380 a9d0047b015c
parent 7364 f72f9b742c34
child 7496 628e1191ee45
equal deleted inserted replaced
7379:8d8e9f289c70 7380:a9d0047b015c
   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);