MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / TorqueMain

Function TorqueMain

Tools/dae2dts/source/main.cpp:75–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75S32 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" );

Callers

nothing calls this directly

Calls 15

setVariableFunction · 0.85
MountDefaultsFunction · 0.85
dStrEqualFunction · 0.85
makeFullPathFunction · 0.85
dStrEndsWithFunction · 0.85
printUsageFunction · 0.85
printfFunction · 0.85
evaluateFunction · 0.85
canWriteOldFormatMethod · 0.80
getFileNameMethod · 0.80
exportSequenceMethod · 0.80
openMethod · 0.65

Tested by

no test coverage detected