//
// PlayLayer::activatePlatformerEndTrigger from 0x14050abd0 to 0x14050acde (270 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407d5e20
// > ??> @ 0x14092a950
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:33:28 +0000
//
__int64 __fastcall PlayLayer::activatePlatformerEndTrigger(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v5; // rdx
__int64 v6; // rax
int v7; // edx
struct cocos2d::CCObject *MainObject; // rax
__int64 v9; // rax
unsigned __int8 v10; // bl
__int64 v11; // rax
char v12; // [rsp+50h] [rbp+8h] BYREF
char v13; // [rsp+68h] [rbp+20h] BYREF
result = *(_QWORD *)(a1 + 3512);
if ( !*(_BYTE *)(result + 2504) && !*(_BYTE *)(a1 + 13936) )
{
*(_QWORD *)(a1 + 15576) = a2;
v5 = *(unsigned int *)(a2 + 1480);
if ( (int)v5 > 0 )
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)(a1 + 408) + 8LL))(a1 + 408, v5, 0);
v6 = *(_QWORD *)(a1 + 13888);
*(_BYTE *)(a1 + 13936) = 1;
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v6 + 568) + 936LL))(*(_QWORD *)(v6 + 568), 0);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)a2 + 1208LL))(a2, &v12);
v7 = *(_DWORD *)(a2 + 1484);
if ( v7 > 0 )
{
MainObject = GJBaseGameLayer::tryGetMainObject(a1, v7);
if ( MainObject )
{
v9 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *, char *))(*(_QWORD *)MainObject + 1208LL))(
MainObject,
&v13);
cocos2d::CCPoint::operator=(&v12, v9);
}
}
v10 = *(_BYTE *)(a2 + 1858);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v13, (const struct cocos2d::CCPoint *)&v12);
return PlayLayer::playPlatformerEndAnimationToPos(a1, v11, v10);
}
return result;
}