Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/GameSetup.cpp
Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | |||||
ERROR_TYPE(System, SDLInitFailed); | ERROR_TYPE(System, SDLInitFailed); | ||||
ERROR_TYPE(System, VmodeFailed); | ERROR_TYPE(System, VmodeFailed); | ||||
ERROR_TYPE(System, RequiredExtensionsMissing); | ERROR_TYPE(System, RequiredExtensionsMissing); | ||||
bool g_DoRenderGui = true; | bool g_DoRenderGui = true; | ||||
bool g_DoRenderLogger = true; | bool g_DoRenderLogger = true; | ||||
bool g_DoRenderCursor = true; | bool g_DoRenderCursor = true; | ||||
shared_ptr<ScriptRuntime> g_ScriptRuntime; | thread_local shared_ptr<ScriptRuntime> g_ScriptRuntime; | ||||
Stan: Needs an include? | |||||
wraitiiAuthorUnsubmitted Done Inline ActionsNo, this is a language keyword. wraitii: No, this is a language keyword. | |||||
static const int SANE_TEX_QUALITY_DEFAULT = 5; // keep in sync with code | static const int SANE_TEX_QUALITY_DEFAULT = 5; // keep in sync with code | ||||
static const CStr g_EventNameGameLoadProgress = "GameLoadProgress"; | static const CStr g_EventNameGameLoadProgress = "GameLoadProgress"; | ||||
bool g_InDevelopmentCopy; | bool g_InDevelopmentCopy; | ||||
bool g_CheckedIfInDevelopmentCopy = false; | bool g_CheckedIfInDevelopmentCopy = false; | ||||
▲ Show 20 Lines • Show All 769 Lines • ▼ Show 20 Lines | bool Init(const CmdLineArgs& args, int flags) | ||||
// g_ConfigDB, command line args, globals | // g_ConfigDB, command line args, globals | ||||
CONFIG_Init(args); | CONFIG_Init(args); | ||||
// Using a global object for the runtime is a workaround until Simulation and AI use | // Using a global object for the runtime is a workaround until Simulation and AI use | ||||
// their own threads and also their own runtimes. | // their own threads and also their own runtimes. | ||||
const int runtimeSize = 384 * 1024 * 1024; | const int runtimeSize = 384 * 1024 * 1024; | ||||
const int heapGrowthBytesGCTrigger = 20 * 1024 * 1024; | const int heapGrowthBytesGCTrigger = 20 * 1024 * 1024; | ||||
g_ScriptRuntime = ScriptInterface::CreateRuntime(shared_ptr<ScriptRuntime>(), runtimeSize, heapGrowthBytesGCTrigger); | g_ScriptRuntime = ScriptRuntime::CreateRuntime(runtimeSize, heapGrowthBytesGCTrigger); | ||||
Mod::CacheEnabledModVersions(g_ScriptRuntime); | Mod::CacheEnabledModVersions(g_ScriptRuntime); | ||||
// Special command-line mode to dump the entity schemas instead of running the game. | // Special command-line mode to dump the entity schemas instead of running the game. | ||||
// (This must be done after loading VFS etc, but should be done before wasting time | // (This must be done after loading VFS etc, but should be done before wasting time | ||||
// on anything else.) | // on anything else.) | ||||
if (args.Has("dumpSchema")) | if (args.Has("dumpSchema")) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 736 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Needs an include?