2008-04-20 12:12:07 +01:00
|
|
|
/* $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)
|
|
|
|
*/
|
2009-05-26 23:10:13 +01:00
|
|
|
struct EffectVehicle : public SpecializedVehicle<EffectVehicle, VEH_EFFECT> {
|
2009-05-22 19:56:25 +01:00
|
|
|
uint16 animation_state;
|
|
|
|
byte animation_substate;
|
|
|
|
|
2008-04-20 12:12:07 +01:00
|
|
|
/** 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);
|
2009-05-22 14:53:14 +01:00
|
|
|
bool Tick();
|
2008-04-20 12:12:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* EFFECTVEHICLE_BASE_H */
|