summaryrefslogtreecommitdiff
path: root/src/vehicle.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/vehicle.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/vehicle.cpp')
-rw-r--r--src/vehicle.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 775113536..8b17afdb9 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -249,16 +249,17 @@ void AfterLoadVehicles()
FOR_ALL_VEHICLES(v) {
switch (v->type) {
case VEH_ROAD:
- v->cur_image = GetRoadVehImage(v, v->direction);
v->u.road.roadtype = HASBIT(EngInfo(v->engine_type)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD;
v->u.road.compatible_roadtypes = RoadTypeToRoadTypes(v->u.road.roadtype);
+ /* FALL THROUGH */
+ case VEH_TRAIN:
+ case VEH_SHIP:
+ v->cur_image = v->GetImage(v->direction);
break;
- case VEH_TRAIN: v->cur_image = GetTrainImage(v, v->direction); break;
- case VEH_SHIP: v->cur_image = GetShipImage(v, v->direction); break;
case VEH_AIRCRAFT:
if (IsNormalAircraft(v)) {
- v->cur_image = GetAircraftImage(v, v->direction);
+ v->cur_image = v->GetImage(v->direction);
/* The plane's shadow will have the same image as the plane */
Vehicle *shadow = v->next;