# 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, f) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, f, 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, f) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, f, 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, f) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 10, f, 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, CT_INVALID, 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) { a, b, c, {j}, d, e, f, g, h, k, i, 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 | RC_S PR_RUNNING_TRAIN_STEAM
#define | RC_D PR_RUNNING_TRAIN_DIESEL
#define | RC_E PR_RUNNING_TRAIN_ELECTRIC
#define | RC_W INVALID_PRICE
#define | SVI(a, b, c, d, e, f, g) { a, b, c, d, e, f, g }
| 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) { a, b, c, PR_RUNNING_ROADVEH, d, e, f, g, h, 76, 0 }
| Writes the properties of a road vehicle into the RoadVehicleInfo struct.

## 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 561 of file engines.h.

#define MA | ( | a,
|  | b,
|  | c,
|  | d,
|  | e |  | ) | { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 20, e, CT_INVALID, 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 63 of file engines.h.

#define MK | ( | a,
|  | b,
|  | c,
|  | d,
|  | e,
|  | f |  | ) | { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, f, 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 | cargo type
  | f | 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,
|  | f |  | ) | { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 10, f, 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 | cargo type
  | f | Bitmask of the climates

See also:
  MK

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

Definition at line 52 of file engines.h.

#define MW | ( | a,
|  | b,
|  | c,
|  | d,
|  | e,
|  | f |  | ) | { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, f, 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 | cargo type
  | f | Bitmask of the climates

See also:
  MK

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

Definition at line 40 of file engines.h.

#define ROV | ( | a,
|  | b,
|  | c,
|  | d,
|  | e,
|  | f,
|  | g,
|  | h |  | ) | { a, b, c, PR_RUNNING_ROADVEH, d, e, f, g, h, 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 | weight (1/4ton)
  | h | power (10hp)

Definition at line 629 of file engines.h.

#define RVI | ( | a,
|  | b,
|  | c,
|  | d,
|  | e,
|  | f,
|  | g,
|  | h,
|  | i,
|  | j,
|  | k |  | ) | { a, b, c, {j}, d, e, f, g, h, k, i, 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 | railtype
  | k | 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 |  | ) | { a, b, c, d, e, f, g }

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_amount
  | e | running_cost
  | f | sound effect
  | g | refittable

Definition at line 529 of file engines.h.

## Variable Documentation

const ShipVehicleInfo _orig_ship_vehicle_info[]`[static]`

Initial value:

     {

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

Definition at line 530 of file engines.h.