src/road_cmd.cpp
branchcpp_gui
changeset 6308 646711c5feaa
parent 6307 f40e88cff863
--- a/src/road_cmd.cpp	Sun Apr 15 17:04:44 2007 +0000
+++ b/src/road_cmd.cpp	Sat Apr 21 08:23:57 2007 +0000
@@ -60,10 +60,10 @@
 	/* Get a bitmask of which neighbouring roads has a tile */
 	n = ROAD_NONE;
 	present = GetAnyRoadBits(tile);
-	if (present & ROAD_NE && GetAnyRoadBits(TILE_ADDXY(tile,-1, 0)) & ROAD_SW) n |= ROAD_NE;
+	if (present & ROAD_NE && GetAnyRoadBits(TILE_ADDXY(tile, -1, 0)) & ROAD_SW) n |= ROAD_NE;
 	if (present & ROAD_SE && GetAnyRoadBits(TILE_ADDXY(tile, 0, 1)) & ROAD_NW) n |= ROAD_SE;
 	if (present & ROAD_SW && GetAnyRoadBits(TILE_ADDXY(tile, 1, 0)) & ROAD_NE) n |= ROAD_SW;
-	if (present & ROAD_NW && GetAnyRoadBits(TILE_ADDXY(tile, 0,-1)) & ROAD_SE) n |= ROAD_NW;
+	if (present & ROAD_NW && GetAnyRoadBits(TILE_ADDXY(tile, 0, -1)) & ROAD_SE) n |= ROAD_NW;
 
 	/* If 0 or 1 bits are set in n, or if no bits that match the bits to remove,
 	 * then allow it */
@@ -90,6 +90,7 @@
 
 /** Delete a piece of road.
  * @param tile tile where to remove road from
+ * @param flags operation to perform
  * @param p1 bit 0..3 road pieces to remove (RoadBits)
  * @param p2 unused
  */
@@ -251,6 +252,7 @@
 
 /** Build a piece of road.
  * @param tile tile where to build road
+ * @param flags operation to perform
  * @param p1 bit 0..3 road pieces to build (RoadBits)
  * @param p2 the town that is building the road (0 if not applicable)
  */
@@ -402,6 +404,7 @@
 
 /** Build a long piece of road.
  * @param end_tile end tile of drag
+ * @param flags operation to perform
  * @param p1 start tile of drag
  * @param p2 various bitstuffed elements
  * - p2 = (bit 0) - start tile starts in the 2nd half of tile (p2 & 1)
@@ -428,7 +431,7 @@
 		TileIndex t = start_tile;
 		start_tile = end_tile;
 		end_tile = t;
-		p2 ^= IS_INT_INSIDE(p2&3, 1, 3) ? 3 : 0;
+		p2 ^= IS_INT_INSIDE(p2 & 3, 1, 3) ? 3 : 0;
 	}
 
 	cost = 0;
@@ -458,6 +461,7 @@
 
 /** Remove a long piece of road.
  * @param end_tile end tile of drag
+ * @param flags operation to perform
  * @param p1 start tile of drag
  * @param p2 various bitstuffed elements
  * - p2 = (bit 0) - start tile starts in the 2nd half of tile (p2 & 1)
@@ -512,6 +516,7 @@
 
 /** Build a road depot.
  * @param tile tile where to build the depot
+ * @param flags operation to perform
  * @param p1 bit 0..1 entrance direction (DiagDirection)
  * @param p2 unused
  *
@@ -659,7 +664,6 @@
 /**
  * Draw ground sprite and road pieces
  * @param ti TileInfo
- * @param road RoadBits to draw
  */
 static void DrawRoadBits(TileInfo* ti)
 {