//
// GravityEffectSprite::init from 0x711d48 to 0x711fa0 (600 bytes)
//
// 3 xrefs:
// > GravityEffectSprite::create @ 0x712008
// > ??> @ 0xd5400
// > ??> @ 0x1428c80
//
// 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:52:13 +0000
//
__int64 __fastcall GravityEffectSprite::init(GravityEffectSprite *this)
{
unsigned __int8 v2; // w0
unsigned int v3; // w2
unsigned int v4; // w24
int v6; // w19
__int64 v7; // x20
cocos2d::CCDirector *v8; // x0
cocos2d::CCDirector *v9; // x0
cocos2d::CCDirector *ContentScaleFactor; // x0
float v11; // s0
float v12; // s12
cocos2d::CCDirector *v13; // x0
cocos2d::CCDirector *ScreenRight; // x0
float v15; // s0
float v16; // w28
cocos2d::CCDirector *v17; // x0
const char *v18; // x1
float v19; // s0
float v20; // s10
__int64 v21; // x26
cocos2d::CCDirector *v22; // x0
cocos2d::CCDirector *v23; // x0
float v24; // s0
float v25; // s1
int v26; // w0
void (__fastcall *v27)(__int64, float); // x27
int v28; // w0
void (__fastcall *v29)(__int64, float); // x27
int v30; // w0
void (__fastcall *v31)(__int64, _QWORD); // x27
int v32; // w0
float v33; // [xsp+A0h] [xbp+A0h]
_BYTE v34[8]; // [xsp+B0h] [xbp+B0h] BYREF
v2 = cocos2d::CCSprite::init(this);
v4 = v2;
if ( v2 )
{
v6 = 0;
v7 = cocos2d::CCSpriteBatchNode::create(
(cocos2d::CCSpriteBatchNode *)"gravityLine_001.png",
(const char *)&dword_14 + 2,
v3);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 72LL))(v7, 1);
(*(void (__fastcall **)(GravityEffectSprite *, __int64))(*(_QWORD *)this + 456LL))(this, v7);
v8 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 912LL))(v7, 0x100000302LL);
v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v8);
ContentScaleFactor = (cocos2d::CCDirector *)cocos2d::CCDirector::getContentScaleFactor(v9);
v12 = v11;
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ContentScaleFactor);
ScreenRight = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenRight(v13);
v16 = (float)(v12 * 480.0) / v15;
v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ScreenRight);
cocos2d::CCDirector::getScreenRight(v17);
v20 = (float)(v19 - 60.0) / 22.0;
do
{
v21 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"gravityLine_001.png", v18);
v22 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 456LL))(v7, v21);
v23 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v22);
cocos2d::CCDirector::getScreenRight(v23);
v25 = (float)v6++;
v33 = (float)((float)(30.0 - (float)(v24 * 0.5)) + (float)(v25 * v20))
+ (float)((float)((float)rand() * 4.6566e-10) * v20);
v26 = rand();
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v34,
v33,
(float)((float)((float)((float)v26 * 4.6566e-10) * 2.0) + -1.0) * 10.0);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v21 + 184LL))(v21, v34);
v27 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v21 + 128LL);
v28 = rand();
v27(v21, (float)((float)((float)((float)v28 * 4.6566e-10) * 4.0) + 2.0) * v16);
v29 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v21 + 144LL);
v30 = rand();
v29(v21, v12 * (float)((float)((float)v30 * 4.6566e-10) + 2.0));
v31 = *(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v21 + 912LL);
v32 = rand();
v31(v21, (unsigned int)(float)((float)((float)((float)v32 * 4.6566e-10) * 130.0) + 50.0));
}
while ( v6 != 22 );
}
return v4;
}