//
// PlayLayer::playEndAnimationToPos from 0x1000b5f50 to 0x1000b6421 (1233 bytes)
//
// 1 xrefs:
// > EndPortalObject::triggerObject @ 0x10039c876
//
// 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 PlayLayer::playEndAnimationToPos(PlayLayer *a1, cocos2d::CCPoint a2)
{
__int64 v2; // rsi
PlayLayer_vtbl *v3; // rax
PlayerObject *m_player1; // r13
EndPortalObject *m_endPortal; // rax
float v6; // xmm0_4
cocos2d::CCActionInterval *v7; // rax
unsigned int v8; // r15d
unsigned int v9; // eax
int v10; // ecx
int v11; // r8d
int v12; // r9d
cocos2d::CCAction *v13; // rax
cocos2d::CCRotateBy *v14; // rax
cocos2d::CCEaseIn *v15; // rax
PlayerObject *m_player2; // r13
EndPortalObject *v17; // rax
float v18; // xmm0_4
cocos2d::CCActionInterval *v19; // rax
cocos2d::CCEaseIn *v20; // rax
cocos2d::CCRotateBy *v21; // rax
cocos2d::CCEaseIn *v22; // rax
float v23[2]; // [rsp-68h] [rbp-68h] BYREF
__int64 v24; // [rsp-60h] [rbp-60h] BYREF
__int64 v25; // [rsp-58h] [rbp-58h] BYREF
__int64 v26; // [rsp-50h] [rbp-50h] BYREF
float v27; // [rsp-48h] [rbp-48h] BYREF
float v28; // [rsp-44h] [rbp-44h]
float v29; // [rsp-40h] [rbp-40h] BYREF
float v30; // [rsp-3Ch] [rbp-3Ch]
bool m_isDualMode; // [rsp-35h] [rbp-35h]
float v32; // [rsp-34h] [rbp-34h]
__int64 v33; // [rsp-8h] [rbp-8h] BYREF
if ( !a1->m_levelEndAnimationStarted )
{
a1->m_levelEndAnimationStarted = 1;
if ( a1->m_gameState.m_unkPoint6.y != 0.0 )
{
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v23);
sub_10028CBE0(
&v29,
(float)(v23[0] * 0.5) / a1->m_gameState.m_cameraZoom,
(float)(0.5 * v23[1]) / a1->m_gameState.m_cameraZoom);
sub_10028CCE0(&v27, &a1->m_gameState.m_cameraPosition2);
sub_10028CD00(&v29, &v27, &a1->m_gameState.m_cameraOffset);
sub_10028CC90();
*(float *)(v2 + 4) = v28;
}
v3 = a1->GJBaseGameLayer::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v32 = 1.0;
((void (__fastcall *)(PlayLayer *))v3->updateTimeWarp)(a1);
GJBaseGameLayer::updateCameraOffsetX(a1, a1->m_gameState.m_cameraOffset.x, 0.0, 0, 0.0, -1, -1);
GJBaseGameLayer::updateCameraOffsetY(a1, a1->m_gameState.m_cameraOffset.y, 0.0, 0, 0.0, -1, -1);
sub_10028CC60(v23);
GJBaseGameLayer::updateStaticCameraPos(
a1,
(cocos2d::CCPoint)1067030938LL,
(unsigned __int8)&v33 - 96,
0,
1,
1.8,
0,
0.0);
m_isDualMode = a1->m_gameState.m_isDualMode;
m_player1 = a1->m_player1;
PlayerObject::lockPlayer(m_player1);
PlayerObject::playingEndEffect(m_player1);
PlayerObject::toggleGhostEffect(m_player1, Enabled);
m_endPortal = a1->m_endPortal;
if ( m_endPortal )
{
if ( m_endPortal->m_flippedX )
v6 = -1.0;
else
v6 = 1.0;
v32 = v6;
}
((void (__fastcall *)(PlayerObject *))m_player1->getPosition)(m_player1);
sub_10028CC60(&v27);
sub_10028CBE0(v23, 50.0 * v32, 0.0);
sub_10028CCE0(&v29, v2);
sub_10028CC30(v23);
sub_10028CC30(&v24);
sub_10028CC30(&v25);
sub_10028CBE0(&v26, v27, v28);
sub_10028CC90();
sub_10028CBE0(&v26, (float)(v32 * 40.0) + v27, v30 + 150.0);
sub_10028CC90();
sub_10028CBE0(&v26, v29, v30 + -20.0);
sub_10028CC90();
v7 = (cocos2d::CCActionInterval *)cocos2d::CCBezierTo::create(v23, &v26, 1.0);
v8 = (unsigned int)cocos2d::CCEaseIn::create(v7, 1.2);
v9 = (unsigned int)cocos2d::CCCallFunc::create(
a1,
(cocos2d::SEL_CallFunc)(unsigned __int64)PlayLayer::levelComplete);
v13 = (cocos2d::CCAction *)sub_1003B5760(v8, v9, 0, v10, v11, v12);
cocos2d::CCNode::runAction(m_player1, v13);
v32 = 1.0;
v14 = cocos2d::CCRotateBy::create_1(1.0, 360.0);
v15 = cocos2d::CCEaseIn::create(v14, 1.5);
cocos2d::CCNode::runAction(m_player1, v15);
if ( m_isDualMode )
{
m_player2 = a1->m_player2;
PlayerObject::lockPlayer(m_player2);
PlayerObject::playingEndEffect(m_player2);
PlayerObject::toggleGhostEffect(m_player2, Enabled);
v17 = a1->m_endPortal;
if ( v17 )
{
if ( v17->m_flippedX )
v18 = -1.0;
else
v18 = 1.0;
v32 = v18;
}
((void (__fastcall *)(PlayerObject *))m_player2->getPosition)(m_player2);
sub_10028CC60(&v27);
sub_10028CBE0(v23, 50.0 * v32, 0.0);
sub_10028CCE0(&v29, v2);
sub_10028CC30(v23);
sub_10028CC30(&v24);
sub_10028CC30(&v25);
sub_10028CBE0(&v26, v27, v28);
sub_10028CC90();
sub_10028CBE0(&v26, (float)(v32 * 40.0) + v27, v30 + 150.0);
sub_10028CC90();
sub_10028CBE0(&v26, v29, v30 + -20.0);
sub_10028CC90();
v19 = (cocos2d::CCActionInterval *)cocos2d::CCBezierTo::create(v23, &v26, 1.0);
v20 = cocos2d::CCEaseIn::create(v19, 1.2);
cocos2d::CCNode::runAction(m_player2, v20);
v21 = cocos2d::CCRotateBy::create_1(1.0, 360.0);
v22 = cocos2d::CCEaseIn::create(v21, 1.5);
cocos2d::CCNode::runAction(m_player2, v22);
}
}
}