(svn r11139) -Codechange: add support for persistent storage for NewGRFs.

This commit is contained in:
rubidium
2007-09-22 13:56:38 +00:00
parent c68c83dffa
commit 60f1eb21fa
9 changed files with 39 additions and 15 deletions

View File

@@ -243,6 +243,9 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte par
case 0x67:
case 0x68: return GetCountAndDistanceOfClosestInstance(parameter, variable == 0x68 ? GB(GetRegister(0x101), 0, 8) : 0, industry);
/* Get a variable from the persistent storage */
case 0x7C: return industry->psa.Get(parameter);
/* Industry structure access*/
case 0x80: return industry->xy;
case 0x81: return GB(industry->xy, 8, 8);
@@ -323,6 +326,7 @@ static void NewIndustryResolver(ResolverObject *res, TileIndex tile, Industry *i
res->GetVariable = IndustryGetVariable;
res->ResolveReal = IndustryResolveReal;
res->psa = &indus->psa;
res->u.industry.tile = tile;
res->u.industry.ind = indus;
res->u.industry.gfx = INVALID_INDUSTRYTILE;