# engines.h File Reference

This file contains all the data for vehicles. More...

Go to the source code of this file.

## Defines
#define | MK(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, e, 0, 8, 0, 0, 0, STR_EMPTY }
| Writes the properties of a train or road vehicle into the EngineInfo struct.
#define | MW(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, e, 0, 8, 0, 0, 0, STR_EMPTY }
| Writes the properties of a train carriage into the EngineInfo struct.
#define | MS(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 10, e, 0, 8, 0, 0, 0, STR_EMPTY }
| Writes the properties of a ship into the EngineInfo struct.
#define | MA(a, b, c, d, e) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 20, e, 0, 8, 0, 0, 0, STR_EMPTY }
| Writes the properties of an aeroplane into the EngineInfo struct.
#define | T 1
#define | A 2
#define | S 4
#define | Y 8
#define | RVI(a, b, c, d, e, f, g, h, i, j, k, l, m) { a, b, c, {l}, d, e, f, g, h, m, i, j, k, 0, 0, 0, 0, 0, 76, 0 }
| Writes the properties of a rail vehicle into the RailVehicleInfo struct.
#define | M RAILVEH_MULTIHEAD
#define | W RAILVEH_WAGON
#define | G RAILVEH_SINGLEHEAD
#define | S EC_STEAM
#define | D EC_DIESEL
#define | E EC_ELECTRIC
#define | N EC_MONORAIL
#define | V EC_MAGLEV
#define | A EC_STEAM
#define | R RAILTYPE_RAIL
#define | C RAILTYPE_ELECTRIC
#define | O RAILTYPE_MONO
#define | L RAILTYPE_MAGLEV
#define | SVI(a, b, c, d, e, f, g, h) { a, b, c, d, e, f, {g}, h }
| Writes the properties of a ship into the ShipVehicleInfo struct.
#define | AVI(a, b, c, d, e, f, g, h, i) { a, b, c, d, {e}, f, (g * 129) / 10, h, i }
| Writes the properties of an aircraft into the AircraftVehicleInfo struct.
#define | H AIR_HELI
#define | P AIR_CTOL
#define | J AIR_CTOL | AIR_FAST
#define | ROV(a, b, c, d, e, f, g, h, i) { a, b, c, RC_R, {d}, e, f, g, h, i, 76, 0 }
| Writes the properties of a road vehicle into the RoadVehicleInfo struct.
## Enumerations
enum | { RC_W = 0xFF, RC_S = 0x2A, RC_D = 0x2B, RC_E = 0x2C, RC_R = 0x2E }
## Variables
static const EngineInfo | _orig_engine_info []
static const RailVehicleInfo | _orig_rail_vehicle_info []
static const ShipVehicleInfo | _orig_ship_vehicle_info []
static const AircraftVehicleInfo | _orig_aircraft_vehicle_info []
static const RoadVehicleInfo | _orig_road_vehicle_info []

## Detailed Description

This file contains all the data for vehicles.

Definition in file engines.h.

## Define Documentation

#define AVI | ( | a,
|  | b,
|  | c,
|  | d,
|  | e,
|  | f,
|  | g,
|  | h,
|  | i |  | ) | { a, b, c, d, {e}, f, (g * 129) / 10, h, i }

Writes the properties of an aircraft into the AircraftVehicleInfo struct.

See also:
  AircraftVehicleInfo

Parameters:

  | a | image_index
  | b | base_cost
  | c | running_Cost
  | d | subtype (bit 0 - plane, bit 1 - large plane)
  | e | sound effect
  | f | acceleration
  | g | max_speed
  | h | mail_capacity
  | i | passenger_capacity

Definition at line 553 of file engines.h.

#define MA | ( | a,
|  | b,
|  | c,
|  | d,
|  | e |  | ) | { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 20, e, 0, 8, 0, 0, 0, STR_EMPTY }

Writes the properties of an aeroplane into the EngineInfo struct.

Parameters:

  | a | Introduction date
  | b | decay speed
  | c | life length
  | d | base life
  | e | Bitmask of the climates

See also:
  MK

Note:
  the 20 between d and e is the load amount

Definition at line 61 of file engines.h.

#define MK | ( | a,
|  | b,
|  | c,
|  | d,
|  | e |  | ) | { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, e, 0, 8, 0, 0, 0, STR_EMPTY }

Writes the properties of a train or road vehicle into the EngineInfo struct.

See also:
  EngineInfo

Parameters:

  | a | Introduction date
  | b | decay speed
  | c | life length
  | d | base life
  | e | Bitmask of the climates

Note:
  the 0x80 in parameter b sets the "is carriage bit"

  the 5 between d and e is the load amount

Definition at line 28 of file engines.h.

#define MS | ( | a,
|  | b,
|  | c,
|  | d,
|  | e |  | ) | { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 10, e, 0, 8, 0, 0, 0, STR_EMPTY }

Writes the properties of a ship into the EngineInfo struct.

Parameters:

  | a | Introduction date
  | b | decay speed
  | c | life length
  | d | base life
  | e | Bitmask of the climates

See also:
  MK

Note:
  the 10 between d and e is the load amount

Definition at line 50 of file engines.h.

#define MW | ( | a,
|  | b,
|  | c,
|  | d,
|  | e |  | ) | { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, e, 0, 8, 0, 0, 0, STR_EMPTY }

Writes the properties of a train carriage into the EngineInfo struct.

Parameters:

  | a | Introduction date
  | b | decay speed
  | c | life length
  | d | base life
  | e | Bitmask of the climates

See also:
  MK

Note:
  the 5 between d and e is the load amount

Definition at line 39 of file engines.h.

#define ROV | ( | a,
|  | b,
|  | c,
|  | d,
|  | e,
|  | f,
|  | g,
|  | h,
|  | i |  | ) | { a, b, c, RC_R, {d}, e, f, g, h, i, 76, 0 }

Writes the properties of a road vehicle into the RoadVehicleInfo struct.

See also:
  RoadVehicleInfo

Parameters:

  | a | image_index
  | b | base_cost
  | c | running_cost
  | d | sound effect
  | e | max_speed
  | f | capacity
  | g | cargo_type
  | h | weight (1/4ton)
  | i | power (10hp)

Definition at line 622 of file engines.h.

#define RVI | ( | a,
|  | b,
|  | c,
|  | d,
|  | e,
|  | f,
|  | g,
|  | h,
|  | i,
|  | j,
|  | k,
|  | l,
|  | m |  | ) | { a, b, c, {l}, d, e, f, g, h, m, i, j, k, 0, 0, 0, 0, 0, 76, 0 }

Writes the properties of a rail vehicle into the RailVehicleInfo struct.

See also:
  RailVehicleInfo

Parameters:

  | a | image_index
  | b | flags
  | c | base_cost
  | d | max_speed (kph)
  | e | power (hp)
  | f | weight
  | g | running_cost
  | h | running_cost_class
  | i | capacity
  | j | cargo_type
  | k | ai_rank
  | l | railtype
  | m | engclass Tractive effort coefficient by default is the same as TTDPatch, 0.30*256=76

Definition at line 356 of file engines.h.

#define SVI | ( | a,
|  | b,
|  | c,
|  | d,
|  | e,
|  | f,
|  | g,
|  | h |  | ) | { a, b, c, d, e, f, {g}, h }

Writes the properties of a ship into the ShipVehicleInfo struct.

See also:
  ShipVehicleInfo

Parameters:

  | a | image_index
  | b | base_cost
  | c | max_speed
  | d | cargo_type
  | e | cargo_amount
  | f | running_cost
  | g | sound effect
  | h | refittable

Definition at line 521 of file engines.h.

## Enumeration Type Documentation

anonymous enum

Enumerator:

  RC_W | Running cost price index (out of range) of wagons.
  RC_S | Running cost price index of steam.
  RC_D | Running cost price index of diesel.
  RC_E | Running cost price index of electric.
  RC_R | Running cost price index of road vehicles.

Definition at line 10 of file engines.h.

## Variable Documentation

const ShipVehicleInfo _orig_ship_vehicle_info[]`[static]`

Initial value:

     {

      SVI( 1, 160,  48, CT_OIL,        220, 140, SND_06_SHIP_HORN,  0 ),
      SVI( 1, 176,  80, CT_OIL,        350, 125, SND_06_SHIP_HORN,  0 ),
      SVI( 2,  96,  64, CT_PASSENGERS, 100,  90, SND_07_FERRY_HORN, 0 ),
      SVI( 2, 112, 128, CT_PASSENGERS, 130,  80, SND_07_FERRY_HORN, 0 ),
      SVI( 3, 148, 224, CT_PASSENGERS, 100, 190, SND_07_FERRY_HORN, 0 ),
      SVI( 2,  96,  64, CT_PASSENGERS, 100,  90, SND_07_FERRY_HORN, 0 ),
      SVI( 2, 112, 128, CT_PASSENGERS, 130,  80, SND_07_FERRY_HORN, 0 ),
      SVI( 0, 128,  48, CT_GOODS,      160, 150, SND_06_SHIP_HORN,  1 ),
      SVI( 0, 144,  80, CT_GOODS,      190, 113, SND_06_SHIP_HORN,  1 ),
      SVI( 0, 128,  48, CT_GOODS,      160, 150, SND_06_SHIP_HORN,  1 ),
      SVI( 0, 144,  80, CT_GOODS,      190, 113, SND_06_SHIP_HORN,  1 ),
    }

Definition at line 522 of file engines.h.