//
// GJBaseGameLayer::checkpointActivated from 0x598224 to 0x59831a (246 bytes)
//
// 2 xrefs:
// > PlayLayer::checkpointActivated @ 0x3feeda
// > LevelEditorLayer::checkpointActivated @ 0x465f10
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:10 +0000
//
int __fastcall GJBaseGameLayer::checkpointActivated(int this, CheckpointGameObject *a2)
{
int v2; // r7
int v4; // r8
cocos2d::CCDirector *v5; // r0
float v6; // r0
float v7; // s17
float v8; // s16
float v9; // r10
float v10; // r0
int v11; // r0
int v12; // [sp+18h] [bp-30h]
float v13[2]; // [sp+1Ch] [bp-2Ch] BYREF
_BYTE v14[4]; // [sp+24h] [bp-24h] BYREF
float v15; // [sp+28h] [bp-20h]
_BYTE v16[8]; // [sp+2Ch] [bp-1Ch] BYREF
_BYTE v17[8]; // [sp+34h] [bp-14h] BYREF
_BYTE v18[8]; // [sp+3Ch] [bp-Ch] BYREF
v2 = this;
v4 = *((unsigned __int8 *)a2 + 908);
if ( !*((_BYTE *)a2 + 908) )
{
v5 = (cocos2d::CCDirector *)(*(int (__fastcall **)(float *))(*(_DWORD *)a2 + 680))(v13);
cocos2d::CCDirector::sharedDirector(v5);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v14);
v6 = randRange(v13[0] - 50.0, v13[0] + 100.0);
v7 = *(float *)(v2 + 852);
v8 = v15 + 50.0;
v9 = v6;
v10 = (*(float (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 2436) + 84))(*(_DWORD *)(v2 + 2436));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, v9, v7 + (float)(v8 / v10));
v11 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)a2 + 189) + 472))(*((_DWORD *)a2 + 189));
LOWORD(v12) = *(_WORD *)v11;
BYTE2(v12) = *(_BYTE *)(v11 + 2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, (const cocos2d::CCPoint *)v16);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, (const cocos2d::CCPoint *)v13);
return GJBaseGameLayer::lightningFlash(v2, (int)v17, (int)v18, v12, 1084227584, 1056964608, v4, v4, 1065353216);
}
return this;
}