diff options
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index fa88841ff..9a6db3267 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1045,19 +1045,6 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int } } -static void DrawVehiclePurchaseInfoLocal(const int x, const int y, uint w, const EngineID engine_number) -{ - switch (GetEngine(engine_number)->type) { - case VEH_Road: DrawRoadVehPurchaseInfo(x, y, w, engine_number); break; - case VEH_Ship: - case VEH_Train: - case VEH_Aircraft: - DrawVehiclePurchaseInfo(x, y, w, engine_number); - break; - default: NOT_REACHED(); - } -} - static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) { static const StringID _vehicle_type_names[] = { @@ -1141,7 +1128,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) for (i = 0 ; i < 2 ; i++) { if (selected_id[i] != INVALID_ENGINE) { const Widget *wi = &w->widget[i == 0 ? 3 : 11]; - DrawVehiclePurchaseInfoLocal(wi->left + 2 , wi->top + 1, wi->right - wi->left - 2, selected_id[i]); + DrawVehiclePurchaseInfo(wi->left + 2 , wi->top + 1, wi->right - wi->left - 2, selected_id[i]); } } } break; // end of paint @@ -1737,12 +1724,7 @@ void PlayerVehWndProc(Window *w, WindowEvent *e) } break; case VLW_WIDGET_NEW_VEHICLES: - switch (vl->vehicle_type) { - case VEH_Road: ShowBuildRoadVehWindow(0); break; - case VEH_Ship: - case VEH_Train: - case VEH_Aircraft: ShowBuildVehicleWindow(0, vl->vehicle_type); break; - } + ShowBuildVehicleWindow(0, vl->vehicle_type); break; case VLW_WIDGET_MANAGE_VEHICLES: |