summaryrefslogtreecommitdiff
path: root/water_map.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-01 21:00:44 +0000
committertron <tron@openttd.org>2006-03-01 21:00:44 +0000
commit819d210acc501e10f20d83cd72176862e8068758 (patch)
tree04b51cfb2ff11a7b3f71f73a94c09725207e46d8 /water_map.h
parente7e8466fb637c4e0f23550d4c1f27b07224b27b1 (diff)
downloadopenttd-819d210acc501e10f20d83cd72176862e8068758.tar.xz
(svn r3714) Add functions to turn tiles into water and shore tiles
Diffstat (limited to 'water_map.h')
-rw-r--r--water_map.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/water_map.h b/water_map.h
new file mode 100644
index 000000000..123e96ae2
--- /dev/null
+++ b/water_map.h
@@ -0,0 +1,27 @@
+/* $Id$ */
+
+#ifndef WATER_MAP_H
+#define WATER_MAP_H
+
+static inline void MakeWater(TileIndex t)
+{
+ SetTileType(t, MP_WATER);
+ SetTileOwner(t, OWNER_WATER);
+ _m[t].m2 = 0;
+ _m[t].m3 = 0;
+ _m[t].m4 = 0;
+ _m[t].m5 = 0;
+}
+
+
+static inline void MakeShore(TileIndex t)
+{
+ SetTileType(t, MP_WATER);
+ SetTileOwner(t, OWNER_WATER);
+ _m[t].m2 = 0;
+ _m[t].m3 = 0;
+ _m[t].m4 = 0;
+ _m[t].m5 = 1;
+}
+
+#endif