Skip to content

Commit 69beb39

Browse files
authored
Merge pull request #82 from sourcehold/reimpl/SHC_3BB0A8C1_0x00479F30
reimplement: SHC_3BB0A8C1_0x00479F30 100%
2 parents d8a0c7d + fd41d7b commit 69beb39

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#include "OpenSHC/Audio/MSS/SoundSystem.func.hpp"
2+
3+
#include <iostream>
4+
5+
namespace OpenSHC {
6+
namespace Audio {
7+
namespace MSS {
8+
9+
// FUNCTION: STRONGHOLDCRUSADER 0x00479F30
10+
void SoundSystem::deactivateSoundFromMenuFuncUnk()
11+
{
12+
if (!this->waveOutOpenUnk_0x8) {
13+
return;
14+
}
15+
16+
for (int i = 0; i < 5; ++i) {
17+
unsigned int const copy = *((unsigned int*)&this->streamFlagsUnkAndLoopCount_0x34[i]) & 0x7fffffff;
18+
this->streamFlagsUnkAndLoopCount_0x34[i] = *((UnkSoundFlagsAndLoopCount*)&copy);
19+
MACRO_CALL_MEMBER(SoundSystem_Func::endSoundStream, this)(i);
20+
}
21+
22+
for (int i = 0; i < 31; ++i) {
23+
AIL_end_sample(this->sample_0x190[i]);
24+
this->sampleSoundIndex_0x20c[i + 1] = 0;
25+
}
26+
27+
for (int i = 1; i < this->loadedSoundsCountAndIndex_0x316c; ++i) {
28+
this->soundFileCurrSampleNum_0x28c[i] = -1;
29+
}
30+
this->soundActiveUnk_0x0 = 0;
31+
}
32+
33+
}
34+
}
35+
}

status/addresses-SHC-3BB0A8C1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10891,7 +10891,7 @@ SHC_3BB0A8C1_0x00479CF0 | 100.0% | Reimplemented
1089110891
SHC_3BB0A8C1_0x00479D90 | 100.0% | Reimplemented
1089210892
SHC_3BB0A8C1_0x00479DF0 | 0.0% | Pending
1089310893
SHC_3BB0A8C1_0x00479E60 | 100.0% | Reimplemented
10894-
SHC_3BB0A8C1_0x00479F30 | 0.0% | Pending
10894+
SHC_3BB0A8C1_0x00479F30 | 100.0% | Reimplemented
1089510895
SHC_3BB0A8C1_0x00479FC0 | 0.0% | Pending
1089610896
SHC_3BB0A8C1_0x0047A080 | 0.0% | Pending
1089710897
SHC_3BB0A8C1_0x0047A130 | 0.0% | Pending

0 commit comments

Comments
 (0)