1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 08:12:53 +01:00

Remove loading of JSON legacy footpaths

This commit is contained in:
Gymnasiast
2021-11-13 18:21:39 +01:00
parent 34128dc262
commit efd9cc420b
2 changed files with 0 additions and 29 deletions

View File

@@ -75,33 +75,6 @@ void FootpathObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t
gfx_draw_sprite(dpi, _queueSurfaceDescriptor.PreviewImage, screenCoords + ScreenCoordsXY{ 4, -17 }, 0);
}
static RailingEntrySupportType ParseSupportType(const std::string& s)
{
if (s == "pole")
return RailingEntrySupportType::Pole;
else /* if (s == "box") */
return RailingEntrySupportType::Box;
}
void FootpathObject::ReadJson(IReadObjectContext* context, json_t& root)
{
Guard::Assert(root.is_object(), "FootpathObject::ReadJson expects parameter root to be object");
auto properties = root["properties"];
if (properties.is_object())
{
_legacyType.support_type = ParseSupportType(Json::GetString(properties["supportType"]));
_legacyType.scrolling_mode = Json::GetNumber<uint8_t>(properties["scrollingMode"]);
_legacyType.flags = Json::GetFlags<uint8_t>(
properties,
{
{ "hasSupportImages", RAILING_ENTRY_FLAG_HAS_SUPPORT_BASE_SPRITE },
{ "hasElevatedPathImages", RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS },
{ "editorOnly", FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR },
});
}
PopulateTablesFromJson(context, root);
}

View File

@@ -377,8 +377,6 @@ namespace ObjectFactory
{
if (s == "ride")
return ObjectType::Ride;
if (s == "footpath")
return ObjectType::Paths;
if (s == "footpath_banner")
return ObjectType::Banners;
if (s == "footpath_item")