//
// LevelEditorLayer::stopTriggersInGroup from 0x66d06c to 0x66d254 (488 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x66d750
// > ??> @ 0x32fb8
//
// 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
//
void LevelEditorLayer::stopTriggersInGroup(LevelEditorLayer *a1, int a2, float a3)
{
cocos2d::CCArray *TriggerGroup; // x0
cocos2d::ccArray *data; // x1
DelayedSpawnNode **m_start; // x19
DelayedSpawnNode **m_finish; // x0
DelayedSpawnNode **v10; // x0
const void *v11; // x1
DelayedSpawnNode **v12; // x0
EffectGameObject **arr; // x19
EffectGameObject **v14; // x24
EffectGameObject *i; // x21
ColorAction *ColorAction; // x0
float m_actionDelay; // s0
GJEffectManager *m_effectManager; // x0
ColorAction *v19; // [xsp+68h] [xbp+68h]
DelayedSpawnNode *v20; // [xsp+70h] [xbp+70h] BYREF
TriggerGroup = LevelEditorLayer::getTriggerGroup(a1, a2);
if ( TriggerGroup )
{
data = TriggerGroup->data;
if ( data->num )
{
arr = (EffectGameObject **)data->arr;
v14 = &arr[data->num - 1];
if ( arr <= v14 )
{
for ( i = *arr; *arr; i = *arr )
{
if ( i->m_canBeControlled )
{
if ( i->m_isColorTrigger )
{
ColorAction = GJEffectManager::getColorAction(a1->m_effectManager, i->m_targetColor);
if ( ColorAction->m_uniqueID == i->m_uniqueID )
{
m_actionDelay = ColorAction->m_actionDelay;
v19 = ColorAction;
ColorAction->m_stepInterval = 0.0;
ColorAction->m_deltaTime = 0.0;
ColorAction::step(ColorAction, a3 - m_actionDelay);
m_effectManager = a1->m_effectManager;
v19->m_stepFinished = 1;
GJEffectManager::updateColorAction(m_effectManager, v19);
}
}
else
{
GJEffectManager::controlActionsForTrigger(a1->m_effectManager, i, Stop);
}
}
if ( v14 < ++arr )
break;
}
}
}
}
m_start = a1->m_delayedSpawnNodes.m_start;
if ( m_start != a1->m_delayedSpawnNodes.m_finish )
{
do
{
while ( 1 )
{
v20 = *m_start;
if ( GameObject::belongsToGroup(v20->m_gameObject, a2) )
break;
if ( a1->m_delayedSpawnNodes.m_finish == ++m_start )
return;
}
m_finish = a1->m_delayedSpawnNodes2.m_finish;
if ( m_finish == a1->m_delayedSpawnNodes2.m_reserveEnd )
{
std::vector::_M_emplace_back_aux(
(__int64)&a1->m_delayedSpawnNodes2,
&v20);
}
else
{
if ( m_finish )
{
*m_finish = v20;
m_finish = a1->m_delayedSpawnNodes2.m_finish;
}
a1->m_delayedSpawnNodes2.m_finish = m_finish + 1;
}
v10 = a1->m_delayedSpawnNodes.m_finish;
v11 = m_start + 1;
if ( m_start + 1 != v10 )
{
if ( ((char *)v10 - (_BYTE *)v11) >> 3 )
{
memmove(m_start, v11, (char *)v10 - (_BYTE *)v11);
v10 = a1->m_delayedSpawnNodes.m_finish;
}
}
v12 = v10 - 1;
a1->m_delayedSpawnNodes.m_finish = v12;
}
while ( v12 != m_start );
}
}