glx@10294: /* $Id$ */ glx@10294: glx@10294: /** @file effectvehicle_base.h Base class for all effect vehicles. */ glx@10294: glx@10294: #ifndef EFFECTVEHICLE_BASE_H glx@10294: #define EFFECTVEHICLE_BASE_H glx@10294: glx@10294: #include "vehicle_base.h" glx@10294: glx@10294: /** glx@10294: * This class 'wraps' Vehicle; you do not actually instantiate this class. glx@10294: * You create a Vehicle using AllocateVehicle, so it is added to the pool glx@10294: * and you reinitialize that to a Train using: glx@10294: * v = new (v) Train(); glx@10294: * glx@10294: * As side-effect the vehicle type is set correctly. glx@10294: * glx@10294: * A special vehicle is one of the following: glx@10294: * - smoke glx@10294: * - electric sparks for trains glx@10294: * - explosions glx@10294: * - bulldozer (road works) glx@10294: * - bubbles (industry) glx@10294: */ glx@10294: struct EffectVehicle : public Vehicle { glx@10294: /** Initializes the Vehicle to a special vehicle */ glx@10294: EffectVehicle() { this->type = VEH_EFFECT; } glx@10294: glx@10294: /** We want to 'destruct' the right class. */ glx@10294: virtual ~EffectVehicle() {} glx@10294: glx@10294: const char *GetTypeString() const { return "special vehicle"; } glx@10294: void UpdateDeltaXY(Direction direction); glx@10294: void Tick(); glx@10294: }; glx@10294: glx@10294: #endif /* EFFECTVEHICLE_BASE_H */