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

Function GetComponentAnimation

engine/gui/src/gui.cpp:4112–4128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4110
4111
4112 inline Animation* GetComponentAnimation(HScene scene, HNode node, float* value)
4113 {
4114 uint16_t version = (uint16_t) (node >> 16);
4115 uint16_t index = node & 0xffff;
4116 InternalNode* n = &scene->m_Nodes[index];
4117 assert(n->m_Version == version);
4118
4119 dmArray<Animation>* animations = &scene->m_Animations;
4120 uint32_t n_animations = animations->Size();
4121 for (uint32_t i = 0; i < n_animations; ++i)
4122 {
4123 Animation* anim = &(*animations)[i];
4124 if (anim->m_Node == node && anim->m_Value == value)
4125 return anim;
4126 }
4127 return 0;
4128 }
4129
4130 static void CancelAnimationComponent(HScene scene, HNode node, float* value)
4131 {

Callers 5

SetNodeFlipbookCursorFunction · 0.70
CancelAnimationComponentFunction · 0.70
UpdateTextureSetAnimDataFunction · 0.70

Calls 2

assertFunction · 0.50
SizeMethod · 0.45

Tested by

no test coverage detected