//
// GravityEffectSprite::init from 0x10008de90 to 0x10008e0e6 (598 bytes)
//
// 3 xrefs:
// > PlayLayer::init @ 0x10007999f
// > GravityEffectSprite::create @ 0x10007a1e2
// > ??> @ 0x100abb3c0
//
// This function is hookable on this platform (idp: pc, 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:20:07 +0000
//
__int64 __fastcall GravityEffectSprite::init(__int64 a1)
{
__int64 v1; // r15
__int64 v2; // rdi
__int64 v3; // rdi
__int64 v4; // rax
int i; // ebx
__int64 v6; // rsi
__int64 v7; // rax
float v8; // xmm0_4
int v9; // eax
int v10; // eax
int v11; // eax
int v12; // eax
_BYTE v14[8]; // [rsp+Ch] [rbp-44h] BYREF
float v15; // [rsp+14h] [rbp-3Ch]
float v16; // [rsp+18h] [rbp-38h]
float v17; // [rsp+1Ch] [rbp-34h]
float v18; // [rsp+20h] [rbp-30h]
unsigned __int8 v19; // [rsp+27h] [rbp-29h]
v19 = cocos2d::CCSprite::init();
if ( v19 )
{
v1 = cocos2d::CCSpriteBatchNode::create("gravityLine_001.png", 22);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v1 + 72LL))(v1, 1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v1 + 912LL))(v1, 0x100000302LL);
v2 = cocos2d::CCDirector::sharedDirector(v1, 0x100000302LL);
v15 = sub_100479350(v2);
v3 = cocos2d::CCDirector::sharedDirector(v2, 0x100000302LL);
v18 = (float)(480.0 * v15) / sub_100479770(v3);
v4 = cocos2d::CCDirector::sharedDirector(v3, 0x100000302LL);
v16 = (float)(sub_100479770(v4) + -60.0) / 22.0;
for ( i = 0; i != 22; ++i )
{
v6 = cocos2d::CCSprite::create_1("gravityLine_001.png");
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v1 + 456LL))(v1, v6);
v7 = cocos2d::CCDirector::sharedDirector(v1, v6);
v8 = sub_100479770(v7);
v17 = (float)((float)(v8 * -0.5) + 30.0) + (float)((float)i * v16);
v17 = (float)((float)((float)rand() * 4.6566129e-10) * v16) + v17;
v9 = rand();
sub_100278250(
v14,
v17,
(float)((float)((float)((float)v9 * 4.6566129e-10) + (float)((float)v9 * 4.6566129e-10)) + -1.0) * 10.0);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v6 + 184LL))(v6, v14);
v10 = rand();
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v6 + 128LL))(
v6,
(float)((float)((float)((float)v10 * 4.6566129e-10) * 4.0) + 2.0) * v18);
v11 = rand();
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v6 + 144LL))(
v6,
(float)((float)((float)v11 * 4.6566129e-10) + 2.0) * v15);
v12 = rand();
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 912LL))(
v6,
(unsigned __int8)(int)(float)((float)((float)((float)v12 * 4.6566129e-10) * 130.0) + 50.0));
}
}
return v19;
}