//
// CreateParticlePopup::toggleGravityMode from 0x1002cf39c to 0x1002cf58c (496 bytes)
//
// 3 xrefs:
// > CreateParticlePopup::init @ 0x1002cd754
// > CreateParticlePopup::onPage @ 0x1002ce0e4
// > CreateParticlePopup::onEmitterMode @ 0x1002ce20c
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall CreateParticlePopup::toggleGravityMode(CreateParticlePopup *a1, bool a2)
{
_BOOL8 v2; // x20
cocos2d::CCDictionary *v4; // x21
cocos2d::CCDictionary *v5; // x22
intptr_t i; // x23
cocos2d::CCObject *v7; // x0
cocos2d::CCObject *v8; // x0
cocos2d::CCObject *v9; // x0
cocos2d::CCObject *v10; // x0
intptr_t j; // x23
cocos2d::CCObject *v12; // x0
cocos2d::CCObject *v13; // x0
cocos2d::CCObject *v14; // x0
cocos2d::CCObject *v15; // x0
unsigned int v16; // w21
__int64 v17; // x0
unsigned int v18; // w21
__int64 v19; // x0
v2 = a2;
v4 = (cocos2d::CCDictionary *)sub_10024A388((__int64)a1->m_inputDicts, 0);
v5 = (cocos2d::CCDictionary *)sub_10024A388((__int64)a1->m_sliderDicts, 0);
for ( i = 8; i != 18; ++i )
{
v7 = cocos2d::CCDictionary::objectForKey(v4, i);
((void (__fastcall *)(cocos2d::CCObject *, _BOOL8))v7->__vftable[4].~CCObject)(v7, v2);
v8 = cocos2d::CCDictionary::objectForKey(v4, i);
((void (__fastcall *)(cocos2d::CCObject *, _BOOL8))v8->__vftable[12].isEqual)(v8, v2);
v9 = cocos2d::CCDictionary::objectForKey(v5, i);
((void (__fastcall *)(cocos2d::CCObject *, _BOOL8))v9->__vftable[4].~CCObject)(v9, v2);
v10 = cocos2d::CCDictionary::objectForKey(v5, i);
((void (__fastcall *)(cocos2d::CCObject *, _BOOL8))v10->__vftable[12].isEqual)(v10, v2);
}
for ( j = 50; j != 56; ++j )
{
v12 = cocos2d::CCDictionary::objectForKey(v4, j);
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v12->__vftable[4].~CCObject)(v12, (unsigned int)v2 ^ 1);
v13 = cocos2d::CCDictionary::objectForKey(v4, j);
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v13->__vftable[12].isEqual)(v13, (unsigned int)v2 ^ 1);
v14 = cocos2d::CCDictionary::objectForKey(v5, j);
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v14->__vftable[4].~CCObject)(v14, (unsigned int)v2 ^ 1);
v15 = cocos2d::CCDictionary::objectForKey(v5, j);
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v15->__vftable[12].isEqual)(v15, (unsigned int)v2 ^ 1);
}
if ( (unsigned int)sub_10024A36C((__int64)a1->m_gravityObjects) )
{
v16 = 0;
do
{
v17 = sub_10024A388((__int64)a1->m_gravityObjects, v16);
(*(void (__fastcall **)(__int64, _BOOL8))(*(_QWORD *)v17 + 328LL))(v17, v2);
++v16;
}
while ( v16 < (unsigned int)sub_10024A36C((__int64)a1->m_gravityObjects) );
}
if ( (unsigned int)sub_10024A36C((__int64)a1->m_radiusObjects) )
{
v18 = 0;
do
{
v19 = sub_10024A388((__int64)a1->m_radiusObjects, v18);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v19 + 328LL))(v19, (unsigned int)v2 ^ 1);
++v18;
}
while ( v18 < (unsigned int)sub_10024A36C((__int64)a1->m_radiusObjects) );
}
a1->m_previewLayer->m_gravityMode = ((unsigned int (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getEmitterMode)(a1->m_particle) == 0;
}