//
// cocos2d::CCAnimation::addSpriteFrame from 0x18008c8f0 to 0x18008c9c8 (216 bytes)
//
// 4 xrefs:
// > cocos2d::CCAnimation::addSpriteFrameWithFileName @ 0x18008ca3c
// > cocos2d::CCAnimation::addSpriteFrameWithTexture @ 0x18008ca72
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bfc70
//
// This function is hookable on this platform (idp: pc, 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 11:22:06 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall cocos2d::CCAnimation::addSpriteFrame(cocos2d::CCArray **this, struct cocos2d::CCSpriteFrame *a2)
{
cocos2d::CCObject *v4; // rax
cocos2d::CCObject *v5; // rbx
cocos2d::CCObject *v6; // rcx
cocos2d::CCObject *v7; // rcx
v4 = (cocos2d::CCObject *)sub_1800E4AC0(0x50u);
v5 = v4;
if ( v4 )
{
cocos2d::CCObject::CCObject(v4);
*(_QWORD *)v5 = &cocos2d::CCAnimationFrame::`vftable';
*((_QWORD *)v5 + 7) = 0;
*((_DWORD *)v5 + 16) = 0;
*((_QWORD *)v5 + 9) = 0;
*((_DWORD *)v5 + 7) = 14;
}
else
{
v5 = nullptr;
}
if ( *((struct cocos2d::CCSpriteFrame **)v5 + 7) != a2 )
{
if ( a2 )
cocos2d::CCObject::retain(a2);
v6 = *((cocos2d::CCObject **)v5 + 7);
if ( v6 )
cocos2d::CCObject::release(v6);
*((_QWORD *)v5 + 7) = a2;
}
*((_DWORD *)v5 + 16) = 1065353216;
v7 = *((cocos2d::CCObject **)v5 + 9);
if ( v7 )
{
cocos2d::CCObject::release(v7);
*((_QWORD *)v5 + 9) = 0;
}
cocos2d::CCArray::addObject(*(this + 9), v5);
cocos2d::CCObject::release(v5);
*((float *)this + 14) = *((float *)this + 14) + 1.0;
}