//
// GJBaseGameLayer::lightningFlash from 0x1001e43bc to 0x1001e452c (368 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::teleportPlayer @ 0x1001e4120
// > GJBaseGameLayer::checkpointActivated @ 0x100207f9c
// > GJBaseGameLayer::lightningFlash_1 @ 0x100208084
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall GJBaseGameLayer::lightningFlash(
GJBaseGameLayer *a1,
cocos2d::CCPoint a2,
cocos2d::CCPoint a3,
cocos2d::ccColor3B a4,
float a5,
float a6,
int a7,
bool a8,
float a9)
{
int v9; // w4
int v10; // w5
float x; // s8
int v12; // w21
int v13; // w20
float y; // s10
float v15; // s9
__int64 v16; // x22
char v18; // x3^2
float v19; // s4
cocos2d::CCLightning *v20; // x23
cocos2d::CCDelayTime *v21; // x21
__int64 v22; // x1
__int64 v23; // x2
__int64 v24; // x3
__int64 v25; // x4
__int64 v26; // x5
__int64 v27; // x6
__int64 v28; // x7
cocos2d::CCSequence *v29; // x0
int v30; // w20
__int64 v31; // x1
__int64 v32; // x2
__int64 v33; // x3
__int64 v34; // x4
__int64 v35; // x5
__int64 v36; // x6
__int64 v37; // x7
char v38; // [xsp+0h] [xbp-90h]
__int64 v39; // [xsp+24h] [xbp-6Ch] BYREF
__int64 v40; // [xsp+2Ch] [xbp-64h] BYREF
float32x2_t v41; // [xsp+34h] [xbp-5Ch] BYREF
__int16 v42; // [xsp+3Ch] [xbp-54h] BYREF
char v43; // [xsp+3Eh] [xbp-52h]
cocos2d::CCPoint v44; // 0:s0.4,4:s1.4
cocos2d::CCPoint v45; // 0:s2.4,4:s3.4
x = a3.x;
v12 = v10;
v13 = v9;
y = a2.y;
v15 = a2.x;
v16 = *(_QWORD *)&a4.r;
v42 = a8;
v43 = v18;
sub_1000229F0(*(float32x2_t **)&a7, *(float32x2_t **)&a4.r, &v41);
if ( !GameManager::sharedState()->m_performanceMode )
{
sub_1000229B8(&v40, (__int64 *)&v41);
sub_1000229B8(&v39, &qword_10086C9A0);
v44.x = y;
v20 = cocos2d::CCLightning::lightningWithStrikePoint(v44, v45, v19);
((void (__fastcall *)(cocos2d::CCLightning *, __int64))v20->setPosition)(v20, v16);
((void (__fastcall *)(cocos2d::CCLightning *, __int16 *))v20->setColor)(v20, &v42);
v20->m_lineWidth = v15;
*(_WORD *)&v20->m_unkBool = 257;
v20->m_opacityModify = x;
if ( v13 )
v20->m_displacement = v13;
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLightning *, _QWORD))a1->m_objectLayer->addChild_0)(
a1->m_objectLayer,
v20,
0);
}
if ( v12 )
{
((void (__fastcall *)(cocos2d::CCNode *, __int64))a1->m_flashNode->setVisible)(a1->m_flashNode, 1);
v21 = cocos2d::CCDelayTime::create(0.08);
if ( v13 )
{
v38 = (unsigned __int8)cocos2d::CCHide::create();
v29 = sub_10018A494(v21, v22, v23, v24, v25, v26, v27, v28, v38);
}
else
{
v30 = (unsigned __int8)cocos2d::CCBlink::create(0.12, 1u);
cocos2d::CCHide::create();
v29 = sub_10018A494(v21, v31, v32, v33, v34, v35, v36, v37, v30);
}
cocos2d::CCNode::runAction(a1->m_flashNode, v29);
}
}