summaryrefslogtreecommitdiff
path: root/newgrf.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-14 20:58:12 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-14 20:58:12 +0000
commite29d60b21bc1f7a01ebdd63361fd298eb36ff074 (patch)
tree8260a44cadafb1c8be32e224224c0ca1a2615f04 /newgrf.c
parent77a3900d5d1bb8fe24cf584d3be6e7f6f423a252 (diff)
downloadopenttd-e29d60b21bc1f7a01ebdd63361fd298eb36ff074.tar.xz
(svn r4869) - NewGRF: support setting train list vehicle width to 32 instead of 29 pixels, for sets which use 32 pixel long engines/wagons.
Diffstat (limited to 'newgrf.c')
-rw-r--r--newgrf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/newgrf.c b/newgrf.c
index 8f26af7d6..f304ba60f 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -2457,6 +2457,8 @@ static void ParamSet(byte *buf, int len)
case 0x9E: /* Miscellaneous GRF features */
_misc_grf_features = res;
+ /* Set train list engine width */
+ _traininfo_vehicle_width = HASBIT(res, 3) ? 32 : 29;
break;
default:
@@ -2648,6 +2650,11 @@ static void ResetNewGRFData(void)
// Add engine type to engine data. This is needed for the refit precalculation.
AddTypeToEngines();
+ /* Reset misc GRF features and train list display variables */
+ _misc_grf_features = 0;
+ _traininfo_vehicle_pitch = 0;
+ _traininfo_vehicle_width = 29;
+
InitializeSpriteGroupPool();
}