tile.c
changeset 1211 6f2f723e5c36
child 1213 bb9906f67932
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tile.c	Sat Jan 29 13:33:48 2005 +0000
@@ -0,0 +1,14 @@
+#include "tile.h"
+
+void SetMapExtraBits(TileIndex tile, byte bits)
+{
+	assert(tile < MapSize());
+	_map_extra_bits[tile >> 2] &= ~(3 << ((tile & 3) * 2));
+	_map_extra_bits[tile >> 2] |= (bits&3) << ((tile & 3) * 2);
+}
+
+uint GetMapExtraBits(TileIndex tile)
+{
+	assert(tile < MapSize());
+	return (_map_extra_bits[tile >> 2] >> (tile & 3) * 2) & 3;
+}