//
// PlayLayer::playPlatformerEndAnimationToPos from 0x313a24 to 0x313bec (456 bytes)
//
// 1 xrefs:
// > PlayLayer::activatePlatformerEndTrigger @ 0x313cb2
//
// 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 PlayLayer::playPlatformerEndAnimationToPos(PlayLayer *a1, cocos2d::CCPoint a2, bool a3)
{
float x; // r10
EndTriggerGameObject *m_platformerEndTrigger; // r2
_BOOL4 m_noEffects; // r9
int v7; // r6
int v8; // r3
PlayerObject *m_player2; // r5
const cocos2d::CCPoint *v10; // r0
const cocos2d::_ccBezierConfig *v11; // r2
cocos2d::CCActionInterval *v12; // r0
cocos2d::CCEaseIn *v13; // r7
cocos2d::CCFiniteTimeAction *v14; // r0
cocos2d::CCAction *v15; // r1
cocos2d::CCNode *v16; // r0
float v17; // r2
cocos2d::CCActionInterval *v18; // r0
cocos2d::CCEaseIn *v19; // r0
float y; // [sp+14h] [bp-58h]
int v21; // [sp+18h] [bp-54h]
cocos2d::CCPoint v22; // [sp+2Ch] [bp-40h] BYREF
cocos2d::CCPoint v23; // [sp+34h] [bp-38h] BYREF
cocos2d::CCPoint v24; // [sp+3Ch] [bp-30h] BYREF
void (*v25)(PlayLayer *); // [sp+44h] [bp-28h]
int v26; // [sp+48h] [bp-24h]
cocos2d::CCPoint v27; // [sp+4Ch] [bp-20h] BYREF
cocos2d::CCPoint v28; // [sp+54h] [bp-18h] BYREF
cocos2d::CCPoint v29; // [sp+5Ch] [bp-10h] BYREF
x = a2.x;
y = a2.y;
m_platformerEndTrigger = a1->m_platformerEndTrigger;
if ( m_platformerEndTrigger )
m_noEffects = m_platformerEndTrigger->m_noEffects;
else
m_noEffects = 0;
cocos2d::CCPoint::operator=(&a1->m_endPosition, LODWORD(a2.x));
((void (__fastcall *)(PlayLayer *, int))a1->updateTimeWarp)(a1, 1065353216);
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);
v7 = 0;
if ( a1->m_gameState.m_isDualMode )
v8 = 2;
else
v8 = 1;
v21 = v8;
do
{
if ( v7 )
m_player2 = a1->m_player2;
else
m_player2 = a1->m_player1;
PlayerObject::lockPlayer(m_player2);
PlayerObject::playingEndEffect(m_player2);
if ( !m_noEffects )
PlayerObject::toggleGhostEffect(m_player2, Enabled);
if ( y == 0.0 )
{
v10 = m_player2->getPosition(m_player2);
cocos2d::CCPoint::CCPoint(&v22, v10);
cocos2d::CCPoint::CCPoint(&v23, (const cocos2d::CCPoint *)LODWORD(x));
cocos2d::CCPoint::CCPoint(&v27);
cocos2d::CCPoint::CCPoint(&v28);
cocos2d::CCPoint::CCPoint(&v29);
cocos2d::CCPoint::CCPoint(&v24, v22.x, v22.y);
cocos2d::CCPoint::operator=(&v28, &v24);
cocos2d::CCPoint::CCPoint(
&v24,
v22.x + (float)((float)(v23.x - v22.x) * 0.5),
v22.y + (float)((float)(v23.y - v22.y) * 0.5));
cocos2d::CCPoint::operator=(&v29, &v24);
cocos2d::CCPoint::operator=(&v27, &v23);
v12 = (cocos2d::CCActionInterval *)cocos2d::CCBezierTo::create(
(cocos2d::CCBezierTo *)0x3F800000,
COERCE_FLOAT(&v27),
v11);
v13 = cocos2d::CCEaseIn::create(v12, 1.8);
if ( v7 )
{
v16 = m_player2;
v15 = v13;
}
else
{
v26 = 0;
v25 = PlayLayer::levelComplete;
v14 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, PlayLayer::levelComplete, 0);
v15 = (cocos2d::CCAction *)cocos2d::CCSequence::create((cocos2d::CCSequence *)v13, v14, 0);
v16 = m_player2;
}
cocos2d::CCNode::runAction(v16, v15);
v18 = (cocos2d::CCActionInterval *)cocos2d::CCRotateBy::create((cocos2d::CCRotateBy *)0x3F800000, 360.0, v17);
v19 = cocos2d::CCEaseIn::create(v18, 1.8);
cocos2d::CCNode::runAction(m_player2, v19);
}
++v7;
}
while ( v7 != v21 );
if ( y != 0.0 )
PlayLayer::levelComplete(a1);
}