Files
OpenRCT2-Web/src/openrct2-cli/Cli.cpp
T

38 lines
1.1 KiB
C++
Raw Normal View History

/*****************************************************************************
2019-03-17 08:16:15 +01:00
* Copyright (c) 2014-2019 OpenRCT2 developers
2018-06-15 14:07:34 +02:00
*
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include <openrct2/Context.h>
2017-06-03 23:10:20 +01:00
#include <openrct2/OpenRCT2.h>
#include <openrct2/platform/platform.h>
using namespace OpenRCT2;
/**
2018-06-22 23:25:16 +02:00
* Main entry point for non-Windows sytems. Windows instead uses its own DLL proxy.
*/
int main(int argc, const char** argv)
{
int32_t rc = EXIT_SUCCESS;
2017-10-16 18:04:40 -04:00
int runGame = cmdline_run(argv, argc);
core_init();
2017-06-03 23:10:20 +01:00
if (runGame == 1)
{
gOpenRCT2Headless = true;
2017-06-07 23:17:19 +01:00
gOpenRCT2NoGraphics = true;
2017-06-03 23:10:20 +01:00
// Run OpenRCT2 with a plain context
auto context = CreateContext();
rc = context->RunOpenRCT2(argc, argv);
2017-06-03 23:10:20 +01:00
}
else if (runGame == -1)
{
rc = EXIT_FAILURE;
}
return rc;
}