//
// LevelEditorLayer::runColorEffect from 0x1003614a0 to 0x1003615b4 (276 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x100360ea8
// > LevelEditorLayer::activateTriggerEffect @ 0x100360ee0
//
// 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
//
// local variable allocation has failed, the output may be wrong!
ColorAction *__fastcall LevelEditorLayer::runColorEffect(
LevelEditorLayer *a1,
EffectGameObject *a2,
int a3,
float a4,
float a5,
bool a6)
{
_BOOL4 v6; // w23
__int64 v9; // x20
float m_duration; // s10
ColorAction *ColorAction; // x0
float m_actionDelay; // s0
ColorAction *v15; // x22
bool v16; // zf
ColorAction *result; // x0
__int64 v18; // [xsp+0h] [xbp-60h]
v6 = a6;
v9 = *(_QWORD *)&a3;
m_duration = a2->m_duration;
ColorAction = GJEffectManager::getColorAction(a1->m_effectManager, a3);
m_actionDelay = ColorAction->m_actionDelay;
if ( m_actionDelay != 0.0 )
{
v15 = ColorAction;
v16 = m_duration <= 0.0 || !v6;
if ( !v16 && (ColorAction->m_deltaTime == 0.0 || ColorAction->m_stepFinished) && ColorAction->m_copyID > 0 )
return nullptr;
ColorAction->m_stepInterval = 0.0;
ColorAction->m_deltaTime = 0.0;
ColorAction::step(ColorAction, a4 - m_actionDelay);
GJEffectManager::updateColorAction(a1->m_effectManager, v15);
}
LODWORD(v18) = a2->m_uniqueID;
HIDWORD(v18) = a2->m_controlID;
result = (ColorAction *)((__int64 (__fastcall *)(LevelEditorLayer *, cocos2d::ccColor3B *, __int64, bool, cocos2d::ccHSVValue *, _QWORD, bool, EffectGameObject *, float, float, __int64))a1->updateColor)(
a1,
&a2->m_triggerTargetColor,
v9,
a2->m_usesBlending,
&a2->m_hsvValue,
(unsigned int)a2->m_copyColorID,
a2->m_copyOpacity,
a2,
a2->m_duration,
a2->m_opacity,
v18);
result->m_actionDelay = a4;
result->m_stepInterval = a5;
return result;
}