//
// CreateParticlePopup::toggleGravityMode from 0x665888 to 0x6659b0 (296 bytes)
//
// 3 xrefs:
// > CreateParticlePopup::onEmitterMode @ 0x665a08
// > CreateParticlePopup::onPage @ 0x665b6e
// > CreateParticlePopup::init @ 0x669e8e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:55:40 +0000
//
bool __fastcall CreateParticlePopup::toggleGravityMode(cocos2d::CCArray **this, int a2)
{
int v4; // r5
cocos2d::CCDictionary *PageInputNodes; // r9
cocos2d::CCDictionary *PageSliders; // r8
int v7; // r0
int v8; // r0
int v9; // r0
int v10; // r1
int v11; // r0
int i; // r5
int v13; // r0
int v14; // r0
int v15; // r0
int v16; // r1
int v17; // r0
unsigned int j; // r5
int v19; // r0
unsigned int k; // r5
int v21; // r0
int v22; // r5
_BOOL4 result; // r0
v4 = 8;
PageInputNodes = (cocos2d::CCDictionary *)CreateParticlePopup::getPageInputNodes(this, 0);
PageSliders = (cocos2d::CCDictionary *)CreateParticlePopup::getPageSliders(this, 0);
do
{
v7 = cocos2d::CCDictionary::objectForKey(PageInputNodes, v4);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 172))(v7, a2);
v8 = cocos2d::CCDictionary::objectForKey(PageInputNodes, v4);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v8 + 500))(v8, a2);
v9 = cocos2d::CCDictionary::objectForKey(PageSliders, v4);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 172))(v9, a2);
v10 = v4++;
v11 = cocos2d::CCDictionary::objectForKey(PageSliders, v10);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v11 + 500))(v11, a2);
}
while ( v4 != 18 );
for ( i = 50; i != 56; ++i )
{
v13 = cocos2d::CCDictionary::objectForKey(PageInputNodes, i);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v13 + 172))(v13, a2 ^ 1);
v14 = cocos2d::CCDictionary::objectForKey(PageInputNodes, i);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v14 + 500))(v14, a2 ^ 1);
v15 = cocos2d::CCDictionary::objectForKey(PageSliders, i);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v15 + 172))(v15, a2 ^ 1);
v16 = i;
v17 = cocos2d::CCDictionary::objectForKey(PageSliders, v16);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v17 + 500))(v17, a2 ^ 1);
}
for ( j = 0; j < cocos2d::CCArray::count(*(this + 169)); ++j )
{
v19 = cocos2d::CCArray::objectAtIndex(*(this + 169), j);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v19 + 172))(v19, a2);
}
for ( k = 0; k < cocos2d::CCArray::count(*(this + 170)); ++k )
{
v21 = cocos2d::CCArray::objectAtIndex(*(this + 170), k);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v21 + 172))(v21, a2 ^ 1);
}
v22 = (int)*(this + 147);
result = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 136) + 796))(*(this + 136)) == 0;
*(_BYTE *)(v22 + 452) = result;
return result;
}