src/effectvehicle_base.h
author richk
Tue, 17 Jun 2008 10:32:49 +0000
branchNewGRF_ports
changeset 10991 d8811e327d12
parent 10275 5e46b660ca6c
permissions -rw-r--r--
(svn r13545) [NewGRF_ports] -Sync: with trunk r13281:13411.
10275
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
     1
/* $Id: effectvehicle_base.h 12804 2008-04-20 11:12:07Z rubidium $ */
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
     2
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
     3
/** @file effectvehicle_base.h Base class for all effect vehicles. */
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
     4
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
     5
#ifndef EFFECTVEHICLE_BASE_H
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
     6
#define EFFECTVEHICLE_BASE_H
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
     7
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
     8
#include "vehicle_base.h"
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
     9
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    10
/**
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    11
 * This class 'wraps' Vehicle; you do not actually instantiate this class.
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    12
 * You create a Vehicle using AllocateVehicle, so it is added to the pool
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    13
 * and you reinitialize that to a Train using:
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    14
 *   v = new (v) Train();
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    15
 *
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    16
 * As side-effect the vehicle type is set correctly.
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    17
 *
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    18
 * A special vehicle is one of the following:
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    19
 *  - smoke
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    20
 *  - electric sparks for trains
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    21
 *  - explosions
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    22
 *  - bulldozer (road works)
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    23
 *  - bubbles (industry)
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    24
 */
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    25
struct EffectVehicle : public Vehicle {
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    26
	/** Initializes the Vehicle to a special vehicle */
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    27
	EffectVehicle() { this->type = VEH_EFFECT; }
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    28
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    29
	/** We want to 'destruct' the right class. */
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    30
	virtual ~EffectVehicle() {}
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    31
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    32
	const char *GetTypeString() const { return "special vehicle"; }
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    33
	void UpdateDeltaXY(Direction direction);
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    34
	void Tick();
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    35
};
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    36
5e46b660ca6c (svn r12807) [NewGRF_ports] -Fix: New files failed to get added to svn on last merge.
richk
parents:
diff changeset
    37
#endif /* EFFECTVEHICLE_BASE_H */