summaryrefslogtreecommitdiff
path: root/src/train_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-07-01 19:11:47 +0000
committerrubidium <rubidium@openttd.org>2007-07-01 19:11:47 +0000
commit83a880c882992efb1b949b26ac881abc3825964f (patch)
tree2e6180dd4e262fcc66cf94a5d26c4c6fb7df642f /src/train_gui.cpp
parentc49fd0957d9e0fbecd365b2c86e82a1a37625921 (diff)
downloadopenttd-83a880c882992efb1b949b26ac881abc3825964f.tar.xz
(svn r10408) -Codechange: make GetImage a class method of Vehicle instead of Get(Aircraft|RoadVeh|Ship|Train)Image.
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 161a997b7..699feb4b1 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -93,7 +93,7 @@ void DrawTrainImage(const Vehicle *v, int x, int y, int count, int skip, Vehicle
if (dx + width > 0) {
if (dx <= count) {
SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
- DrawSprite(GetTrainImage(v, DIR_W), pal, 16 + WagonLengthToPixels(dx), 7 + (is_custom_sprite(RailVehInfo(v->engine_type)->image_index) ? _traininfo_vehicle_pitch : 0));
+ DrawSprite(v->GetImage(DIR_W), pal, 16 + WagonLengthToPixels(dx), 7 + (is_custom_sprite(RailVehInfo(v->engine_type)->image_index) ? _traininfo_vehicle_pitch : 0));
if (v->index == selection) {
/* Set the highlight position */
highlight_l = WagonLengthToPixels(dx) + 1;
@@ -459,7 +459,7 @@ static void DrawTrainDetailsWindow(Window *w)
u = v;
do {
SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
- DrawSprite(GetTrainImage(u, DIR_W), pal, x + WagonLengthToPixels(4 + dx), y + 6 + (is_custom_sprite(RailVehInfo(u->engine_type)->image_index) ? _traininfo_vehicle_pitch : 0));
+ DrawSprite(u->GetImage(DIR_W), pal, x + WagonLengthToPixels(4 + dx), y + 6 + (is_custom_sprite(RailVehInfo(u->engine_type)->image_index) ? _traininfo_vehicle_pitch : 0));
dx += u->u.rail.cached_veh_length;
u = u->next;
} while (u != NULL && IsArticulatedPart(u) && u->cargo_cap == 0);