//
// AudioEffectsLayer::triggerEffect from 0x1004a8c00 to 0x1004a8d1d (285 bytes)
//
// 1 xrefs:
// > AudioEffectsLayer::audioStep @ 0x1004a8bf3
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 12:30:55 +0000
//
__int64 __fastcall AudioEffectsLayer::triggerEffect(__int64 a1, float a2)
{
float v2; // xmm0_4
__int64 v3; // r15
__int64 v4; // r14
__int64 v5; // rax
__int64 v6; // r14
__int64 result; // rax
if ( a2 == 1.0 )
{
a2 = 4.0;
}
else if ( a2 == 0.89999998 )
{
a2 = 3.0;
}
else if ( a2 == 0.80000001 )
{
a2 = 2.5;
}
v2 = fminf((float)(a2 * 0.2) + *(float *)(a1 + 580), 1.1);
if ( *(_BYTE *)(a1 + 576) || v2 >= *(float *)(a1 + 572) )
{
*(float *)(a1 + 572) = v2;
*(_BYTE *)(a1 + 576) = 0;
cocos2d::CCNode::stopActionByTag(a1, 0);
v3 = cocos2d::CCActionTween::create_1((std::string::value_type *)"audioScale");
v4 = cocos2d::CCActionTween::create_1((std::string::value_type *)"audioScale");
v5 = cocos2d::CCCallFunc::create(a1, AudioEffectsLayer::goingDown, 0);
v6 = sub_10039EB60(
v3,
v5,
v4,
0,
COERCE_DOUBLE(1045220557),
COERCE_DOUBLE((unsigned __int64)LODWORD(v2)),
COERCE_DOUBLE(1036831949));
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 72LL))(v6, 0);
return cocos2d::CCNode::runAction(a1, v6);
}
return result;
}