(svn r7614) [cbh] - Codechange: Moved the DiagDirection of the bridge head from m5 bits 0..1 to m4 bits 5..6 custombridgeheads
authorcelestar
Fri, 29 Dec 2006 12:33:26 +0000
branchcustombridgeheads
changeset 5596 fdbe3e553294
parent 5595 049ed4486972
child 5597 ffc0b228cee6
(svn r7614) [cbh] - Codechange: Moved the DiagDirection of the bridge head from m5 bits 0..1 to m4 bits 5..6
bridge_map.h
openttd.c
--- a/bridge_map.h	Fri Dec 29 12:18:43 2006 +0000
+++ b/bridge_map.h	Fri Dec 29 12:33:26 2006 +0000
@@ -58,7 +58,7 @@
 static inline DiagDirection GetBridgeRampDirection(TileIndex t)
 {
 	assert(IsBridgeTile(t));
-	return (DiagDirection)GB(_m[t].m5, 0, 2);
+	return (DiagDirection)GB(_m[t].m4, 5, 2);
 }
 
 
--- a/openttd.c	Fri Dec 29 12:18:43 2006 +0000
+++ b/openttd.c	Fri Dec 29 12:33:26 2006 +0000
@@ -1362,6 +1362,8 @@
 					}
 					CLRBIT(_m[tile].m5, 7);
 					SB(_m[tile].m5, 2, 2, 0);
+					SB(_m[tile].m4, 5, 2, GB(_m[tile].m5, 0, 2));
+					SB(_m[tile].m5, 0, 2, 0);
 				} else { /* Tunnel */
 					SetTileType(tile, MP_TUNNEL);
 				}