From 742d5f24cc1113144435c5ab526a99614963b3ae Mon Sep 17 00:00:00 2001 From: TheRedDaemon <66257843+TheRedDaemon@users.noreply.github.com> Date: Wed, 20 May 2026 21:46:40 +0200 Subject: [PATCH] reimplement: SHC_3BB0A8C1_0x00479DF0 100% --- .../Audio/mss/SoundSystem/playSound.cpp | 25 +++++++++++++++++++ status/addresses-SHC-3BB0A8C1.txt | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/OpenSHC/Audio/mss/SoundSystem/playSound.cpp diff --git a/src/OpenSHC/Audio/mss/SoundSystem/playSound.cpp b/src/OpenSHC/Audio/mss/SoundSystem/playSound.cpp new file mode 100644 index 0000000..6647e51 --- /dev/null +++ b/src/OpenSHC/Audio/mss/SoundSystem/playSound.cpp @@ -0,0 +1,25 @@ +#include "OpenSHC/Audio/MSS/SoundSystem.func.hpp" + +#include "OpenSHC/string-literals.hpp" + +namespace OpenSHC { +namespace Audio { + namespace MSS { + + // FUNCTION: STRONGHOLDCRUSADER 0x00479DF0 + void SoundSystem::playSound(int soundIndex) + { + if (!this->waveOutOpenUnk_0x8 || !this->soundActiveUnk_0x0 + || this->soundFileCurrSampleNum_0x28c[soundIndex] < 0) { + return; + } + + AIL_set_named_sample_file(this->sample_0x190[this->soundFileCurrSampleNum_0x28c[soundIndex] + -1], + s__wav_005a6cc4, this->soundFileDataPointerArray_0x122c[soundIndex], + this->soundFileSizes_0x21cc[soundIndex], 0); + AIL_start_sample(this->sample_0x190[this->soundFileCurrSampleNum_0x28c[soundIndex] + -1]); + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index 4e9089a..578d38b 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -10889,7 +10889,7 @@ SHC_3BB0A8C1_0x00479C20 | 0.0% | Pending SHC_3BB0A8C1_0x00479C80 | 0.0% | Pending SHC_3BB0A8C1_0x00479CF0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00479D90 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x00479DF0 | 0.0% | Pending +SHC_3BB0A8C1_0x00479DF0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00479E60 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00479F30 | 0.0% | Pending SHC_3BB0A8C1_0x00479FC0 | 0.0% | Pending