MCPcopy Create free account
hub / github.com/defold/defold / MoveAllUp

Function MoveAllUp

engine/gameobject/src/gameobject/gameobject.cpp:1332–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1330 }
1331
1332 static void MoveAllUp(Collection* collection, Instance* instance)
1333 {
1334 /*
1335 * Move all children up in hierarchy
1336 */
1337
1338 uint32_t index = instance->m_FirstChildIndex;
1339 while (index != INVALID_INSTANCE_INDEX)
1340 {
1341 Instance* child = collection->m_Instances[index];
1342 // NOTE: This assertion is only valid if we processes the tree depth first
1343 // The order of MoveAllUp and MoveUp below is imperative
1344 // NOTE: This assert is not possible when moving more than a single step. TODO: ?
1345 //assert(child->m_Depth == instance->m_Depth + 1);
1346 MoveAllUp(collection, child);
1347 MoveUp(collection, child);
1348 index = collection->m_Instances[index]->m_SiblingIndex;
1349 }
1350 }
1351
1352 static void ReparentChildNodes(Collection* collection, HInstance instance)
1353 {

Callers 3

DoDeleteInstanceFunction · 0.85
SetParentFunction · 0.85

Calls 1

MoveUpFunction · 0.85

Tested by

no test coverage detected