summaryrefslogtreecommitdiff
path: root/src/aircraft_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/aircraft_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/aircraft_gui.cpp')
-rw-r--r--src/aircraft_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp
index fafa7195f..360c02a7f 100644
--- a/src/aircraft_gui.cpp
+++ b/src/aircraft_gui.cpp
@@ -76,11 +76,11 @@ void DrawAircraftDetails(const Aircraft *v, int left, int right, int y)
* @param y Vertical position to draw at
* @param selection Selected vehicle to draw a frame around
*/
-void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID selection)
+void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID selection, EngineImageType image_type)
{
bool rtl = _current_text_dir == TD_RTL;
- SpriteID sprite = v->GetImage(rtl ? DIR_E : DIR_W);
+ SpriteID sprite = v->GetImage(rtl ? DIR_E : DIR_W, image_type);
const Sprite *real_sprite = GetSprite(sprite, ST_NORMAL);
int x = rtl ? right - real_sprite->width - real_sprite->x_offs : left - real_sprite->x_offs;
@@ -90,7 +90,7 @@ void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID s
DrawSprite(sprite, pal, x, y + 10);
if (helicopter) {
const Aircraft *a = Aircraft::From(v);
- SpriteID rotor_sprite = GetCustomRotorSprite(a, true);
+ SpriteID rotor_sprite = GetCustomRotorSprite(a, true, image_type);
if (rotor_sprite == 0) rotor_sprite = SPR_ROTOR_STOPPED;
DrawSprite(rotor_sprite, PAL_NONE, x, y + 5);
}