//
// GJBaseGameLayer::clearActivatedAudioTriggers from 0x5b3c04 to 0x5b3c94 (144 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::resetPlayback @ 0x461b68
// > LevelEditorLayer::onPlaytest @ 0x468566
// > LevelEditorLayer::updateGameObjects @ 0x46cef6
// > GJBaseGameLayer::resetLevelVariables @ 0x5b9546
//
// 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:53:35 +0000
//
void __fastcall GJBaseGameLayer::clearActivatedAudioTriggers(GJBaseGameLayer *this)
{
_DWORD *i; // r0
_DWORD *v3; // r5
_DWORD *v4; // r3
char **j; // r5
char *v6; // r6
char **v7; // r3
int v8; // r2
int v9; // r3
if ( *((_DWORD *)this + 333) )
{
for ( i = *((_DWORD **)this + 332); i; i = v3 )
{
v3 = (_DWORD *)*i;
operator delete(i);
}
v4 = *((_DWORD **)this + 331);
*((_DWORD *)this + 332) = 0;
while ( i != v4 )
{
*(_DWORD *)(*((_DWORD *)this + 330) + 4 * (_DWORD)i) = 0;
i = (_DWORD *)((char *)i + 1);
}
*((_DWORD *)this + 333) = 0;
}
if ( *((_DWORD *)this + 338) )
{
for ( j = *((char ***)this + 337); j; j = (char **)v6 )
{
v6 = *j;
std::__vector_base::~__vector_base(j + 3);
operator delete(j);
}
v7 = *((char ***)this + 336);
*((_DWORD *)this + 337) = 0;
while ( j != v7 )
{
*(_DWORD *)(*((_DWORD *)this + 335) + 4 * (_DWORD)j) = 0;
j = (char **)((char *)j + 1);
}
*((_DWORD *)this + 338) = 0;
}
v8 = *((_DWORD *)this + 340);
while ( 1 )
{
v9 = *((_DWORD *)this + 341);
if ( v8 == v9 )
break;
*((_DWORD *)this + 341) = v9 - 160;
}
}