mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-17 21:12:34 +01:00
Remove Platform::CoreInit
This commit is contained in:
@@ -21,7 +21,6 @@ int main(int argc, const char** argv)
|
|||||||
{
|
{
|
||||||
int32_t rc = EXIT_SUCCESS;
|
int32_t rc = EXIT_SUCCESS;
|
||||||
int runGame = CommandLineRun(argv, argc);
|
int runGame = CommandLineRun(argv, argc);
|
||||||
Platform::CoreInit();
|
|
||||||
if (runGame == EXITCODE_CONTINUE)
|
if (runGame == EXITCODE_CONTINUE)
|
||||||
{
|
{
|
||||||
gOpenRCT2Headless = true;
|
gOpenRCT2Headless = true;
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ int main(int argc, const char** argv)
|
|||||||
std::unique_ptr<IContext> context;
|
std::unique_ptr<IContext> context;
|
||||||
int32_t rc = EXIT_SUCCESS;
|
int32_t rc = EXIT_SUCCESS;
|
||||||
int runGame = CommandLineRun(argv, argc);
|
int runGame = CommandLineRun(argv, argc);
|
||||||
Platform::CoreInit();
|
|
||||||
RegisterBitmapReader();
|
RegisterBitmapReader();
|
||||||
if (runGame == EXITCODE_CONTINUE)
|
if (runGame == EXITCODE_CONTINUE)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ static void fixup_pointers(std::vector<RecordedPaintSession>& s)
|
|||||||
|
|
||||||
static std::vector<RecordedPaintSession> extract_paint_session(std::string_view parkFileName)
|
static std::vector<RecordedPaintSession> extract_paint_session(std::string_view parkFileName)
|
||||||
{
|
{
|
||||||
Platform::CoreInit();
|
|
||||||
gOpenRCT2Headless = true;
|
gOpenRCT2Headless = true;
|
||||||
auto context = OpenRCT2::CreateContext();
|
auto context = OpenRCT2::CreateContext();
|
||||||
std::vector<RecordedPaintSession> sessions;
|
std::vector<RecordedPaintSession> sessions;
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ static int CommandLineForBenchSpriteSort(int argc, const char* const* argv)
|
|||||||
if (::benchmark::ReportUnrecognizedArguments(argc, &argv_for_benchmark[0]))
|
if (::benchmark::ReportUnrecognizedArguments(argc, &argv_for_benchmark[0]))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
Platform::CoreInit();
|
|
||||||
gOpenRCT2Headless = true;
|
gOpenRCT2Headless = true;
|
||||||
|
|
||||||
::benchmark::RunSpecifiedBenchmarks();
|
::benchmark::RunSpecifiedBenchmarks();
|
||||||
|
|||||||
@@ -39,8 +39,6 @@ static exitcode_t HandleSimulate(CommandLineArgEnumerator* argEnumerator)
|
|||||||
return EXITCODE_FAIL;
|
return EXITCODE_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform::CoreInit();
|
|
||||||
|
|
||||||
const char* inputPath = argv[0];
|
const char* inputPath = argv[0];
|
||||||
uint32_t ticks = atol(argv[1]);
|
uint32_t ticks = atol(argv[1]);
|
||||||
|
|
||||||
|
|||||||
@@ -490,7 +490,6 @@ int32_t CommandLineForGfxbench(const char** argv, int32_t argc)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform::CoreInit();
|
|
||||||
int32_t iterationCount = 5;
|
int32_t iterationCount = 5;
|
||||||
if (argc == 2)
|
if (argc == 2)
|
||||||
{
|
{
|
||||||
@@ -587,7 +586,6 @@ int32_t CommandLineForScreenshot(const char** argv, int32_t argc, ScreenshotOpti
|
|||||||
DrawPixelInfo dpi;
|
DrawPixelInfo dpi;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Platform::CoreInit();
|
|
||||||
bool customLocation = false;
|
bool customLocation = false;
|
||||||
bool centreMapX = false;
|
bool centreMapX = false;
|
||||||
bool centreMapY = false;
|
bool centreMapY = false;
|
||||||
|
|||||||
@@ -37,10 +37,6 @@ static constexpr std::array _prohibitedCharacters = { '/' };
|
|||||||
|
|
||||||
namespace Platform
|
namespace Platform
|
||||||
{
|
{
|
||||||
void CoreInit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
CurrencyType GetCurrencyValue(const char* currCode)
|
CurrencyType GetCurrencyValue(const char* currCode)
|
||||||
{
|
{
|
||||||
if (currCode == nullptr || strlen(currCode) < 3)
|
if (currCode == nullptr || strlen(currCode) < 3)
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ struct RealWorldTime;
|
|||||||
|
|
||||||
namespace Platform
|
namespace Platform
|
||||||
{
|
{
|
||||||
// Called very early in the program before parsing commandline arguments.
|
|
||||||
void CoreInit();
|
|
||||||
std::string GetEnvironmentVariable(std::string_view name);
|
std::string GetEnvironmentVariable(std::string_view name);
|
||||||
std::string GetFolderPath(SPECIAL_FOLDER folder);
|
std::string GetFolderPath(SPECIAL_FOLDER folder);
|
||||||
std::string GetInstallPath();
|
std::string GetInstallPath();
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ TEST(MultiLaunchTest, all)
|
|||||||
gOpenRCT2Headless = true;
|
gOpenRCT2Headless = true;
|
||||||
gOpenRCT2NoGraphics = true;
|
gOpenRCT2NoGraphics = true;
|
||||||
|
|
||||||
Platform::CoreInit();
|
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
auto context = CreateContext();
|
auto context = CreateContext();
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ class PathfindingTestBase : public testing::Test
|
|||||||
public:
|
public:
|
||||||
static void SetUpTestCase()
|
static void SetUpTestCase()
|
||||||
{
|
{
|
||||||
Platform::CoreInit();
|
|
||||||
|
|
||||||
gOpenRCT2Headless = true;
|
gOpenRCT2Headless = true;
|
||||||
gOpenRCT2NoGraphics = true;
|
gOpenRCT2NoGraphics = true;
|
||||||
_context = CreateContext();
|
_context = CreateContext();
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ static std::unique_ptr<IContext> localStartGame(const std::string& parkPath)
|
|||||||
{
|
{
|
||||||
gOpenRCT2Headless = true;
|
gOpenRCT2Headless = true;
|
||||||
gOpenRCT2NoGraphics = true;
|
gOpenRCT2NoGraphics = true;
|
||||||
Platform::CoreInit();
|
|
||||||
|
|
||||||
auto context = CreateContext();
|
auto context = CreateContext();
|
||||||
if (!context->Initialise())
|
if (!context->Initialise())
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ TEST_P(ReplayTests, RunReplay)
|
|||||||
{
|
{
|
||||||
gOpenRCT2Headless = true;
|
gOpenRCT2Headless = true;
|
||||||
gOpenRCT2NoGraphics = true;
|
gOpenRCT2NoGraphics = true;
|
||||||
Platform::CoreInit();
|
|
||||||
|
|
||||||
auto testData = GetParam();
|
auto testData = GetParam();
|
||||||
auto replayFile = testData.filePath;
|
auto replayFile = testData.filePath;
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ protected:
|
|||||||
gOpenRCT2Headless = true;
|
gOpenRCT2Headless = true;
|
||||||
gOpenRCT2NoGraphics = true;
|
gOpenRCT2NoGraphics = true;
|
||||||
|
|
||||||
Platform::CoreInit();
|
|
||||||
auto context = CreateContext();
|
auto context = CreateContext();
|
||||||
bool initialised = context->Initialise();
|
bool initialised = context->Initialise();
|
||||||
ASSERT_TRUE(initialised);
|
ASSERT_TRUE(initialised);
|
||||||
|
|||||||
@@ -187,8 +187,6 @@ TEST(S6ImportExportBasic, all)
|
|||||||
gOpenRCT2Headless = true;
|
gOpenRCT2Headless = true;
|
||||||
gOpenRCT2NoGraphics = true;
|
gOpenRCT2NoGraphics = true;
|
||||||
|
|
||||||
Platform::CoreInit();
|
|
||||||
|
|
||||||
MemoryStream importBuffer;
|
MemoryStream importBuffer;
|
||||||
MemoryStream exportBuffer;
|
MemoryStream exportBuffer;
|
||||||
MemoryStream snapshotStream;
|
MemoryStream snapshotStream;
|
||||||
@@ -233,8 +231,6 @@ TEST(S6ImportExportAdvanceTicks, all)
|
|||||||
gOpenRCT2Headless = true;
|
gOpenRCT2Headless = true;
|
||||||
gOpenRCT2NoGraphics = true;
|
gOpenRCT2NoGraphics = true;
|
||||||
|
|
||||||
Platform::CoreInit();
|
|
||||||
|
|
||||||
MemoryStream importBuffer;
|
MemoryStream importBuffer;
|
||||||
MemoryStream exportBuffer;
|
MemoryStream exportBuffer;
|
||||||
MemoryStream snapshotStream;
|
MemoryStream snapshotStream;
|
||||||
|
|||||||
Reference in New Issue
Block a user