summaryrefslogtreecommitdiff
path: root/newgrf.c
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
commitdaae0d315a0c30d49915d4ecc9b1473f360f2077 (patch)
tree105b039e5d3807e6c220132364ed2547386be6d7 /newgrf.c
parent5e8b14df3e563be00e60bbf8ee609826226f1328 (diff)
downloadopenttd-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 'newgrf.c')
-rw-r--r--newgrf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/newgrf.c b/newgrf.c
index 7d9011a99..4803acd27 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -353,9 +353,17 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
case 0x1E: { /* Callback */
FOR_EACH_OBJECT {
byte callbacks = grf_load_byte(&buf);
+
rvi[i].callbackmask = callbacks;
}
} break;
+ case 0x21: { /* Shorter vehicle */
+ FOR_EACH_OBJECT {
+ byte shorten_factor = grf_load_byte(&buf);
+
+ rvi[i].shorten_factor = shorten_factor;
+ }
+ } break;
case 0x22: { /* Visual effect */
// see note in engine.h about rvi->visual_effect
FOR_EACH_OBJECT {
@@ -377,7 +385,6 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
case 0x1C: /* Refit cost */
case 0x1F: /* Tractive effort */
case 0x20: /* Air drag */
- case 0x21: /* Shorter tenders */
case 0x24: /* High byte of vehicle weight */
case 0x25: /* User-defined bit mask to set when checking veh. var. 42 */
case 0x26: /* Retire vehicle early */