//
// SetupInstantCountPopup::onCountType from 0x1404237e0 to 0x1404238a9 (201 bytes)
//
// 6 xrefs:
// > SetupInstantCountPopup::init @ 0x1404230dd
// > SetupInstantCountPopup::init @ 0x14042317f
// > SetupInstantCountPopup::init @ 0x140423231
// > ??> @ 0x1406a07c4
// > ??> @ 0x1406a07d4
// > ??> @ 0x1406d9680
//
// 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 SetupInstantCountPopup::onCountType(SetupInstantCountPopup *a1, cocos2d::CCObject *a2)
{
int v3; // eax
CCMenuItemToggler *m_equalsToggler; // rcx
EffectGameObject *m_gameObject; // rcx
cocos2d::CCArray *m_gameObjects; // rcx
unsigned int v7; // edi
struct cocos2d::CCObject *v8; // rax
v3 = a2->getTag(a2);
m_equalsToggler = a1->m_equalsToggler;
a1->m_mode = v3;
CCMenuItemToggler::toggle(m_equalsToggler, v3 == 0);
CCMenuItemToggler::toggle(a1->m_largerToggler, a1->m_mode == 1);
CCMenuItemToggler::toggle(a1->m_smallerToggler, a1->m_mode == 2);
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_mode;
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects )
{
v7 = 0;
if ( cocos2d::CCArray::count(m_gameObjects) )
{
do
{
v8 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v7++);
v8[33].m_nLuaID = a1->m_mode;
}
while ( v7 < cocos2d::CCArray::count(a1->m_gameObjects) );
}
}
}
}