//
// GJBaseGameLayer::updateKeyframeOrder from 0x475daa to 0x475e12 (104 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::reverseKeyframeAnimationOrder @ 0x3694c8
// > GJBaseGameLayer::addKeyframe @ 0x475e58
// > GJBaseGameLayer::removeKeyframe @ 0x475e86
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GJBaseGameLayer::updateKeyframeOrder(GJBaseGameLayer *a1, int a2)
{
cocos2d::CCArray *v2; // r0
cocos2d::CCArray *v3; // r6
int v4; // r0
unsigned int v5; // r4
__int16 v6; // r7
int v7; // r8
int v8; // r5
int v9; // r0
v2 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(a1->m_keyframeGroups, a2);
v3 = v2;
if ( v2 && cocos2d::CCArray::count(v2) )
{
v4 = cocos2d::CCArray::objectAtIndex(v3, 0);
v5 = 0;
v6 = *(_WORD *)(v4 + 1030);
v7 = *(unsigned __int8 *)(v4 + 1670);
v8 = v6 + 1;
while ( v5 < cocos2d::CCArray::count(v3) )
{
v9 = cocos2d::CCArray::objectAtIndex(v3, v5);
*(_DWORD *)(v9 + 1648) = v5;
*(_BYTE *)(v9 + 1670) = v7;
if ( v7 )
{
*(_WORD *)(v9 + 1032) = v8++;
*(_WORD *)(v9 + 1030) = v6;
}
++v5;
}
}
}