//
// GJEffectManager::controlActionsForTrigger from 0x8bfde0 to 0x8c06b8 (2264 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::stopTriggersInGroup @ 0x66d21c
// > GJBaseGameLayer::controlTriggersInGroup @ 0x899358
// > ??> @ 0x540f0
//
// 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 GJEffectManager::controlActionsForTrigger(GJEffectManager *a1, EffectGameObject *a2, GJActionCommand a3)
{
int m_uniqueID; // w20
int m_objectID; // w0
ToggleTriggerAction *v7; // x3
int v8; // w23
unsigned __int64 v9; // x21
__int64 kk; // x2
__int64 v11; // x1
ColorAction *ColorAction; // x0
SpawnTriggerAction *m_start; // x4
int v14; // w23
unsigned __int64 v15; // x21
__int64 j; // x3
__int64 v17; // x1
PulseEffectAction *v18; // x4
int v19; // w3
PulseEffectAction *m_finish; // x5
unsigned __int64 v21; // x2
__int64 v22; // x6
PulseEffectAction *v23; // x0
std::__detail::_Hash_node_base *M_nxt; // x7
std::__detail::_Hash_node_base *v25; // x5
int v26; // w3
std::__detail::_Hash_node_base *v27; // x4
unsigned __int64 v28; // x2
__int64 v29; // x6
std::__detail::_Hash_node_base *v30; // x0
std::__detail::_Hash_node_base *v31; // x23
std::__detail::_Hash_node_base *v32; // x3
int v33; // w21
unsigned __int64 v34; // x19
__int64 v35; // x2
__int64 v36; // x1
std::__detail::_Hash_node_base *v37; // x1
std::__detail::_Hash_node_base *v38; // x5
bool v39; // zf
std::__detail::_Hash_node_base *v40; // x5
std::__detail::_Hash_node_base *v41; // x5
std::__detail::_Hash_node_base *v42; // x5
std::__detail::_Hash_node_base *v43; // x0
char *p_m_disabled; // x1
PulseEffectAction *v45; // x6
__int64 v46; // x5
__int64 v47; // x5
__int64 v48; // x5
__int64 v49; // x5
std::vector
*p_m_pulseEffectVector; // x0
std::__detail::_Hash_node_base *v51; // x23
std::__detail::_Hash_node_base *v52; // x4
int v53; // w21
unsigned __int64 v54; // x19
__int64 ii; // x3
__int64 v56; // x1
TouchToggleAction *v57; // x4
int v58; // w23
unsigned __int64 v59; // x21
__int64 jj; // x3
__int64 v61; // x1
__int64 m; // x3
__int64 v63; // x0
CollisionTriggerAction *v64; // x4
int v65; // w23
unsigned __int64 v66; // x21
__int64 k; // x3
__int64 v68; // x1
std::__detail::_Hash_node_base *i; // x0
GroupCommandObject2 *v70; // x1
GroupCommandObject2 *v71; // x0
unsigned __int64 v72; // x2
bool *v73; // x0
bool *v74; // x1
std::_Hashtable, std::allocator>, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits>::size_type v75; // x1
__int64 *n; // x2
m_uniqueID = a2->m_uniqueID;
m_objectID = a2->m_objectID;
if ( m_uniqueID <= 0 )
return;
if ( m_objectID <= 1347 )
{
if ( m_objectID >= 1346 )
goto LABEL_144;
if ( m_objectID <= 900 )
{
if ( m_objectID < 899 && m_objectID != 105 )
{
if ( m_objectID <= 105 )
{
if ( (unsigned int)(m_objectID - 29) > 1 )
return;
}
else if ( m_objectID != 744 )
{
return;
}
}
goto LABEL_18;
}
if ( m_objectID != 1006 )
{
if ( m_objectID > 1006 )
{
if ( m_objectID == 1007 )
{
for ( i = a1->m_opacityEffectMap._M_h._M_before_begin._M_nxt; i; i = i->_M_nxt )
{
if ( LODWORD(i[5]._M_nxt) == m_uniqueID )
{
if ( a3 )
{
if ( a3 == Pause )
{
BYTE1(i[3]._M_nxt) = 1;
}
else if ( a3 == Resume )
{
BYTE1(i[3]._M_nxt) = 0;
}
}
else
{
LOBYTE(i[3]._M_nxt) = 1;
}
}
}
return;
}
if ( m_objectID != 1268 )
return;
m_start = a1->m_spawnTriggerActions.m_start;
v14 = 0;
v15 = 0;
for ( j = (char *)a1->m_spawnTriggerActions.m_finish - (char *)m_start;
;
j = (char *)a1->m_spawnTriggerActions.m_finish - (char *)m_start )
{
while ( 1 )
{
v17 = (__int64)&m_start[v15];
if ( v15 >= 0x8E38E38E38E38E39LL * (j >> 3) )
return;
if ( *(_DWORD *)(v17 + 28) == m_uniqueID )
break;
LABEL_31:
v15 = ++v14;
}
if ( a3 )
{
if ( a3 == Pause )
{
*(_BYTE *)(v17 + 1) = 1;
}
else if ( a3 == Resume )
{
*(_BYTE *)(v17 + 1) = 0;
}
goto LABEL_31;
}
std::vector::_M_erase((__int64)&a1->m_spawnTriggerActions, v17);
m_start = a1->m_spawnTriggerActions.m_start;
}
}
if ( m_objectID == 901 )
goto LABEL_144;
if ( m_objectID != 915 )
return;
LABEL_18:
ColorAction = GJEffectManager::getColorAction(a1, a2->m_targetColor);
if ( m_uniqueID == ColorAction->m_uniqueID )
{
if ( a3 )
{
if ( a3 == Pause )
{
ColorAction->m_paused = 1;
}
else if ( a3 == Resume )
{
ColorAction->m_paused = 0;
}
}
else
{
ColorAction->m_stepFinished = 1;
}
}
return;
}
v18 = a1->m_pulseEffectVector.m_start;
v19 = 0;
m_finish = a1->m_pulseEffectVector.m_finish;
v21 = 0;
v22 = (char *)m_finish - (char *)v18;
LABEL_39:
if ( v21 < 0x8E38E38E38E38E39LL * (v22 >> 3) )
{
do
{
v23 = &v18[v21];
if ( m_uniqueID == v23->m_triggerUniqueID )
{
switch ( a3 )
{
case Stop:
p_m_disabled = (char *)&v23[1].m_disabled;
if ( &v23[1] == m_finish
|| (__int64)(0x8E38E38E38E38E39LL * (((char *)m_finish - p_m_disabled) >> 3)) <= 0 )
{
p_m_pulseEffectVector = &a1->m_pulseEffectVector;
}
else
{
v45 = m_finish - 1;
do
{
v46 = *((_QWORD *)p_m_disabled + 1);
*(_QWORD *)&v23->m_disabled = *(_QWORD *)p_m_disabled;
*(_QWORD *)&v23->m_holdTime = v46;
v39 = p_m_disabled == (char *)v45;
v47 = *((_QWORD *)p_m_disabled + 3);
*(_QWORD *)&v23->m_deltaTime = *((_QWORD *)p_m_disabled + 2);
*(_QWORD *)&v23->m_currentValue = v47;
v48 = *((_QWORD *)p_m_disabled + 5);
*(_QWORD *)&v23->m_pulseEffectType = *((_QWORD *)p_m_disabled + 4);
*(_QWORD *)&v23->m_hsv.s = v48;
v49 = *((_QWORD *)p_m_disabled + 7);
*(_QWORD *)&v23->m_hsv.absoluteSaturation = *((_QWORD *)p_m_disabled + 6);
*(_QWORD *)&v23->m_mainOnly = v49;
*(_QWORD *)&v23->m_controlID = *((_QWORD *)p_m_disabled + 8);
v23 = (PulseEffectAction *)p_m_disabled;
p_m_disabled += 72;
}
while ( !v39 );
p_m_pulseEffectVector = &a1->m_pulseEffectVector;
v18 = a1->m_pulseEffectVector.m_start;
m_finish = a1->m_pulseEffectVector.m_finish;
}
p_m_pulseEffectVector->m_finish = --m_finish;
v22 = (char *)m_finish - (char *)v18;
goto LABEL_39;
case Pause:
v23->m_disabled = 1;
break;
case Resume:
v23->m_disabled = 0;
break;
}
}
v21 = ++v19;
}
while ( v19 < 0x8E38E38E38E38E39LL * (v22 >> 3) );
}
M_nxt = a1->m_pulseEffectMap._M_h._M_before_begin._M_nxt;
if ( !M_nxt )
return;
while ( 2 )
{
v25 = M_nxt[2]._M_nxt;
v26 = 0;
v27 = M_nxt[3]._M_nxt;
v28 = 0;
v29 = (char *)v27 - (char *)v25;
LABEL_44:
if ( v28 >= 0x8E38E38E38E38E39LL * (v29 >> 3) )
{
LABEL_47:
M_nxt = M_nxt->_M_nxt;
if ( !M_nxt )
return;
continue;
}
break;
}
while ( 1 )
{
v30 = &v25[9 * v28];
if ( m_uniqueID == HIDWORD(v30[7]._M_nxt) )
{
switch ( a3 )
{
case Stop:
v37 = v30 + 9;
if ( &v30[9] == v27 || (__int64)(0x8E38E38E38E38E39LL * (v27 - v37)) <= 0 )
{
v43 = M_nxt + 2;
}
else
{
do
{
v38 = v37[1]._M_nxt;
v30->_M_nxt = v37->_M_nxt;
v30[1]._M_nxt = v38;
v39 = &v27[-9] == v37;
v40 = v37[3]._M_nxt;
v30[2]._M_nxt = v37[2]._M_nxt;
v30[3]._M_nxt = v40;
v41 = v37[5]._M_nxt;
v30[4]._M_nxt = v37[4]._M_nxt;
v30[5]._M_nxt = v41;
v42 = v37[7]._M_nxt;
v30[6]._M_nxt = v37[6]._M_nxt;
v30[7]._M_nxt = v42;
v30[8]._M_nxt = v37[8]._M_nxt;
v30 = v37;
v37 += 9;
}
while ( !v39 );
v43 = M_nxt + 2;
v25 = M_nxt[2]._M_nxt;
v27 = M_nxt[3]._M_nxt;
}
v27 -= 9;
v43[1]._M_nxt = v27;
v29 = (char *)v27 - (char *)v25;
goto LABEL_44;
case Pause:
LOBYTE(v30->_M_nxt) = 1;
break;
case Resume:
LOBYTE(v30->_M_nxt) = 0;
break;
}
}
v28 = ++v26;
if ( v26 >= 0x8E38E38E38E38E39LL * (v29 >> 3) )
goto LABEL_47;
}
}
if ( m_objectID == 1815 )
{
v64 = a1->m_unkVector230.m_start;
v65 = 0;
v66 = 0;
for ( k = (char *)a1->m_unkVector230.m_finish - (char *)v64; ; k = (char *)a1->m_unkVector230.m_finish - (char *)v64 )
{
while ( 1 )
{
v68 = (__int64)&v64[v66];
if ( v66 >= 0x6DB6DB6DB6DB6DB7LL * (k >> 3) )
return;
if ( *(_DWORD *)(v68 + 24) == m_uniqueID )
break;
LABEL_126:
v66 = ++v65;
}
if ( a3 )
{
if ( a3 == Pause )
{
*(_BYTE *)v68 = 1;
}
else if ( a3 == Resume )
{
*(_BYTE *)v68 = 0;
}
goto LABEL_126;
}
std::vector::_M_erase((__int64)&a1->m_unkVector230, v68);
v64 = a1->m_unkVector230.m_start;
}
}
if ( m_objectID > 1815 )
{
if ( m_objectID != 3033 )
{
if ( m_objectID <= 3033 )
{
if ( m_objectID != 2067 && m_objectID != 3016 )
return;
goto LABEL_144;
}
if ( m_objectID == 3614 )
{
m = (__int64)a1->m_timerItemMap._M_h._M_before_begin._M_nxt;
if ( !m )
return;
v63 = m + 16;
if ( *(_DWORD *)(m + 64) == m_uniqueID )
goto LABEL_121;
while ( 1 )
{
LABEL_118:
for ( m = *(_QWORD *)m; ; m = *(_QWORD *)m )
{
while ( 1 )
{
if ( !m )
return;
while ( 1 )
{
v63 = m + 16;
if ( *(_DWORD *)(m + 64) != m_uniqueID )
goto LABEL_118;
LABEL_121:
if ( a3 )
break;
v75 = *(int *)(m + 8) % a1->m_timerItemMap._M_h._M_bucket_count;
for ( n = (__int64 *)a1->m_timerItemMap._M_h._M_buckets[v75]; m != *n; n = (__int64 *)*n )
;
m = std::_Hashtable,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::_M_erase(
(__int64 *)&a1->m_timerItemMap,
v75,
n,
(_QWORD *)m);
if ( !m )
return;
}
if ( a3 != Pause )
break;
*(_BYTE *)(v63 + 80) = 1;
m = *(_QWORD *)m;
}
if ( a3 != Resume )
break;
*(_BYTE *)(v63 + 80) = 0;
}
}
}
if ( m_objectID != 3615 )
return;
v51 = a1->m_unkMap3f8._M_h._M_before_begin._M_nxt;
if ( !v51 )
return;
LABEL_87:
v52 = v51[2]._M_nxt;
v53 = 0;
v54 = 0;
for ( ii = (char *)v51[3]._M_nxt - (char *)v52; ; ii = (char *)v51[3]._M_nxt - (char *)v52 )
{
while ( 1 )
{
v56 = (__int64)&v52[7 * v54];
if ( v54 >= 0x6DB6DB6DB6DB6DB7LL * (ii >> 3) )
{
v51 = v51->_M_nxt;
if ( !v51 )
return;
goto LABEL_87;
}
if ( m_uniqueID == *(_DWORD *)(v56 + 16) )
break;
LABEL_88:
v54 = ++v53;
}
if ( a3 )
{
if ( a3 == Pause )
{
*(_BYTE *)v56 = 1;
}
else if ( a3 == Resume )
{
*(_BYTE *)v56 = 0;
}
goto LABEL_88;
}
std::vector::_M_erase((__int64)&v51[2], v56);
v52 = v51[2]._M_nxt;
}
}
LABEL_144:
v70 = a1->m_unkVector560.m_start;
v71 = a1->m_unkVector560.m_finish;
if ( v71 != v70 )
{
v72 = (unsigned __int64)((char *)v71 - (char *)&v70[1]) >> 3;
v73 = &v70->m_disabled;
v74 = &v70[1].m_disabled + 8 * v72;
do
{
if ( m_uniqueID == *(_DWORD *)(v73 + 231) )
{
if ( a3 )
{
if ( a3 == Pause )
{
*v73 = 1;
}
else if ( a3 == Resume )
{
*v73 = 0;
}
}
else
{
v73[1] = 1;
}
}
v73 += 520;
}
while ( v73 != v74 );
}
return;
}
if ( m_objectID == 1611 )
{
v31 = a1->m_countTriggerActions._M_h._M_before_begin._M_nxt;
if ( !v31 )
return;
while ( 1 )
{
v32 = v31[2]._M_nxt;
v33 = 0;
v34 = 0;
v35 = (char *)v31[3]._M_nxt - (char *)v32;
while ( 1 )
{
v36 = (__int64)&v32[8 * v34];
if ( v34 >= v35 >> 6 )
break;
if ( m_uniqueID != *(_DWORD *)(v36 + 20) )
goto LABEL_51;
if ( a3 )
{
if ( a3 == Pause )
{
*(_BYTE *)v36 = 1;
}
else if ( a3 == Resume )
{
*(_BYTE *)v36 = 0;
}
LABEL_51:
v34 = ++v33;
}
else
{
std::vector::_M_erase((__int64)&v31[2], v36);
v32 = v31[2]._M_nxt;
v35 = (char *)v31[3]._M_nxt - (char *)v32;
}
}
v31 = v31->_M_nxt;
if ( !v31 )
return;
}
}
if ( m_objectID <= 1611 )
{
if ( m_objectID != 1595 )
return;
v57 = a1->m_unkVector1e0.m_start;
v58 = 0;
v59 = 0;
for ( jj = (char *)a1->m_unkVector1e0.m_finish - (char *)v57; ; jj = (char *)a1->m_unkVector1e0.m_finish
- (char *)v57 )
{
while ( 1 )
{
v61 = (__int64)&v57[v59];
if ( v59 >= 0x6DB6DB6DB6DB6DB7LL * (jj >> 3) )
return;
if ( *(_DWORD *)(v61 + 20) == m_uniqueID )
break;
LABEL_104:
v59 = ++v58;
}
if ( a3 )
{
if ( a3 == Pause )
{
*(_BYTE *)v61 = 1;
}
else if ( a3 == Resume )
{
*(_BYTE *)v61 = 0;
}
goto LABEL_104;
}
std::vector::_M_erase((__int64)&a1->m_unkVector1e0, v61);
v57 = a1->m_unkVector1e0.m_start;
}
}
if ( m_objectID == 1812 )
{
v7 = a1->m_unkVector248.m_start;
v8 = 0;
v9 = 0;
for ( kk = (char *)a1->m_unkVector248.m_finish - (char *)v7; ; kk = (char *)a1->m_unkVector248.m_finish - (char *)v7 )
{
while ( 1 )
{
v11 = (__int64)&v7[v9];
if ( v9 >= 0xAAAAAAAAAAAAAAABLL * (kk >> 4) )
return;
if ( m_uniqueID == *(_DWORD *)(v11 + 12) )
break;
LABEL_9:
v9 = ++v8;
}
if ( a3 )
{
if ( a3 == Pause )
{
*(_BYTE *)v11 = 1;
}
else if ( a3 == Resume )
{
*(_BYTE *)v11 = 0;
}
goto LABEL_9;
}
std::vector::_M_erase((__int64)&a1->m_unkVector248, v11);
v7 = a1->m_unkVector248.m_start;
}
}
if ( m_objectID == 1814 )
goto LABEL_144;
}