//
// PlayLayer::activatePlatformerEndTrigger from 0x1000b6430 to 0x1000b651f (239 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008b7338
//
// 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::activatePlatformerEndTrigger(
PlayLayer *a1,
EndTriggerGameObject *a2,
std::vector *const a3)
{
__int64 m_targetGroupID; // rsi
int m_centerGroupID; // esi
GameObject *MainObject; // rax
cocos2d::CCPoint v7; // xmm0_8
_BYTE v8[8]; // [rsp+8h] [rbp-28h] BYREF
_BYTE v9[32]; // [rsp+10h] [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 *)(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);
a1->m_levelEndAnimationStarted = 1;
UILayer::disableMenu(a1->m_uiLayer);
((void (__fastcall *)(_BYTE *, EndTriggerGameObject *))a2->getRealPosition)(v9, a2);
m_centerGroupID = a2->m_centerGroupID;
if ( m_centerGroupID > 0 )
{
MainObject = GJBaseGameLayer::tryGetMainObject(a1, m_centerGroupID);
if ( MainObject )
{
((void (__fastcall *)(_BYTE *, GameObject *))MainObject->getRealPosition)(v8, MainObject);
sub_10028CC90();
}
}
*(double *)&v7 = sub_10028CC60(v8);
PlayLayer::playPlatformerEndAnimationToPos(a1, v7, (bool)v8);
}
}