//
// AudioEffectsLayer::triggerEffect from 0x50a238 to 0x50a334 (252 bytes)
//
// 1 xrefs:
// > AudioEffectsLayer::audioStep @ 0x50a3da
//
// 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:51:27 +0000
//
int __fastcall AudioEffectsLayer::triggerEffect(int this, float a2)
{
float v2; // s15
const char **v3; // r4
float v4; // s16
cocos2d::CCSequence *v5; // r7
int v6; // r6
cocos2d::CCFiniteTimeAction *v7; // r0
cocos2d::CCAction *v8; // r6
float v9; // [sp+0h] [bp-Ch]
float v10; // [sp+0h] [bp-Ch]
v2 = a2;
v3 = (const char **)this;
if ( a2 == 1.0 )
{
v2 = 4.0;
}
else if ( a2 == 0.9 )
{
v2 = 3.0;
}
else if ( a2 == 0.8 )
{
v2 = 2.5;
}
v4 = *(float *)(this + 464) + (float)(v2 * 0.2);
if ( v4 >= 1.1 )
v4 = 1.1;
if ( *(_BYTE *)(this + 460) || *(float *)(this + 456) <= v4 )
{
*(float *)(this + 456) = v4;
*(_BYTE *)(this + 460) = 0;
cocos2d::CCNode::stopActionByTag((cocos2d::CCNode *)this, 0);
v5 = (cocos2d::CCSequence *)cocos2d::CCActionTween::create(
(cocos2d::CCActionTween *)0x3D4CCCCD,
COERCE_FLOAT("audioScale"),
v3[116],
v4,
v9);
v6 = cocos2d::CCActionTween::create(
(cocos2d::CCActionTween *)0x3E4CCCCD,
COERCE_FLOAT("audioScale"),
(const char *)LODWORD(v4),
0.1,
v10);
v7 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v3, AudioEffectsLayer::goingDown, 0);
v8 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v5, v7, v6, 0, AudioEffectsLayer::goingDown, 0);
(*(void (__fastcall **)(cocos2d::CCAction *, _DWORD))(*(_DWORD *)v8 + 36))(v8, 0);
return cocos2d::CCNode::runAction((cocos2d::CCNode *)v3, v8);
}
return this;
}