//
// CCPartAnimSprite::tweenToFrame from 0x10035e4a0 to 0x10035e681 (481 bytes)
//
// 1 xrefs:
// > CCAnimatedSprite::tweenToAnimation @ 0x10033c481
//
// 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 12:28:55 +0000
//
void __fastcall CCPartAnimSprite::tweenToFrame(_QWORD *a1, __int64 a2, float a3)
{
const char *CString; // r15
size_t v5; // rax
size_t v6; // r14
char *v7; // r12
size_t v8; // r13
__int64 v9; // rax
char *v10; // rsi
__int64 v11; // rax
__int64 v12; // rcx
unsigned int *v13; // rdx
__int64 v14; // rsi
unsigned __int64 v15; // rdx
unsigned __int64 v16; // rsi
int *v17; // r14
__int64 v18; // r15
__int64 i; // r12
unsigned int *v20; // rax
_BYTE **v21; // r14
unsigned __int64 v22; // r15
_BYTE *v23; // rdi
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
if ( !a1[76] )
{
(*(void (__fastcall **)(_QWORD *))(*a1 + 1160LL))(a1);
return;
}
CString = (const char *)cocos2d::CCString::getCString(a2);
v5 = strlen(CString);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
__p = v7;
__dst[0] = v8 + 1;
__dst[1] = v6;
}
else
{
LOBYTE(__dst[0]) = 2 * v5;
v7 = (char *)__dst + 1;
if ( !v5 )
goto LABEL_11;
}
memmove(v7, CString, v6);
LABEL_11:
v7[v6] = 0;
v9 = CCAnimateFrameCache::sharedSpriteFrameCache();
if ( (__dst[0] & 1) != 0 )
v10 = (char *)__p;
else
v10 = (char *)__dst + 1;
v11 = CCAnimateFrameCache::spriteFrameByName(v9, v10);
if ( v11 )
{
v12 = a1[79];
if ( v12 )
{
v13 = *(unsigned int **)(v12 + 56);
v14 = *v13;
if ( *v13 )
{
v15 = *((_QWORD *)v13 + 2);
v16 = v15 + 8 * v14 - 8;
do
{
if ( !*(_QWORD *)v15 )
break;
*(_BYTE *)(*(_QWORD *)v15 + 619LL) = 0;
v15 += 8LL;
}
while ( v15 <= v16 );
}
}
v17 = *(int **)(v11 + 56);
v18 = *v17;
if ( v18 > 0 )
{
for ( i = 0; i != v18; ++i )
CCPartAnimSprite::tweenSpriteTo(a1, *(_QWORD *)(*((_QWORD *)v17 + 2) + 8 * i), a3);
v12 = a1[79];
}
if ( v12 )
{
v20 = *(unsigned int **)(v12 + 56);
if ( *v20 )
{
v21 = *((_BYTE ***)v20 + 2);
v22 = (unsigned __int64)&v21[*v20 - 1];
do
{
v23 = *v21;
if ( !*v21 )
break;
if ( !v23[619] )
(*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)v23 + 344LL))(v23, 0);
++v21;
}
while ( (unsigned __int64)v21 <= v22 );
}
}
}
*((_BYTE *)a1 + 616) = 1;
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
}