src/newgrf_industries.cpp
changeset 8106 9f527cc360cf
parent 8100 3fcfa8594d0f
child 8110 120abf2bfe82
equal deleted inserted replaced
8105:8f7fcf4d2b7e 8106:9f527cc360cf
   240 
   240 
   241 		/* Count of industry, distance of closest instance
   241 		/* Count of industry, distance of closest instance
   242 		 * 68 is the same as 67, but with a filtering on selected layout */
   242 		 * 68 is the same as 67, but with a filtering on selected layout */
   243 		case 0x67:
   243 		case 0x67:
   244 		case 0x68: return GetCountAndDistanceOfClosestInstance(parameter, variable == 0x68 ? GB(GetRegister(0x101), 0, 8) : 0, industry);
   244 		case 0x68: return GetCountAndDistanceOfClosestInstance(parameter, variable == 0x68 ? GB(GetRegister(0x101), 0, 8) : 0, industry);
       
   245 
       
   246 		/* Get a variable from the persistent storage */
       
   247 		case 0x7C: return industry->psa.Get(parameter);
   245 
   248 
   246 		/* Industry structure access*/
   249 		/* Industry structure access*/
   247 		case 0x80: return industry->xy;
   250 		case 0x80: return industry->xy;
   248 		case 0x81: return GB(industry->xy, 8, 8);
   251 		case 0x81: return GB(industry->xy, 8, 8);
   249 		/* Pointer to the town the industry is associated with */
   252 		/* Pointer to the town the industry is associated with */
   321 	res->GetTriggers   = IndustryTileGetTriggers;
   324 	res->GetTriggers   = IndustryTileGetTriggers;
   322 	res->SetTriggers   = IndustryTileSetTriggers;
   325 	res->SetTriggers   = IndustryTileSetTriggers;
   323 	res->GetVariable   = IndustryGetVariable;
   326 	res->GetVariable   = IndustryGetVariable;
   324 	res->ResolveReal   = IndustryResolveReal;
   327 	res->ResolveReal   = IndustryResolveReal;
   325 
   328 
       
   329 	res->psa             = &indus->psa;
   326 	res->u.industry.tile = tile;
   330 	res->u.industry.tile = tile;
   327 	res->u.industry.ind  = indus;
   331 	res->u.industry.ind  = indus;
   328 	res->u.industry.gfx  = INVALID_INDUSTRYTILE;
   332 	res->u.industry.gfx  = INVALID_INDUSTRYTILE;
   329 
   333 
   330 	res->callback        = CBID_NO_CALLBACK;
   334 	res->callback        = CBID_NO_CALLBACK;