//
// CCPartAnimSprite::setDisplayFrame from 0x100374e30 to 0x100374f67 (311 bytes)
//
// 1 xrefs:
// > ??> @ 0x10091db78
//
// 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
//
void __fastcall CCPartAnimSprite::setDisplayFrame(CCPartAnimSprite *a1, cocos2d::CCSpriteFrame *a2)
{
cocos2d::CCSpriteFrame *m_spriteFrame; // rdi
CCAnimateFrameCache *v4; // r15
const char *CString; // rax
cocos2d::CCArray *v6; // rax
cocos2d::CCArray *m_spriteParts; // rcx
cocos2d::ccArray *data; // rdx
__int64 num; // rsi
unsigned __int64 arr; // rdx
unsigned __int64 v11; // rsi
cocos2d::ccArray *v12; // r14
__int64 v13; // r15
__int64 i; // r12
cocos2d::ccArray *v15; // rax
cocos2d::CCObject **v16; // r14
unsigned __int64 v17; // r15
cocos2d::CCObject *v18; // rdi
if ( a2 )
{
m_spriteFrame = a1->m_spriteFrame;
if ( m_spriteFrame != a2 )
{
if ( m_spriteFrame )
cocos2d::CCObject::release(m_spriteFrame);
a1->m_spriteFrame = a2;
cocos2d::CCObject::retain(a2);
v4 = CCAnimateFrameCache::sharedSpriteFrameCache();
CString = cocos2d::CCString::getCString((cocos2d::CCString *)a2);
v6 = CCAnimateFrameCache::spriteFrameByName(v4, CString);
if ( v6 )
{
m_spriteParts = a1->m_spriteParts;
if ( m_spriteParts )
{
data = m_spriteParts->data;
num = data->num;
if ( data->num )
{
arr = (unsigned __int64)data->arr;
v11 = arr + 8 * num - 8;
do
{
if ( !*(_QWORD *)arr )
break;
*(_BYTE *)(*(_QWORD *)arr + 619LL) = 0;
arr += 8LL;
}
while ( arr <= v11 );
}
}
v12 = v6->data;
v13 = (int)v12->num;
if ( v13 > 0 )
{
for ( i = 0; i != v13; ++i )
CCPartAnimSprite::transformSprite(a1, (SpriteDescription *)v12->arr[i]);
m_spriteParts = a1->m_spriteParts;
}
if ( m_spriteParts )
{
v15 = m_spriteParts->data;
if ( v15->num )
{
v16 = v15->arr;
v17 = (unsigned __int64)&v16[v15->num - 1];
do
{
v18 = *v16;
if ( !*v16 )
break;
if ( !BYTE3(v18[11].__vftable) )
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v18->__vftable[4].~CCObject)(v18, 0);
++v16;
}
while ( (unsigned __int64)v16 <= v17 );
}
}
}
a1->m_hasChanged = 1;
}
}
}