//
// GameToolbox::strongColor from 0x2ece18 to 0x2eced4 (188 bytes)
//
// 3 xrefs:
// > PlayerObject::updateGlowColor @ 0x3407f8
// > PlayerObject::updateGlowColor @ 0x340824
// > SimplePlayer::updateColors @ 0x402f48
//
// 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
//
cocos2d::ccColor3B GameToolbox::strongColor(cocos2d::ccColor3B a1)
{
int r; // r2
int g; // r3
bool v3; // zf
int b; // r0
int v5; // r1
float v6; // s14
unsigned __int8 v9; // [sp+Ch] [bp-4h]
unsigned __int8 v10; // [sp+Dh] [bp-3h]
unsigned __int8 v11; // [sp+Eh] [bp-2h]
r = a1.r;
g = a1.g;
v3 = a1.r == 255;
b = a1.b;
if ( v3 || g == 255 || b == 255 )
{
v9 = r;
v10 = g;
v11 = b;
}
else
{
v5 = b;
if ( b < (unsigned int)g )
v5 = g;
if ( v5 < r )
v5 = r;
v6 = 255.0 / (float)v5;
if ( v6 > 1.5 )
v6 = 1.5;
v9 = (unsigned int)(float)((float)r * v6);
v10 = (unsigned int)(float)((float)g * v6);
v11 = (unsigned int)(float)((float)b * v6);
}
return (cocos2d::ccColor3B)(v9 | (unsigned __int16)(v10 << 8) | (v11 << 16));
}