//
// GJColorSetupLayer::updateSpriteColors from 0x14035f3e0 to 0x14035f4ff (287 bytes)
//
// 7 xrefs:
// > GJColorSetupLayer::init @ 0x14035eff7
// > GJColorSetupLayer::init @ 0x14035f3a3
// > GJColorSetupLayer::colorSelectClosed @ 0x14035f797
// > GJColorSetupLayer::showPage @ 0x14035f7fb
// > ??> @ 0x1408ba348
// > ??> @ 0x1408ba358
// > ??> @ 0x140921278
//
// 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:30:52 +0000
//
unsigned int __fastcall GJColorSetupLayer::updateSpriteColors(__int64 a1)
{
int v2; // esi
unsigned int v3; // ebx
unsigned int result; // eax
int v5; // r15d
struct cocos2d::CCObject *v6; // rsi
struct cocos2d::CCObject *v7; // r14
__int64 v8; // rax
__int64 v9; // rdx
void (__fastcall *v10)(__int64, __int64); // r8
__int64 v11; // rdx
__int64 v12; // rdx
v2 = *(_DWORD *)(a1 + 720) * *(_DWORD *)(a1 + 724);
v3 = 0;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 712));
if ( result )
{
v5 = v2 + 1;
do
{
v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 712), v3);
v7 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 704), v3);
v8 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v6 + 504LL))(v6);
v10 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 936LL);
if ( (int)(v5 + v3) > 999 )
{
v10(v8, 0);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v6 + 336LL))(v6, 0);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v7 + 336LL))(v7, 0);
}
else
{
LOBYTE(v9) = 1;
v10(v8, v9);
LOBYTE(v11) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v6 + 336LL))(v6, v11);
LOBYTE(v12) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v7 + 336LL))(v7, v12);
GJColorSetupLayer::updateSpriteColor(a1, v6, v7, v5 + v3);
}
++v3;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 712));
}
while ( v3 < result );
}
return result;
}