MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / init

Method init

Engine/source/app/mainLoop.cpp:212–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void StandardMainLoop::init()
213{
214 #ifdef TORQUE_DEBUG
215 gStartupTimer = PlatformTimer::create();
216 #endif
217
218 #ifdef TORQUE_DEBUG_GUARD
219 Memory::flagCurrentAllocs( Memory::FLAG_Global );
220 #endif
221
222 Platform::setMathControlStateKnown();
223
224 // Asserts should be created FIRST
225 PlatformAssert::create();
226
227 ManagedSingleton< ThreadManager >::createSingleton();
228 FrameAllocator::init(TORQUE_FRAME_SIZE); // See comments in torqueConfig.h
229
230 // Yell if we can't initialize the network.
231 if(!Net::init())
232 {
233 AssertISV(false, "StandardMainLoop::initCore - could not initialize networking!");
234 }
235
236 _StringTable::create();
237
238 // Set up the resource manager and get some basic file types in it.
239 Con::init();
240 Platform::initConsole();
241 NetStringTable::create();
242
243 // Use debug output logging on the Xbox and OSX builds
244#if defined( _XBOX ) || defined( TORQUE_OS_MAC )
245 DebugOutputConsumer::init();
246#endif
247
248 // init Filesystem first, so we can actually log errors for all components that follow
249 Platform::FS::InstallFileSystems(); // install all drives for now until we have everything using the volume stuff
250 Platform::FS::MountDefaults();
251
252 // Set our working directory.
253 Torque::FS::SetCwd( "game:/" );
254
255 // Set our working directory.
256 Platform::setCurrentDirectory( Platform::getMainDotCsDir() );
257
258 Processor::init();
259 Math::init();
260 Platform::init(); // platform specific initialization
261 RedBook::init();
262 Platform::initConsole();
263
264 ThreadPool::GlobalThreadPool::createSingleton();
265
266 // Initialize modules.
267
268 EngineModuleManager::initializeSystem();
269

Callers

nothing calls this directly

Calls 13

flagCurrentAllocsFunction · 0.85
MountDefaultsFunction · 0.85
SetCwdFunction · 0.85
openEmbeddedVFSArchiveFunction · 0.85
addVariableFunction · 0.85
setVariableFunction · 0.85
addListenerMethod · 0.80
initFunction · 0.50
insertMethod · 0.45
registerObjectMethod · 0.45
pushObjectMethod · 0.45
notifyMethod · 0.45

Tested by

no test coverage detected