src/bridge_cmd.cpp
branchcustombridgeheads
changeset 5650 aefc131bf5ce
parent 5649 55c8267c933f
child 5651 335d9bd345b0
--- a/src/bridge_cmd.cpp	Thu Jan 11 13:41:16 2007 +0000
+++ b/src/bridge_cmd.cpp	Mon Jan 15 20:14:06 2007 +0000
@@ -190,11 +190,11 @@
 
 	// type of bridge
 	if (HASBIT(p2, 15)) {
-		railtype = 0;
+		railtype = RAILTYPE_BEGIN;
 		transport = TRANSPORT_ROAD;
 	} else {
 		if (!ValParamRailtype(GB(p2, 8, 8))) return CMD_ERROR;
-		railtype = GB(p2, 8, 8);
+		railtype = (RailType)GB(p2, 8, 8);
 		transport = TRANSPORT_RAIL;
 	}
 
@@ -833,7 +833,7 @@
 			} else if (f < 15) {
 				return z + TILE_HEIGHT;
 			}
-			tileh = _inclined_tileh[f - 15];
+			tileh = (Slope)_inclined_tileh[f - 15];
 		}
 	}
 	return z + GetPartialZ(x, y, tileh);
@@ -848,7 +848,7 @@
 
 		if (f == 0) return tileh;
 		if (f < 15) return SLOPE_FLAT;
-		return _inclined_tileh[f - 15];
+		return (Slope)_inclined_tileh[f - 15];
 	}
 }
 
@@ -1018,7 +1018,7 @@
 
 	if (v->direction == DiagDirToDir(ReverseDiagDir(dir))) {
 		/* We are entering the bridge head from the bridge itself */
-		if (v->u.rail.track == 0x40) {
+		if (v->u.rail.track == TRACK_BIT_WORMHOLE) {
 			/* Get the vehicle out of the wormhole, the track will be chosen later
 			   by the pathfinder */
 			v->tile = tile;
@@ -1046,7 +1046,7 @@
 			if (diff.x != 0) v->y_pos = y; else v->x_pos = x;
 			v->direction = DiagDirToDir(dir);
 			/* We're about to enter the bridge body, clear all up/down flags just in case */
-			v->u.rail.track = 0x40;
+			v->u.rail.track = TRACK_BIT_WORMHOLE;
 			v->direction = DiagDirToDir(dir);
 			CLRBIT(v->u.rail.flags, VRF_GOINGUP);
 			CLRBIT(v->u.rail.flags, VRF_GOINGDOWN);
@@ -1068,7 +1068,7 @@
 	NOT_REACHED();
 }
 
-const TileTypeProcs _tile_type_bridge_procs = {
+extern const TileTypeProcs _tile_type_bridge_procs = {
 	DrawTile_Bridge,           /* draw_tile_proc */
 	GetSlopeZ_Bridge,          /* get_slope_z_proc */
 	ClearTile_Bridge,          /* clear_tile_proc */