summaryrefslogtreecommitdiff
path: root/src/train.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-15 18:23:52 +0000
committerrubidium <rubidium@openttd.org>2010-01-15 18:23:52 +0000
commitaaf0b4b46ca2745bb12dad5c228c23446c3203ec (patch)
treeef1d90f676cd9752edb683bff8af3907da4faf19 /src/train.h
parent55d1db5b2851c5b3357126adb720a4a91038b7dc (diff)
downloadopenttd-aaf0b4b46ca2745bb12dad5c228c23446c3203ec.tar.xz
(svn r18812) -Codechange: make some functions in train.h functions of Train.
Diffstat (limited to 'src/train.h')
-rw-r--r--src/train.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/train.h b/src/train.h
index 1e45ffd00..9ce4764f3 100644
--- a/src/train.h
+++ b/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