//
// cocos2d::CCAnimation::addSpriteFrame from 0x1800898d0 to 0x1800899a8 (216 bytes)
//
// 4 xrefs:
// > cocos2d::CCAnimation::addSpriteFrameWithFileName @ 0x180089a19
// > cocos2d::CCAnimation::addSpriteFrameWithTexture @ 0x180089a52
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b59a0
//
// 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
//
// Hidden C++ exception states: #wind=1
void __fastcall cocos2d::CCAnimation::addSpriteFrame(cocos2d::CCAnimation *this, struct cocos2d::CCSpriteFrame *a2)
{
cocos2d::CCObject *v4; // rax
cocos2d::CCObject *v5; // rbx
cocos2d::CCObject *v6; // rcx
cocos2d::CCObject *v7; // rcx
v4 = (cocos2d::CCObject *)operator new(0x50u);
v5 = v4;
if ( v4 )
{
cocos2d::CCObject::CCObject(v4);
v5->__vftable = (cocos2d::CCObject_vtbl *)&cocos2d::CCAnimationFrame::`vftable';
v5[1].__vftable = nullptr;
v5[1].m_uID = 0;
*(_QWORD *)&v5[1].m_nTag = 0;
v5->m_eObjType = LevelEditorLayerObjectType|0x8;
}
else
{
v5 = nullptr;
}
if ( (struct cocos2d::CCSpriteFrame *)v5[1].__vftable != a2 )
{
if ( a2 )
cocos2d::CCObject::retain(a2);
v6 = (cocos2d::CCObject *)v5[1].__vftable;
if ( v6 )
cocos2d::CCObject::release(v6);
v5[1].__vftable = (cocos2d::CCObject_vtbl *)a2;
}
v5[1].m_uID = 1065353216;
v7 = *(cocos2d::CCObject **)&v5[1].m_nTag;
if ( v7 )
{
cocos2d::CCObject::release(v7);
*(_QWORD *)&v5[1].m_nTag = 0;
}
cocos2d::CCArray::addObject(this->m_pFrames, v5);
cocos2d::CCObject::release(v5);
this->m_fTotalDelayUnits = this->m_fTotalDelayUnits + 1.0;
}