(svn r4231) Remove ModifyTile(), it's not used anymore, yay!
authortron
Sun, 02 Apr 2006 07:30:01 +0000
changeset 3416 ffa71854c5a3
parent 3415 3adf03460ad8
child 3417 acded0892dad
(svn r4231) Remove ModifyTile(), it's not used anymore, yay!
functions.h
landscape.c
openttd.h
--- a/functions.h	Sun Apr 02 07:05:35 2006 +0000
+++ b/functions.h	Sun Apr 02 07:30:01 2006 +0000
@@ -7,7 +7,6 @@
 void FindLandscapeHeight(TileInfo *ti, uint x, uint y);
 
 void DoClearSquare(TileIndex tile);
-void CDECL ModifyTile(TileIndex tile, uint flags, ...);
 void RunTileLoop(void);
 
 uint GetPartialZ(int x, int y, int corners);
--- a/landscape.c	Sun Apr 02 07:05:35 2006 +0000
+++ b/landscape.c	Sun Apr 02 07:30:01 2006 +0000
@@ -342,53 +342,6 @@
 }
 
 
-/* utility function used to modify a tile */
-void CDECL ModifyTile(TileIndex tile, uint flags, ...)
-{
-	va_list va;
-	int i;
-
-	va_start(va, flags);
-
-	if ((i = GB(flags, 8, 4)) != 0) {
-		SetTileType(tile, i - 1);
-	}
-
-	if (flags & (MP_MAP2_CLEAR | MP_MAP2)) {
-		int x = 0;
-		if (flags & MP_MAP2) x = va_arg(va, int);
-		_m[tile].m2 = x;
-	}
-
-	if (flags & (MP_MAP3LO_CLEAR | MP_MAP3LO)) {
-		int x = 0;
-		if (flags & MP_MAP3LO) x = va_arg(va, int);
-		_m[tile].m3 = x;
-	}
-
-	if (flags & (MP_MAP3HI_CLEAR | MP_MAP3HI)) {
-		int x = 0;
-		if (flags & MP_MAP3HI) x = va_arg(va, int);
-		_m[tile].m4 = x;
-	}
-
-	if (flags & (MP_MAPOWNER|MP_MAPOWNER_CURRENT)) {
-		PlayerID x = _current_player;
-		if (flags & MP_MAPOWNER) x = va_arg(va, int);
-		_m[tile].m1 = x;
-	}
-
-	if (flags & MP_MAP5) {
-		_m[tile].m5 = va_arg(va, int);
-	}
-
-	va_end(va);
-
-	if (!(flags & MP_NODIRTY))
-		MarkTileDirtyByTile(tile);
-}
-
-
 #define TILELOOP_BITS 4
 #define TILELOOP_SIZE (1 << TILELOOP_BITS)
 #define TILELOOP_ASSERTMASK ((TILELOOP_SIZE-1) + ((TILELOOP_SIZE-1) << MapLogX()))
--- a/openttd.h	Sun Apr 02 07:05:35 2006 +0000
+++ b/openttd.h	Sun Apr 02 07:30:01 2006 +0000
@@ -353,26 +353,6 @@
 } TileTypeProcs;
 
 
-
-#define MP_SETTYPE(x) ((x+1) << 8)
-
-enum {
-	MP_MAP2 = 1<<0,
-	MP_MAP3LO = 1<<1,
-	MP_MAP3HI = 1<<2,
-	MP_MAP5 = 1<<3,
-	MP_MAPOWNER_CURRENT = 1<<4,
-	MP_MAPOWNER = 1<<5,
-
-	MP_TYPE_MASK = 0xF << 8,
-
-	MP_MAP2_CLEAR = 1 << 12,
-	MP_MAP3LO_CLEAR = 1 << 13,
-	MP_MAP3HI_CLEAR = 1 << 14,
-
-	MP_NODIRTY = 1<<15,
-};
-
 enum {
 	WC_MAIN_WINDOW = 0x0,
 	WC_MAIN_TOOLBAR = 0x1,