diff --git a/Templates/BaseGame/game/main.cs.in b/Templates/BaseGame/game/main.cs.in index 3eed267df..1e3e37c44 100644 --- a/Templates/BaseGame/game/main.cs.in +++ b/Templates/BaseGame/game/main.cs.in @@ -16,39 +16,12 @@ $appName = "@TORQUE_APP_NAME@"; //----------------------------------------------------------------------------- // 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.LoadGroup( "Game" ); @@ -85,14 +58,4 @@ else closeSplashWindow(); } -echo("Engine initialized..."); - -//----------------------------------------------------------------------------- -// Called when the engine is shutting down. -function onExit() -{ - // Stop file change events. - stopFileChangeNotifications(); - - ModuleDatabase.UnloadExplicit( "Game" ); -} \ No newline at end of file +echo("Engine initialized..."); \ No newline at end of file