summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-03-06 12:45:47 +0000
committerterkhen <terkhen@openttd.org>2010-03-06 12:45:47 +0000
commit1c3b7c35a7efbd05da32c97d0a6b4fc49fed087a (patch)
tree20ea9da7343cdd9d2ec4e28db28118d1654b728d
parent07c373d60a9f2d262617dbfdf719499687aeea73 (diff)
downloadopenttd-1c3b7c35a7efbd05da32c97d0a6b4fc49fed087a.tar.xz
(svn r19340) -Documentation: Add a list of required functions to GroundVehicle.
-rw-r--r--src/ground_vehicle.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ground_vehicle.hpp b/src/ground_vehicle.hpp
index c87dbf76f..106b0b954 100644
--- a/src/ground_vehicle.hpp
+++ b/src/ground_vehicle.hpp
@@ -39,6 +39,21 @@ struct AccelerationCache {
/**
* Base class for all vehicles that move through ground.
+ *
+ * Child classes must define all of the following functions.
+ * These functions are not defined as pure virtual functions at this class to improve performance.
+ *
+ * virtual uint16 GetPower() const = 0;
+ * virtual uint16 GetPoweredPartPower(const T *head) const = 0;
+ * virtual uint16 GetWeight() const = 0;
+ * virtual byte GetTractiveEffort() const = 0;
+ * virtual AccelStatus GetAccelerationStatus() const = 0;
+ * virtual uint16 GetCurrentSpeed() const = 0;
+ * virtual uint32 GetRollingFriction() const = 0;
+ * virtual int GetAccelerationType() const = 0;
+ * virtual int32 GetSlopeSteepness() const = 0;
+ * virtual uint16 GetInitialMaxSpeed() const = 0;
+ * virtual uint16 GetMaxTrackSpeed() const = 0;
*/
template <class T, VehicleType Type>
struct GroundVehicle : public SpecializedVehicle<T, Type> {