summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-24 20:06:10 +0000
committerrubidium <rubidium@openttd.org>2007-06-24 20:06:10 +0000
commit1caa0f7fb7f1d2fc44fcec0201a53a491b0fda05 (patch)
treee72d8d2fea1039573b7b88c79454139708e0b609 /src
parentb17b9351dd4e27fe15642655cd58bd6a3731d788 (diff)
downloadopenttd-1caa0f7fb7f1d2fc44fcec0201a53a491b0fda05.tar.xz
(svn r10308) -Codechange: some "cleanup" chunks from B. N. SmatZ!' work on fixing FS#119.
Diffstat (limited to 'src')
-rw-r--r--src/landscape.cpp2
-rw-r--r--src/rail_cmd.cpp5
-rw-r--r--src/tunnelbridge_cmd.cpp4
3 files changed, 6 insertions, 5 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp
index 61a9a1a8e..698ba9f4a 100644
--- a/src/landscape.cpp
+++ b/src/landscape.cpp
@@ -252,7 +252,7 @@ void DrawFoundation(TileInfo *ti, uint f)
if (f < 15) {
/* leveled foundation
* Use the original slope sprites if NW and NE borders should be visible */
- if (sprite_base == SPR_SLOPES_BASE - 15) sprite_base = SPR_FOUNDATION_BASE;
+ if (sprite_base == SPR_SLOPES_BASE - 15) sprite_base = SPR_FOUNDATION_BASE;
AddSortableSpriteToDraw(sprite_base + f, PAL_NONE, ti->x, ti->y, 16, 16, 7, ti->z);
ti->z += TILE_HEIGHT;
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 6dc6d36a6..dd852bb1f 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1289,9 +1289,6 @@ static void DrawTrackBits(TileInfo* ti, TrackBits track)
if (track & TRACK_BIT_LEFT) DrawGroundSprite(rti->base_sprites.single_w, PAL_NONE);
if (track & TRACK_BIT_RIGHT) DrawGroundSprite(rti->base_sprites.single_e, PAL_NONE);
}
-
- if (GetRailType(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenary(ti);
-
}
static void DrawSignals(TileIndex tile, TrackBits rails)
@@ -1340,6 +1337,8 @@ static void DrawTile_Track(TileInfo *ti)
if (HASBIT(_display_opt, DO_FULL_DETAIL)) DrawTrackDetails(ti);
+ if (GetRailType(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenary(ti);
+
if (HasSignals(ti->tile)) DrawSignals(ti->tile, rails);
} else {
/* draw depot/waypoint */
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 1a3bc0243..291b1ff5c 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -1004,7 +1004,7 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
* it doesn't disappear behind it
*/
AddSortableSpriteToDraw(
- image, pal, ti->x, ti->y, 16, 16, ti->tileh == SLOPE_FLAT ? 0 : 8, ti->z
+ image, pal, ti->x, ti->y, 16, 16, ti->tileh == SLOPE_FLAT ? 0 : 1, ti->z
);
if (GetBridgeTransportType(ti->tile) == TRANSPORT_ROAD) {
@@ -1026,6 +1026,8 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
}
DrawBridgeMiddle(ti);
+ } else {
+ NOT_REACHED();
}
}