| 73 | } |
| 74 | |
| 75 | S32 TorqueMain( S32 argc, const char **argv ) |
| 76 | { |
| 77 | S32 failed = 0; |
| 78 | |
| 79 | // Initialize the subsystems. |
| 80 | StandardMainLoop::init(); |
| 81 | Con::setVariable( "Con::Prompt", "" ); |
| 82 | WindowsConsole->enable( true ); |
| 83 | |
| 84 | // install all drives for now until we have everything using the volume stuff |
| 85 | Platform::FS::InstallFileSystems(); |
| 86 | Platform::FS::MountDefaults(); |
| 87 | |
| 88 | bool compatMode = false; |
| 89 | bool diffuseNames = false; |
| 90 | bool verbose = false; |
| 91 | bool saveDTS = true; |
| 92 | bool saveDSQ = false; |
| 93 | bool genMaterials = false; |
| 94 | Torque::Path cfgPath, srcPath, destPath; |
| 95 | |
| 96 | // Parse arguments |
| 97 | S32 i; |
| 98 | for ( i = 1; i < argc-1; i++ ) |
| 99 | { |
| 100 | if ( dStrEqual( argv[i], "--config" ) ) |
| 101 | cfgPath = makeFullPath( argv[++i] ); |
| 102 | else if ( dStrEqual( argv[i], "--output" ) ) |
| 103 | destPath = makeFullPath( argv[++i] ); |
| 104 | else if ( dStrEqual( argv[i], "--dsq" ) ) |
| 105 | saveDSQ = true; |
| 106 | else if ( dStrEqual( argv[i], "--dsq-only" ) ) |
| 107 | { |
| 108 | saveDTS = false; |
| 109 | saveDSQ = true; |
| 110 | } |
| 111 | else if ( dStrEqual( argv[i], "--compat" ) ) |
| 112 | compatMode = true; |
| 113 | else if ( dStrEqual( argv[i], "--diffuse" ) ) |
| 114 | diffuseNames = true; |
| 115 | else if ( dStrEqual( argv[i], "--materials" ) ) |
| 116 | genMaterials = true; |
| 117 | else if ( dStrEqual( argv[i], "--verbose" ) ) |
| 118 | verbose = true; |
| 119 | } |
| 120 | |
| 121 | if ( ( i >= argc ) || ( !dStrEndsWith(argv[i], ".dae") && !dStrEndsWith(argv[i], ".kmz" ) ) ) |
| 122 | { |
| 123 | Con::errorf( "Error: no DAE file specified.\n" ); |
| 124 | printUsage(); |
| 125 | return -1; |
| 126 | } |
| 127 | |
| 128 | srcPath = makeFullPath( argv[i] ); |
| 129 | if ( destPath.isEmpty() ) |
| 130 | { |
| 131 | destPath = srcPath; |
| 132 | destPath.setExtension( "dts" ); |
nothing calls this directly
no test coverage detected