49 void FillDefaultCapacities(
const Engine *e);
64void ShowVehicleListWindow(
const Vehicle *v);
100 default: NOT_REACHED();
111bool VehicleClicked(VehicleList::const_iterator begin, VehicleList::const_iterator end);
116void StopGlobalFollowVehicle(
const Vehicle *v);
uint8_t CargoID
Cargo slots to indicate a cargo type within a game.
Types related to companies.
Owner
Enum for all companies/owners.
Types related to engines.
uint16_t EngineID
Unique identification number of an engine.
#define DECLARE_ENUM_AS_ADDABLE(EnumType)
Operator that allows this enumeration to be added to any other enumeration.
uint8_t VehicleOrderID
The index of an order within its current vehicle (not pool related)
Types related to stations.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Class for storing amounts of cargo.
Specification of a rectangle with absolute coordinates of all edges.
Extra information about refitted cargo and capacity.
CargoArray all_capacities
Capacities for all cargoes.
uint16_t mail_capacity
Mail capacity if available.
uint capacity
Cargo capacity.
'Train' is either a loco or a wagon.
Dimensions of a cell in the purchase/depot windows.
uint extend_left
Extend of the cell to the left.
uint height
Vehicle cell height.
uint extend_right
Extend of the cell to the right.
Data structure for viewport, display of a part of the world.
Data structure for an opened window.
Vehicle * CheckClickOnVehicle(const Viewport *vp, int x, int y)
Find the vehicle close to the clicked coordinates.
int GetSingleVehicleWidth(const Vehicle *v, EngineImageType image_type)
Get the width of a vehicle (part) in pixels.
int GetVehicleWidth(const Vehicle *v, EngineImageType image_type)
Get the width of a vehicle (including all parts of the consist) in pixels.
StringID GetCargoSubtypeText(const Vehicle *v)
Get the cargo subtype text from NewGRF for the vehicle details window.
void DrawTrainImage(const Train *v, const Rect &r, VehicleID selection, EngineImageType image_type, int skip, VehicleID drag_dest=INVALID_VEHICLE)
Draws an image of a whole train.
void ShowVehicleViewWindow(const Vehicle *v)
Shows the vehicle view window of the given vehicle.
void DrawRoadVehImage(const Vehicle *v, const Rect &r, VehicleID selection, EngineImageType image_type, int skip=0)
Draws an image of a road vehicle chain.
uint GetVehicleHeight(VehicleType type)
Get the height of a single vehicle in the GUIs.
uint ShowRefitOptionsList(int left, int right, int y, EngineID engine)
Display list of cargo types of the engine, for the purchase information window.
TrainDetailsWindowTabs
The tabs in the train details window.
@ TDW_TAB_CAPACITY
Tab with cargo capacity of the vehicles.
@ TDW_TAB_TOTALS
Tab with sum of total cargo transported.
@ TDW_TAB_INFO
Tab with name and value of the vehicles.
@ TDW_TAB_CARGO
Tab with cargo carried by the vehicles.
void DrawVehicleImage(const Vehicle *v, const Rect &r, VehicleID selection, EngineImageType image_type, int skip)
Draws an image of a vehicle chain.
int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number, TestedEngineDetails &te)
Draw the purchase info details of a vehicle at a given location.
VehicleInvalidateWindowData
Special values for vehicle-related windows for the data parameter of InvalidateWindowData.
@ VIWD_CONSIST_CHANGED
Vehicle composition was changed.
@ VIWD_AUTOREPLACE
Autoreplace replaced the vehicle.
@ VIWD_MODIFY_ORDERS
Other order modifications.
@ VIWD_REMOVE_ALL_ORDERS
Removed / replaced all orders (after deleting / sharing).
void DrawShipImage(const Vehicle *v, const Rect &r, VehicleID selection, EngineImageType image_type)
Draws an image of a ship.
void DrawAircraftImage(const Vehicle *v, const Rect &r, VehicleID selection, EngineImageType image_type)
Draws an image of an aircraft.
bool VehicleClicked(const Vehicle *v)
Dispatch a "vehicle selected" event if any window waits for it.
void StartStopVehicle(const Vehicle *v, bool texteffect)
Executes CMD_START_STOP_VEHICLE for given vehicle.
void SetMouseCursorVehicle(const Vehicle *v, EngineImageType image_type)
Set the mouse cursor to look like a vehicle.
WindowClass GetWindowClassForVehicleType(VehicleType vt)
Get WindowClass for vehicle list of given vehicle type.
void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent, bool auto_refit=false)
Show the refit window for a vehicle.
VehicleCellSize GetVehicleImageCellSize(VehicleType type, EngineImageType image_type)
Get the GUI cell size for a vehicle image.
Functions/classes shared between the different vehicle list GUIs.
Types related to vehicles.
EngineImageType
Visualisation contexts of vehicles and engines.
VehicleType
Available vehicle types.
@ VEH_ROAD
Road vehicle type.
@ VEH_AIRCRAFT
Aircraft vehicle type.
@ VEH_SHIP
Ship vehicle type.
@ VEH_TRAIN
Train vehicle type.
uint32_t VehicleID
The type all our vehicle IDs have.
static const VehicleID INVALID_VEHICLE
Constant representing a non-existing vehicle.
Functions and type for generating vehicle lists.
Types related to windows.
WindowClass
Window classes.
@ WC_ROADVEH_LIST
Road vehicle list; Window numbers:
@ WC_SHIPS_LIST
Ships list; Window numbers:
@ WC_TRAINS_LIST
Trains list; Window numbers:
@ WC_AIRCRAFT_LIST
Aircraft list; Window numbers: