diff options
author | frosch <frosch@openttd.org> | 2016-10-16 14:57:56 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2016-10-16 14:57:56 +0000 |
commit | d2393b4f6c89b75a90452fe68ab8a1cfbd8c353f (patch) | |
tree | c7934b2d2a19fa55c53ac063b91cc519fb4b753a /src/roadveh_gui.cpp | |
parent | f5409c713b002012c6a2218de1720a91282eab67 (diff) | |
download | openttd-d2393b4f6c89b75a90452fe68ab8a1cfbd8c353f.tar.xz |
(svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq.
Diffstat (limited to 'src/roadveh_gui.cpp')
-rw-r--r-- | src/roadveh_gui.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp index 46ff6cea7..26027a889 100644 --- a/src/roadveh_gui.cpp +++ b/src/roadveh_gui.cpp @@ -149,7 +149,9 @@ void DrawRoadVehImage(const Vehicle *v, int left, int right, int y, VehicleID se if (rtl ? px + width > 0 : px - width < max_width) { PaletteID pal = (u->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(u); - DrawSprite(u->GetImage(dir, image_type), pal, px + (rtl ? -offset.x : offset.x), ScaleGUITrad(6) + offset.y); + VehicleSpriteSeq seq; + u->GetImage(dir, image_type, &seq); + DrawSprite(seq.sprite, pal, px + (rtl ? -offset.x : offset.x), ScaleGUITrad(6) + offset.y); } px += rtl ? -width : width; |