//
// cocos2d::CCLightning::initWithStrikePoint from 0x1005ddcf0 to 0x1005dde14 (292 bytes)
//
// 3 xrefs:
// > cocos2d::CCLightning::lightningWithStrikePoint_1 @ 0x1005ddaec
// > cocos2d::CCLightning::initWithStrikePoint_1 @ 0x1005ddb80
// > cocos2d::CCLightning::lightningWithStrikePoint @ 0x1005ddca0
//
// 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
//
bool __fastcall cocos2d::CCLightning::initWithStrikePoint(
cocos2d::CCLightning *a1,
cocos2d::CCPoint a2,
cocos2d::CCPoint a3,
float a4)
{
double *v4; // rdx
double *v5; // rsi
double *v6; // r14
std::array *v7; // r14
__int64 i; // r15
cocos2d::CCShow *v9; // r14
double v10; // xmm0_8
cocos2d::CCFadeOut *v11; // r15
cocos2d::CCCallFunc *v12; // rax
cocos2d::CCSequence *v13; // rax
float x; // [rsp+0h] [rbp-1Ch]
x = a2.x;
v6 = v4;
sub_10028CC90(&a1->m_strikePoint, v5);
sub_10028CC90(&a1->m_strikePoint2, v6);
*(_WORD *)&a1->m_color.r = -1;
a1->m_color.b = -1;
a1->m_opacity = -1;
a1->m_seed = rand();
a1->m_split = 0;
a1->m_duration = x;
*(_QWORD *)&a1->m_displacement = 0x8000000A0LL;
a1->m_numPoints = 0;
v7 = (std::array *)operator new[](0x640u);
for ( i = 0; i != 1600; i += 8 )
sub_10028CC30((std::array *)((char *)v7 + i));
a1->m_lightningPoints = v7;
__bzero(v7, 1600);
a1->m_unkBool = 0;
v9 = cocos2d::CCShow::create();
*(_QWORD *)&v10 = LODWORD(a1->m_duration);
v11 = cocos2d::CCFadeOut::create(*(float *)&v10);
v12 = cocos2d::CCCallFunc::create(a1, (cocos2d::SEL_CallFunc)(unsigned __int64)cocos2d::CCLightning::strikeFinished);
v13 = sub_1003B5760(v9, v11, v12, 0, v10, *(double *)&a3);
cocos2d::CCNode::runAction(a1, v13);
return 1;
}