OpenTTD Source 20241224-master-gee860a5c8e
|
Container for each entry point of a drive through road stop. More...
#include <roadstop_base.h>
Public Member Functions | |
Entry () | |
Create an entry. | |
int | GetLength () const |
Get the length of this drive through stop. | |
int | GetOccupied () const |
Get the amount of occupied space in this drive through stop. | |
void | Leave (const RoadVehicle *rv) |
Leave the road stop. | |
void | Enter (const RoadVehicle *rv) |
Enter the road stop. | |
void | CheckIntegrity (const RoadStop *rs) const |
Check the integrity of the data in this struct. | |
void | Rebuild (const RoadStop *rs, int side=-1) |
Rebuild, from scratch, the vehicles and other metadata on this stop. | |
Private Attributes | |
int | length |
The length of the stop in tile 'units'. | |
int | occupied |
The amount of occupied stop in tile 'units'. | |
Friends | |
struct | RoadStop |
Oh yeah, the road stop may play with me. | |
Container for each entry point of a drive through road stop.
Definition at line 33 of file roadstop_base.h.
|
inline |
Create an entry.
Definition at line 42 of file roadstop_base.h.
void RoadStop::Entry::CheckIntegrity | ( | const RoadStop * | rs | ) | const |
Check the integrity of the data in this struct.
rs | the roadstop this entry is part of |
Definition at line 393 of file roadstop.cpp.
References RoadStop::east, GetDriveThroughStopAxis(), HasBit(), RoadStop::IsDriveThroughRoadStopContinuation(), IsDriveThroughStopTile(), length, occupied, Rebuild(), RoadStop::RSSFB_BASE_ENTRY, RoadStop::status, TileOffsByAxis(), and RoadStop::xy.
void RoadStop::Entry::Enter | ( | const RoadVehicle * | rv | ) |
Enter the road stop.
rv | the vehicle that enters the stop |
Definition at line 288 of file roadstop.cpp.
References GroundVehicleCache::cached_total_length, and GroundVehicle< T, Type >::gcache.
Referenced by RoadStop::Enter().
|
inline |
Get the length of this drive through stop.
Definition at line 48 of file roadstop_base.h.
References length.
Referenced by CYapfCostRoadT< Types >::OneTileCost().
|
inline |
Get the amount of occupied space in this drive through stop.
Definition at line 57 of file roadstop_base.h.
References occupied.
Referenced by CYapfCostRoadT< Types >::OneTileCost().
void RoadStop::Entry::Leave | ( | const RoadVehicle * | rv | ) |
Leave the road stop.
rv | the vehicle that leaves the stop |
Definition at line 278 of file roadstop.cpp.
References GroundVehicleCache::cached_total_length, GroundVehicle< T, Type >::gcache, and occupied.
Referenced by RoadStop::Leave().
void RoadStop::Entry::Rebuild | ( | const RoadStop * | rs, |
int | side = -1 |
||
) |
Rebuild, from scratch, the vehicles and other metadata on this stop.
rs | the roadstop this entry is part of |
side | the side of the road stop to look at |
Definition at line 365 of file roadstop.cpp.
References RoadStopEntryRebuilderHelper::dir, RoadStop::east, FindVehicleOnPos(), FindVehiclesInRoadStop(), GetDriveThroughStopAxis(), GetEntryDirection(), HasBit(), RoadStop::IsDriveThroughRoadStopContinuation(), RoadStop::RSSFB_BASE_ENTRY, RoadStop::status, TILE_SIZE, TileOffsByAxis(), RoadStopEntryRebuilderHelper::vehicles, and RoadStop::xy.
Referenced by CheckIntegrity(), and RoadStop::ClearDriveThrough().
|
friend |
Oh yeah, the road stop may play with me.
Definition at line 39 of file roadstop_base.h.
|
private |
The length of the stop in tile 'units'.
Definition at line 35 of file roadstop_base.h.
Referenced by CheckIntegrity(), RoadStop::ClearDriveThrough(), GetLength(), and RoadStop::MakeDriveThrough().
|
private |
The amount of occupied stop in tile 'units'.
Definition at line 36 of file roadstop_base.h.
Referenced by CheckIntegrity(), GetOccupied(), Leave(), and RoadStop::MakeDriveThrough().