From f83e8d77b9e497da2c6412728f852bb32458e678 Mon Sep 17 00:00:00 2001 From: TheRedDaemon <66257843+TheRedDaemon@users.noreply.github.com> Date: Mon, 29 Jun 2026 20:35:20 +0200 Subject: [PATCH] reimplement: SHC_3BB0A8C1_0x0047A080 100% --- .../mss/SoundSystem/resumeAudioSample.cpp | 37 +++++++++++++++++++ status/addresses-SHC-3BB0A8C1.txt | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 src/OpenSHC/Audio/mss/SoundSystem/resumeAudioSample.cpp diff --git a/src/OpenSHC/Audio/mss/SoundSystem/resumeAudioSample.cpp b/src/OpenSHC/Audio/mss/SoundSystem/resumeAudioSample.cpp new file mode 100644 index 0000000..da2f2b5 --- /dev/null +++ b/src/OpenSHC/Audio/mss/SoundSystem/resumeAudioSample.cpp @@ -0,0 +1,37 @@ +#include "../SoundSystem.func.hpp" + +namespace OpenSHC { +namespace Audio { + namespace MSS { + + // FUNCTION: STRONGHOLDCRUSADER 0x0047A080 + void SoundSystem::resumeAudioSample() + { + if (!(this->waveOutOpenUnk_0x8 && this->digSndDriver_0x4)) { + return; + } + + for (int streamIndex = 0; streamIndex < 5; ++streamIndex) { + if (!this->streamPaused_0x15c[streamIndex]) { + continue; + } + this->streamPaused_0x15c[streamIndex] = false; + if (streamIndex == enums::SND_STR_MUSIC) { + AIL_resume_sample(this->musicSampleUnk_0x170); + } else { + AIL_pause_stream(this->stream_0xc[streamIndex], 1); + } + } + + for (int soundIndex = 1; soundIndex < this->loadedSoundsCountAndIndex_0x316c; ++soundIndex) { + if (this->soundFileCurrSampleNum_0x28c[soundIndex] < 0 || !this->samplePaused_0x31f4[soundIndex]) { + continue; + } + this->samplePaused_0x31f4[this->soundFileCurrSampleNum_0x28c[soundIndex]] = false; + AIL_resume_sample(this->sample[this->soundFileCurrSampleNum_0x28c[soundIndex]]); + } + } + + } +} +} diff --git a/status/addresses-SHC-3BB0A8C1.txt b/status/addresses-SHC-3BB0A8C1.txt index ae50397..e0811e6 100644 --- a/status/addresses-SHC-3BB0A8C1.txt +++ b/status/addresses-SHC-3BB0A8C1.txt @@ -10893,7 +10893,7 @@ SHC_3BB0A8C1_0x00479DF0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00479E60 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00479F30 | 100.0% | Reimplemented SHC_3BB0A8C1_0x00479FC0 | 100.0% | Reimplemented -SHC_3BB0A8C1_0x0047A080 | 0.0% | Pending +SHC_3BB0A8C1_0x0047A080 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047A130 | 100.0% | Reimplemented, but requires all used structs to be active SHC_3BB0A8C1_0x0047A1B0 | 100.0% | Reimplemented SHC_3BB0A8C1_0x0047A220 | 100.0% | Reimplemented