//
// ColorAction::step from 0x9f9140 to 0x9f923c (252 bytes)
//
// 5 xrefs:
// > LevelEditorLayer::runColorEffect @ 0x78c730
// > LevelEditorLayer::stopTriggersInGroup @ 0x795690
// > GJBaseGameLayer::updateColor @ 0x998784
// > GJEffectManager::updateColorEffects @ 0x9fa2f0
// > ??> @ 0x5c7e8
//
// This function is hookable on this platform (idp: arm, 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:59:15 +0000
//
__int64 __fastcall ColorAction::step(__int64 this, float a2)
{
__int64 v2; // x19
float v3; // s0
float v4; // s1
float v5; // s8
float v6; // s9
unsigned __int64 v7; // x0
int v8; // w0
char v9; // w1
int v10; // w0
char v11; // w1
if ( !*(_BYTE *)(this + 56) && !*(_BYTE *)(this + 57) )
{
v2 = this;
v3 = a2 + *(float *)(this + 68);
v4 = *(float *)(this + 80);
v5 = v3 + *(float *)(this + 164);
*(float *)(this + 68) = v3;
if ( v5 < v4 )
{
if ( v5 <= 0.0 )
goto LABEL_11;
v6 = v5 / v4;
if ( (float)(v5 / v4) < 1.0 )
{
if ( v6 > 0.0 )
{
v7 = GameToolbox::multipliedColorValue(*(_QWORD *)(this + 72), *(_QWORD *)(this + 75), v5 / v4);
*(_WORD *)(v2 + 58) = v7;
*(_BYTE *)(v2 + 60) = BYTE2(v7);
v4 = *(float *)(v2 + 80);
*(float *)(v2 + 64) = *(float *)(v2 + 96) + (float)(v6 * (float)(*(float *)(v2 + 100) - *(float *)(v2 + 96)));
LABEL_9:
this = v5 >= v4;
*(_BYTE *)(v2 + 56) = this;
return this;
}
LABEL_11:
v10 = *(_DWORD *)(this + 96);
v11 = *(_BYTE *)(v2 + 74);
*(_WORD *)(v2 + 58) = *(_WORD *)(v2 + 72);
*(_BYTE *)(v2 + 60) = v11;
*(_DWORD *)(v2 + 64) = v10;
goto LABEL_9;
}
}
v8 = *(_DWORD *)(this + 100);
v9 = *(_BYTE *)(v2 + 77);
*(_WORD *)(v2 + 58) = *(_WORD *)(v2 + 75);
*(_BYTE *)(v2 + 60) = v9;
*(_DWORD *)(v2 + 64) = v8;
goto LABEL_9;
}
return this;
}