//
// LevelEditorLayer::runColorEffect from 0x660098 to 0x6601e4 (332 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x66d37c
// > LevelEditorLayer::activateTriggerEffect @ 0x66d49c
// > ??> @ 0x4e108
//
// 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 *LevelEditorLayer::runColorEffect(
LevelEditorLayer *a1,
EffectGameObject *a2,
int a3,
float a4,
float a5,
bool a6)
{
float m_duration; // s10
unsigned int v11; // w21
ColorAction *ColorAction; // x1
float m_actionDelay; // s0
ColorAction *v14; // x2
ColorAction *result; // x0
ColorAction *v16; // [xsp+50h] [xbp+40h]
ColorAction *v17; // [xsp+58h] [xbp+48h]
ColorAction *v18; // [xsp+58h] [xbp+48h]
m_duration = a2->m_duration;
v17 = *(ColorAction **)&a3;
v11 = a6;
ColorAction = GJEffectManager::getColorAction(a1->m_effectManager, a3);
m_actionDelay = ColorAction->m_actionDelay;
v14 = v17;
if ( m_actionDelay == 0.0 )
goto LABEL_4;
if ( (m_duration <= 0.0) >= v11
|| ColorAction->m_deltaTime != 0.0 && !ColorAction->m_stepFinished
|| (result = nullptr, ColorAction->m_copyID <= 0) )
{
v16 = v17;
v18 = ColorAction;
ColorAction->m_stepInterval = 0.0;
ColorAction->m_deltaTime = 0.0;
ColorAction::step(ColorAction, a4 - m_actionDelay);
GJEffectManager::updateColorAction(a1->m_effectManager, v18);
v14 = v16;
LABEL_4:
result = (ColorAction *)((__int64 (__fastcall *)(LevelEditorLayer *, cocos2d::ccColor3B *, ColorAction *, bool, cocos2d::ccHSVValue *, _QWORD, bool, EffectGameObject *, float, float, int, int))a1->updateColor)(
a1,
&a2->m_triggerTargetColor,
v14,
a2->m_usesBlending,
&a2->m_hsvValue,
(unsigned int)a2->m_copyColorID,
a2->m_copyOpacity,
a2,
a2->m_duration,
a2->m_opacity,
a2->m_uniqueID,
a2->m_controlID);
result->m_actionDelay = a4;
result->m_stepInterval = a5;
}
return result;
}