//
// GJColorSetupLayer::updateSpriteColors from 0x5c16e8 to 0x5c178c (164 bytes)
//
// 3 xrefs:
// > GJColorSetupLayer::colorSelectClosed @ 0x5c178c
// > GJColorSetupLayer::showPage @ 0x5c17d6
// > GJColorSetupLayer::init @ 0x5c1b2e
//
// 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:53:50 +0000
//
unsigned int __fastcall GJColorSetupLayer::updateSpriteColors(GJColorSetupLayer *this)
{
int v2; // r8
const char *v3; // r4
unsigned int result; // r0
ColorChannelSprite *v5; // r5
cocos2d::CCLabelBMFont *v6; // r7
bool v7; // cc
void (*v8)(void); // r3
v2 = *((_DWORD *)this + 138) * *((_DWORD *)this + 137);
v3 = (const char *)v2;
while ( 1 )
{
result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 136));
if ( (unsigned int)&v3[-v2] >= result )
break;
v5 = (ColorChannelSprite *)cocos2d::CCArray::objectAtIndex(
*((cocos2d::CCArray **)this + 136),
(unsigned int)&v3[-v2]);
v6 = (cocos2d::CCLabelBMFont *)cocos2d::CCArray::objectAtIndex(
*((cocos2d::CCArray **)this + 135),
(unsigned int)&v3[-v2]);
v7 = (int)v3++ <= 998;
v8 = *(void (**)(void))(*(_DWORD *)(*(int (__fastcall **)(ColorChannelSprite *))(*(_DWORD *)v5 + 256))(v5) + 528);
v8();
if ( v7 )
{
(*(void (__fastcall **)(ColorChannelSprite *, int))(*(_DWORD *)v5 + 172))(v5, 1);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, int))(*(_DWORD *)v6 + 172))(v6, 1);
GJColorSetupLayer::updateSpriteColor(this, v5, v6, v3);
}
else
{
(*(void (__fastcall **)(ColorChannelSprite *, _DWORD))(*(_DWORD *)v5 + 172))(v5, 0);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _DWORD))(*(_DWORD *)v6 + 172))(v6, 0);
}
}
return result;
}