//
// LevelEditorLayer::activateTriggerEffect from 0x46780c to 0x467cf0 (1252 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::spawnGroupPreview @ 0x467eb0
// > LevelEditorLayer::spawnGroupPreview @ 0x467f44
// > LevelEditorLayer::updateGameObjects @ 0x46ce68
// > LevelEditorLayer::updateGameObjects @ 0x46d09e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:48:57 +0000
//
int __fastcall LevelEditorLayer::activateTriggerEffect(
LevelEditorLayer *this,
EffectGameObject *a2,
float a3,
float a4,
float a5,
bool a6)
{
int v9; // r6
int v11; // r7
int v12; // r10
float v13; // s16
float v14; // s19
int v15; // r7
bool v17; // r3
int v18; // r2
int v19; // s15
float v20; // s13
float v21; // s14
int v22; // r1
int v23; // r2
int v24; // r3
int v25; // r9
int v26; // r12
int v27; // lr
int OpacityActionForGroup; // r0
OpacityEffectAction *v29; // r7
float v30; // s15
float v31; // s15
int v32; // r0
float v33; // s15
int v34; // r6
float v35; // r0
int v36; // s16
int v37; // r3
__int16 v38; // [sp+40h] [bp-18h]
int v39; // [sp+44h] [bp-14h] BYREF
int v40; // [sp+48h] [bp-10h]
int v41; // [sp+4Ch] [bp-Ch]
int v42; // [sp+50h] [bp-8h]
v9 = *((unsigned __int8 *)a2 + 550);
v11 = a6;
if ( *((_BYTE *)a2 + 550)
|| *((_BYTE *)this + 11181) && *((_BYTE *)a2 + 1095)
|| *((_BYTE *)a2 + 1292) && !(*(int (__fastcall **)(EffectGameObject *))(*(_DWORD *)a2 + 776))(a2) )
{
return 1;
}
v12 = *((unsigned __int8 *)a2 + 1090);
v13 = *((float *)a2 + 406);
v14 = (float)(a3 - v13) - a5;
if ( *((_BYTE *)a2 + 1090) )
{
v15 = *((unsigned __int8 *)this + 11885);
if ( !*((_BYTE *)this + 11885) )
return 1;
v17 = (float)(a4 - (float)(v13 + *((float *)a2 + 318))) <= 5.0 && (float)(a5 - (float)(a3 - v13)) > 0.2;
if ( LevelEditorLayer::runColorEffect((GJEffectManager **)this, a2, *((_DWORD *)a2 + 222), v13, v14, v17) )
{
if ( *((_DWORD *)a2 + 223) == 29 && *((_BYTE *)a2 + 1304) )
{
v9 = v15;
LevelEditorLayer::runColorEffect((GJEffectManager **)this, a2, 1001, v13, v14, 0);
return v9;
}
return 1;
}
return v9;
}
v18 = *((_DWORD *)a2 + 223);
if ( v18 == 2907 )
goto LABEL_86;
if ( v18 > 2907 )
{
if ( v18 == 2999 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v39, (EffectGameObject *)((char *)a2 + 1308));
GJBaseGameLayer::updateMGOffsetY(this, *(float *)&v40, 0.0, v12, 0.0, -1, -1);
return 1;
}
if ( v18 > 2999 )
{
if ( v18 == 3605 )
{
if ( a6 )
{
GJBaseGameLayer::activateSongEditTrigger(this, a2);
return 1;
}
}
else
{
if ( v18 > 3605 )
{
if ( v18 == 3606 )
{
GJBaseGameLayer::updateBGArtSpeed(this, *((float *)a2 + 334), *((float *)a2 + 335));
}
else if ( v18 == 3612 )
{
GJBaseGameLayer::updateMGArtSpeed(this, *((float *)a2 + 334), *((float *)a2 + 335));
}
return 1;
}
if ( v18 == 3602 )
{
if ( a6 )
{
GJBaseGameLayer::activateSFXTrigger(this, a2);
return 1;
}
}
else
{
if ( v18 != 3603 )
return 1;
if ( a6 )
{
GJBaseGameLayer::activateSFXEditTrigger(this, a2);
return 1;
}
}
}
goto LABEL_71;
}
if ( v18 < 2909 || v18 > 2917 && (unsigned int)(v18 - 2919) > 5 )
return 1;
LABEL_86:
v9 = *((unsigned __int8 *)this + 11706);
if ( !*((_BYTE *)this + 11706) || *((_BYTE *)a2 + 1722) )
return 1;
v37 = *((_DWORD *)this + 2678);
if ( v37 && *(_BYTE *)(v37 + 952) )
*(double *)(v37 + 360) = *(double *)(v37 + 376) + v13;
GJBaseGameLayer::triggerShaderCommand(this, a2);
return v9;
}
if ( v18 == 1616 )
{
if ( !*((_DWORD *)a2 + 415) )
LevelEditorLayer::stopTriggersInGroup((GJEffectManager **)this, *((_DWORD *)a2 + 321), *((float *)a2 + 406));
return 1;
}
if ( v18 > 1616 )
{
if ( v18 == 2903 )
{
GJBaseGameLayer::triggerGradientCommand(this, a2);
return 1;
}
if ( v18 <= 2903 )
{
if ( v18 != 1934 )
{
if ( v18 == 2900 && *((_BYTE *)a2 + 1668) )
*((_DWORD *)this + 183) = *((_DWORD *)a2 + 418);
return 1;
}
if ( a6 )
{
GJBaseGameLayer::activateSongTrigger(this, a2);
return 1;
}
LABEL_71:
if ( *((_BYTE *)this + 12276) )
{
v9 = *((unsigned __int8 *)this + 12277);
if ( *((_BYTE *)this + 12277) )
{
(*(void (__fastcall **)(LevelEditorLayer *, EffectGameObject *))(*(_DWORD *)this + 760))(this, a2);
return v9;
}
}
return 1;
}
if ( v18 > 2905 )
return 1;
goto LABEL_86;
}
if ( v18 == 1007 )
{
v9 = *((unsigned __int8 *)this + 11885);
if ( !*((_BYTE *)this + 11885) )
return 1;
OpacityActionForGroup = GJEffectManager::getOpacityActionForGroup(
*((GJEffectManager **)this + 381),
*((_DWORD *)a2 + 321));
v29 = (OpacityEffectAction *)OpacityActionForGroup;
if ( OpacityActionForGroup )
{
v30 = *(float *)(OpacityActionForGroup + 40);
if ( v30 != 0.0 )
{
v31 = v13 - v30;
if ( v31 != 0.0 )
{
*(_DWORD *)(OpacityActionForGroup + 36) = 0;
*(_DWORD *)(OpacityActionForGroup + 16) = 0;
OpacityEffectAction::step((OpacityEffectAction *)OpacityActionForGroup, v31);
GJEffectManager::updateOpacityAction(*((GJEffectManager **)this + 381), v29);
}
}
}
v32 = GJEffectManager::runOpacityActionOnGroup(
*((GJEffectManager **)this + 381),
*((_DWORD *)a2 + 321),
*((float *)a2 + 318),
*((float *)a2 + 319),
*((_DWORD *)a2 + 195),
*((_DWORD *)a2 + 373));
*(float *)(v32 + 40) = v13;
*(float *)(v32 + 36) = v14;
}
else
{
if ( v18 >= 1008 )
{
if ( v18 == 1049 )
{
LevelEditorLayer::toggleGroupPreview(
(GJEffectManager **)this,
*((_DWORD *)a2 + 321),
*((unsigned __int8 *)a2 + 1457));
}
else if ( v18 == 1268 && !*((_BYTE *)a2 + 1485) )
{
v33 = *((float *)a2 + 422);
if ( v33 > 0.0 )
{
*(float *)&v36 = v13 + v33;
if ( *(float *)&v36 <= a4 )
LevelEditorLayer::addDelayedSpawn((int)this, a2, v36);
}
else
{
v34 = *((_DWORD *)a2 + 321);
v35 = (*(float (__fastcall **)(EffectGameObject *))(*(_DWORD *)a2 + 812))(a2);
LevelEditorLayer::spawnGroupPreview(
this,
v34,
v35,
*((float *)a2 + 406),
a3,
a4,
a5,
*((_BYTE *)a2 + 1486),
a6);
}
}
return 1;
}
if ( v18 != 1006 )
return 1;
v9 = *((unsigned __int8 *)this + 11885);
if ( !*((_BYTE *)this + 11885) )
return 1;
v19 = *((int *)a2 + 353);
v20 = *((float *)a2 + 354);
v21 = *((float *)a2 + 355);
if ( (float)((float)((float)(v13 + *(float *)&v19) + v20) + v21) < a4 )
return 1;
HIBYTE(v38) = *((_BYTE *)a2 + 1269);
if ( !*((_DWORD *)a2 + 356) )
v11 = 2;
LOBYTE(v38) = *((_BYTE *)a2 + 1268);
if ( *((_DWORD *)a2 + 356) )
v11 = 1;
v22 = *((_DWORD *)a2 + 359);
v23 = *((_DWORD *)a2 + 360);
v24 = *((_DWORD *)a2 + 361);
v25 = *((_DWORD *)this + 381);
v26 = *((_DWORD *)a2 + 321);
v27 = *((_DWORD *)a2 + 357);
v39 = *((_DWORD *)a2 + 358);
v40 = v22;
v41 = v23;
v42 = v24;
*(float *)(GJEffectManager::runPulseEffect(
v25,
v26,
v27 == 1,
v19,
v20,
v21,
v11,
v38,
v39,
v22,
v23,
v24,
*((_DWORD *)a2 + 362),
*((_BYTE *)a2 + 1453),
*((_BYTE *)a2 + 1454),
*((_BYTE *)a2 + 1455),
*((_BYTE *)a2 + 1456),
*((_DWORD *)a2 + 195),
*((_DWORD *)a2 + 373))
+ 68) = v14;
}
return v9;
}