summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/industry_map.h7
-rw-r--r--src/industrytype.h5
2 files changed, 12 insertions, 0 deletions
diff --git a/src/industry_map.h b/src/industry_map.h
index e22934f14..1e07ca072 100644
--- a/src/industry_map.h
+++ b/src/industry_map.h
@@ -119,6 +119,13 @@ static inline void SetIndustryConstructionStage(TileIndex tile, byte value)
SB(_m[tile].m1, 0, 2, value);
}
+/**
+ * Get the industry graphics ID for the given industry tile as
+ * stored in the without translation.
+ * @param t the tile to get the gfx for
+ * @pre IsTileType(t, MP_INDUSTRY)
+ * @return the gfx ID
+ */
static inline IndustryGfx GetCleanIndustryGfx(TileIndex t)
{
assert(IsTileType(t, MP_INDUSTRY));
diff --git a/src/industrytype.h b/src/industrytype.h
index 051f2f086..8b86526e1 100644
--- a/src/industrytype.h
+++ b/src/industrytype.h
@@ -181,6 +181,11 @@ void ResetIndustries();
extern IndustrySpec _industry_specs[NUM_INDUSTRYTYPES];
extern IndustryTileSpec _industry_tile_specs[NUM_INDUSTRYTILES];
+/**
+ * Do industry gfx ID translation for NewGRFs.
+ * @param gfx the type to get the override for.
+ * @return the gfx to actually work with.
+ */
static inline IndustryGfx GetTranslatedIndustryTileID(IndustryGfx gfx)
{
/* the 0xFF should be GFX_WATERTILE_SPECIALCHECK but for reasons of include mess,