summaryrefslogtreecommitdiff
path: root/newgrf.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-02-11 07:34:05 +0000
committerpeter1138 <peter1138@openttd.org>2006-02-11 07:34:05 +0000
commit8caedb4898761a24d300daf1ee7096a05dbe2df2 (patch)
tree1d6eb3db8a416ff37bc6b3233269ce32cec8a614 /newgrf.c
parent50fd9c8f73d68766a2a84d26c48a6787008a1f85 (diff)
downloadopenttd-8caedb4898761a24d300daf1ee7096a05dbe2df2.tar.xz
(svn r3586) - NewGRF: Load callback masks for all vehicle types.
Diffstat (limited to 'newgrf.c')
-rw-r--r--newgrf.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/newgrf.c b/newgrf.c
index c8f2798d4..d8b0c386f 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -555,6 +555,13 @@ static bool RoadVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
_engine_info[ROAD_ENGINES_INDEX + engine + i].refit_mask = refit_mask;
}
} break;
+
+ case 0x17: // Callback mask
+ FOR_EACH_OBJECT {
+ rvi[i].callbackmask = grf_load_byte(&buf);
+ }
+ break;
+
case 0x1D: { /* Cargo classes allowed */
FOR_EACH_OBJECT {
cargo_allowed[ROAD_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
@@ -565,7 +572,6 @@ static bool RoadVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
cargo_disallowed[ROAD_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
}
} break;
- case 0x17: /* Callback */
case 0x18: /* Tractive effort */
case 0x19: /* Air drag */
case 0x1A: /* Refit cost */
@@ -676,6 +682,13 @@ static bool ShipVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
_engine_info[SHIP_ENGINES_INDEX + engine + i].refit_mask = refit_mask;
}
} break;
+
+ case 0x12: // Callback mask
+ FOR_EACH_OBJECT {
+ svi[i].callbackmask = grf_load_byte(&buf);
+ }
+ break;
+
case 0x18: { /* Cargo classes allowed */
FOR_EACH_OBJECT {
cargo_allowed[SHIP_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
@@ -686,7 +699,6 @@ static bool ShipVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
cargo_disallowed[SHIP_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
}
} break;
- case 0x12: /* Callback */
case 0x13: /* Refit cost */
case 0x14: /* Ocean speed fraction */
case 0x15: /* Canal speed fraction */
@@ -799,6 +811,13 @@ static bool AircraftVehicleChangeInfo(uint engine, int numinfo, int prop, byte *
_engine_info[AIRCRAFT_ENGINES_INDEX + engine + i].refit_mask = refit_mask;
}
} break;
+
+ case 0x14: // Callback mask
+ FOR_EACH_OBJECT {
+ avi[i].callbackmask = grf_load_byte(&buf);
+ }
+ break;
+
case 0x18: { /* Cargo classes allowed */
FOR_EACH_OBJECT {
cargo_allowed[AIRCRAFT_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
@@ -809,7 +828,6 @@ static bool AircraftVehicleChangeInfo(uint engine, int numinfo, int prop, byte *
cargo_disallowed[AIRCRAFT_ENGINES_INDEX + engine + i] = grf_load_word(&buf);
}
} break;
- case 0x14: /* Callback */
case 0x15: /* Refit cost */
case 0x16: /* Retire vehicle early */
case 0x17: /* Miscellaneous flags */