//
// SetupEnterTriggerPopup::onEnterType from 0x8c2864 to 0x8c2934 (208 bytes)
//
// 4 xrefs:
// > ??> @ 0x4d538
// > SetupEnterTriggerPopup::init @ 0x8c7acc
// > SetupEnterTriggerPopup::init @ 0x8c7b90
// > ??> @ 0x122a7b8
//
// 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 SetupEnterTriggerPopup::onEnterType(SetupEnterTriggerPopup *a1, cocos2d::CCObject *a2)
{
int v3; // w0
bool v4; // w1
EffectGameObject *m_gameObject; // x0
unsigned int v6; // w20
bool v7; // cf
unsigned int v8; // w1
if ( a2->getTag(a2) == a1->m_enterType )
{
a1->m_enterType = 0;
v4 = 0;
}
else
{
v3 = a2->getTag(a2);
a1->m_enterType = v3;
v4 = v3 == 1;
}
CCMenuItemToggler::toggle(a1->m_enterOnlyToggler, v4);
CCMenuItemToggler::toggle(a1->m_exitOnlyToggler, a1->m_enterType == 2);
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
*(_DWORD *)(&m_gameObject->m_canSpawnTriggers + 1) = a1->m_enterType;
}
else
{
v6 = 0;
while ( 1 )
{
v7 = v6 >= (unsigned int)cocos2d::CCArray::count(a1->m_gameObjects);
v8 = v6++;
if ( v7 )
break;
*(_DWORD *)(cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v8) + 1820) = a1->m_enterType;
}
}
}