//
// LevelEditorLayer::runColorEffect from 0x367de6 to 0x367ec0 (218 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x36dc16
// > LevelEditorLayer::activateTriggerEffect @ 0x36dc44
//
// 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
//
ColorAction *LevelEditorLayer::runColorEffect(
LevelEditorLayer *a1,
EffectGameObject *a2,
int a3,
float a4,
float a5,
bool a6)
{
float *p_m_duration; // r8
float m_duration; // s17
ColorAction *ColorAction; // r0
float m_actionDelay; // s15
ColorAction *v14; // r5
ColorAction *result; // r0
p_m_duration = &a2->m_duration;
m_duration = a2->m_duration;
ColorAction = GJEffectManager::getColorAction(a1->m_effectManager, a3);
m_actionDelay = ColorAction->m_actionDelay;
v14 = ColorAction;
if ( m_actionDelay != 0.0 )
{
if ( m_duration > 0.0
&& a6
&& (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, v14);
}
result = (ColorAction *)((int (__fastcall *)(LevelEditorLayer *, cocos2d::ccColor3B *, _DWORD, int, bool, _DWORD, cocos2d::ccHSVValue *, int, bool, EffectGameObject *, int, int))a1->updateColor)(
a1,
&a2->m_triggerTargetColor,
*(_DWORD *)p_m_duration,
a3,
a2->m_usesBlending,
LODWORD(a2->m_opacity),
&a2->m_hsvValue,
a2->m_copyColorID,
a2->m_copyOpacity,
a2,
a2->m_uniqueID,
a2->m_controlID);
result->m_actionDelay = a4;
result->m_stepInterval = a5;
return result;
}