MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / simulateGame

Function simulateGame

src/OpenLoco/src/OpenLoco.cpp:751–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749 }
750
751 void simulateGame(const fs::path& savePath, int32_t ticks)
752 {
753 Config::read();
754
755 if (getCommandLineOptions().locomotionDataPath.has_value())
756 {
757 auto& cfg = Config::get();
758 cfg.locoInstallPath = getCommandLineOptions().locomotionDataPath.value();
759 }
760
761 Environment::resolvePaths();
762
763 try
764 {
765 initialise();
766 loadFile(savePath);
767 }
768 catch (const std::exception& e)
769 {
770 Logging::error("Unable to simulate park: {}", e.what());
771 }
772 catch (const GameException i)
773 {
774 if (i != GameException::Interrupt)
775 {
776 Logging::error("Unable to simulate park!");
777 }
778 else
779 {
780 Logging::info("File loaded. Starting simulation.");
781 }
782 }
783 tickLogic(ticks);
784 }
785
786 // 0x00406D13
787 static int main(const CommandLineOptions& options)

Callers 1

simulateFunction · 0.85

Calls 9

resolvePathsFunction · 0.85
loadFileFunction · 0.85
errorFunction · 0.85
infoFunction · 0.85
tickLogicFunction · 0.85
valueMethod · 0.80
whatMethod · 0.80
getFunction · 0.70
initialiseFunction · 0.70

Tested by

no test coverage detected