//
// GJColorSetupLayer::updateSpriteColors from 0x10018e34c to 0x10018e46c (288 bytes)
//
// 4 xrefs:
// > GJColorSetupLayer::init @ 0x10018e040
// > GJColorSetupLayer::showPage @ 0x10018e584
// > GJColorSetupLayer::colorSelectClosed @ 0x10018e61c
// > sub_10018E620 @ 0x10018e624
//
// 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
//
void __fastcall GJColorSetupLayer::updateSpriteColors(GJColorSetupLayer *a1)
{
int m_page; // w21
int m_colorsPerPage; // w22
__int64 v4; // x20
int v5; // w23
ColorChannelSprite *v6; // x21
cocos2d::CCLabelBMFont *v7; // x22
__int64 v8; // x0
m_page = a1->m_page;
m_colorsPerPage = a1->m_colorsPerPage;
if ( (unsigned int)sub_10024A36C(a1->m_colorSprites) )
{
v4 = 0;
v5 = m_colorsPerPage * m_page;
do
{
v6 = (ColorChannelSprite *)sub_10024A388(a1->m_colorSprites, v4);
v7 = (cocos2d::CCLabelBMFont *)sub_10024A388(a1->m_colorLabels, v4);
v8 = ((__int64 (__fastcall *)(ColorChannelSprite *))v6->getParent)(v6);
if ( v5 + (int)v4 > 998 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v8 + 1040LL))(v8, 0);
((void (__fastcall *)(ColorChannelSprite *, _QWORD))v6->setVisible)(v6, 0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))v7->setVisible)(v7, 0);
}
else
{
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 1040LL))(v8, 1);
((void (__fastcall *)(ColorChannelSprite *, __int64))v6->setVisible)(v6, 1);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v7->setVisible)(v7, 1);
GJColorSetupLayer::updateSpriteColor(a1, v6, v7, v5 + v4 + 1);
}
v4 = (unsigned int)(v4 + 1);
}
while ( (unsigned int)v4 < (unsigned int)sub_10024A36C(a1->m_colorSprites) );
}
}