//
// SetupGradientPopup::onBlending from 0x1005f2dd0 to 0x1005f2eee (286 bytes)
//
// 2 xrefs:
// > SetupGradientPopup::init @ 0x1005f26c5
// > SetupGradientPopup::init @ 0x1005f27aa
//
// 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 __fastcall SetupGradientPopup::onBlending(SetupGradientPopup *a1, cocos2d::CCObject *a2)
{
int v2; // eax
int v3; // ecx
int v4; // eax
EffectGameObject *m_gameObject; // rcx
unsigned int v6; // r14d
int m_blendingMode; // eax
const char *v8; // rsi
v2 = a1->m_blendingMode + 2 * (((unsigned int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) == 1) - 1;
v3 = 0;
if ( v2 > 0 )
v3 = v2;
v4 = 3;
if ( v3 < 3 )
v4 = v3;
a1->m_blendingMode = v4;
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
LODWORD(m_gameObject[1].EnhancedGameObject::GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable) = v4;
}
else if ( (unsigned int)sub_100720070(a1->m_gameObjects) )
{
v6 = 0;
do
*(_DWORD *)(sub_1007200C0(a1->m_gameObjects, v6++) + 1840) = a1->m_blendingMode;
while ( v6 < (unsigned int)sub_100720070(a1->m_gameObjects) );
}
m_blendingMode = a1->m_blendingMode;
if ( m_blendingMode > 1 )
{
if ( m_blendingMode == 2 )
{
v8 = "Multiply";
goto LABEL_20;
}
if ( m_blendingMode == 3 )
{
v8 = "Invert";
goto LABEL_20;
}
LABEL_17:
v8 = "Normal";
goto LABEL_20;
}
if ( m_blendingMode == -99999 )
{
v8 = "Mixed";
goto LABEL_20;
}
if ( m_blendingMode != 1 )
goto LABEL_17;
v8 = "Additive";
LABEL_20:
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_blendingLabel->setString)(a1->m_blendingLabel, v8);
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_blendingLabel, 150.0, 0.69999999, 0.0);
}