//
// FMODAudioEngine::playEffect from 0x1003e40b0 to 0x1003e4181 (209 bytes)
//
// 31 xrefs:
// > PlayLayer::destroyPlayer @ 0x1000ba47f
// > EditLevelLayer::onPlay @ 0x1001fbefa
// > MapSelectLayer::checkTouchMonster @ 0x10026943d
// > CCMenuItemSpriteExtra::activate @ 0x100276ecc
// > CCMenuItemSpriteExtra::selected @ 0x100277024
// > LevelAreaInnerLayer::onDoor @ 0x10027abc3
// > LevelInfoLayer::onPlay @ 0x1002bfa3f
// > LevelInfoLayer::onPlayReplay @ 0x1002c457c
// > GJPathPage::playUnlockAnimation @ 0x100300f19
// > GJShopLayer::dialogClosed @ 0x100327115
// > AnimatedShopKeeper::playReactAnimation @ 0x100327527
// > GJWorldNode::playStep1 @ 0x1003c4ccb
// > PauseLayer::onQuit @ 0x1003d79cc
// > FMODAudioEngine::playEffect_1 @ 0x1003e406b
// > LevelPage::onPlay @ 0x100434aba
// > SecretLayer5::onSubmit @ 0x10047b5c8
// > SecretLayer5::animateHead @ 0x10047c378
// > SecretLayer5::showSuccessAnimation @ 0x10047cccb
// > SecretLayer5::showSuccessAnimation @ 0x10047cd46
// > SecretLayer5::showSuccessAnimation @ 0x10047cdbe
// > SecretLayer5::showSuccessAnimation @ 0x10047ce2d
// > SecretLayer5::showFailAnimation @ 0x10047d32f
// > SecretLayer5::showFailAnimation @ 0x10047d3bb
// > SecretLayer5::playWinSFX @ 0x10047d6a5
// > EndLevelLayer::onReplay @ 0x1004c1edc
// > EndLevelLayer::onMenu @ 0x1004c200f
// > EndLevelLayer::onRestartCheckpoint @ 0x1004c215e
// > RetryLevelLayer::onMenu @ 0x1004f910d
// > MenuGameLayer::destroyPlayer @ 0x1004fafac
// > GauntletSelectLayer::playUnlockAnimation @ 0x100573369
// > AchievementNotifier::showNextAchievement @ 0x1007c2cdb
//
// 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
//
unsigned int __fastcall FMODAudioEngine::playEffect(__int64 a1, __int64 a2, __m128 a3, float a4, float a5)
{
unsigned __int64 v5; // rdx
const void *v6; // rsi
unsigned int result; // eax
unsigned int v8; // ebx
__int128 v9; // [rsp+50h] [rbp-30h] BYREF
void *__p; // [rsp+60h] [rbp-20h]
float v11; // [rsp+6Ch] [rbp-14h]
float v12; // [rsp+70h] [rbp-10h]
unsigned __int32 v13; // [rsp+74h] [rbp-Ch]
if ( (*(_BYTE *)a2 & 1) != 0 )
{
v5 = *(_QWORD *)(a2 + 8);
v6 = *(const void **)(a2 + 16);
v11 = a5;
v12 = a4;
v13 = a3.i32[0];
sub_100006B70(&v9, v6, v5, *(double *)a3.i64);
a3 = (__m128)v13;
a4 = v12;
a5 = v11;
}
else
{
__p = *(void **)(a2 + 16);
v9 = *(_OWORD *)a2;
}
result = FMODAudioEngine::playEffectAdvanced(a1, &v9, 0, 0, 0, 0, a3, a4, a5, 0.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
if ( (v9 & 1) != 0 )
{
v8 = result;
operator delete(__p);
return v8;
}
return result;
}