//
// GJBaseGameLayer::activateSongEditTrigger from 0x100202ed0 to 0x100202f94 (196 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::processQueuedAudioTriggers @ 0x100202d48
// > LevelEditorLayer::activateTriggerEffect @ 0x1003610b4
// > EffectGameObject::triggerObject @ 0x100385efc
//
// 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 __fastcall GJBaseGameLayer::activateSongEditTrigger(GJBaseGameLayer *a1, SongTriggerGameObject *a2)
{
int *p_m_activeGradients; // x21
SongTriggerGameObject *v5; // [xsp+8h] [xbp-28h] BYREF
p_m_activeGradients = &a1->m_activeGradients;
if ( a1->m_practiceMusicSync || !a1->m_isPracticeMode )
{
((void (__fastcall *)(GJBaseGameLayer *, SongTriggerGameObject *))a1->activatedAudioTrigger)(a1, a2);
if ( (p_m_activeGradients[345] & 1) == 0 )
{
if ( a1->m_startingFromBeginning )
{
v5 = a2;
sub_1000115B8((__int64)&a1->m_activeSfxTriggers, &v5);
}
else
{
GJBaseGameLayer::applySFXEditTrigger(a1, a2->m_songChannel, 2, a2);
if ( a2->m_targetGroupID >= 1 )
GJBaseGameLayer::addProximityVolumeEffect(a1, a2->m_songChannel, 2, a2);
}
}
}
}