diff --git a/src/OpenSHC/Audio/SoundEffectsHelperData1.hpp b/src/OpenSHC/Audio/SoundEffectsHelperData1.hpp index ee6a431..1eb5e7c 100644 --- a/src/OpenSHC/Audio/SoundEffectsHelperData1.hpp +++ b/src/OpenSHC/Audio/SoundEffectsHelperData1.hpp @@ -41,7 +41,7 @@ namespace Audio { BOOLEnum field14_0x54; // 0x00000054 length: 4 BOOLEnum field15_0x58; // 0x00000058 length: 4 undefined4 field16_0x5c; // 0x0000005C length: 4 - undefined4 DAT_WinMusicVariation; // 0x00000060 length: 4 + int DAT_WinMusicVariation; // 0x00000060 length: 4 undefined4 field18_0x64; // 0x00000064 length: 4 undefined4 DAT_LossMusicVariation; // 0x00000068 length: 4 DWORD DAT_enemyInsideCastleSoundWarningCooldownTimer; // 0x0000006C length: 4 diff --git a/src/OpenSHC/Audio/mss/SoundSystem/playWinMusicVariation.cpp b/src/OpenSHC/Audio/mss/SoundSystem/playWinMusicVariation.cpp new file mode 100644 index 0000000..cbe5a01 --- /dev/null +++ b/src/OpenSHC/Audio/mss/SoundSystem/playWinMusicVariation.cpp @@ -0,0 +1,22 @@ +#include "../SoundSystem.func.hpp" + +#include "OpenSHC/Globals/DAT_SoundEffectsHelperData1.hpp" + +namespace OpenSHC { +namespace Audio { + namespace MSS { + + // FUNCTION: STRONGHOLDCRUSADER 0x0047A630 + void SoundSystem::playWinMusicVariation() + { + MACRO_CALL_MEMBER(SoundSystem_Func::setupVolumeAndSoundIDWithMultiplier, this)( + DAT_SoundEffectsHelperData1::ptr->DAT_WinMusicVariation + DE::SHCDE::MUSIC_TUNE_WIN1, 100); + ++DAT_SoundEffectsHelperData1::ptr->DAT_WinMusicVariation; + if (DAT_SoundEffectsHelperData1::ptr->DAT_WinMusicVariation > 2) { + DAT_SoundEffectsHelperData1::ptr->DAT_WinMusicVariation = 0; + } + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index 5bf99ba..18a7646 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -10909,7 +10909,7 @@ SHC_3BB0A8C1_0x0047A564 | 0.0% | Pending SHC_3BB0A8C1_0x0047A570 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047A580 | 0.0% | Pending SHC_3BB0A8C1_0x0047A5E0 | 100.0% | Pending -SHC_3BB0A8C1_0x0047A630 | 0.0% | Pending +SHC_3BB0A8C1_0x0047A630 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047A660 | 0.0% | Pending SHC_3BB0A8C1_0x0047A690 | 0.0% | Pending SHC_3BB0A8C1_0x0047A790 | 0.0% | Pending