//
// CreateParticlePopup::onPage from 0x1002cdf10 to 0x1002ce100 (496 bytes)
//
// 2 xrefs:
// > CreateParticlePopup::init @ 0x1002cd734
// > CreateParticlePopup::init @ 0x1002cb024
//
// 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
//
void __fastcall CreateParticlePopup::onPage(CreateParticlePopup *a1, cocos2d::CCObject *a2)
{
unsigned int i; // w20
__int64 v4; // x0
__int64 v5; // x0
ButtonSprite *v6; // x0
const char *v7; // x1
__int64 v8; // x0
__int64 v9; // x25
__int64 v10; // x22
__int64 v11; // x0
__int64 v12; // x8
__int64 v13; // x22
__int64 v14; // x21
unsigned int v15; // w22
__int64 v16; // x0
bool v17; // w1
if ( a2 )
a1->m_page = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
for ( i = 1; i != 5; ++i )
{
v4 = sub_10024A388((__int64)a1->m_pageNodes, i - 1);
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v4 + 328LL))(v4, a1->m_page == i);
v5 = sub_10024A388((__int64)a1->m_pageButtons, i - 1);
v6 = (ButtonSprite *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 1056LL))(v5);
if ( a1->m_page == i )
v7 = "GJ_button_01.png";
else
v7 = "GJ_button_04.png";
ButtonSprite::updateBGImage(v6, v7);
v8 = sub_10024A388((__int64)a1->m_inputDicts, i);
if ( v8 )
{
v9 = *(_QWORD *)(v8 + 56);
while ( v9 )
{
v10 = *(_QWORD *)(v9 + 264);
v9 = *(_QWORD *)(v9 + 288);
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v10 + 984LL))(v10, a1->m_page == i);
if ( a1->m_page != i )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v10 + 1144LL))(v10, 0);
}
}
v11 = sub_10024A388((__int64)a1->m_sliderDicts, i);
if ( v11 )
{
v12 = *(_QWORD *)(v11 + 56);
if ( v12 )
{
do
{
v13 = *(_QWORD *)(v12 + 288);
(*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(v12 + 264) + 984LL))(
*(_QWORD *)(v12 + 264),
a1->m_page == i);
v12 = v13;
}
while ( v13 );
}
}
v14 = sub_10024A388((__int64)a1->m_pageObjectArrays, i - 1);
if ( (unsigned int)sub_10024A36C(v14) )
{
v15 = 0;
do
{
v16 = sub_10024A388(v14, v15);
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v16 + 328LL))(v16, a1->m_page == i);
++v15;
}
while ( v15 < (unsigned int)sub_10024A36C(v14) );
}
}
if ( a1->m_page == 1 )
{
v17 = ((unsigned int (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getEmitterMode)(a1->m_particle) == 0;
CreateParticlePopup::toggleGravityMode(a1, v17);
}
}