summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-04-27 21:35:02 +0000
committermaedhros <maedhros@openttd.org>2007-04-27 21:35:02 +0000
commit889f2ab48c9e5f95e0f2fc93a9d75e866d87a346 (patch)
treeaa6645ca8e8c06f7695870287f42ae02224cf936 /src/newgrf.cpp
parente1057864d8254e35854918b2b60db6dc43025ecf (diff)
downloadopenttd-889f2ab48c9e5f95e0f2fc93a9d75e866d87a346.tar.xz
(svn r9730) -Feature: [NewGRF] Add support for miscellaneous grf feature bit 1 - paved roads on desert tiles.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 6ee9be4ac..381a35bae 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -3764,7 +3764,7 @@ 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;
+ _traininfo_vehicle_width = HasGrfMiscBit(GMB_TRAIN_WIDTH_32_PIXELS) ? 32 : 29;
break;
default:
@@ -4811,3 +4811,8 @@ void LoadNewGRF(uint load_index, uint file_index)
/* Call any functions that should be run after GRFs have been loaded. */
AfterLoadGRFs();
}
+
+bool HasGrfMiscBit(GrfMiscBit bit)
+{
+ return HASBIT(_misc_grf_features, bit);
+}