//
// GJColorSetupLayer::updateSpriteColors from 0x9f7468 to 0x9f7594 (300 bytes)
//
// 4 xrefs:
// > GJColorSetupLayer::colorSelectClosed @ 0x9f7594
// > GJColorSetupLayer::showPage @ 0x9f7608
// > GJColorSetupLayer::init @ 0x9f7a74
// > ??> @ 0xc3bc8
//
// This function is hookable on this platform (idp: arm, 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 12:59:14 +0000
//
__int64 __fastcall GJColorSetupLayer::updateSpriteColors(GJColorSetupLayer *this)
{
unsigned int v2; // w19
int v3; // w23
__int64 result; // x0
unsigned int v5; // w1
ColorChannelSprite *v6; // x20
cocos2d::CCLabelBMFont *v7; // x22
__int64 v8; // x2
char *v9; // x3
v2 = 0;
v3 = *((_DWORD *)this + 180) * *((_DWORD *)this + 181);
result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 89));
v5 = 0;
if ( (_DWORD)result )
{
do
{
v6 = (ColorChannelSprite *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 89), v5);
v7 = (cocos2d::CCLabelBMFont *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 88), v2);
v8 = *(_QWORD *)(*(__int64 (__fastcall **)(ColorChannelSprite *))(*(_QWORD *)v6 + 512LL))(v6);
if ( (int)(v2 + v3) > 998 )
{
++v2;
(*(void (**)(void))(v8 + 1056))();
(*(void (__fastcall **)(ColorChannelSprite *, _QWORD))(*(_QWORD *)v6 + 344LL))(v6, 0);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _QWORD))(*(_QWORD *)v7 + 344LL))(v7, 0);
}
else
{
(*(void (**)(void))(v8 + 1056))();
(*(void (__fastcall **)(ColorChannelSprite *, __int64))(*(_QWORD *)v6 + 344LL))(v6, 1);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v7 + 344LL))(v7, 1);
v9 = (char *)(v2 + v3 + 1);
++v2;
GJColorSetupLayer::updateSpriteColor(this, v6, v7, v9);
}
result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 89));
v5 = v2;
}
while ( v2 < (unsigned int)result );
}
return result;
}