OpenTTD
|
The information about a vehicle list. More...
#include <vehiclelist.h>
Public Member Functions | |
uint32 | Pack () const |
Pack a VehicleListIdentifier in a single uint32. More... | |
bool | UnpackIfValid (uint32 data) |
Unpack a VehicleListIdentifier from a single uint32. More... | |
VehicleListIdentifier (VehicleListType type, VehicleType vtype, CompanyID company, uint index=0) | |
Create a simple vehicle list. More... | |
Static Public Member Functions | |
static VehicleListIdentifier | UnPack (uint32 data) |
Decode a packed vehicle list identifier into a new one. More... | |
Data Fields | |
VehicleListType | type |
The type of vehicle list. | |
VehicleType | vtype |
The vehicle type associated with this list. | |
CompanyID | company |
The company associated with this list. | |
uint32 | index |
A vehicle list type specific index. | |
The information about a vehicle list.
Definition at line 31 of file vehiclelist.h.
|
inline |
uint32 VehicleListIdentifier::Pack | ( | ) | const |
Pack a VehicleListIdentifier in a single uint32.
Definition at line 23 of file vehiclelist.cpp.
References company, and OWNER_NONE.
|
static |
Decode a packed vehicle list identifier into a new one.
data | The data to unpack. |
Definition at line 55 of file vehiclelist.cpp.
References UnpackIfValid().
bool VehicleListIdentifier::UnpackIfValid | ( | uint32 | data | ) |
Unpack a VehicleListIdentifier from a single uint32.
data | The data to unpack. |
Definition at line 40 of file vehiclelist.cpp.
References company, GB(), and OWNER_NONE.
Referenced by CmdMassStartStopVehicle(), CmdSendVehicleToDepot(), and UnPack().