//
// GameManager::fadeInMenuMusic from 0x100360680 to 0x100360737 (183 bytes)
//
// 30 xrefs:
// > PlayLayer::onQuit @ 0x100080538
// > LevelAreaLayer::onBack @ 0x100264ce6
// > LevelAreaLayer::keyBackClicked @ 0x1002660a6
// > sub_1002660F0 @ 0x100266121
// > GJShopLayer::onBack @ 0x1003101b9
// > GameManager::returnToLastScene @ 0x100376c57
// > MenuLayer::init @ 0x10037ad3f
// > LoadingLayer::loadAssets @ 0x10038c82d
// > SecretLayer4::onBack @ 0x10039b4c2
// > SecretLayer4::keyBackClicked @ 0x10039e482
// > sub_10039E4C0 @ 0x10039e4fa
// > SecretLayer6::onBack @ 0x1004739b9
// > SecretLayer6::keyBackClicked @ 0x100474159
// > sub_100474190 @ 0x1004741b4
// > SecretLayer2::onBack @ 0x1004973c2
// > SecretLayer2::keyBackClicked @ 0x10049c072
// > sub_10049C0B0 @ 0x10049c0ea
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x1005a131d
// > GameSettingsLayer::dropDownLayerWillClose @ 0x10060346d
// > sub_100603480 @ 0x1006034ad
// > SecretLayer::onBack @ 0x1006d2721
// > SecretLayer::keyBackClicked @ 0x1006d5631
// > sub_1006D5670 @ 0x1006d56aa
// > SongInfoLayer::onMenuMusic @ 0x1006d956e
// > SecretRewardsLayer::onBack @ 0x10070ed3a
// > SecretRewardsLayer::keyBackClicked @ 0x100716faa
// > sub_100716FF0 @ 0x10071700e
// > OptionsLayer::onMenuMusic @ 0x10087be78
// > MoreOptionsLayer::dropDownLayerWillClose @ 0x10087fcad
// > sub_10087FCC0 @ 0x10087fccd
//
// 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:28:56 +0000
//
void __fastcall GameManager::fadeInMenuMusic(__int64 a1, double a2)
{
__int64 v2; // rax
void *v3; // r14
_BYTE v4[16]; // [rsp+8h] [rbp-28h] BYREF
void *__p; // [rsp+18h] [rbp-18h]
if ( qword_100BE3098 )
{
if ( (unsigned __int8)GameManager::getGameVariable(qword_100BE3098, "0122") )
{
LABEL_3:
v2 = FMODAudioEngine::sharedEngine(a2);
FMODAudioEngine::stopAllMusic(v2, 1);
return;
}
}
else
{
v3 = operator new(0x6B8u);
sub_100377960(v3);
qword_100BE3098 = (__int64)v3;
(*(void (__fastcall **)(void *))(*(_QWORD *)v3 + 80LL))(v3);
if ( (unsigned __int8)GameManager::getGameVariable(qword_100BE3098, "0122") )
goto LABEL_3;
}
GameManager::getMenuMusicFile((__int64)v4, a1, a2);
GameManager::fadeInMusic(v4, v4, a2);
if ( (v4[0] & 1) != 0 )
operator delete(__p);
}