//
// GJBaseGameLayer::lightningFlash from 0x9ab7d4 to 0x9ab9a8 (468 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::checkpointActivated @ 0x9abad8
// > GJBaseGameLayer::lightningFlash @ 0x9abbfc
// > GJBaseGameLayer::teleportPlayer @ 0x9e5c38
// > ??> @ 0x101908
//
// 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::lightningFlash(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
int a5,
unsigned __int8 a6,
long double a7,
float a8,
float a9)
{
int v10; // s9
int v15; // w23
GameManager *v16; // x0
cocos2d::CCDelayTime *v17; // x0
unsigned int v18; // w1
cocos2d::CCHide *v19; // x20
cocos2d::CCFiniteTimeAction *v20; // x0
cocos2d::CCAction *v21; // x0
cocos2d::CCLightning *v23; // x20
__int64 v24; // x0
cocos2d::CCFiniteTimeAction *v25; // [xsp+60h] [xbp+60h]
__int64 v26; // [xsp+68h] [xbp+68h] BYREF
__int64 v27; // [xsp+70h] [xbp+70h] BYREF
_BYTE v28[8]; // [xsp+78h] [xbp+78h] BYREF
_BYTE v29[8]; // [xsp+80h] [xbp+80h] BYREF
v10 = LODWORD(a7);
v26 = a4;
v15 = a6;
v16 = (GameManager *)cocos2d::CCPoint::operator-(&v27, a3, a2, a7);
if ( !*(_BYTE *)(GameManager::sharedState(v16) + 925) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v28, (const cocos2d::CCPoint *)&v27);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v29, (const cocos2d::CCPoint *)&unk_155D2C8);
v23 = cocos2d::CCLightning::lightningWithStrikePoint(
(const cocos2d::CCPoint *)v28,
(const cocos2d::CCPoint *)v29,
a8);
(*(void (__fastcall **)(cocos2d::CCLightning *, __int64))(*(_QWORD *)v23 + 184LL))(v23, a2);
(*(void (__fastcall **)(cocos2d::CCLightning *, __int64 *))(*(_QWORD *)v23 + 976LL))(v23, &v26);
*((_BYTE *)v23 + 372) = 1;
*((_BYTE *)v23 + 373) = 1;
*((_DWORD *)v23 + 92) = v10;
*((float *)v23 + 95) = a9;
if ( a5 )
*((_DWORD *)v23 + 87) = a5;
(*(void (__fastcall **)(_QWORD, cocos2d::CCLightning *, _QWORD))(**(_QWORD **)(a1 + 3920) + 464LL))(
*(_QWORD *)(a1 + 3920),
v23,
0);
}
if ( v15 )
{
v17 = (cocos2d::CCDelayTime *)(*(__int64 (**)(void))(**(_QWORD **)(a1 + 12552) + 344LL))();
v19 = (cocos2d::CCHide *)cocos2d::CCDelayTime::create(v17, 0.08);
if ( a5 )
{
v20 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCHide::create(v19);
v21 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v19, v20, 0);
}
else
{
v25 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCBlink::create(
(cocos2d::CCBlink *)((char *)&dword_0 + 1),
0.12,
v18);
v24 = cocos2d::CCHide::create(v25);
v21 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v19, v25, v24, 0);
}
cocos2d::CCNode::runAction(*(cocos2d::CCNode **)(a1 + 12552), v21);
}
return _stack_chk_guard;
}