(svn r18812) -Codechange: make some functions in train.h functions of Train.

This commit is contained in:
rubidium
2010-01-15 18:23:52 +00:00
parent 55d1db5b28
commit aaf0b4b46c
10 changed files with 84 additions and 80 deletions

View File

@@ -44,7 +44,6 @@ enum VehicleRailFlags {
byte FreightWagonMult(CargoID cargo);
void UpdateTrainAcceleration(Train *v);
void CheckTrainsLengths();
void FreeTrainTrackReservation(const Train *v, TileIndex origin = INVALID_TILE, Trackdir orig_td = INVALID_TRACKDIR);
@@ -52,11 +51,6 @@ bool TryPathReserve(Train *v, bool mark_as_stuck = false, bool first_tile_okay =
int GetTrainStopLocation(StationID station_id, TileIndex tile, const Train *v, int *station_ahead, int *station_length);
void TrainConsistChanged(Train *v, bool same_length);
void TrainPowerChanged(Train *v);
int GetTrainCurveSpeedLimit(Train *v);
Money GetTrainRunningCost(const Train *v);
/** Variables that are cached to improve performance and such */
struct TrainCache {
/* Cached wagon override spritegroup */
@@ -139,6 +133,14 @@ struct Train : public SpecializedVehicle<Train, VEH_TRAIN> {
void ReserveTrackUnderConsist() const;
int GetCurveSpeedLimit() const;
void ConsistChanged(bool same_length);
void CargoChanged();
void PowerChanged();
void UpdateAcceleration();
/**
* enum to handle train subtypes
* Do not access it directly unless you have to. Use the access functions below