diff --git a/src/openrct2-cli/Cli.cpp b/src/openrct2-cli/Cli.cpp index c9deea36e2..5e2a37ff0b 100644 --- a/src/openrct2-cli/Cli.cpp +++ b/src/openrct2-cli/Cli.cpp @@ -21,7 +21,6 @@ int main(int argc, const char** argv) { int32_t rc = EXIT_SUCCESS; int runGame = CommandLineRun(argv, argc); - Platform::CoreInit(); if (runGame == EXITCODE_CONTINUE) { gOpenRCT2Headless = true; diff --git a/src/openrct2-ui/Ui.cpp b/src/openrct2-ui/Ui.cpp index eeda41160d..3364bb29e8 100644 --- a/src/openrct2-ui/Ui.cpp +++ b/src/openrct2-ui/Ui.cpp @@ -44,7 +44,6 @@ int main(int argc, const char** argv) std::unique_ptr context; int32_t rc = EXIT_SUCCESS; int runGame = CommandLineRun(argv, argc); - Platform::CoreInit(); RegisterBitmapReader(); if (runGame == EXITCODE_CONTINUE) { diff --git a/src/openrct2/command_line/BenchSpriteSort.cpp b/src/openrct2/command_line/BenchSpriteSort.cpp index 3b360a6c5d..e24c76c812 100644 --- a/src/openrct2/command_line/BenchSpriteSort.cpp +++ b/src/openrct2/command_line/BenchSpriteSort.cpp @@ -70,7 +70,6 @@ static void fixup_pointers(std::vector& s) static std::vector extract_paint_session(std::string_view parkFileName) { - Platform::CoreInit(); gOpenRCT2Headless = true; auto context = OpenRCT2::CreateContext(); std::vector sessions; diff --git a/src/openrct2/command_line/BenchUpdate.cpp b/src/openrct2/command_line/BenchUpdate.cpp index ec1b628197..d87777a8da 100644 --- a/src/openrct2/command_line/BenchUpdate.cpp +++ b/src/openrct2/command_line/BenchUpdate.cpp @@ -118,7 +118,6 @@ static int CommandLineForBenchSpriteSort(int argc, const char* const* argv) if (::benchmark::ReportUnrecognizedArguments(argc, &argv_for_benchmark[0])) return -1; - Platform::CoreInit(); gOpenRCT2Headless = true; ::benchmark::RunSpecifiedBenchmarks(); diff --git a/src/openrct2/command_line/SimulateCommands.cpp b/src/openrct2/command_line/SimulateCommands.cpp index 1dfc7526dc..22fdca0712 100644 --- a/src/openrct2/command_line/SimulateCommands.cpp +++ b/src/openrct2/command_line/SimulateCommands.cpp @@ -39,8 +39,6 @@ static exitcode_t HandleSimulate(CommandLineArgEnumerator* argEnumerator) return EXITCODE_FAIL; } - Platform::CoreInit(); - const char* inputPath = argv[0]; uint32_t ticks = atol(argv[1]); diff --git a/src/openrct2/interface/Screenshot.cpp b/src/openrct2/interface/Screenshot.cpp index 5533aad5f6..24ec108206 100644 --- a/src/openrct2/interface/Screenshot.cpp +++ b/src/openrct2/interface/Screenshot.cpp @@ -490,7 +490,6 @@ int32_t CommandLineForGfxbench(const char** argv, int32_t argc) return -1; } - Platform::CoreInit(); int32_t iterationCount = 5; if (argc == 2) { @@ -587,7 +586,6 @@ int32_t CommandLineForScreenshot(const char** argv, int32_t argc, ScreenshotOpti DrawPixelInfo dpi; try { - Platform::CoreInit(); bool customLocation = false; bool centreMapX = false; bool centreMapY = false; diff --git a/src/openrct2/platform/Platform.Common.cpp b/src/openrct2/platform/Platform.Common.cpp index 051925b9f8..bbb492db7d 100644 --- a/src/openrct2/platform/Platform.Common.cpp +++ b/src/openrct2/platform/Platform.Common.cpp @@ -37,10 +37,6 @@ static constexpr std::array _prohibitedCharacters = { '/' }; namespace Platform { - void CoreInit() - { - } - CurrencyType GetCurrencyValue(const char* currCode) { if (currCode == nullptr || strlen(currCode) < 3) diff --git a/src/openrct2/platform/Platform.h b/src/openrct2/platform/Platform.h index 607387ec9a..ce97861555 100644 --- a/src/openrct2/platform/Platform.h +++ b/src/openrct2/platform/Platform.h @@ -45,8 +45,6 @@ struct RealWorldTime; namespace Platform { - // Called very early in the program before parsing commandline arguments. - void CoreInit(); std::string GetEnvironmentVariable(std::string_view name); std::string GetFolderPath(SPECIAL_FOLDER folder); std::string GetInstallPath(); diff --git a/test/tests/MultiLaunch.cpp b/test/tests/MultiLaunch.cpp index fc1146bca3..ed0af996eb 100644 --- a/test/tests/MultiLaunch.cpp +++ b/test/tests/MultiLaunch.cpp @@ -34,7 +34,6 @@ TEST(MultiLaunchTest, all) gOpenRCT2Headless = true; gOpenRCT2NoGraphics = true; - Platform::CoreInit(); for (int i = 0; i < 3; i++) { auto context = CreateContext(); diff --git a/test/tests/Pathfinding.cpp b/test/tests/Pathfinding.cpp index 32aa2c93f5..71fbe3038e 100644 --- a/test/tests/Pathfinding.cpp +++ b/test/tests/Pathfinding.cpp @@ -29,8 +29,6 @@ class PathfindingTestBase : public testing::Test public: static void SetUpTestCase() { - Platform::CoreInit(); - gOpenRCT2Headless = true; gOpenRCT2NoGraphics = true; _context = CreateContext(); diff --git a/test/tests/PlayTests.cpp b/test/tests/PlayTests.cpp index 43c147d540..238e89b839 100644 --- a/test/tests/PlayTests.cpp +++ b/test/tests/PlayTests.cpp @@ -41,7 +41,6 @@ static std::unique_ptr localStartGame(const std::string& parkPath) { gOpenRCT2Headless = true; gOpenRCT2NoGraphics = true; - Platform::CoreInit(); auto context = CreateContext(); if (!context->Initialise()) diff --git a/test/tests/ReplayTests.cpp b/test/tests/ReplayTests.cpp index 7aee8464de..4d450480b4 100644 --- a/test/tests/ReplayTests.cpp +++ b/test/tests/ReplayTests.cpp @@ -73,7 +73,6 @@ TEST_P(ReplayTests, RunReplay) { gOpenRCT2Headless = true; gOpenRCT2NoGraphics = true; - Platform::CoreInit(); auto testData = GetParam(); auto replayFile = testData.filePath; diff --git a/test/tests/RideRatings.cpp b/test/tests/RideRatings.cpp index ba75d89d20..9ec03030a2 100644 --- a/test/tests/RideRatings.cpp +++ b/test/tests/RideRatings.cpp @@ -65,7 +65,6 @@ protected: gOpenRCT2Headless = true; gOpenRCT2NoGraphics = true; - Platform::CoreInit(); auto context = CreateContext(); bool initialised = context->Initialise(); ASSERT_TRUE(initialised); diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 58436b15fd..5cd4541094 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -187,8 +187,6 @@ TEST(S6ImportExportBasic, all) gOpenRCT2Headless = true; gOpenRCT2NoGraphics = true; - Platform::CoreInit(); - MemoryStream importBuffer; MemoryStream exportBuffer; MemoryStream snapshotStream; @@ -233,8 +231,6 @@ TEST(S6ImportExportAdvanceTicks, all) gOpenRCT2Headless = true; gOpenRCT2NoGraphics = true; - Platform::CoreInit(); - MemoryStream importBuffer; MemoryStream exportBuffer; MemoryStream snapshotStream;