//
// SetupPulsePopup::onSelectPulseMode from 0x1003ade80 to 0x1003ae091 (529 bytes)
//
// 2 xrefs:
// > SetupPulsePopup::init @ 0x1003ad2ba
// > SetupPulsePopup::init @ 0x1003ab8c7
//
// 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 SetupPulsePopup::onSelectPulseMode(SetupPulsePopup *a1, cocos2d::CCObject *a2)
{
int v3; // r14d
ButtonSprite *v4; // rax
const char *v5; // r15
const char *v6; // rsi
ButtonSprite *v7; // rax
unsigned int v8; // r15d
__int64 v9; // rax
unsigned int v10; // r15d
__int64 v11; // rax
EffectGameObject *m_gameObject; // rax
cocos2d::CCArray *m_gameObjects; // rdi
unsigned int v14; // r14d
if ( a2 )
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
else
v3 = -1;
v4 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_colorButton->getNormalImage)(a1->m_colorButton);
v5 = "GJ_button_04.png";
v6 = "GJ_button_04.png";
if ( !v3 )
v6 = "GJ_button_02.png";
ButtonSprite::updateBGImage(v4, v6);
v7 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_hsvButton->getNormalImage)(a1->m_hsvButton);
if ( v3 == 1 )
v5 = "GJ_button_02.png";
ButtonSprite::updateBGImage(v7, v5);
if ( (unsigned int)sub_100720070(a1->m_colorObjects) )
{
v8 = 0;
do
{
v9 = sub_1007200C0(a1->m_colorObjects, v8);
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v9 + 328LL))(v9, v3 == 0);
++v8;
}
while ( v8 < (unsigned int)sub_100720070(a1->m_colorObjects) );
}
if ( (unsigned int)sub_100720070(a1->m_hsvObjects) )
{
v10 = 0;
do
{
v11 = sub_1007200C0(a1->m_hsvObjects, v10);
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v11 + 328LL))(v11, v3 == 1);
++v10;
}
while ( v10 < (unsigned int)sub_100720070(a1->m_hsvObjects) );
}
((void (__fastcall *)(CCTextInputNode *, bool))a1->m_colorIDInput->setTouchEnabled)(a1->m_colorIDInput, v3 == 1);
((void (__fastcall *)(CCTextInputNode *, bool))a1->m_rInput->setTouchEnabled)(a1->m_rInput, v3 == 0);
((void (__fastcall *)(CCTextInputNode *, bool))a1->m_gInput->setTouchEnabled)(a1->m_gInput, v3 == 0);
((void (__fastcall *)(CCTextInputNode *, bool))a1->m_bInput->setTouchEnabled)(a1->m_bInput, v3 == 0);
((void (__fastcall *)(CCTextInputNode *, bool))a1->m_hexInput->setTouchEnabled)(a1->m_hexInput, v3 == 0);
a1->m_pulseMode = v3;
if ( !a1->m_modesInitializing )
{
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
m_gameObject->m_pulseMode = v3;
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects && (unsigned int)sub_100720070(m_gameObjects) )
{
v14 = 0;
do
*(_DWORD *)(sub_1007200C0(a1->m_gameObjects, v14++) + 1604) = a1->m_pulseMode;
while ( v14 < (unsigned int)sub_100720070(a1->m_gameObjects) );
}
}
}
}