MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / TrackDesignImport

Function TrackDesignImport

src/openrct2/ride/TrackDesign.cpp:607–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607std::unique_ptr<TrackDesign> TrackDesignImport(const utf8* path)
608{
609 try
610 {
611 auto trackImporter = TrackImporter::Create(path);
612 trackImporter->Load(path);
613 return trackImporter->Import();
614 }
615 catch (const std::exception& e)
616 {
617 LOG_ERROR("Unable to load track design: %s", e.what());
618 }
619 LOG_VERBOSE("track_design_open(\"%s\")", path);
620 return nullptr;
621}
622
623/**
624 *

Callers 4

CreateMethod · 0.85
InstallTrackOpenFunction · 0.85
loadDesignPreviewMethod · 0.85
TrackPlaceOpenFunction · 0.85

Calls 4

CreateFunction · 0.50
LoadMethod · 0.45
ImportMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected