| 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) |
no test coverage detected