Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-----------------------------------------------------------------------------
- // Torque
- // Copyright GarageGames, LLC 2011
- //-----------------------------------------------------------------------------
- $appName = "Collateral Universe";
- $isDedicated = false;
- $defaultGame = "scripts";
- $Pref::Video::ProfilePath = "data/profile";
- $displayHelp = false;
- echo("\n--------- Preload the base functions ---------");
- exec("scripts/core.cs");
- echo("\n--------- Parsing Arguments ---------");
- exec("scripts/parseArgs.cs");
- defaultParseArgs();
- $dirCount = 3;
- $userDirs = $defaultGame @ ";data;levels";
- // load tools scripts if we're a tool build
- if( isToolBuild() && !$isDedicated)
- {
- $userDirs = "tools;" @ $userDirs;
- $dirCount++;
- }
- //--------------------------------------------------------------------------
- // Default to a new logfile each session.
- if( !$logModeSpecified )
- {
- if( $platform !$= "xbox" && $platform !$= "xenon" )
- setLogMode(6);
- }
- if( $compileAll )
- {
- echo("\n --- Compiling all files ---");
- compileFiles("*.cs");
- compileFiles("*.gui");
- compileFiles("*.ts");
- echo(" --- Exiting after compile ---");
- quit();
- }
- if( $compileTools )
- {
- echo(" --- Compiling tools scritps ---");
- compileFiles("tools/*.cs");
- compileFiles("tools/*.gui");
- compileFiles("tools/*.ts");
- echo(" --- Exiting after compile ---");
- quit();
- }
- // Get the first dir on the list, which will be the last to be applied... this
- // does not modify the list.
- nextToken($userDirs, currentMod, ";");
- echo("\n--------- Loading DIRS ---------");
- loadDirs($userDirs);
- // Either display the help message or startup the app.
- if ($displayHelp) {
- enableWinConsole(true);
- displayHelp();
- quit();
- } else {
- onStart();
- echo("\n--------- Engine initialized ---------");
- // Auto-load on the 360
- if( $platform $= "xenon" )
- {
- %mission = "levels/Empty Terrain.mis";
- echo("Xbox360 Autoloading level: '" @ %mission @ "'");
- if ($pref::HostMultiPlayer)
- %serverType = "MultiPlayer";
- else
- %serverType = "SinglePlayer";
- createAndConnectToLocalServer( %serverType, %mission );
- }
- }
- // Display an error message for unused arguments
- for ($i = 1; $i < $Game::argc; $i++)
- {
- if (!$argUsed[$i])
- error("Error: Unknown command line argument: " @ $Game::argv[$i]);
- }
- // Automatically start up the appropriate eidtor, if any
- if ($startWorldEditor)
- {
- Canvas.setCursor("DefaultCursor");
- Canvas.setContent(EditorChooseLevelGui);
- } else if ($startGUIEditor) {
- Canvas.setCursor("DefaultCursor");
- Canvas.setContent(EditorChooseGUI);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement