summaryrefslogtreecommitdiff
path: root/engine.h
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2004-11-13 15:15:41 +0000
committercelestar <celestar@openttd.org>2004-11-13 15:15:41 +0000
commitb8327e0457a8f40d98a8bd5a6889166d4a4afd02 (patch)
tree0c2c138ef5956ca627597a893d78d83cf457ec1c /engine.h
parent6db750373a806f77aa096e6eb5665d7ddfb8de6b (diff)
downloadopenttd-b8327e0457a8f40d98a8bd5a6889166d4a4afd02.tar.xz
(svn r562) newgrf: Merge most of the road vehicle info to a single
road_vehicle_info table, like it already is for trains and ships. Needed for GRF custom override support. (pasky)
Diffstat (limited to 'engine.h')
-rw-r--r--engine.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/engine.h b/engine.h
index 5c6a752b9..de5f72227 100644
--- a/engine.h
+++ b/engine.h
@@ -14,6 +14,16 @@ typedef struct RailVehicleInfo {
byte cargo_type;
} RailVehicleInfo;
+typedef struct RoadVehicleInfo {
+ byte image_index;
+ byte base_cost;
+ uint16 max_speed;
+ byte cargo_type;
+ uint16 capacity;
+ byte running_cost;
+ byte sfx;
+} RoadVehicleInfo;
+
typedef struct ShipVehicleInfo {
byte image_index;
byte base_cost;
@@ -133,6 +143,10 @@ VARDEF StringID _engine_name_strings[TOTAL_NUM_ENGINES];
extern EngineInfo _engine_info[TOTAL_NUM_ENGINES];
extern RailVehicleInfo _rail_vehicle_info[];
+#define road_vehicle_info(e) (&_road_vehicle_info[e - ROAD_ENGINES_INDEX])
+extern RoadVehicleInfo _road_vehicle_info[];
+/* TODO: Change this to return a pointer instead, for the sake of consistency.
+ * --pasky */
#define ship_vehicle_info(e) _ship_vehicle_info[e - SHIP_ENGINES_INDEX]
extern ShipVehicleInfo _ship_vehicle_info[];