(svn r4824) - NewGRF: add support for getting/setting miscellaneous grf flags (param 0x9E)
authorpeter1138
Thu, 11 May 2006 12:41:02 +0000
changeset 3814 d0b901dfc313
parent 3813 a7ab3ce00a21
child 3815 4c4175bc0749
(svn r4824) - NewGRF: add support for getting/setting miscellaneous grf flags (param 0x9E)
newgrf.c
--- a/newgrf.c	Thu May 11 11:24:09 2006 +0000
+++ b/newgrf.c	Thu May 11 12:41:02 2006 +0000
@@ -47,6 +47,9 @@
 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 @@
 		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 @@
 			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;