//
// ColorSelectPopup::onToggleTintMode from 0x140090a70 to 0x140090b2d (189 bytes)
//
// 3 xrefs:
// > ColorSelectPopup::onDefault @ 0x140090ffb
// > ColorSelectPopup::init @ 0x14008ec03
// > ??> @ 0x1406c6f30
//
// 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 ColorSelectPopup::onToggleTintMode(ColorSelectPopup *a1, cocos2d::CCObject *a2)
{
int m_blending; // edx
unsigned int v3; // edi
EffectGameObject *m_gameObject; // rcx
cocos2d::CCArray *m_gameObjects; // rcx
struct cocos2d::CCObject *v7; // rax
ColorAction *m_colorAction; // rcx
m_blending = a1->m_blending;
v3 = 0;
a1->m_blending = m_blending != 1;
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
m_gameObject->m_usesBlending = m_blending != 1;
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects )
{
if ( cocos2d::CCArray::count(m_gameObjects) )
{
do
{
v7 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v3++);
HIBYTE(v7[26].m_nZOrder) = a1->m_blending != 0;
}
while ( v3 < cocos2d::CCArray::count(a1->m_gameObjects) );
}
}
else
{
m_colorAction = a1->m_colorAction;
if ( m_colorAction )
m_colorAction->m_blending = m_blending != 1;
}
}
}