//
// GravityEffectSprite::init from 0x1403bb2b0 to 0x1403bb5ce (798 bytes)
//
// 3 xrefs:
// > PlayLayer::init @ 0x1403a602f
// > ??> @ 0x1405c9dd8
// > ??> @ 0x1406d71a8
//
// 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 GravityEffectSprite::init(GravityEffectSprite *a1)
{
bool result; // al
struct cocos2d::CCSpriteBatchNode *v3; // rsi
__int64 v4; // rcx
cocos2d::CCDirector *v5; // rax
__int64 v6; // rcx
cocos2d::CCDirector *v7; // rax
__int64 v8; // rcx
cocos2d::CCDirector *v9; // rax
int v10; // ebp
float v11; // xmm8_4
struct cocos2d::CCSprite *v12; // rdi
__int64 v13; // rcx
cocos2d::CCDirector *v14; // rax
float v15; // xmm0_4
int v16; // eax
cocos2d::CCSprite_vtbl *v17; // rbx
cocos2d::CCSprite_vtbl *v18; // rbx
cocos2d::CCRGBAProtocol *v19; // rbx
cocos2d::CCRGBAProtocol_vtbl *v20; // rdi
int v21; // eax
__int64 v22; // [rsp+D8h] [rbp+10h] BYREF
result = cocos2d::CCSprite::init(a1);
if ( result )
{
v3 = cocos2d::CCSpriteBatchNode::create("gravityLine_001.png", 0x16u);
v3->setTag(v3, 1);
a1->addChild_1(a1, v3);
v22 = 0x100000302LL;
((void (__fastcall *)(cocos2d::CCTextureProtocol *, __int64))v3->setBlendFunc)(
&v3->cocos2d::CCTextureProtocol,
0x100000302LL);
v5 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v4);
cocos2d::CCDirector::getContentScaleFactor(v5);
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6);
cocos2d::CCDirector::getScreenRight(v7);
v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v8);
v10 = 0;
v11 = (float)(cocos2d::CCDirector::getScreenRight(v9) - 60.0) / 22.0;
do
{
v12 = cocos2d::CCSprite::create("gravityLine_001.png");
v3->addChild_1(v3, v12);
rand();
v14 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v13);
v15 = cocos2d::CCDirector::getScreenRight(v14) * 0.5;
v16 = rand();
cocos2d::CCPoint::CCPoint(
v15,
(float)((float)((float)v16 / 32767.0) * v11) + (float)((float)(30.0 - v15) + (float)((float)v10 * v11)));
v12->setPosition_0(v12, (const cocos2d::CCPoint *)&v22);
v17 = v12->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
rand();
((void (__fastcall *)(struct cocos2d::CCSprite *))v17->setScaleX)(v12);
v18 = v12->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
rand();
((void (__fastcall *)(struct cocos2d::CCSprite *))v18->setScaleY)(v12);
v19 = &v12->cocos2d::CCRGBAProtocol;
v20 = v12->cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable;
v21 = rand();
v20->setOpacity(v19, (int)(float)((float)((float)((float)v21 / 32767.0) * 130.0) + 50.0));
++v10;
}
while ( v10 < 22 );
return 1;
}
return result;
}