Add NewGRF object properties to set viewport map mode/smallmap tile type

This commit is contained in:
Jonathan G Rennison
2022-02-07 01:16:45 +00:00
parent 1d885c462f
commit d4f11eca42
16 changed files with 479 additions and 39 deletions

View File

@@ -3989,13 +3989,20 @@ bool AfterLoadGame()
}
}
if (SlXvIsFeatureMissing(XSLFI_OBJECT_GROUND_TYPES, 2)) {
if (SlXvIsFeatureMissing(XSLFI_OBJECT_GROUND_TYPES, 3)) {
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_OBJECT)) {
if (SlXvIsFeatureMissing(XSLFI_OBJECT_GROUND_TYPES)) _m[t].m4 = 0;
ObjectType type = GetObjectType(t);
extern void SetObjectFoundationType(TileIndex tile, Slope tileh, ObjectType type, const ObjectSpec *spec);
SetObjectFoundationType(t, SLOPE_ELEVATED, type, ObjectSpec::Get(type));
if (SlXvIsFeatureMissing(XSLFI_OBJECT_GROUND_TYPES, 2)) {
ObjectType type = GetObjectType(t);
extern void SetObjectFoundationType(TileIndex tile, Slope tileh, ObjectType type, const ObjectSpec *spec);
SetObjectFoundationType(t, SLOPE_ELEVATED, type, ObjectSpec::Get(type));
}
if (SlXvIsFeatureMissing(XSLFI_OBJECT_GROUND_TYPES, 3)) {
if (ObjectSpec::GetByTile(t)->ctrl_flags & OBJECT_CTRL_FLAG_VPORT_MAP_TYPE) {
SetObjectHasViewportMapViewOverride(t, true);
}
}
}
}
}