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