summaryrefslogtreecommitdiff
path: root/industry_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'industry_map.h')
-rw-r--r--industry_map.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/industry_map.h b/industry_map.h
index f42d11833..3726b619c 100644
--- a/industry_map.h
+++ b/industry_map.h
@@ -7,6 +7,7 @@
static inline uint GetIndustryIndex(TileIndex t)
{
+ assert(IsTileType(t, MP_INDUSTRY));
return _m[t].m2;
}
@@ -16,19 +17,22 @@ static inline Industry* GetIndustryByTile(TileIndex t)
}
-static inline bool IsIndustryCompleted(TileIndex tile)
+static inline bool IsIndustryCompleted(TileIndex t)
{
- return HASBIT(_m[tile].m1, 7);
+ assert(IsTileType(t, MP_INDUSTRY));
+ return HASBIT(_m[t].m1, 7);
}
static inline uint GetIndustryGfx(TileIndex t)
{
+ assert(IsTileType(t, MP_INDUSTRY));
return _m[t].m5;
}
static inline void SetIndustryGfx(TileIndex t, uint gfx)
{
+ assert(IsTileType(t, MP_INDUSTRY));
_m[t].m5 = gfx;
}