summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-11 12:41:02 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-11 12:41:02 +0000
commit82d8df7cedfdab67fac42ec451e269762daaa995 (patch)
tree0e5e767ae9e1854b7ef4c9a08fd3d02a01901bca
parent53e034cd9bbe8f1089514005f96583582a26515b (diff)
downloadopenttd-82d8df7cedfdab67fac42ec451e269762daaa995.tar.xz
(svn r4824) - NewGRF: add support for getting/setting miscellaneous grf flags (param 0x9E)
-rw-r--r--newgrf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/newgrf.c b/newgrf.c
index 44d97f046..613ad55d0 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -47,6 +47,9 @@ static SpriteID _cur_spriteid;
static int _cur_stage;
static uint32 _nfo_line;
+/* Miscellaneous GRF features, set by Action 0x0D, parameter 0x9E */
+static byte _misc_grf_features = 0;
+
/* 32 * 8 = 256 flags. Apparently TTDPatch uses this many.. */
static uint32 _ttdpatch_flags[8];
@@ -1976,6 +1979,9 @@ static uint32 GetParamVal(byte param, uint32 *cond_val)
case 0x9D: /* TTD Platform, 00=TTDPatch, 01=OpenTTD */
return 1;
+ case 0x9E: /* Miscellaneous GRF features */
+ return _misc_grf_features;
+
default:
/* GRF Parameter */
if (param < 0x80) return _cur_grffile->param[param];
@@ -2435,6 +2441,10 @@ static void ParamSet(byte *buf, int len)
DEBUG(grf, 7) ("ParamSet: Skipping unimplemented target 0x%02X", target);
break;
+ case 0x9E: /* Miscellaneous GRF features */
+ _misc_grf_features = res;
+ break;
+
default:
if (target < 0x80) {
_cur_grffile->param[target] = res;