//
// cocos2d::CCAnimation::initWithAnimationFrames from 0x5e5650 to 0x5e56ac (92 bytes)
//
// 3 xrefs:
// > cocos2d::CCAnimation::create @ 0x5e5738
// > cocos2d::CCAnimation::copyWithZone @ 0x5e5776
// > cocos2d::CCAnimationCache::parseVersion2 @ 0x5e5c62
//
// 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
//
bool cocos2d::CCAnimation::initWithAnimationFrames(
cocos2d::CCAnimation *a1,
cocos2d::CCArray *a2,
float a3,
unsigned int a4)
{
cocos2d::CCArray *v5; // r0
cocos2d::CCArray *v6; // r5
cocos2d::CCArray *m_pFrames; // r0
cocos2d::CCArray *v8; // r3
cocos2d::ccArray *data; // r2
int v10; // r3
cocos2d::CCObject **arr; // r2
cocos2d::CCObject **v12; // r3
int v13; // r1
int v14; // t1
a1->m_uLoops = a4;
a1->m_fDelayPerUnit = a3;
v5 = (cocos2d::CCArray *)cocos2d::CCArray::createWithArray(a2, a2);
v6 = v5;
if ( a1->m_pFrames != v5 )
{
if ( v5 )
cocos2d::CCObject::retain(v5);
m_pFrames = a1->m_pFrames;
if ( m_pFrames )
cocos2d::CCObject::release(m_pFrames);
a1->m_pFrames = v6;
}
v8 = a1->m_pFrames;
if ( v8 )
{
data = v8->data;
if ( data->num )
{
v10 = data->num + 0x40000000;
arr = data->arr;
v12 = &arr[v10 - 1];
while ( arr <= v12 )
{
v14 = (int)*arr++;
v13 = v14;
if ( !v14 )
break;
a1->m_fTotalDelayUnits = a1->m_fTotalDelayUnits + *(float *)(v13 + 56);
}
}
}
return 1;
}