//
// ColorSelectPopup::onTintGround from 0x140129910 to 0x14012999a (138 bytes)
//
// 4 xrefs:
// > ColorSelectPopup::init @ 0x140127a3f
// > ??> @ 0x140898468
// > ??> @ 0x140898478
// > ??> @ 0x140916a48
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:27:00 +0000
//
char __fastcall ColorSelectPopup::onTintGround(__int64 a1)
{
unsigned int v2; // eax
__int64 v3; // rcx
cocos2d::CCArray *v4; // rcx
unsigned int v5; // edi
struct cocos2d::CCObject *v6; // rax
LOBYTE(v2) = *(_BYTE *)(a1 + 1145) == 0;
*(_BYTE *)(a1 + 1145) = v2;
v3 = *(_QWORD *)(a1 + 680);
if ( v3 )
{
*(_BYTE *)(v3 + 1500) = v2;
}
else
{
v4 = *(cocos2d::CCArray **)(a1 + 688);
if ( v4 )
{
v5 = 0;
v2 = cocos2d::CCArray::count(v4);
if ( v2 )
{
do
{
v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 688), v5++);
*((_BYTE *)v6 + 1500) = *(_BYTE *)(a1 + 1145);
v2 = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 688));
}
while ( v5 < v2 );
}
}
}
return v2;
}