//
// PlayLayer::activatePlatformerEndTrigger from 0x1403ac2d0 to 0x1403ac3d5 (261 bytes)
//
// 2 xrefs:
// > ??> @ 0x1405c9be8
// > ??> @ 0x1406d6c44
//
// 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::activatePlatformerEndTrigger(PlayLayer *a1, EndTriggerGameObject *a2, std::vector *const a3)
{
__int64 m_targetGroupID; // rdx
UILayer *m_uiLayer; // rax
int m_centerGroupID; // edx
GameObject *MainObject; // rax
__int64 v9; // rax
cocos2d::CCPoint v10; // rax
char v11; // [rsp+50h] [rbp+8h] BYREF
cocos2d::CCPoint v12; // [rsp+68h] [rbp+20h] BYREF
if ( !a1->m_player1->m_isDead && !a1->m_levelEndAnimationStarted )
{
a1->m_platformerEndTrigger = a2;
m_targetGroupID = (unsigned int)a2->m_targetGroupID;
if ( (int)m_targetGroupID > 0 )
((void (__fastcall *)(TriggerEffectDelegate *, __int64, _QWORD))a1->spawnGroup)(
&a1->TriggerEffectDelegate,
m_targetGroupID,
0);
m_uiLayer = a1->m_uiLayer;
a1->m_levelEndAnimationStarted = 1;
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD, std::vector *const))m_uiLayer->m_pauseBtn->setEnabled)(
m_uiLayer->m_pauseBtn,
0,
a3);
((void (__fastcall *)(EndTriggerGameObject *, char *))a2->getRealPosition)(a2, &v11);
m_centerGroupID = a2->m_centerGroupID;
if ( m_centerGroupID > 0 )
{
MainObject = GJBaseGameLayer::tryGetMainObject(a1, m_centerGroupID);
if ( MainObject )
{
v9 = ((__int64 (__fastcall *)(GameObject *, cocos2d::CCPoint *))MainObject->getRealPosition)(MainObject, &v12);
cocos2d::CCPoint::operator=(&v11, v9);
}
}
cocos2d::CCPoint::CCPoint(&v12);
PlayLayer::playPlatformerEndAnimationToPos(a1, v10, a2->m_instant);
}
}