(svn r10972) -Codechange: Implement the counterpart(GetTranslatedIndustryTileID) of getindustileid of TTDPatch. This allows to ensure that the ID of a tile (taken out of the map or not) is still a valid one regarding the possible override it may have been flagged to.

It is not the strict same thing, but is what we need regarding the slightly different approach we took for newindustries.
This commit is contained in:
belugas
2007-08-24 00:23:35 +00:00
parent 604924542c
commit 99158287fd
3 changed files with 12 additions and 5 deletions

View File

@@ -132,7 +132,7 @@ static inline void SetIndustryConstructionStage(TileIndex tile, byte value)
static inline IndustryGfx GetIndustryGfx(TileIndex t)
{
assert(IsTileType(t, MP_INDUSTRY));
return _m[t].m5;
return GetTranslatedIndustryTileID(_m[t].m5 | (GB(_m[t].m6, 2, 1) << 8));
}
/**