//
// LevelEditorLayer::runColorEffect from 0x1402dd870 to 0x1402dda03 (403 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x1402dd02a
// > LevelEditorLayer::activateTriggerEffect @ 0x1402dd06d
// > ??> @ 0x1406d3314
// > ??> @ 0x1406d3320
//
// 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)
{
bool v9; // di
ColorAction *ColorAction; // rax
float m_actionDelay; // xmm2_4
ColorAction *result; // rax
__int64 v13; // r10
__int64 v14; // rcx
v9 = a2->m_duration <= 0.0;
ColorAction = GJEffectManager::getColorAction(a1->m_effectManager, a3);
m_actionDelay = ColorAction->m_actionDelay;
if ( m_actionDelay != 0.0 )
{
if ( !v9 && 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);
if ( !*(_DWORD *)(v13 + 120) )
{
v14 = *(_QWORD *)(v13 + 144);
*(_WORD *)(v14 + 324) = *(_WORD *)(v13 + 58);
*(_BYTE *)(v14 + 326) = *(_BYTE *)(v13 + 60);
*(float *)(v14 + 320) = *(float *)(v13 + 64) * 255.0;
}
}
result = (ColorAction *)((__int64 (__fastcall *)(LevelEditorLayer *, cocos2d::ccColor3B *, LevelEditorLayer_vtbl *, _QWORD, bool, _DWORD, cocos2d::ccHSVValue *, int, bool, EffectGameObject *, int, int))a1->updateColor)(
a1,
&a2->m_triggerTargetColor,
a1->GJBaseGameLayer::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable,
(unsigned int)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;
}