//
// PlayLayer::playPlatformerEndAnimationToPos from 0x7042f0 to 0x70459c (684 bytes)
//
// 2 xrefs:
// > PlayLayer::activatePlatformerEndTrigger @ 0x7046b8
// > ??> @ 0xbfc38
//
// This function is hookable on this platform (idp: arm, 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:52:04 +0000
//
__int64 __fastcall PlayLayer::playPlatformerEndAnimationToPos(
__int64 *a1,
const cocos2d::CCPoint *a2,
unsigned __int8 a3)
{
int v4; // w25
__int64 v5; // x0
int v6; // w26
int v7; // w20
__int64 v8; // x1
int v9; // w24
PlayerObject *v10; // x19
const cocos2d::CCPoint *v12; // x0
cocos2d::CCEaseIn *v13; // x0
cocos2d::CCActionInterval *v14; // x1
cocos2d::CCAction *v15; // x22
cocos2d::CCRotateBy *v16; // x0
cocos2d::CCEaseIn *v17; // x0
cocos2d::CCActionInterval *v18; // x1
cocos2d::CCAction *v19; // x0
cocos2d::CCFiniteTimeAction *v20; // x0
cocos2d::CCAction *v21; // x0
float v23; // [xsp+98h] [xbp+98h] BYREF
float v24; // [xsp+9Ch] [xbp+9Ch]
float v25[2]; // [xsp+A0h] [xbp+A0h] BYREF
_BYTE v26[8]; // [xsp+A8h] [xbp+A8h] BYREF
_BYTE v27[8]; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v28; // [xsp+B8h] [xbp+B8h] BYREF
__int64 v29; // [xsp+C0h] [xbp+C0h] BYREF
v4 = a3;
v5 = a1[1862];
if ( v5 )
v6 = *(unsigned __int8 *)(v5 + 1840);
else
v6 = 0;
v7 = 0;
cocos2d::CCPoint::operator=((char *)a1 + 14884, a2);
v8 = *a1;
*((_BYTE *)a1 + 1982) = 1;
(*(void (__fastcall **)(__int64 *, float))(v8 + 1464))(a1, 1.0);
GJBaseGameLayer::updateCameraOffsetX((GJBaseGameLayer *)a1, *((float *)a1 + 108), 0.0, 0, 0.0, -1, -1);
GJBaseGameLayer::updateCameraOffsetY((GJBaseGameLayer *)a1, *((float *)a1 + 109), 0.0, 0, 0.0, -1, -1);
if ( *((_BYTE *)a1 + 1010) )
v9 = 2;
else
v9 = 1;
do
{
if ( v7 )
v10 = (PlayerObject *)a1[408];
else
v10 = (PlayerObject *)a1[407];
PlayerObject::lockPlayer(v10);
PlayerObject::playingEndEffect(v10);
if ( v6 )
{
if ( v4 )
goto LABEL_10;
}
else
{
PlayerObject::toggleGhostEffect(v10, 1);
if ( v4 )
goto LABEL_10;
}
v12 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(PlayerObject *))(*(_QWORD *)v10 + 192LL))(v10);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v23, v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, a2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v27);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v28);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v29);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v26, v23, v24);
cocos2d::CCPoint::operator=(&v28, v26);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v26,
v23 + (float)((float)(v25[0] - v23) * 0.5),
v24 + (float)((float)(v25[1] - v24) * 0.5));
cocos2d::CCPoint::operator=(&v29, v26);
cocos2d::CCPoint::operator=(v27, v25);
v13 = (cocos2d::CCEaseIn *)cocos2d::CCBezierTo::create(v27, 1.0);
v15 = (cocos2d::CCAction *)cocos2d::CCEaseIn::create(v13, v14, 1.8);
if ( v7 )
{
v16 = (cocos2d::CCRotateBy *)cocos2d::CCNode::runAction(v10, v15);
}
else
{
v20 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, PlayLayer::levelComplete, 0);
v21 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v15, v20, 0);
v16 = (cocos2d::CCRotateBy *)cocos2d::CCNode::runAction(v10, v21);
}
v17 = (cocos2d::CCEaseIn *)cocos2d::CCRotateBy::create(v16, 1.0, 360.0);
v19 = (cocos2d::CCAction *)cocos2d::CCEaseIn::create(v17, v18, 1.8);
cocos2d::CCNode::runAction(v10, v19);
LABEL_10:
++v7;
}
while ( v7 != v9 );
if ( v4 )
PlayLayer::levelComplete((PlayLayer *)a1);
return _stack_chk_guard;
}