//
// GameManager::addCustomAnimationFrame from 0x65e888 to 0x65e91c (148 bytes)
//
// 2 xrefs:
// > GameManager::addDuplicateLastFrame @ 0x65eac4
// > GameManager::setupGameAnimations @ 0x65fcba
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:55:35 +0000
//
int __fastcall GameManager::addCustomAnimationFrame(
int result,
int a2,
unsigned int a3,
unsigned __int8 *a4,
unsigned __int8 *a5)
{
int v6; // r2
int v8; // r7
int v10; // r2
cocos2d::CCArray *v11; // r9
cocos2d::CCObject *v12; // r0
cocos2d::CCObject *v13; // r0
int v14; // r3
int v15; // r3
cocos2d::CCArray *v16; // r6
cocos2d::CCObject *v17; // r0
cocos2d::CCObject *v18; // r1
v6 = *a4;
v8 = result;
if ( (v6 & 1) != 0 )
v10 = *((_DWORD *)a4 + 1);
else
v10 = v6 >> 1;
if ( v10 )
{
v11 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(result + 292), a2);
if ( cocos2d::CCArray::count(v11) >= a3 )
{
v12 = (cocos2d::CCObject *)cocos2d::CCString::create(a4);
result = cocos2d::CCArray::insertObject(v11, v12, a3 - 1);
}
else
{
v13 = (cocos2d::CCObject *)cocos2d::CCString::create(a4);
result = cocos2d::CCArray::addObject(v11, v13);
}
}
v14 = *a5;
if ( (v14 & 1) != 0 )
v15 = *((_DWORD *)a5 + 1);
else
v15 = v14 >> 1;
if ( v15 )
{
v16 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(v8 + 296), a2);
if ( cocos2d::CCArray::count(v16) >= a3 )
{
v17 = (cocos2d::CCObject *)cocos2d::CCString::create(a5);
return cocos2d::CCArray::insertObject(v16, v17, a3 - 1);
}
else
{
v18 = (cocos2d::CCObject *)cocos2d::CCString::create(a5);
return cocos2d::CCArray::addObject(v16, v18);
}
}
return result;
}