//
// ShaderLayer::triggerInvertColor from 0x140487690 to 0x140487903 (627 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::triggerShaderCommand @ 0x140221fd4
// > ??> @ 0x1406dbdc8
//
// 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 ShaderLayer::triggerInvertColor(
ShaderLayer *a1,
float a2,
float a3,
float a4,
float a5,
float a6,
bool a7,
bool a8,
bool a9,
int a10,
float a11)
{
ShaderLayer *v11; // rbx
float m_invertColorR; // xmm1_4
float m_invertColorG; // xmm1_4
float m_invertColorEditRGB; // xmm1_4
v11 = a1;
if ( a7 )
{
a1->m_state.m_invertColorClampRGB = a9;
if ( a8 )
{
if ( a4 != -909190.0 )
{
if ( a2 <= 0.0 )
{
m_invertColorR = 0.0;
}
else
{
if ( a1->m_timesyncShaderActions )
GJShaderState::timesyncShaderAction(&a1->m_state, 35);
m_invertColorR = v11->m_state.m_invertColorR;
a1 = v11;
}
ShaderLayer::tweenValue(a1, m_invertColorR, a4, 35, a2, a10, a11);
}
if ( a5 != -909190.0 )
{
if ( a2 <= 0.0 )
{
m_invertColorG = 0.0;
}
else
{
if ( v11->m_timesyncShaderActions )
GJShaderState::timesyncShaderAction(&v11->m_state, 36);
m_invertColorG = v11->m_state.m_invertColorG;
}
ShaderLayer::tweenValue(v11, m_invertColorG, a5, 36, a2, a10, a11);
}
if ( a6 != -909190.0 )
{
if ( a2 <= 0.0 )
{
ShaderLayer::tweenValue(v11, 0.0, a6, 37, a2, a10, a11);
}
else
{
if ( v11->m_timesyncShaderActions )
GJShaderState::timesyncShaderAction(&v11->m_state, 37);
ShaderLayer::tweenValue(v11, v11->m_state.m_invertColorB, a6, 37, a2, a10, a11);
}
}
}
else
{
a1->m_state.m_invertColorG = a5;
a1->m_state.m_invertColorB = a6;
a1->m_state.m_invertColorR = a4;
}
}
if ( a3 != -909190.0 )
{
if ( a2 <= 0.0 )
{
m_invertColorEditRGB = 0.0;
}
else
{
if ( v11->m_timesyncShaderActions )
GJShaderState::timesyncShaderAction(&v11->m_state, 34);
m_invertColorEditRGB = v11->m_state.m_invertColorEditRGB;
}
ShaderLayer::tweenValue(v11, m_invertColorEditRGB, a3, 34, a2, a10, a11);
}
}