//
// CCPartAnimSprite::tweenToFrame from 0x3c788c to 0x3c798a (254 bytes)
//
// 1 xrefs:
// > CCAnimatedSprite::tweenToAnimation @ 0x3c3e6e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:46:35 +0000
//
int __fastcall CCPartAnimSprite::tweenToFrame(CCPartAnimSprite *this, cocos2d::CCSpriteFrame *a2, char *a3, int a4)
{
const char *CString; // r4
size_t v8; // r0
CCAnimateFrameCache *v9; // r0
CCAnimateFrameCache *v10; // r0
char *v11; // r1
int v12; // r6
int v13; // r3
int *v14; // r6
int v15; // r4
int v16; // r10
_DWORD *v17; // r2
int *v18; // r4
int *v19; // r10
int v20; // r0
int v21; // t1
int v22; // r3
_DWORD *v23; // r2
_DWORD *v24; // r6
_DWORD *v25; // r4
_BYTE *v26; // r0
_BYTE *v27; // t1
CCPartAnimSprite *v28; // [sp+0h] [bp-10h] BYREF
cocos2d::CCSpriteFrame *v29; // [sp+4h] [bp-Ch]
char *v30; // [sp+8h] [bp-8h]
int v31; // [sp+Ch] [bp-4h]
v28 = this;
v29 = a2;
v30 = a3;
v31 = a4;
if ( !*((_DWORD *)this + 128) )
return (*(int (__fastcall **)(CCPartAnimSprite *))(*(_DWORD *)this + 580))(this);
v28 = nullptr;
v29 = nullptr;
v30 = nullptr;
CString = (const char *)cocos2d::CCString::getCString(a2);
v8 = strlen(CString);
v9 = (CCAnimateFrameCache *)std::string::__init((int *)&v28, CString, v8);
v10 = (CCAnimateFrameCache *)CCAnimateFrameCache::sharedSpriteFrameCache(v9);
if ( ((unsigned __int8)v28 & 1) != 0 )
v11 = v30;
else
v11 = (char *)&v28 + 1;
v12 = CCAnimateFrameCache::spriteFrameByName(v10, v11);
if ( v12 )
{
v13 = *((_DWORD *)this + 132);
if ( v13 )
{
v17 = *(_DWORD **)(v13 + 52);
if ( *v17 )
{
v18 = (int *)v17[3];
v19 = &v18[*v17 - 1];
while ( v18 <= v19 )
{
v21 = *v18++;
v20 = v21;
if ( !v21 )
break;
CCSpritePart::markAsNotBeingUsed(v20);
}
}
}
v14 = *(int **)(v12 + 52);
v15 = 0;
v16 = *v14;
while ( v15 < v16 )
CCPartAnimSprite::tweenSpriteTo(
(cocos2d::CCArray **)this,
*(SpriteDescription **)(v14[3] + 4 * v15++),
(cocos2d::CCMoveTo *)a3);
v22 = *((_DWORD *)this + 132);
if ( v22 )
{
v23 = *(_DWORD **)(v22 + 52);
if ( *v23 )
{
v24 = (_DWORD *)v23[3];
v25 = &v24[*v23 - 1];
while ( v24 <= v25 )
{
v27 = (_BYTE *)*v24++;
v26 = v27;
if ( !v27 )
break;
CCSpritePart::hideInactive(v26);
}
}
}
}
*((_BYTE *)this + 516) = 1;
return std::string::~string((int)&v28);
}