//
// ColorSelectPopup::onToggleTintMode from 0x4deda6 to 0x4dee02 (92 bytes)
//
// 1 xrefs:
// > ColorSelectPopup::onDefault @ 0x4df444
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:50:59 +0000
//
_DWORD *__fastcall ColorSelectPopup::onToggleTintMode(_DWORD *this, cocos2d::CCObject *a2)
{
_DWORD *v2; // r4
unsigned int v3; // r5
_BOOL4 v4; // r3
int v5; // r0
int v6; // r2
v2 = this;
v3 = *(this + 132);
v4 = *(this + 194) != 1;
*(this + 194) = v4;
if ( v3 )
{
*(_BYTE *)(v3 + 1307) = v4;
}
else if ( *(this + 133) )
{
while ( 1 )
{
this = (_DWORD *)cocos2d::CCArray::count((cocos2d::CCArray *)v2[133]);
if ( v3 >= (unsigned int)this )
break;
v5 = cocos2d::CCArray::objectAtIndex((cocos2d::CCArray *)v2[133], v3++);
*(_BYTE *)(v5 + 1307) = v2[194] != 0;
}
}
else
{
v6 = *(this + 196);
if ( v6 )
*(_BYTE *)(v6 + 80) = v4;
}
return this;
}