#include <roadveh.h>

Public Member Functions | |
| RoadVehicle () | |
| We don't want GCC to zero our struct! It already is zeroed and has an index! | |
| virtual | ~RoadVehicle () |
| We want to 'destruct' the right class. | |
| const char * | GetTypeString () const |
| void | MarkDirty () |
| void | UpdateDeltaXY (Direction direction) |
| ExpensesType | GetExpenseType (bool income) const |
| bool | IsPrimaryVehicle () const |
| SpriteID | GetImage (Direction direction) const |
| int | GetDisplaySpeed () const |
| int | GetDisplayMaxSpeed () const |
| Money | GetRunningCost () const |
| int | GetDisplayImageWidth (Point *offset=NULL) const |
| Get the width of a road vehicle image in the GUI. | |
| bool | IsInDepot () const |
| bool | IsStoppedInDepot () const |
| bool | Tick () |
| void | OnNewDay () |
| uint | Crash (bool flooded=false) |
| Trackdir | GetVehicleTrackdir () const |
| TileIndex | GetOrderStationLocation (StationID station) |
| bool | FindClosestDepot (TileIndex *location, DestinationID *destination, bool *reverse) |
| bool | IsBus () const |
| Check whether a roadvehicle is a bus. | |
| FORCEINLINE bool | IsRoadVehFront () const |
| Check if vehicle is a front engine. | |
| FORCEINLINE void | SetRoadVehFront () |
| Set front engine state. | |
| FORCEINLINE bool | IsArticulatedPart () const |
| Check if vehicl is an articulated part of an engine. | |
| FORCEINLINE void | SetArticulatedPart () |
| Set a vehicle to be an articulated part. | |
| FORCEINLINE bool | HasArticulatedPart () const |
| Check if an engine has an articulated part. | |
Data Fields | |
| RoadVehicleCache | rcache |
| Cache of often used calculated values. | |
| byte | state |
| byte | frame |
| uint16 | blocked_ctr |
| byte | overtaking |
| byte | overtaking_ctr |
| uint16 | crashed_ctr |
| byte | reverse_ctr |
| RoadType | roadtype |
| RoadTypes | compatible_roadtypes |
Definition at line 96 of file roadveh.h.
| virtual RoadVehicle::~RoadVehicle | ( | ) | [inline, virtual] |
| int RoadVehicle::GetDisplayImageWidth | ( | Point * | offset = NULL |
) | const |
Get the width of a road vehicle image in the GUI.
| offset | Additional offset for positioning the sprite; set to NULL if not needed |
Definition at line 100 of file roadveh_cmd.cpp.
References RoadVehicleCache::cached_veh_length, rcache, Point::x, and Point::y.
Referenced by DrawRoadVehImage().
| bool RoadVehicle::IsBus | ( | ) | const |
Check whether a roadvehicle is a bus.
Definition at line 89 of file roadveh_cmd.cpp.
References CC_PASSENGERS, IsCargoInClass(), and IsRoadVehFront().
Referenced by CmdCloneOrder(), and RoadFindPathToDest().
| FORCEINLINE bool RoadVehicle::IsRoadVehFront | ( | ) | const [inline] |
Check if vehicle is a front engine.
Definition at line 139 of file roadveh.h.
Referenced by AfterLoadVehicles(), DisasterTick_Ufo(), and IsBus().
| FORCEINLINE bool RoadVehicle::IsArticulatedPart | ( | ) | const [inline] |
Check if vehicl is an articulated part of an engine.
Definition at line 150 of file roadveh.h.
Referenced by HasArticulatedPart().
| FORCEINLINE bool RoadVehicle::HasArticulatedPart | ( | ) | const [inline] |
Check if an engine has an articulated part.
Definition at line 161 of file roadveh.h.
References IsArticulatedPart(), and SpecializedVehicle< RoadVehicle, VEH_ROAD >::Next().
Referenced by CheckConsistencyOfArticulatedVehicle(), CmdCloneVehicle(), DrawRoadVehDetails(), RoadStop::Enter(), IsArticulatedVehicleCarryingDifferentCargos(), and RoadFindPathToDest().
| byte RoadVehicle::state |
Definition at line 98 of file roadveh.h.
Referenced by CmdBuildRoadVeh(), CmdTurnRoadVeh(), RoadStop::Enter(), FindVehiclesInRoadStop(), and RoadStop::Leave().
1.5.6