//
// PlayLayer::activatePlatformerEndTrigger from 0x5d19c0 to 0x5d1ae8 (296 bytes)
//
// 2 xrefs:
// > ??> @ 0x908e8
// > ??> @ 0x1148a10
//
// 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)
{
float *v5; // x22
__int64 m_targetGroupID; // x1
UILayer *m_uiLayer; // x0
int m_centerGroupID; // w1
GameObject *MainObject; // x0
float v10; // s0
float v11; // s1
cocos2d::CCPoint v12; // [xsp+48h] [xbp+48h] BYREF
cocos2d::CCPoint v13; // [xsp+50h] [xbp+50h] BYREF
cocos2d::CCPoint v14; // 0:s0.4,4:s1.4
if ( !a1->m_player1->m_isDead )
{
v5 = &a1->m_varianceValues.__elems_[1975];
if ( !a1->m_levelEndAnimationStarted )
{
m_targetGroupID = (unsigned int)a2->m_targetGroupID;
a1->m_platformerEndTrigger = a2;
if ( (int)m_targetGroupID > 0 )
((void (__fastcall *)(PlayLayer *, __int64, _QWORD, std::vector *const, _QWORD, _QWORD, double))a1->spawnGroup)(
a1,
m_targetGroupID,
0,
a3,
(unsigned int)a2->m_uniqueID,
(unsigned int)a2->m_controlID,
0.0);
m_uiLayer = a1->m_uiLayer;
*((_BYTE *)v5 + 1392) = 1;
UILayer::disableMenu(m_uiLayer);
a2->getRealPosition(a2);
m_centerGroupID = a2->m_centerGroupID;
if ( m_centerGroupID > 0 )
{
MainObject = GJBaseGameLayer::tryGetMainObject(a1, m_centerGroupID);
if ( MainObject )
{
MainObject->getRealPosition((GameObject *)&v13);
cocos2d::CCPoint::operator=(&v12, v10, v11);
}
}
cocos2d::CCPoint::CCPoint(&v13, &v12);
PlayLayer::playPlatformerEndAnimationToPos(a1, v14, (bool)&v13);
}
}
}