//
// GJEffectManager::updateEffects from 0x1002ca110 to 0x1002ca223 (275 bytes)
//
// 9 xrefs:
// > PlayLayer::setupHasCompleted @ 0x10007beb6
// > PlayLayer::loadDefaultColors @ 0x10007f468
// > LevelEditorLayer::updateGameObjects @ 0x1000ad162
// > LevelEditorLayer::updateGameObjects @ 0x1000ad7fc
// > LevelEditorLayer::onPlaytest @ 0x1000c5b66
// > GJBaseGameLayer::loadUpToPosition @ 0x10012c73f
// > GJBaseGameLayer::update @ 0x10012f3f5
// > GJBaseGameLayer::update @ 0x100130b92
// > GJEffectManager::loadFromState @ 0x1002da639
//
// 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 12:28:09 +0000
//
void __fastcall GJEffectManager::updateEffects(__int64 a1, float a2)
{
__int64 v2; // rdx
__int64 *v3; // rbx
char v4; // al
float v5; // xmm0_4
float v6; // xmm0_4
float v7; // xmm1_4
float v8; // xmm2_4
__int64 v9; // r15
void *v10; // rdi
void *__p; // [rsp+8h] [rbp-38h] BYREF
float v12; // [rsp+24h] [rbp-1Ch]
v12 = a2;
GJEffectManager::updateColorEffects();
GJEffectManager::updatePulseEffects(a1, a2);
v2 = *(_QWORD *)(a1 + 424);
if ( v2 )
{
v3 = (__int64 *)(a1 + 408);
do
{
while ( 1 )
{
v4 = *(_BYTE *)(v2 + 32);
if ( !*(_WORD *)(v2 + 32) )
{
v5 = *(float *)(v2 + 36) + v12;
*(float *)(v2 + 36) = v5;
v6 = v5 + *(float *)(v2 + 56);
v7 = *(float *)(v2 + 20);
v8 = 1.0;
if ( v6 < v7 )
{
v8 = 0.0;
if ( v6 > 0.0 )
v8 = v6 / v7;
}
*(float *)(v2 + 44) = (float)((float)(*(float *)(v2 + 28) - *(float *)(v2 + 24)) * v8) + *(float *)(v2 + 24);
v4 = v6 >= v7;
*(_BYTE *)(v2 + 32) = v6 >= v7;
}
if ( v4 && *(float *)(v2 + 44) >= 1.0 )
break;
v2 = *(_QWORD *)v2;
if ( !v2 )
return;
}
v9 = *(_QWORD *)v2;
sub_10001AE30((__int64)&__p, v3, (__int64 *)v2);
v10 = __p;
__p = nullptr;
if ( v10 )
operator delete(v10);
v2 = v9;
}
while ( v9 );
}
}