summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2014-10-04 16:40:23 +0000
committerpeter1138 <peter1138@openttd.org>2014-10-04 16:40:23 +0000
commitce9fab58bc02cda3fde8d3cb42fd88f25889b340 (patch)
tree7b92188f2ac8622c17ee45cd6c54bd16196c064c /src/train_cmd.cpp
parent587ad940cc46ffb573e080320bac51085994b7f7 (diff)
downloadopenttd-ce9fab58bc02cda3fde8d3cb42fd88f25889b340.tar.xz
(svn r26951) -Codechange: Do the GUI-scale dance for vehicle, depot, and purchase lists.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 73e26a4b1..a31b9272d 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -464,10 +464,10 @@ int Train::GetDisplayImageWidth(Point *offset) const
}
if (offset != NULL) {
- offset->x = reference_width / 2;
- offset->y = vehicle_pitch;
+ offset->x = UnScaleByZoom(2 * reference_width, ZOOM_LVL_GUI);
+ offset->y = UnScaleByZoom(4 * vehicle_pitch, ZOOM_LVL_GUI);
}
- return this->gcache.cached_veh_length * reference_width / VEHICLE_LENGTH;
+ return UnScaleByZoom(4 * this->gcache.cached_veh_length * reference_width / VEHICLE_LENGTH, ZOOM_LVL_GUI);
}
static SpriteID GetDefaultTrainSprite(uint8 spritenum, Direction direction)
@@ -514,7 +514,7 @@ static SpriteID GetRailIcon(EngineID engine, bool rear_head, int &y, EngineImage
SpriteID sprite = GetCustomVehicleIcon(engine, dir, image_type);
if (sprite != 0) {
if (e->GetGRF() != NULL) {
- y += e->GetGRF()->traininfo_vehicle_pitch;
+ y += UnScaleByZoom(4 * e->GetGRF()->traininfo_vehicle_pitch, ZOOM_LVL_GUI);
}
return sprite;
}