# vehicle_type.h

Go to the documentation of this file.

    00001 /* $Id: vehicle_type.h 12129 2008-02-13 14:21:36Z smatz $ */
    00002
    00005 #ifndef VEHICLE_TYPE_H
    00006 #define VEHICLE_TYPE_H
    00007
    00008 #include "core/enum_type.hpp"
    00009
    00010 typedef uint16 VehicleID;
    00011
    00012 enum VehicleType {
    00013   VEH_TRAIN,
    00014   VEH_ROAD,
    00015   VEH_SHIP,
    00016   VEH_AIRCRAFT,
    00017   VEH_SPECIAL,
    00018   VEH_DISASTER,
    00019   VEH_END,
    00020   VEH_INVALID = 0xFF,
    00021 };
    00022 DECLARE_POSTFIX_INCREMENT(VehicleType);
    00023 template <> struct EnumPropsT<VehicleType> : MakeEnumPropsT<VehicleType, byte, VEH_TRAIN, VEH_END, VEH_INVALID> {};
    00024 typedef TinyEnumT<VehicleType> VehicleTypeByte;
    00025
    00026 struct Vehicle;
    00027
    00028 struct BaseVehicle
    00029 {
    00030   VehicleTypeByte type;
    00031
    00036   inline bool IsValid() const { return this->type != VEH_INVALID; }
    00037 };
    00038
    00039 static const VehicleID INVALID_VEHICLE = 0xFFFF;
    00040
    00041 /* Effect vehicle types */
    00042 enum EffectVehicle {
    00043   EV_CHIMNEY_SMOKE   = 0,
    00044   EV_STEAM_SMOKE     = 1,
    00045   EV_DIESEL_SMOKE    = 2,
    00046   EV_ELECTRIC_SPARK  = 3,
    00047   EV_SMOKE           = 4,
    00048   EV_EXPLOSION_LARGE = 5,
    00049   EV_BREAKDOWN_SMOKE = 6,
    00050   EV_EXPLOSION_SMALL = 7,
    00051   EV_BULLDOZER       = 8,
    00052   EV_BUBBLE          = 9
    00053 };
    00054
    00056 enum {
    00057   VPF_OPF  = 0,
    00058   VPF_NTP  = 0,
    00059   VPF_NPF  = 1,
    00060   VPF_YAPF = 2,
    00061 };
    00062
    00063 #endif /* VEHICLE_TYPE_H */