summaryrefslogtreecommitdiff
path: root/engine.h
diff options
context:
space:
mode:
authorhackykid <hackykid@openttd.org>2005-06-06 22:44:11 +0000
committerhackykid <hackykid@openttd.org>2005-06-06 22:44:11 +0000
commit6d78b700757fd7765363754195645c6f02cfba55 (patch)
tree105b039e5d3807e6c220132364ed2547386be6d7 /engine.h
parent4184611d3a43d046f341858b97c5fb2c1783b58c (diff)
downloadopenttd-6d78b700757fd7765363754195645c6f02cfba55.tar.xz
(svn r2428) - Feature: [newgrf] Implement shorter train vehicles (Therax), and the callback that goes with it.
- Codechange: Remove some magic numbers (PALETTE_CRASH)
Diffstat (limited to 'engine.h')
-rw-r--r--engine.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/engine.h b/engine.h
index 8a78bec28..e5fa8a09b 100644
--- a/engine.h
+++ b/engine.h
@@ -21,6 +21,7 @@ typedef struct RailVehicleInfo {
// for when the 'powered wagon' callback fails. But it should really also determine what
// kind of visual effect to generate for a vehicle (default, steam, diesel, electric).
// Same goes for the callback result, which atm is only used to check if a wagon is powered.
+ byte shorten_factor; // length on main map for this type is 8 - shorten_factor
} RailVehicleInfo;
typedef struct ShipVehicleInfo {
@@ -136,6 +137,10 @@ enum CallbackID {
// TODO: interpret the rest of the result, aka "visual effects"
CBID_WAGON_POWER = 0x10,
+ // Vehicle length, returns the amount of 1/8's the vehicle is shorter
+ // only for train vehicles
+ CBID_VEH_LENGTH = 0x11,
+
// Refit capacity, the passed vehicle needs to have its ->cargo_type set to
// the cargo we are refitting to, returns the new cargo capacity
CBID_REFIT_CAP = 0x15,
@@ -145,6 +150,7 @@ enum CallbackID {
// (some callbacks are always used, and dont appear here)
enum CallbackMask {
CBM_WAGON_POWER = 0,
+ CBM_VEH_LENGTH = 1,
CBM_REFIT_CAP = 3,
};