(svn r11983) -Codechange: Add some helper functions for slopes and use them.

This commit is contained in:
frosch
2008-01-25 15:47:58 +00:00
parent d13311e710
commit d4dc5e0775
11 changed files with 150 additions and 107 deletions

View File

@@ -130,13 +130,7 @@ static void AdjustTileh(TileIndex tile, Slope *tileh)
} else if (*tileh != SLOPE_FLAT) {
*tileh = SLOPE_FLAT;
} else {
switch (GetTunnelBridgeDirection(tile)) {
case DIAGDIR_NE: *tileh = SLOPE_NE; break;
case DIAGDIR_SE: *tileh = SLOPE_SE; break;
case DIAGDIR_SW: *tileh = SLOPE_SW; break;
case DIAGDIR_NW: *tileh = SLOPE_NW; break;
default: NOT_REACHED();
}
*tileh = InclinedSlope(GetTunnelBridgeDirection(tile));
}
}
}