mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Add support for replacing the main.tscript file with a specified Console Function
This commit is contained in:
parent
bcea9bfc3a
commit
df8041e689
|
|
@ -450,7 +450,12 @@ bool StandardMainLoop::handleCommandLine( S32 argc, const char **argv )
|
|||
Stream *mainCsStream = NULL;
|
||||
|
||||
// The working filestream.
|
||||
FileStream str;
|
||||
FileStream str;
|
||||
|
||||
#ifdef TORQUE_ENTRY_FUNCTION
|
||||
Con::executef(TORQUE_ENTRY_FUNCTION);
|
||||
return true;
|
||||
#endif
|
||||
|
||||
const char *defaultScriptName = "main." TORQUE_SCRIPT_EXTENSION;
|
||||
bool useDefaultScript = true;
|
||||
|
|
|
|||
|
|
@ -87,6 +87,9 @@
|
|||
/// Define the default extension to be used for TorqueScript files
|
||||
#cmakedefine TORQUE_SCRIPT_EXTENSION "@TORQUE_SCRIPT_EXTENSION@"
|
||||
|
||||
/// Specify a console function to execute instead of looking for a main.tscript file
|
||||
#cmakedefine TORQUE_ENTRY_FUNCTION "@TORQUE_ENTRY_FUNCTION@"
|
||||
|
||||
// Define me if this build is a tools build
|
||||
#cmakedefine TORQUE_PLAYER
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ mark_as_advanced(WIN32)
|
|||
#general
|
||||
advanced_option(TORQUE_MULTITHREAD "Multi Threading" ON)
|
||||
advanced_option(TORQUE_DISABLE_MEMORY_MANAGER "Disable memory manager" ON)
|
||||
set(TORQUE_ENTRY_FUNCTION "" CACHE STRING "Specify a console function to execute instead of looking for a main.tscript file")
|
||||
mark_as_advanced(TORQUE_ENTRY_FUNCTION)
|
||||
|
||||
#fileIO
|
||||
set(TORQUE_APP_PASSWORD "changeme" CACHE STRING "zip file password")
|
||||
|
|
|
|||
Loading…
Reference in a new issue