//
// GJEffectManager::processColors from 0x140365640 to 0x140365752 (274 bytes)
//
// 9 xrefs:
// > GJBaseGameLayer::loadUpToPosition @ 0x14033e9b3
// > LevelEditorLayer::updateGameObjects @ 0x1403fb118
// > LevelEditorLayer::updateGameObjects @ 0x1403fb5c6
// > LevelEditorLayer::onPlaytest @ 0x1403fea52
// > LevelEditorLayer::postUpdate @ 0x1404008ed
// > PlayLayer::updateVisibility @ 0x14050df39
// > ??> @ 0x1408baa58
// > ??> @ 0x1408baa68
// > ??> @ 0x140921608
//
// 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:54 +0000
//
__int64 __fastcall GJEffectManager::processColors(__int64 a1)
{
__int64 v2; // r8
int v3; // ebp
__int64 v4; // r14
__int64 v5; // rsi
__int64 ColorAction; // rax
__int64 v7; // rbx
__int64 v8; // rax
char v10; // [rsp+40h] [rbp+8h] BYREF
GJEffectManager::calculateBaseActiveColors();
v2 = *(_QWORD *)(a1 + 344);
v3 = 0;
if ( (*(_QWORD *)(a1 + 352) - v2) / 72 )
{
v4 = 0;
do
{
v5 = v4 + v2;
ColorAction = GJEffectManager::getColorAction(a1, *(unsigned int *)(v4 + v2 + 20));
if ( !*(_DWORD *)(v5 + 52) && (!ColorAction || !*(_DWORD *)(ColorAction + 120)) )
{
v7 = *(_QWORD *)(ColorAction + 144);
v8 = GJEffectManager::colorForPulseEffect(a1, &v10, v7 + 327, v5);
*(_WORD *)(v7 + 327) = *(_WORD *)v8;
*(_BYTE *)(v7 + 329) = *(_BYTE *)(v8 + 2);
}
v2 = *(_QWORD *)(a1 + 344);
++v3;
v4 += 72;
}
while ( v3 < (unsigned __int64)((*(_QWORD *)(a1 + 352) - v2) / 72) );
}
GJEffectManager::processInheritedColors(a1);
return GJEffectManager::processCopyColorPulseActions(a1);
}