(svn r1715) Move [GS]etMapExtraBits to tile.[ch]
authortron
Sat, 29 Jan 2005 13:33:48 +0000
changeset 1211 6f2f723e5c36
parent 1210 05975e9167c4
child 1212 e9fbf66a8af2
(svn r1715) Move [GS]etMapExtraBits to tile.[ch]
Makefile
functions.h
landscape.c
tile.c
tile.h
--- a/Makefile	Sat Jan 29 13:33:14 2005 +0000
+++ b/Makefile	Sat Jan 29 13:33:48 2005 +0000
@@ -624,6 +624,7 @@
 C_SOURCES += subsidy_gui.c
 C_SOURCES += terraform_gui.c
 C_SOURCES += texteff.c
+C_SOURCES += tile.c
 C_SOURCES += town_cmd.c
 C_SOURCES += town_gui.c
 C_SOURCES += train_cmd.c
--- a/functions.h	Sat Jan 29 13:33:14 2005 +0000
+++ b/functions.h	Sat Jan 29 13:33:48 2005 +0000
@@ -14,8 +14,6 @@
 
 void DoClearSquare(uint tile);
 void CDECL ModifyTile(uint tile, uint flags, ...);
-void SetMapExtraBits(uint tile, byte flags);
-uint GetMapExtraBits(uint tile);
 void RunTileLoop(void);
 
 uint GetPartialZ(int x, int y, int corners);
--- a/landscape.c	Sat Jan 29 13:33:14 2005 +0000
+++ b/landscape.c	Sat Jan 29 13:33:48 2005 +0000
@@ -430,17 +430,6 @@
 		MarkTileDirtyByTile(tile);
 }
 
-void SetMapExtraBits(uint tile, byte bits)
-{
-	_map_extra_bits[tile >> 2] &= ~(3 << ((tile&3)*2));
-	_map_extra_bits[tile >> 2] |= (bits&3) << ((tile&3)*2);
-}
-
-uint GetMapExtraBits(uint tile)
-{
-	assert(tile < MapSize());
-	return (_map_extra_bits[tile >> 2] >> (tile & 3) * 2) & 3;
-}
 
 #define TILELOOP_BITS 4
 #define TILELOOP_SIZE (1 << TILELOOP_BITS)
--- /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;
+}
--- a/tile.h	Sat Jan 29 13:33:14 2005 +0000
+++ b/tile.h	Sat Jan 29 13:33:48 2005 +0000
@@ -3,6 +3,9 @@
 
 #include "map.h"
 
+void SetMapExtraBits(TileIndex tile, byte flags);
+uint GetMapExtraBits(TileIndex tile);
+
 static inline uint TileHeight(TileIndex tile)
 {
 	assert(tile < MapSize());