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

Function main

src/openrct2-cli/Cli.cpp:20–38  ·  view source on GitHub ↗

* Main entry point for non-Windows systems. Windows instead uses its own DLL proxy. */

Source from the content-addressed store, hash-verified

18 * Main entry point for non-Windows systems. Windows instead uses its own DLL proxy.
19 */
20int main(int argc, const char** argv)
21{
22 int32_t rc = EXIT_SUCCESS;
23 auto runGame = CommandLineRun(argv, argc);
24 if (runGame == ExitCode::launch)
25 {
26 gOpenRCT2Headless = true;
27 gOpenRCT2NoGraphics = true;
28
29 // Run OpenRCT2 with a plain context
30 auto context = CreateContext();
31 rc = context->RunOpenRCT2(argc, argv);
32 }
33 else if (runGame == ExitCode::fail)
34 {
35 rc = EXIT_FAILURE;
36 }
37 return rc;
38}

Callers

nothing calls this directly

Calls 3

CommandLineRunFunction · 0.85
CreateContextFunction · 0.85
RunOpenRCT2Method · 0.80

Tested by

no test coverage detected