src/effectvehicle_base.h
author translators
Sat, 06 Dec 2008 18:44:49 +0000
changeset 10409 a61956ad5da2
parent 9009 6684576ef32b
permissions -rw-r--r--
(svn r14660) -Update: WebTranslator2 update to 2008-12-06 18:44:39
croatian - 55 changed by knovak (55)
hebrew - 237 fixed, 2 changed by ybungalobill (239)
indonesian - 124 fixed, 11 changed by sireno (19), adjayanto (50), fanioz (66)
persian - 19 fixed by ali sattari (19)
russian - 1 fixed by ybungalobill (1)
traditional_chinese - 1 fixed by josesun (1)
turkish - 28 fixed by Emin (28)
/* $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 */