Advertisement
Guest User

Untitled

a guest
Oct 5th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
4CS 2.58 KB | None | 0 0
  1. //-----------------------------------------------------------------------------
  2. // Torque
  3. // Copyright GarageGames, LLC 2011
  4. //-----------------------------------------------------------------------------
  5.  
  6. $appName = "Collateral Universe";
  7. $isDedicated = false;
  8. $defaultGame = "scripts";
  9. $Pref::Video::ProfilePath = "data/profile";
  10. $displayHelp = false;
  11.  
  12. echo("\n--------- Preload the base functions ---------");
  13. exec("scripts/core.cs");
  14.  
  15. echo("\n--------- Parsing Arguments ---------");
  16. exec("scripts/parseArgs.cs");
  17. defaultParseArgs();
  18.  
  19. $dirCount = 3;
  20. $userDirs = $defaultGame @ ";data;levels";
  21.  
  22. // load tools scripts if we're a tool build
  23. if( isToolBuild() && !$isDedicated)
  24. {
  25.     $userDirs = "tools;" @ $userDirs;
  26.     $dirCount++;
  27. }
  28.  
  29. //--------------------------------------------------------------------------
  30. // Default to a new logfile each session.
  31. if( !$logModeSpecified )
  32. {
  33.    if( $platform !$= "xbox" && $platform !$= "xenon" )
  34.       setLogMode(6);
  35. }
  36.  
  37. if( $compileAll )
  38. {
  39.    echo("\n --- Compiling all files ---");
  40.    compileFiles("*.cs");
  41.    compileFiles("*.gui");
  42.    compileFiles("*.ts");  
  43.    echo(" --- Exiting after compile ---");
  44.    quit();
  45. }
  46.  
  47. if( $compileTools )
  48. {
  49.    echo(" --- Compiling tools scritps ---");
  50.    compileFiles("tools/*.cs");
  51.    compileFiles("tools/*.gui");
  52.    compileFiles("tools/*.ts");  
  53.    echo(" --- Exiting after compile ---");
  54.    quit();
  55. }
  56.  
  57. // Get the first dir on the list, which will be the last to be applied... this
  58. // does not modify the list.
  59. nextToken($userDirs, currentMod, ";");
  60.  
  61. echo("\n--------- Loading DIRS ---------");
  62. loadDirs($userDirs);
  63.  
  64. // Either display the help message or startup the app.
  65. if ($displayHelp) {
  66.    enableWinConsole(true);
  67.    displayHelp();
  68.    quit();
  69. } else {
  70.    onStart();
  71.    echo("\n--------- Engine initialized ---------");
  72.    
  73.    // Auto-load on the 360
  74.    if( $platform $= "xenon" )
  75.    {
  76.       %mission = "levels/Empty Terrain.mis";
  77.      
  78.       echo("Xbox360 Autoloading level: '" @ %mission @ "'");
  79.      
  80.      
  81.       if ($pref::HostMultiPlayer)
  82.          %serverType = "MultiPlayer";
  83.       else
  84.          %serverType = "SinglePlayer";
  85.  
  86.       createAndConnectToLocalServer( %serverType, %mission );
  87.    }
  88. }
  89.  
  90. // Display an error message for unused arguments
  91. for ($i = 1; $i < $Game::argc; $i++)
  92. {
  93.    if (!$argUsed[$i])
  94.       error("Error: Unknown command line argument: " @ $Game::argv[$i]);
  95. }
  96.  
  97. // Automatically start up the appropriate eidtor, if any
  98. if ($startWorldEditor)
  99. {
  100.    Canvas.setCursor("DefaultCursor");
  101.    Canvas.setContent(EditorChooseLevelGui);
  102. } else if ($startGUIEditor) {
  103.    Canvas.setCursor("DefaultCursor");
  104.    Canvas.setContent(EditorChooseGUI);
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement