//
// SetupCameraEdgePopup::onCameraEdge from 0x9eddc8 to 0x9edec0 (248 bytes)
//
// 6 xrefs:
// > ??> @ 0x84888
// > SetupCameraEdgePopup::init @ 0x9ee734
// > SetupCameraEdgePopup::init @ 0x9ee828
// > SetupCameraEdgePopup::init @ 0x9ee920
// > SetupCameraEdgePopup::init @ 0x9eea10
// > ??> @ 0x122c790
//
// 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 SetupCameraEdgePopup::onCameraEdge(SetupCameraEdgePopup *a1, cocos2d::CCObject *a2)
{
CCMenuItemToggler *v3; // x0
CCMenuItemToggler *v4; // x0
CCMenuItemToggler *v5; // x0
CCMenuItemToggler *v6; // x0
EffectGameObject *m_gameObject; // x0
cocos2d::CCArray *m_gameObjects; // x1
unsigned int v9; // w20
__int64 v10; // x0
bool v11; // cf
unsigned int v12; // w1
a1->m_edgeDirection = a2->getTag(a2);
v3 = (CCMenuItemToggler *)cocos2d::CCArray::objectAtIndex(a1->m_directionToggles, 0);
CCMenuItemToggler::toggle(v3, a1->m_edgeDirection == 1);
v4 = (CCMenuItemToggler *)cocos2d::CCArray::objectAtIndex(a1->m_directionToggles, 1u);
CCMenuItemToggler::toggle(v4, a1->m_edgeDirection == 2);
v5 = (CCMenuItemToggler *)cocos2d::CCArray::objectAtIndex(a1->m_directionToggles, 2u);
CCMenuItemToggler::toggle(v5, a1->m_edgeDirection == 3);
v6 = (CCMenuItemToggler *)cocos2d::CCArray::objectAtIndex(a1->m_directionToggles, 3u);
CCMenuItemToggler::toggle(v6, a1->m_edgeDirection == 4);
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
HIDWORD(m_gameObject[1].EnhancedGameObject::GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable) = a1->m_edgeDirection;
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects )
{
v9 = 0;
while ( 1 )
{
v11 = v9 >= (unsigned int)cocos2d::CCArray::count(m_gameObjects);
v12 = v9++;
if ( v11 )
break;
v10 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v12);
m_gameObjects = a1->m_gameObjects;
*(_DWORD *)(v10 + 1828) = a1->m_edgeDirection;
}
}
}
}