//
// PlayLayer::loadDefaultColors from 0x100118660 to 0x100118818 (440 bytes)
//
// 2 xrefs:
// > PlayLayer::setupHasCompleted @ 0x10011707c
// > PlayLayer::resetLevel @ 0x100121fb8
//
// 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 PlayLayer::loadDefaultColors(PlayLayer *a1)
{
cocos2d::CCArray *AllColorActions; // x20
__int64 i; // x21
__int64 v4; // x0
cocos2d::CCArray *v5; // x20
__int64 j; // x21
__int64 v7; // x0
cocos2d::CCArray *v8; // x20
__int64 k; // x21
__int64 v10; // x22
int v11; // w24
int v12; // [xsp+Ch] [xbp-64h] BYREF
_QWORD v13[4]; // [xsp+10h] [xbp-60h] BYREF
int v14; // [xsp+30h] [xbp-40h]
memset(v13, 0, sizeof(v13));
v14 = 1065353216;
AllColorActions = GJEffectManager::getAllColorActions(a1->m_effectManager);
for ( i = 0; (unsigned int)i < (unsigned int)sub_10024A36C(AllColorActions); i = (unsigned int)(i + 1) )
{
v4 = sub_10024A388(AllColorActions, i);
if ( *(_BYTE *)(v4 + 84) == 1 )
{
v12 = *(_DWORD *)(v4 + 92);
sub_10001C1B0((unsigned __int64)v13, &v12, &v12);
}
}
GJEffectManager::reset(a1->m_effectManager);
v5 = GJEffectManager::getAllColorActions(a1->m_levelSettings->GJBaseGameLayer::m_effectManager);
for ( j = 0; (unsigned int)j < (unsigned int)sub_10024A36C(v5); j = (unsigned int)(j + 1) )
{
v7 = sub_10024A388(v5, j);
((void (__fastcall *)(PlayLayer *, __int64, _QWORD, _QWORD, __int64, _QWORD, _QWORD, _QWORD, float, float, _QWORD))a1->updateColor)(
a1,
v7 + 72,
*(unsigned int *)(v7 + 92),
*(unsigned __int8 *)(v7 + 84),
v7 + 104,
*(unsigned int *)(v7 + 120),
*(unsigned __int8 *)(v7 + 125),
0,
0.0,
*(float *)(v7 + 96),
*(_QWORD *)(v7 + 128));
}
v8 = GJEffectManager::getAllColorActions(a1->m_effectManager);
for ( k = 0; (unsigned int)k < (unsigned int)sub_10024A36C(v8); k = (unsigned int)(k + 1) )
{
v10 = sub_10024A388(v8, k);
v11 = *(unsigned __int8 *)(v10 + 84);
v12 = *(_DWORD *)(v10 + 92);
if ( (((sub_100018814(v13, &v12) == nullptr) ^ v11) & 1) == 0 )
{
v12 = *(_DWORD *)(v10 + 92);
sub_10001C1B0((unsigned __int64)&a1->m_blendingColors, &v12, &v12);
}
}
GJEffectManager::updateEffects(a1->m_effectManager, 0.0);
GJEffectManager::calculateBaseActiveColors(a1->m_effectManager);
GJEffectManager::processInheritedColors(a1->m_effectManager);
sub_100017A98((__int64)v13);
}