//
// SetupAreaMoveTriggerPopup::onMode from 0x14040dda0 to 0x14040def6 (342 bytes)
//
// 2 xrefs:
// > SetupAreaMoveTriggerPopup::addAreaDefaultControls @ 0x14040d76a
// > ??> @ 0x1406d8bb8
//
// 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 SetupAreaMoveTriggerPopup::onMode(SetupAreaMoveTriggerPopup *a1, cocos2d::CCObject *a2)
{
signed int v4; // eax
_BOOL8 v5; // r8
unsigned int v6; // esi
__int64 v7; // rdi
int v8; // ecx
int v9; // ebp
BOOL v10; // ebx
struct cocos2d::CCObject *v11; // rbx
ButtonSprite *v12; // rdi
int v13; // eax
const char *v14; // rdx
v4 = a2->getTag(a2);
v6 = 0;
if ( (unsigned int)(v4 - 2) <= 3 || v4 <= 1 )
{
v7 = (unsigned int)(v4 - 2) <= 3;
if ( v4 == 1 )
goto LABEL_8;
}
else
{
LODWORD(v7) = 2;
}
if ( (unsigned int)v4 > 8 || (v8 = 424, !_bittest(&v8, v4)) )
{
v9 = 0;
goto LABEL_9;
}
LABEL_8:
v9 = 1;
LABEL_9:
v10 = ((v4 - 2) & 0xFFFFFFFA) == 0;
LOBYTE(v5) = (_DWORD)v7 == 0;
a1->toggleGroup(a1, 99, v5);
SetupTriggerPopup::valueChanged(a1, 262, (float)(int)v7);
SetupTriggerPopup::valueChanged(a1, 276, (float)v9);
SetupTriggerPopup::valueChanged(a1, 283, (float)v10);
if ( cocos2d::CCArray::count(a1->m_modeButtons) )
{
do
{
v11 = cocos2d::CCArray::objectAtIndex(a1->m_modeButtons, v6);
v12 = (ButtonSprite *)((__int64 (__fastcall *)(struct cocos2d::CCObject *))v11->__vftable[13].copyWithZone)(v11);
LODWORD(v11) = v11->getTag(v11);
v13 = a2->getTag(a2);
v14 = "GJ_button_04.png";
if ( (_DWORD)v11 == v13 )
v14 = "GJ_button_02.png";
ButtonSprite::updateBGImage(v12, v14);
++v6;
}
while ( v6 < cocos2d::CCArray::count(a1->m_modeButtons) );
}
}