2008-04-20 13:12:07 +02:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
/** @file effectvehicle_base.h Base class for all effect vehicles. */
|
|
|
|
|
|
|
|
#ifndef EFFECTVEHICLE_BASE_H
|
|
|
|
#define EFFECTVEHICLE_BASE_H
|
|
|
|
|
|
|
|
#include "vehicle_base.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A special vehicle is one of the following:
|
|
|
|
* - smoke
|
|
|
|
* - electric sparks for trains
|
|
|
|
* - explosions
|
|
|
|
* - bulldozer (road works)
|
|
|
|
* - bubbles (industry)
|
|
|
|
*/
|
2009-05-27 00:10:13 +02:00
|
|
|
struct EffectVehicle : public SpecializedVehicle<EffectVehicle, VEH_EFFECT> {
|
2009-05-22 20:56:25 +02:00
|
|
|
uint16 animation_state;
|
|
|
|
byte animation_substate;
|
|
|
|
|
2009-06-02 21:12:28 +02:00
|
|
|
/** We don't want GCC to zero our struct! It already is zeroed and has an index! */
|
|
|
|
EffectVehicle() : SpecializedVehicle<EffectVehicle, VEH_EFFECT>() {}
|
2008-04-20 13:12:07 +02:00
|
|
|
/** We want to 'destruct' the right class. */
|
|
|
|
virtual ~EffectVehicle() {}
|
|
|
|
|
|
|
|
const char *GetTypeString() const { return "special vehicle"; }
|
|
|
|
void UpdateDeltaXY(Direction direction);
|
2009-05-22 15:53:14 +02:00
|
|
|
bool Tick();
|
2008-04-20 13:12:07 +02:00
|
|
|
};
|
|
|
|
|
2009-05-27 00:45:48 +02:00
|
|
|
#define FOR_ALL_EFFECTVEHICLES(var) FOR_ALL_VEHICLES_OF_TYPE(EffectVehicle, var)
|
|
|
|
|
2008-04-20 13:12:07 +02:00
|
|
|
#endif /* EFFECTVEHICLE_BASE_H */
|