//
// cocos2d::CCAnimation::initWithSpriteFrames from 0xd84a88 to 0xd84b88 (256 bytes)
//
// 3 xrefs:
// > cocos2d::CCAnimation::init @ 0xd84b90
// > cocos2d::CCAnimation::createWithSpriteFrames @ 0xd84cfc
// > ??> @ 0xb4a00
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:08:12 +0000
//
__int64 __fastcall cocos2d::CCAnimation::initWithSpriteFrames(
cocos2d::CCAnimation *this,
cocos2d::CCArray *a2,
float a3)
{
cocos2d::CCArray *v5; // x0
cocos2d::CCArray *v6; // x20
cocos2d::CCArray *v7; // x2
unsigned int *v8; // x1
cocos2d::CCObject **v9; // x21
__int64 v10; // x0
char *v11; // x22
cocos2d::CCObject *i; // x1
cocos2d::CCAnimationFrame *v13; // x20
cocos2d::CCObject *v15; // [xsp+48h] [xbp+48h]
*((float *)this + 15) = a3;
*((_DWORD *)this + 21) = (unsigned int)&dword_0 + 1;
v5 = cocos2d::CCArray::create((cocos2d::CCArray *)((char *)&dword_0 + 1));
v6 = v5;
v7 = *((cocos2d::CCArray **)this + 9);
if ( v5 != v7 )
{
if ( v5 )
{
cocos2d::CCObject::retain((__int64)v5);
v7 = *((cocos2d::CCArray **)this + 9);
}
if ( v7 )
cocos2d::CCObject::release(v7);
*((_QWORD *)this + 9) = v6;
}
if ( a2 )
{
v8 = *((unsigned int **)a2 + 7);
if ( *v8 )
{
v9 = *((cocos2d::CCObject ***)v8 + 2);
v10 = 8LL * *v8 - 8;
v11 = (char *)v9 + v10;
if ( v9 <= (cocos2d::CCObject **)((char *)v9 + v10) )
{
for ( i = *v9; *v9; i = *v9 )
{
v15 = i;
++v9;
v13 = (cocos2d::CCAnimationFrame *)operator new(0x50u);
cocos2d::CCAnimationFrame::CCAnimationFrame(v13);
cocos2d::CCAnimationFrame::initWithSpriteFrame((__int64)v13, v15, nullptr, 1.0);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 9), v13);
cocos2d::CCObject::release(v13);
*((float *)this + 14) = *((float *)this + 14) + 1.0;
if ( v11 < (char *)v9 )
break;
}
}
}
}
return 1;
}