summaryrefslogtreecommitdiff
path: root/src/train_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-11-01 16:51:47 +0000
committerfrosch <frosch@openttd.org>2011-11-01 16:51:47 +0000
commitbbc3409942565cd6876016e270288517cb6acafb (patch)
tree3079bbaa5682e25b2805774cd2382e9c0c6ef109 /src/train_gui.cpp
parente802dc66b9d1e913e77816184ed2744f737823ec (diff)
downloadopenttd-bbc3409942565cd6876016e270288517cb6acafb.tar.xz
(svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs.
Diffstat (limited to 'src/train_gui.cpp')
-rw-r--r--src/train_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp
index 7ae0103b8..a12bca0dd 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -90,7 +90,7 @@ static int HighlightDragPosition(int px, int max_width, VehicleID selection)
* @param skip Number of pixels to skip at the front (for scrolling)
* @param drag_dest The vehicle another one is dragged over, \c INVALID_VEHICLE if none.
*/
-void DrawTrainImage(const Train *v, int left, int right, int y, VehicleID selection, int skip, VehicleID drag_dest)
+void DrawTrainImage(const Train *v, int left, int right, int y, VehicleID selection, EngineImageType image_type, int skip, VehicleID drag_dest)
{
bool rtl = _current_text_dir == TD_RTL;
Direction dir = rtl ? DIR_E : DIR_W;
@@ -122,7 +122,7 @@ void DrawTrainImage(const Train *v, int left, int right, int y, VehicleID select
if (rtl ? px + width > 0 : px - width < max_width) {
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
- DrawSprite(v->GetImage(dir), pal, px + (rtl ? -offset.x : offset.x), 7 + offset.y);
+ DrawSprite(v->GetImage(dir, image_type), pal, px + (rtl ? -offset.x : offset.x), 7 + offset.y);
}
if (!v->IsArticulatedPart()) sel_articulated = false;
@@ -359,7 +359,7 @@ void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_po
int width = u->GetDisplayImageWidth(&offset);
if (vscroll_pos <= 0 && vscroll_pos > -vscroll_cap) {
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
- DrawSprite(u->GetImage(dir), pal, px + (rtl ? -offset.x : offset.x), y - line_height * vscroll_pos + sprite_y_offset + offset.y);
+ DrawSprite(u->GetImage(dir, EIT_IN_DETAILS), pal, px + (rtl ? -offset.x : offset.x), y - line_height * vscroll_pos + sprite_y_offset + offset.y);
}
px += rtl ? -width : width;
dx += width;