summaryrefslogtreecommitdiff
path: root/src/build_vehicle_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-08-30 17:38:28 +0000
committeralberth <alberth@openttd.org>2009-08-30 17:38:28 +0000
commit1a15f7e6a73ed7bbc16813fcd69b3e8b270a8a73 (patch)
treeb90b1e2744df4701f0f88490532eaf847a86f1b5 /src/build_vehicle_gui.cpp
parentfe7ca1b3e3a5cef63d61a117dbe1fda80b5e877d (diff)
downloadopenttd-1a15f7e6a73ed7bbc16813fcd69b3e8b270a8a73.tar.xz
(svn r17325) -Codechange: Un-duplicate engine drawing routines.
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r--src/build_vehicle_gui.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 1d67a221f..84ca486bb 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -703,17 +703,6 @@ int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number)
return y;
}
-static void DrawVehicleEngine(VehicleType type, int x, int y, EngineID engine, SpriteID pal)
-{
- switch (type) {
- case VEH_TRAIN: DrawTrainEngine( x, y, engine, pal); break;
- case VEH_ROAD: DrawRoadVehEngine( x, y, engine, pal); break;
- case VEH_SHIP: DrawShipEngine( x, y, engine, pal); break;
- case VEH_AIRCRAFT: DrawAircraftEngine(x, y, engine, pal); break;
- default: NOT_REACHED();
- }
-}
-
/** Engine drawing loop
* @param type Type of vehicle (VEH_*)
* @param x,y Where should the list start
@@ -763,7 +752,7 @@ void DrawEngineList(VehicleType type, int x, int r, int y, const GUIEngineList *
SetDParam(0, engine);
DrawString(x + x_offset, r, y, STR_ENGINE_NAME, engine == selected_id ? TC_WHITE : TC_BLACK);
- DrawVehicleEngine(type, x, y + y_offset, engine, (count_location != 0 && num_engines == 0) ? PALETTE_CRASH : GetEnginePalette(engine, _local_company));
+ DrawVehicleEngine(x, y + y_offset, engine, (count_location != 0 && num_engines == 0) ? PALETTE_CRASH : GetEnginePalette(engine, _local_company));
if (count_location != 0) {
SetDParam(0, num_engines);
DrawString(x, count_location, y + (GetVehicleListHeight(type) == 14 ? 3 : 8), STR_TINY_BLACK_COMA, TC_FROMSTRING, SA_RIGHT);