//
// ColorAction::step from 0x10000d534 to 0x10000d628 (244 bytes)
//
// 4 xrefs:
// > GJEffectManager::updateColorEffects @ 0x10000fc78
// > GJBaseGameLayer::updateColor @ 0x1001f1fb0
// > LevelEditorLayer::runColorEffect @ 0x100361540
// > LevelEditorLayer::stopTriggersInGroup @ 0x100361740
//
// 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 __fastcall ColorAction::step(ColorAction *a1, float a2)
{
float v3; // s0
float v4; // s9
float m_duration; // s0
float v6; // s8
float m_fromOpacity; // s1
if ( !a1->m_stepFinished && !a1->m_paused )
{
v3 = a1->m_deltaTime + a2;
a1->m_deltaTime = v3;
v4 = v3 + a1->m_stepInterval;
m_duration = a1->m_duration;
if ( v4 < m_duration )
{
if ( v4 <= 0.0 )
{
LABEL_9:
a1->m_color = a1->m_fromColor;
m_fromOpacity = a1->m_fromOpacity;
goto LABEL_10;
}
v6 = v4 / m_duration;
if ( (float)(v4 / m_duration) < 1.0 )
{
if ( v6 > 0.0 )
{
a1->m_color = GameToolbox::multipliedColorValue(
(cocos2d::ccColor3B)(*(unsigned __int16 *)&a1->m_fromColor.r | (a1->m_fromColor.b << 16)),
(cocos2d::ccColor3B)(*(unsigned __int16 *)&a1->m_toColor.r | (a1->m_toColor.b << 16)),
v4 / m_duration);
a1->m_currentOpacity = a1->m_fromOpacity + (float)((float)(a1->m_toOpacity - a1->m_fromOpacity) * v6);
m_duration = a1->m_duration;
LABEL_11:
a1->m_stepFinished = v4 >= m_duration;
return;
}
goto LABEL_9;
}
}
a1->m_color = a1->m_toColor;
m_fromOpacity = a1->m_toOpacity;
LABEL_10:
a1->m_currentOpacity = m_fromOpacity;
goto LABEL_11;
}
}