//
// LevelEditorLayer::runColorEffect from 0x1000efd10 to 0x1000efe4e (318 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x1000ef467
// > LevelEditorLayer::activateTriggerEffect @ 0x1000ef4a8
//
// 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 *__fastcall LevelEditorLayer::runColorEffect(
LevelEditorLayer *a1,
EffectGameObject *a2,
int a3,
float a4,
float a5,
bool a6)
{
ColorAction *ColorAction; // rax
float m_actionDelay; // xmm1_4
ColorAction *result; // rax
ColorAction *v11; // r12
float m_duration; // [rsp+8h] [rbp-28h]
m_duration = a2->m_duration;
ColorAction = GJEffectManager::getColorAction(a1->m_effectManager, a3);
m_actionDelay = ColorAction->m_actionDelay;
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;
v11 = ColorAction;
ColorAction::step(ColorAction, a4 - m_actionDelay);
GJEffectManager::updateColorAction(a1->m_effectManager, v11);
}
result = (ColorAction *)((__int64 (__fastcall *)(LevelEditorLayer *, cocos2d::ccColor3B *, _QWORD, bool, cocos2d::ccHSVValue *, _QWORD, float, float, bool, EffectGameObject *, _QWORD, _QWORD))a1->updateColor)(
a1,
&a2->m_triggerTargetColor,
(unsigned int)a3,
a2->m_usesBlending,
&a2->m_hsvValue,
(unsigned int)a2->m_copyColorID,
a2->m_duration,
a2->m_opacity,
a2->m_copyOpacity,
a2,
(unsigned int)a2->m_uniqueID,
(unsigned int)a2->m_controlID);
result->m_actionDelay = a4;
result->m_stepInterval = a5;
return result;
}