diff options
author | rubidium <rubidium@openttd.org> | 2007-07-01 19:24:54 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-01 19:24:54 +0000 |
commit | 90f85c957ad8e8d2dfd23535701b3079fc2d2718 (patch) | |
tree | fb5afab9eaa026a83642f983053acfabe1d9f492 /src/vehicle.h | |
parent | 83a880c882992efb1b949b26ac881abc3825964f (diff) | |
download | openttd-90f85c957ad8e8d2dfd23535701b3079fc2d2718.tar.xz |
(svn r10409) -Codechange: replace (Aircraft|RoadVeh|Ship|Train)_Tick with a Tick method in the Vehicle class.
Diffstat (limited to 'src/vehicle.h')
-rw-r--r-- | src/vehicle.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vehicle.h b/src/vehicle.h index 8d2ac0e08..07d2e3acd 100644 --- a/src/vehicle.h +++ b/src/vehicle.h @@ -427,6 +427,11 @@ struct Vehicle { * @return the sprite for the given vehicle in the given direction */ virtual int GetImage(Direction direction) const { return 0; } + + /** + * Calls the tick handler of the vehicle + */ + virtual void Tick() = 0; }; /** @@ -453,6 +458,7 @@ struct SpecialVehicle : public Vehicle { const char *GetTypeString() const { return "special vehicle"; } void UpdateDeltaXY(Direction direction); + void Tick(); }; /** @@ -472,6 +478,7 @@ struct DisasterVehicle : public Vehicle { const char *GetTypeString() const { return "disaster vehicle"; } void UpdateDeltaXY(Direction direction); + void Tick(); }; /** @@ -490,6 +497,7 @@ struct InvalidVehicle : public Vehicle { virtual ~InvalidVehicle() {} const char *GetTypeString() const { return "invalid vehicle"; } + void Tick() {} }; #define is_custom_sprite(x) (x >= 0xFD) |