//
// GJBaseGameLayer::checkpointActivated from 0x9ab9b0 to 0x9abb10 (352 bytes)
//
// 4 xrefs:
// > PlayLayer::checkpointActivated @ 0x6f2d98
// > LevelEditorLayer::checkpointActivated @ 0x7870bc
// > ??> @ 0x4d758
// > ??> @ 0x1475868
//
// This function is hookable on this platform (idp: arm, 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 12:58:12 +0000
//
__int64 __fastcall GJBaseGameLayer::checkpointActivated(GJBaseGameLayer *this, CheckpointGameObject *a2)
{
cocos2d::CCDirector *v3; // x0
cocos2d::CCDirector *v4; // x0
float v5; // s10
float v6; // s8
float v7; // s9
float v8; // s0
__int64 v9; // x0
long double v10; // q0
__int64 v13; // [xsp+78h] [xbp+78h]
__int64 v14; // [xsp+80h] [xbp+80h] BYREF
__int64 v15; // [xsp+88h] [xbp+88h] BYREF
_BYTE v16[8]; // [xsp+90h] [xbp+90h] BYREF
_BYTE v17[8]; // [xsp+98h] [xbp+98h] BYREF
_BYTE v18[8]; // [xsp+A0h] [xbp+A0h] BYREF
if ( !*((_BYTE *)a2 + 1044) )
{
v3 = (cocos2d::CCDirector *)(*(_QWORD *(__fastcall **)(__int64 *__return_ptr, CheckpointGameObject *))(*(_QWORD *)a2 + 1360LL))(
&v14,
a2);
v4 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v3);
cocos2d::CCDirector::getWinSize(&v15, v4);
v5 = randRange(*(float *)&v14 - 50.0, *(float *)&v14 + 100.0);
v6 = *((float *)&v15 + 1) + 50.0;
v7 = *((float *)this + 249);
v8 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)this + 490) + 168LL))(*((_QWORD *)this + 490));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, v5, v7 + (float)(v6 / v8));
v9 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)a2 + 111) + 944LL))(*((_QWORD *)a2 + 111));
LOWORD(v13) = *(_WORD *)v9;
BYTE2(v13) = *(_BYTE *)(v9 + 2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, (const cocos2d::CCPoint *)v16);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, (const cocos2d::CCPoint *)&v14);
LODWORD(v10) = 5.0;
GJBaseGameLayer::lightningFlash((__int64)this, (__int64)v17, (__int64)v18, v13, 0, 0, v10, 0.5, 1.0);
}
return _stack_chk_guard;
}