//
// GJEffectManager::updateEffects from 0x140366180 to 0x140366300 (384 bytes)
//
// 12 xrefs:
// > GJBaseGameLayer::loadUpToPosition @ 0x14033e848
// > GJBaseGameLayer::update @ 0x140341c06
// > GJBaseGameLayer::update @ 0x140341ecc
// > GJEffectManager::loadFromState @ 0x14036f179
// > LevelEditorLayer::updateGameObjects @ 0x1403fb10c
// > LevelEditorLayer::updateGameObjects @ 0x1403fb5ba
// > LevelEditorLayer::onPlaytest @ 0x1403fea46
// > PlayLayer::setupHasCompleted @ 0x140505ade
// > PlayLayer::loadDefaultColors @ 0x1405109cc
// > ??> @ 0x1408babdc
// > ??> @ 0x1408babec
// > ??> @ 0x1409216e0
//
// 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
//
_QWORD *__fastcall GJEffectManager::updateEffects(_QWORD *a1, float a2)
{
__int64 v2; // r10
__int64 v4; // r10
__int64 v5; // r10
__int64 v6; // r11
__int64 v7; // rcx
_QWORD **v8; // rcx
_QWORD *result; // rax
float v10; // xmm4_4
float v11; // xmm2_4
float v12; // xmm2_4
float v13; // xmm3_4
float *v14; // rdx
float v15; // xmm0_4
__int64 v16; // [rsp+60h] [rbp+8h] BYREF
v2 = a1[41];
if ( v2 )
{
v4 = *(_QWORD *)(v2 + 56);
if ( v4 )
{
do
{
ColorAction::step(*(_QWORD *)(v4 + 264), a2);
if ( !*(_DWORD *)(v5 + 120) )
{
v7 = *(_QWORD *)(v5 + 144);
*(_WORD *)(v7 + 324) = *(_WORD *)(v5 + 58);
*(_BYTE *)(v7 + 326) = *(_BYTE *)(v5 + 60);
*(float *)(v7 + 320) = *(float *)(v5 + 64) * 255.0;
}
v4 = v6;
}
while ( v6 );
}
}
GJEffectManager::updatePulseEffects(a1);
v8 = (_QWORD **)a1[55];
result = *v8;
if ( *v8 != v8 )
{
do
{
if ( *((_BYTE *)result + 32) )
{
v14 = (float *)result + 11;
}
else
{
if ( *((_BYTE *)result + 33) )
goto LABEL_19;
v10 = *((float *)result + 5);
v11 = a2 + *((float *)result + 9);
*((float *)result + 9) = v11;
v12 = v11 + *((float *)result + 14);
if ( v12 < v10 )
v13 = v12 <= 0.0 ? 0.0 : v12 / v10;
else
v13 = 1.0;
v14 = (float *)result + 11;
v15 = (float)(*((float *)result + 7) - *((float *)result + 6)) * v13;
*((_BYTE *)result + 32) = v12 >= v10;
*((float *)result + 11) = v15 + *((float *)result + 6);
if ( v12 < v10 )
goto LABEL_19;
}
if ( *v14 >= 1.0 )
result = sub_1403535F0(a1 + 54, &v16, (void **)result);
LABEL_19:
result = (_QWORD *)*result;
}
while ( result != (_QWORD *)a1[55] );
}
return result;
}