|
@@ -16,39 +16,12 @@ $appName = "@TORQUE_APP_NAME@";
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
//-----------------------------------------------------------------------------
|
|
// Load up scripts to initialise subsystems.
|
|
// Load up scripts to initialise subsystems.
|
|
-exec("core/main.cs");
|
|
|
|
-
|
|
|
|
-// Parse the command line arguments
|
|
|
|
-echo("\n--------- Parsing Arguments ---------");
|
|
|
|
-parseArgs();
|
|
|
|
-
|
|
|
|
-// The canvas needs to be initialized before any gui scripts are run since
|
|
|
|
-// some of the controls assume that the canvas exists at load time.
|
|
|
|
-createCanvas($appName);
|
|
|
|
|
|
+ModuleDatabase.setModuleExtension("module");
|
|
|
|
+ModuleDatabase.scanModules( "core", false );
|
|
|
|
+ModuleDatabase.LoadExplicit( "CoreModule" );
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
//-----------------------------------------------------------------------------
|
|
-// Load console.
|
|
|
|
-exec("core/console/main.cs");
|
|
|
|
-
|
|
|
|
-// Init the physics plugin.
|
|
|
|
-physicsInit();
|
|
|
|
-
|
|
|
|
-sfxStartup();
|
|
|
|
-
|
|
|
|
-// Set up networking.
|
|
|
|
-setNetPort(0);
|
|
|
|
-
|
|
|
|
-// Start processing file change events.
|
|
|
|
-startFileChangeNotifications();
|
|
|
|
-
|
|
|
|
-// If we have editors, initialize them here as well
|
|
|
|
-if (isToolBuild())
|
|
|
|
-{
|
|
|
|
- if(isFile("tools/main.cs") && !$isDedicated)
|
|
|
|
- exec("tools/main.cs");
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-ModuleDatabase.setModuleExtension("module");
|
|
|
|
|
|
+// Load any gameplay modules
|
|
ModuleDatabase.scanModules( "data", false );
|
|
ModuleDatabase.scanModules( "data", false );
|
|
ModuleDatabase.LoadGroup( "Game" );
|
|
ModuleDatabase.LoadGroup( "Game" );
|
|
|
|
|
|
@@ -85,14 +58,4 @@ else
|
|
closeSplashWindow();
|
|
closeSplashWindow();
|
|
}
|
|
}
|
|
|
|
|
|
-echo("Engine initialized...");
|
|
|
|
-
|
|
|
|
-//-----------------------------------------------------------------------------
|
|
|
|
-// Called when the engine is shutting down.
|
|
|
|
-function onExit()
|
|
|
|
-{
|
|
|
|
- // Stop file change events.
|
|
|
|
- stopFileChangeNotifications();
|
|
|
|
-
|
|
|
|
- ModuleDatabase.UnloadExplicit( "Game" );
|
|
|
|
-}
|
|
|
|
|
|
+echo("Engine initialized...");
|