//
// PlayLayer::playGravityEffect from 0x6f7790 to 0x6f7a7c (748 bytes)
//
// 2 xrefs:
// > ??> @ 0x65a70
// > ??> @ 0x1428a08
//
// 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:51:51 +0000
//
__int64 __fastcall PlayLayer::playGravityEffect(PlayLayer *this, unsigned __int8 a2)
{
int v3; // w23
GameManager *v4; // x0
int v6; // w0
cocos2d::CCDirector *v7; // x0
cocos2d::CCDirector *v8; // x0
cocos2d::CCNode *v9; // x21
int v10; // w0
float v11; // s0
float v12; // s1
int v13; // w1
__int64 v14; // x1
const cocos2d::CCPoint *v15; // x1
cocos2d::CCSequence *v16; // x22
cocos2d::CCFiniteTimeAction *v17; // x0
cocos2d::CCAction *v18; // x0
cocos2d::CCDelayTime *v19; // x0
cocos2d::CCSequence *v20; // x21
cocos2d::CCFiniteTimeAction *v21; // x0
cocos2d::CCAction *v22; // x0
__int64 v23; // [xsp+78h] [xbp+78h]
__int64 v24; // [xsp+80h] [xbp+80h] BYREF
_BYTE v25[8]; // [xsp+88h] [xbp+88h] BYREF
_BYTE v26[8]; // [xsp+90h] [xbp+90h] BYREF
_BYTE v27[8]; // [xsp+98h] [xbp+98h] BYREF
_BYTE v28[8]; // [xsp+A0h] [xbp+A0h] BYREF
v3 = a2;
v4 = (GameManager *)*((unsigned __int8 *)this + 14752);
if ( !(_DWORD)v4 && !*(_BYTE *)(GameManager::sharedState(v4) + 925) )
{
v6 = *((_DWORD *)this + 3595);
if ( v6 < *((_DWORD *)this + 3594) )
{
v7 = (cocos2d::CCDirector *)(unsigned int)(v6 + 1);
*((_DWORD *)this + 3595) = (_DWORD)v7;
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize(&v24, v8);
v9 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex(
*((cocos2d::CCArray **)this + 1799),
*((_DWORD *)this + 3596));
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v9 + 528LL))(v9, 1);
v10 = *((_DWORD *)this + 3596);
v11 = *(float *)&v24 * 0.5;
v12 = *((float *)&v24 + 1) + 95.0;
if ( v10 < *((_DWORD *)this + 3594) - 1 )
v13 = v10 + 1;
else
v13 = 0;
*((_DWORD *)this + 3596) = v13;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, v11, v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v26, *(float *)&v24 * 0.5, -95.0);
if ( *(_BYTE *)(*((_QWORD *)this + 407) + 2427LL) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v28, *(float *)&v24 + 95.0, *((float *)&v24 + 1) * 0.5);
cocos2d::CCPoint::operator=(v26, v28);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v28, -95.0, *((float *)&v24 + 1) * 0.5);
cocos2d::CCPoint::operator=(v25, v28);
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v27);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v28);
if ( v3 )
{
cocos2d::CCPoint::operator=(v27, v26);
cocos2d::CCPoint::operator=(v28, v25);
LOBYTE(v23) = -1;
*(_WORD *)((char *)&v23 + 1) = 255;
v14 = *(_QWORD *)v9;
if ( *(_BYTE *)(*((_QWORD *)this + 407) + 2427LL) )
{
LABEL_12:
(*(void (__fastcall **)(cocos2d::CCNode *, float))(v14 + 360))(v9, 90.0);
LABEL_13:
(*(void (__fastcall **)(PlayLayer *, cocos2d::CCNode *, _QWORD))(*(_QWORD *)this + 464LL))(this, v9, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, _BYTE *))(*(_QWORD *)v9 + 184LL))(v9, v27);
GravityEffectSprite::updateSpritesColor((__int64)v9, v23);
v16 = (cocos2d::CCSequence *)cocos2d::CCMoveTo::create((cocos2d::CCMoveTo *)v28, 0.4, v15);
v17 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v9, 536, 1);
v18 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v16, v17, 0);
v19 = (cocos2d::CCDelayTime *)cocos2d::CCNode::runAction(v9, v18);
v20 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(v19, 0.4);
v21 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, PlayLayer::gravityEffectFinished, 0);
v22 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v20, v21, 0);
cocos2d::CCNode::runAction(this, v22);
return _stack_chk_guard;
}
}
else
{
cocos2d::CCPoint::operator=(v27, v25);
cocos2d::CCPoint::operator=(v28, v26);
cocos2d::CCSprite::setFlipY(v9, 1);
LOWORD(v23) = -256;
BYTE2(v23) = -1;
v14 = *(_QWORD *)v9;
if ( *(_BYTE *)(*((_QWORD *)this + 407) + 2427LL) )
goto LABEL_12;
}
(*(void (__fastcall **)(cocos2d::CCNode *, float))(v14 + 360))(v9, 0.0);
goto LABEL_13;
}
}
return _stack_chk_guard;
}