summaryrefslogtreecommitdiff
path: root/industry_map.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-24 13:31:17 +0000
committertron <tron@openttd.org>2006-03-24 13:31:17 +0000
commit662885ecd109f24688858c4b777b8292bece2d88 (patch)
tree4c2227ca2e8c592799085fda417f02d20fb6aa74 /industry_map.h
parentc699d0e791c31170557351d4d46637b3c253dc90 (diff)
downloadopenttd-662885ecd109f24688858c4b777b8292bece2d88.tar.xz
(svn r4086) Add MakeIndustry()
Diffstat (limited to 'industry_map.h')
-rw-r--r--industry_map.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/industry_map.h b/industry_map.h
index c3a8d0b1c..63c289503 100644
--- a/industry_map.h
+++ b/industry_map.h
@@ -14,3 +14,14 @@ static inline Industry* GetIndustryByTile(TileIndex t)
{
return GetIndustry(GetIndustryIndex(t));
}
+
+
+static inline void MakeIndustry(TileIndex t, uint index, uint gfx)
+{
+ SetTileType(t, MP_INDUSTRY);
+ _m[t].m1 = 0;
+ _m[t].m2 = index;
+ _m[t].m3 = 0;
+ _m[t].m4 = 0;
+ _m[t].m5 = gfx;
+}