summaryrefslogtreecommitdiff
path: root/src/industry_map.h
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-08-24 00:23:35 +0000
committerbelugas <belugas@openttd.org>2007-08-24 00:23:35 +0000
commit99158287fd34351e811acef1cb5e1fbdbe059439 (patch)
tree4cbae99b4d2ec0b1c709d85ea814a81a94cbef54 /src/industry_map.h
parent604924542c5c2e42562f28ae1e5b66d6dde8394d (diff)
downloadopenttd-99158287fd34351e811acef1cb5e1fbdbe059439.tar.xz
(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.
Diffstat (limited to 'src/industry_map.h')
-rw-r--r--src/industry_map.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/industry_map.h b/src/industry_map.h
index 91ea96972..18e72eb33 100644
--- a/src/industry_map.h
+++ b/src/industry_map.h
@@ -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));
}
/**