|
|
@ -1559,11 +1559,19 @@ static void NewVehicle_SpriteGroupMapping(byte *buf, int len)
|
|
|
|
uint8 cidcount;
|
|
|
|
uint8 cidcount;
|
|
|
|
int c, i;
|
|
|
|
int c, i;
|
|
|
|
|
|
|
|
|
|
|
|
check_length(len, 7, "VehicleMapSpriteGroup");
|
|
|
|
check_length(len, 6, "VehicleMapSpriteGroup");
|
|
|
|
feature = buf[1];
|
|
|
|
feature = buf[1];
|
|
|
|
idcount = buf[2] & 0x7F;
|
|
|
|
idcount = buf[2] & 0x7F;
|
|
|
|
wagover = (buf[2] & 0x80) == 0x80;
|
|
|
|
wagover = (buf[2] & 0x80) == 0x80;
|
|
|
|
check_length(len, 3 + idcount, "VehicleMapSpriteGroup");
|
|
|
|
check_length(len, 3 + idcount, "VehicleMapSpriteGroup");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* If ``n-id'' (or ``idcount'') is zero, this is a ``feature
|
|
|
|
|
|
|
|
* callback''. */
|
|
|
|
|
|
|
|
if (idcount == 0) {
|
|
|
|
|
|
|
|
grfmsg(GMS_WARN, "VehicleMapSpriteGroup: Feature callbacks not implemented yet.");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
cidcount = buf[3 + idcount];
|
|
|
|
cidcount = buf[3 + idcount];
|
|
|
|
check_length(len, 4 + idcount + cidcount * 3, "VehicleMapSpriteGroup");
|
|
|
|
check_length(len, 4 + idcount + cidcount * 3, "VehicleMapSpriteGroup");
|
|
|
|
|
|
|
|
|
|
|
@ -1625,15 +1633,6 @@ static void NewVehicle_SpriteGroupMapping(byte *buf, int len)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* If ``n-id'' (or ``idcount'') is zero, this is a ``feature
|
|
|
|
|
|
|
|
* callback''. I have no idea how this works, so we will ignore it for
|
|
|
|
|
|
|
|
* now. --octo */
|
|
|
|
|
|
|
|
if (idcount == 0) {
|
|
|
|
|
|
|
|
grfmsg(GMS_NOTICE, "NewMapping: Feature callbacks not implemented yet.");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// FIXME: Tropicset contains things like:
|
|
|
|
// FIXME: Tropicset contains things like:
|
|
|
|
// 03 00 01 19 01 00 00 00 00 - this is missing one 00 at the end,
|
|
|
|
// 03 00 01 19 01 00 00 00 00 - this is missing one 00 at the end,
|
|
|
|
// what should we exactly do with that? --pasky
|
|
|
|
// what should we exactly do with that? --pasky
|
|
|
|