//
// CCAnimatedSprite::tweenToAnimation from 0x10033c240 to 0x10033c4ee (686 bytes)
//
// 12 xrefs:
// > AnimatedGameObject::playAnimation @ 0x100199250
// > GJMapObject::monsterIdle @ 0x100251856
// > PlayerObject::updateJump @ 0x1003ec96c
// > PlayerObject::updateJump @ 0x1003ec9f0
// > PlayerObject::updateJump @ 0x1003ecd61
// > PlayerObject::updateJump @ 0x1003ecda3
// > PlayerObject::updateJump @ 0x1003ecf03
// > PlayerObject::updateMove @ 0x1003ed999
// > PlayerObject::updateMove @ 0x1003edab9
// > PlayerObject::boostPlayer @ 0x1003f37ca
// > PlayerObject::ringJump @ 0x10040217d
// > PlayerObject::playingEndEffect @ 0x10040787d
//
// 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:41 +0000
//
void __fastcall CCAnimatedSprite::tweenToAnimation(std::string *a1, std::string *a2, float a3)
{
std::string::__long::$5C0822F47C3855276CFDD0C01D0AA610 v5; // r15
int v6; // r15d
unsigned int v7; // r15d
unsigned int v8; // r13d
size_t size; // r13
std::string::pointer data; // rdi
char *v11; // r12
size_t v12; // r15
std::string::pointer v13; // rsi
size_t v14; // rdx
std::string *v15; // r15
__int64 v16; // rax
std::string::__long::$5C0822F47C3855276CFDD0C01D0AA610 v17; // rdi
__int64 v18; // rsi
__int64 v19; // rax
size_t v20; // rax
size_t v21; // r13
char *v22; // r12
__int64 v23; // r15
void *v24; // rsi
size_t v25; // r15
char *v26; // rax
__int64 v27; // r12
int v28; // r14d
int v29; // eax
int v30; // ecx
int v31; // r8d
int v32; // r9d
__int64 v33; // r14
char v34; // [rsp+0h] [rbp-80h]
__int128 v35; // [rsp+10h] [rbp-70h] BYREF
void *__p; // [rsp+20h] [rbp-60h]
__int64 v37; // [rsp+28h] [rbp-58h]
void *__src; // [rsp+30h] [rbp-50h]
_QWORD __dst[2]; // [rsp+38h] [rbp-48h] BYREF
void *v40; // [rsp+48h] [rbp-38h]
float v41; // [rsp+54h] [rbp-2Ch]
v41 = a3;
v5 = (std::string::__long::$5C0822F47C3855276CFDD0C01D0AA610)a1[27].__r_.__value_.__r.__words[0];
if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) != 0 )
{
sub_10001AD30(&v35, a2->__r_.__value_.__l.__data_, a2->__r_.__value_.__l.__size_);
}
else
{
__p = a2->__r_.__value_.__l.__data_;
v35 = *(_OWORD *)&a2->__r_.__value_.__l.0;
}
v6 = ((__int64 (__fastcall *)(_QWORD, _QWORD))SpriteAnimationManager::getAnimType)(v5, &v35);
if ( (v35 & 1) != 0 )
operator delete(__p);
if ( v6 != 2 )
return;
v7 = (unsigned int)a2->__r_.__value_.__l.0;
v8 = (unsigned int)a1[26].__r_.__value_.__l.0;
if ( (v8 & 1) != 0 )
{
size = a1[26].__r_.__value_.__l.__size_;
data = a1[26].__r_.__value_.__l.__data_;
v11 = a2->__r_.__value_.__s.__data_;
if ( (v7 & 1) == 0 )
{
LABEL_9:
v12 = v7 >> 1;
v13 = v11;
goto LABEL_12;
}
}
else
{
size = v8 >> 1;
data = a1[26].__r_.__value_.__s.__data_;
v11 = a2->__r_.__value_.__s.__data_;
if ( (v7 & 1) == 0 )
goto LABEL_9;
}
v12 = a2->__r_.__value_.__l.__size_;
v13 = a2->__r_.__value_.__l.__data_;
LABEL_12:
v14 = size;
if ( v12 < size )
v14 = v12;
if ( memcmp(data, v13, v14) || v12 != size || !cocos2d::CCNode::getActionByTag((__int64)a1, 1) )
{
v15 = a1 + 26;
SpriteAnimationManager::stopAnimations(a1[27].__r_.__value_.__r.__words[0]);
cocos2d::CCNode::stopActionByTag((__int64)a1, 1);
std::string::operator=(a1 + 26, a2);
v16 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1[27].__r_.__value_.__r.__words[0] + 392), (char *)a2);
if ( v16 )
{
if ( *(_DWORD *)(v16 + 28) )
{
v17 = (std::string::__long::$5C0822F47C3855276CFDD0C01D0AA610)a1[28].__r_.__value_.__r.__words[0];
v18 = v16;
LABEL_31:
((void (__fastcall *)(_QWORD, _QWORD, float))CCPartAnimSprite::tweenToFrame)(v17, v18, v41);
std::string::operator=(v15, a2);
v28 = cocos2d::CCDelayTime::create(v41);
v29 = cocos2d::CCCallFunc::create(a1, CCAnimatedSprite::tweenToAnimationFinished, 0);
v33 = sub_10039EB60(v28, v29, 0, v30, v31, v32);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v33 + 72LL))(v33, 1);
cocos2d::CCNode::runAction((__int64)a1, v33);
return;
}
v37 = *(_QWORD *)(a1[27].__r_.__value_.__r.__words[0] + 392);
v19 = sub_10088E820("%s_first", v34);
__src = (void *)cocos2d::CCString::getCString(v19);
v20 = strlen((const char *)__src);
if ( v20 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v21 = v20;
if ( v20 >= 0x17 )
{
v25 = 26;
if ( (v20 | 7) != 0x17 )
v25 = (v20 | 7) + 1;
v26 = (char *)operator new(v25);
v24 = __src;
v22 = v26;
v40 = v26;
__dst[0] = v25 | 1;
__dst[1] = v21;
v23 = v37;
}
else
{
LOBYTE(__dst[0]) = 2 * v20;
v22 = (char *)__dst + 1;
v23 = v37;
v24 = __src;
if ( !v20 )
goto LABEL_28;
}
memmove(v22, v24, v21);
LABEL_28:
v22[v21] = 0;
v27 = cocos2d::CCDictionary::objectForKey(v23, (char *)__dst);
v15 = a1 + 26;
if ( (__dst[0] & 1) != 0 )
operator delete(v40);
v17 = (std::string::__long::$5C0822F47C3855276CFDD0C01D0AA610)a1[28].__r_.__value_.__r.__words[0];
v18 = v27;
goto LABEL_31;
}
}
}