diff options
author | hackykid <hackykid@openttd.org> | 2005-06-06 22:44:11 +0000 |
---|---|---|
committer | hackykid <hackykid@openttd.org> | 2005-06-06 22:44:11 +0000 |
commit | daae0d315a0c30d49915d4ecc9b1473f360f2077 (patch) | |
tree | 105b039e5d3807e6c220132364ed2547386be6d7 /engine.h | |
parent | 5e8b14df3e563be00e60bbf8ee609826226f1328 (diff) | |
download | openttd-daae0d315a0c30d49915d4ecc9b1473f360f2077.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.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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, }; |