(svn r18812) -Codechange: make some functions in train.h functions of Train.
This commit is contained in:
14
src/train.h
14
src/train.h
@@ -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
|
||||
|
Reference in New Issue
Block a user