GRF: Only use extended bytes for object IDs if feature is tested for
This commit is contained in:
@@ -6529,7 +6529,7 @@ static void ObjectMapSpriteGroup(ByteReader *buf, uint8 idcount)
|
|||||||
|
|
||||||
uint16 *objects = AllocaM(uint16, idcount);
|
uint16 *objects = AllocaM(uint16, idcount);
|
||||||
for (uint i = 0; i < idcount; i++) {
|
for (uint i = 0; i < idcount; i++) {
|
||||||
objects[i] = buf->ReadExtendedByte();
|
objects[i] = HasBit(_cur.grffile->observed_feature_tests, GFTOF_MORE_OBJECTS_PER_GRF) ? buf->ReadExtendedByte() : buf->ReadByte();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 cidcount = buf->ReadByte();
|
uint8 cidcount = buf->ReadByte();
|
||||||
|
@@ -57,7 +57,7 @@ extern const GRFFeatureInfo _grf_feature_list[] = {
|
|||||||
GRFFeatureInfo("action0_object_viewport_map_tile_type", 1),
|
GRFFeatureInfo("action0_object_viewport_map_tile_type", 1),
|
||||||
GRFFeatureInfo("road_stops", 7),
|
GRFFeatureInfo("road_stops", 7),
|
||||||
GRFFeatureInfo("new_landscape", 2),
|
GRFFeatureInfo("new_landscape", 2),
|
||||||
GRFFeatureInfo("more_objects_per_grf", 1),
|
GRFFeatureInfo("more_objects_per_grf", 1, GFTOF_MORE_OBJECTS_PER_GRF),
|
||||||
GRFFeatureInfo(),
|
GRFFeatureInfo(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -86,6 +86,8 @@ enum Action2VariableRemapIds {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum GRFFeatureTestObservationFlag : uint8 {
|
enum GRFFeatureTestObservationFlag : uint8 {
|
||||||
|
GFTOF_MORE_OBJECTS_PER_GRF = 0,
|
||||||
|
|
||||||
GFTOF_INVALID = 0xFF,
|
GFTOF_INVALID = 0xFF,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user