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

Method updateProgress

Engine/source/ts/loader/tsShapeLoader.cpp:116–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114//-----------------------------------------------------------------------------
115
116void TSShapeLoader::updateProgress(S32 major, const char* msg, S32 numMinor, S32 minor)
117{
118 // Calculate progress value
119 F32 progress = (F32)major / NumLoadPhases;
120 const char *progressMsg = msg;
121
122 if (numMinor)
123 {
124 progress += (minor * (1.0f / NumLoadPhases) / numMinor);
125 progressMsg = avar("%s (%d of %d)", msg, minor + 1, numMinor);
126 }
127
128 if(Con::isFunction("updateTSShapeLoadProgress"))
129 Con::executef("updateTSShapeLoadProgress", Con::getFloatArg(progress), progressMsg);
130}
131
132//-----------------------------------------------------------------------------
133// Shape creation entry point

Callers

nothing calls this directly

Calls 4

avarFunction · 0.85
isFunctionFunction · 0.85
executefFunction · 0.85
getFloatArgFunction · 0.85

Tested by

no test coverage detected