Mercurial > hg > openttd
view src/effectvehicle_base.h @ 9149:856095066478 draft
(svn r13011) -Codechange: move PlaceProc_BuyLand out of rail_gui.cpp to the place where it is used and remove some unneeded globalisations of some other PlaceProc functions.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Thu, 08 May 2008 13:30:50 +0000 |
parents | 870efbdb988d |
children | 2286db6ac0bb |
line wrap: on
line source
/* $Id$ */ /** @file effectvehicle_base.h Base class for all effect vehicles. */ #ifndef EFFECTVEHICLE_BASE_H #define EFFECTVEHICLE_BASE_H #include "vehicle_base.h" /** * This class 'wraps' Vehicle; you do not actually instantiate this class. * You create a Vehicle using AllocateVehicle, so it is added to the pool * and you reinitialize that to a Train using: * v = new (v) Train(); * * As side-effect the vehicle type is set correctly. * * A special vehicle is one of the following: * - smoke * - electric sparks for trains * - explosions * - bulldozer (road works) * - bubbles (industry) */ struct EffectVehicle : public Vehicle { /** Initializes the Vehicle to a special vehicle */ EffectVehicle() { this->type = VEH_EFFECT; } /** We want to 'destruct' the right class. */ virtual ~EffectVehicle() {} const char *GetTypeString() const { return "special vehicle"; } void UpdateDeltaXY(Direction direction); void Tick(); }; #endif /* EFFECTVEHICLE_BASE_H */