(svn r8709) -Fix/Codechange: Rename the function GetStationPlatforms into GetPlatformLength because that is what it really does. Overload it because there is already a GetPlatformLength (one gives the length of the whole platform, the other gives the remaining length in a given direction). Turned both functions into methods of Station. While messing around with it, fix a problem where loading times for overhanging trains are miscomputed.

This commit is contained in:
celestar
2007-02-13 16:36:38 +00:00
parent 5e880a6a75
commit d9385f2798
6 changed files with 55 additions and 56 deletions

View File

@@ -167,6 +167,8 @@ struct Station {
void MarkDirty() const;
void MarkTilesDirty() const;
bool TileBelongsToRailStation(TileIndex tile) const;
uint GetPlatformLength(TileIndex tile, DiagDirection dir) const;
uint GetPlatformLength(TileIndex tile) const;
bool IsBuoy() const;
bool IsValid() const;
@@ -260,8 +262,6 @@ DECLARE_OLD_POOL(RoadStop, RoadStop, 5, 2000)
void AfterLoadStations(void);
void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile, int w, int h, int rad);
void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int h, int rad);
uint GetStationPlatforms(const Station *st, TileIndex tile);
uint GetPlatformLength(TileIndex tile, DiagDirection dir);
const DrawTileSprites *GetStationTileLayout(byte gfx);