src/bridge_map.h
branchNewGRF_ports
changeset 6872 1c4a4a609f85
parent 6871 5a9dc001e1ad
child 6878 7d1ff2f621c7
--- a/src/bridge_map.h	Mon Dec 03 23:39:38 2007 +0000
+++ b/src/bridge_map.h	Tue Jan 22 21:00:30 2008 +0000
@@ -5,12 +5,9 @@
 #ifndef BRIDGE_MAP_H
 #define BRIDGE_MAP_H
 
-#include "direction.h"
-#include "macros.h"
-#include "map.h"
-#include "rail.h"
+#include "direction_func.h"
+#include "rail_type.h"
 #include "road_map.h"
-#include "tile.h"
 
 
 /**
@@ -64,7 +61,6 @@
 	return GB(_m[t].m6, 6, 2) != 0;
 }
 
-
 /**
  * Determines the type of bridge on a tile
  * @param t The tile to analyze
@@ -77,20 +73,6 @@
 	return GB(_m[t].m2, 4, 4);
 }
 
-
-/**
- * Get the direction pointing onto the bridge
- * @param t The tile to analyze
- * @pre IsBridgeTile(t)
- * @return the above mentionned direction
- */
-static inline DiagDirection GetBridgeRampDirection(TileIndex t)
-{
-	assert(IsBridgeTile(t));
-	return (DiagDirection)GB(_m[t].m5, 0, 2);
-}
-
-
 /**
  * Get the axis of the bridge that goes over the tile. Not the axis or the ramp.
  * @param t The tile to analyze
@@ -103,45 +85,6 @@
 	return (Axis)(GB(_m[t].m6, 6, 2) - 1);
 }
 
-
-/**
- * Get the transport type of the bridge's ramp.
- * @param t The ramp tile to analyze
- * @pre IsBridgeTile(t)
- * @return the transport type of the bridge
- */
-static inline TransportType GetBridgeTransportType(TileIndex t)
-{
-	assert(IsBridgeTile(t));
-	return (TransportType)GB(_m[t].m5, 2, 2);
-}
-
-
-/**
- * Does the bridge ramp lie in a snow or desert area?
- * @param t The ramp tile to analyze
- * @pre IsBridgeTile(t)
- * @return true if and only if in a snow or desert area
- */
-static inline bool HasBridgeSnowOrDesert(TileIndex t)
-{
-	assert(IsBridgeTile(t));
-	return HasBit(_m[t].m4, 7);
-}
-
-
-/**
- * Sets whether the bridge ramp lies in a snow or desert area.
- * @param t              The ramp tile to set (un)make a snow/desert area
- * @param snow_or_desert Make (true) or unmake the tile a snow/desert area
- * @pre IsBridgeTile(t)
- */
-static inline void SetBridgeSnowOrDesert(TileIndex t, bool snow_or_desert)
-{
-	assert(IsBridgeTile(t));
-	SB(_m[t].m4, 7, 1, snow_or_desert);
-}
-
 /**
  * Finds the end of a bridge in the specified direction starting at a middle tile
  * @param t the bridge tile to find the bridge ramp for
@@ -187,7 +130,6 @@
 	ClrBit(_m[t].m6, 6 + a);
 }
 
-
 /**
  * Removes bridges from the given, that is bridges along the X and Y axis.
  * @param t the tile to remove the bridge from