diff options
author | rubidium <rubidium@openttd.org> | 2007-12-27 13:35:39 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-12-27 13:35:39 +0000 |
commit | 722613f7f3d833e28193f4c628161a372aa346b5 (patch) | |
tree | 7262db82a9e80413b5783b88be96602fdd29a485 /src/vehicle_gui.h | |
parent | ae3206cd97f78a4657f6a33603125bf98811b726 (diff) | |
download | openttd-722613f7f3d833e28193f4c628161a372aa346b5.tar.xz |
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
Diffstat (limited to 'src/vehicle_gui.h')
-rw-r--r-- | src/vehicle_gui.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/vehicle_gui.h b/src/vehicle_gui.h index fe9235c04..cc16f17dd 100644 --- a/src/vehicle_gui.h +++ b/src/vehicle_gui.h @@ -6,7 +6,7 @@ #define VEHICLE_GUI_H #include "window_gui.h" -#include "vehicle.h" +#include "vehicle_type.h" void DrawVehicleProfitButton(const Vehicle *v, int x, int y); void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order); @@ -50,8 +50,8 @@ void PlayerVehWndProc(Window *w, WindowEvent *e); int DrawVehiclePurchaseInfo(int x, int y, uint w, EngineID engine_number); -void DrawTrainImage(const Vehicle *v, int x, int y, int count, int skip, VehicleID selection); -void DrawRoadVehImage(const Vehicle *v, int x, int y, int count, VehicleID selection); +void DrawTrainImage(const Vehicle *v, int x, int y, VehicleID selection, int count, int skip); +void DrawRoadVehImage(const Vehicle *v, int x, int y, VehicleID selection, int count); void DrawShipImage(const Vehicle *v, int x, int y, VehicleID selection); void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selection); @@ -71,16 +71,7 @@ void ShowReplaceVehicleWindow(VehicleType vehicletype); void DrawSmallOrderList(const Vehicle *v, int x, int y); void ShowReplaceGroupVehicleWindow(GroupID group, VehicleType veh); -static inline void DrawVehicleImage(const Vehicle *v, int x, int y, int count, int skip, VehicleID selection) -{ - switch (v->type) { - case VEH_TRAIN: DrawTrainImage(v, x, y, count, skip, selection); break; - case VEH_ROAD: DrawRoadVehImage(v, x, y, count, selection); break; - case VEH_SHIP: DrawShipImage(v, x, y, selection); break; - case VEH_AIRCRAFT: DrawAircraftImage(v, x, y, selection); break; - default: NOT_REACHED(); - } -} +void DrawVehicleImage(const Vehicle *v, int x, int y, VehicleID selection, int count, int skip); static inline uint GetVehicleListHeight(VehicleType type) { |