(svn r6646) -Codechange: [vehicle list window] Cleaned up the drawing code

This moved a few of the strings and sprites a few pixels. Hopefully this will work out ok.
This commit is contained in:
bjarni
2006-10-05 08:15:51 +00:00
parent 7606b2707d
commit ff6f83b56c
6 changed files with 68 additions and 91 deletions

View File

@@ -4,6 +4,7 @@
#define VEHICLE_GUI_H
#include "window.h"
#include "vehicle.h"
void DrawVehicleProfitButton(const Vehicle *v, int x, int y);
void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order);
@@ -40,9 +41,7 @@ void DrawShipPurchaseInfo(int x, int y, 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, VehicleID selection);
void DrawShipImage(const Vehicle *v, int x, int y, VehicleID selection);
void DrawSmallOrderListShip(const Vehicle *v, int x, int y);
void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selection);
void DrawSmallOrderListAircraft(const Vehicle *v, int x, int y);
void ShowBuildTrainWindow(TileIndex tile);
void ShowBuildRoadVehWindow(TileIndex tile);
@@ -57,4 +56,16 @@ void ShowVehicleListWindow(PlayerID player, StationID station, byte vehicle_type
void ShowVehWithSharedOrders(Vehicle *v, byte vehicle_type);
void ShowVehDepotOrders(PlayerID player, byte vehicle_type, TileIndex depot_tile);
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, selection); break;
case VEH_Ship: DrawShipImage(v, x, y, selection); break;
case VEH_Aircraft: DrawAircraftImage(v, x, y, selection); break;
default: NOT_REACHED();
}
}
#endif /* VEHICLE_GUI_H */