10294
|
1 |
/* $Id$ */
|
|
2 |
|
|
3 |
/** @file effectvehicle_base.h Base class for all effect vehicles. */
|
|
4 |
|
|
5 |
#ifndef EFFECTVEHICLE_BASE_H
|
|
6 |
#define EFFECTVEHICLE_BASE_H
|
|
7 |
|
|
8 |
#include "vehicle_base.h"
|
|
9 |
|
|
10 |
/**
|
|
11 |
* This class 'wraps' Vehicle; you do not actually instantiate this class.
|
|
12 |
* You create a Vehicle using AllocateVehicle, so it is added to the pool
|
|
13 |
* and you reinitialize that to a Train using:
|
|
14 |
* v = new (v) Train();
|
|
15 |
*
|
|
16 |
* As side-effect the vehicle type is set correctly.
|
|
17 |
*
|
|
18 |
* A special vehicle is one of the following:
|
|
19 |
* - smoke
|
|
20 |
* - electric sparks for trains
|
|
21 |
* - explosions
|
|
22 |
* - bulldozer (road works)
|
|
23 |
* - bubbles (industry)
|
|
24 |
*/
|
|
25 |
struct EffectVehicle : public Vehicle {
|
|
26 |
/** Initializes the Vehicle to a special vehicle */
|
|
27 |
EffectVehicle() { this->type = VEH_EFFECT; }
|
|
28 |
|
|
29 |
/** We want to 'destruct' the right class. */
|
|
30 |
virtual ~EffectVehicle() {}
|
|
31 |
|
|
32 |
const char *GetTypeString() const { return "special vehicle"; }
|
|
33 |
void UpdateDeltaXY(Direction direction);
|
|
34 |
void Tick();
|
|
35 |
};
|
|
36 |
|
|
37 |
#endif /* EFFECTVEHICLE_BASE_H */
|