Files @ r11336:5c2d4656acdf
Branch filter:

Location: cpp/openttd-patchpack/source/src/effectvehicle_base.h

translators
(svn r15691) -Update: WebTranslator2 update to 2009-03-12 18:42:18
french - 1 fixed by glx (1)
hungarian - 1 fixed by alyr (1)
luxembourgish - 258 fixed, 3 changed by Gubius (261)
persian - 146 fixed by ali sattari (146)
russian - 1 fixed by Smoky555 (1)
spanish - 1 fixed by eusebio (1)
/* $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 */