summaryrefslogtreecommitdiff
path: root/src/train_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2016-10-16 14:58:38 +0000
committerfrosch <frosch@openttd.org>2016-10-16 14:58:38 +0000
commitc175067ed9c17d43feaf356cd575dddddd699889 (patch)
treef865fa356c59ab450aa1c93a22f024f15d675224 /src/train_gui.cpp
parentd2393b4f6c89b75a90452fe68ab8a1cfbd8c353f (diff)
downloadopenttd-c175067ed9c17d43feaf356cd575dddddd699889.tar.xz
(svn r27667) -Codechange: Add VehicleSpriteSeq::GetBounds and Draw.
Diffstat (limited to 'src/train_gui.cpp')
-rw-r--r--src/train_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp
index 42ba87c84..513f57fbb 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -126,7 +126,7 @@ void DrawTrainImage(const Train *v, int left, int right, int y, VehicleID select
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
VehicleSpriteSeq seq;
v->GetImage(dir, image_type, &seq);
- DrawSprite(seq.sprite, pal, px + (rtl ? -offset.x : offset.x), height / 2 + offset.y);
+ seq.Draw(px + (rtl ? -offset.x : offset.x), height / 2 + offset.y, pal, v->vehstatus & VS_CRASHED);
}
if (!v->IsArticulatedPart()) sel_articulated = false;
@@ -387,7 +387,7 @@ void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_po
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
VehicleSpriteSeq seq;
u->GetImage(dir, EIT_IN_DETAILS, &seq);
- DrawSprite(seq.sprite, pal, px + (rtl ? -offset.x : offset.x), y - line_height * vscroll_pos + sprite_y_offset + pitch);
+ seq.Draw(px + (rtl ? -offset.x : offset.x), y - line_height * vscroll_pos + sprite_y_offset + pitch, pal, v->vehstatus & VS_CRASHED);
}
px += rtl ? -width : width;
dx += width;