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 | 0x80, 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)   { a, b, c, RC_R, {d}, e, f, g }
 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

const EngineInfo _orig_engine_info []
const RailVehicleInfo _orig_rail_vehicle_info [NUM_TRAIN_ENGINES]
const ShipVehicleInfo _orig_ship_vehicle_info [NUM_SHIP_ENGINES]
const AircraftVehicleInfo _orig_aircraft_vehicle_info [NUM_AIRCRAFT_ENGINES]
const RoadVehicleInfo _orig_road_vehicle_info [NUM_ROAD_ENGINES]


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,
 )     { 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,
 )     { 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 unk2, flag for carriage(bit 7) and decay speed(bits0..6)
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,
 )     { 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 unk2, flag for carriage(bit 7) and decay speed(bits0..6)
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,
 )     { 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 unk2, flag for carriage(bit 7) and decay speed(bits0..6)
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,
 )     { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b | 0x80, 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 unk2, flag for carriage(bit 7) and decay speed(bits0..6)
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,
 )     { a, b, c, RC_R, {d}, e, f, g }

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

Definition at line 620 of file engines.h.

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

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.


Generated on Wed Oct 1 17:03:32 2008 for openttd by  doxygen 1.5.6