Skip to content

Commit a6b6e39

Browse files
committed
reimplement: SHC_3BB0A8C1_0x00479F30 100%
1 parent 70abbb3 commit a6b6e39

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
int* piVar1 = this->sampleSoundIndex_0x20c + 1;
23+
unsigned int iVar3 = 32;
24+
do {
25+
AIL_end_sample((HSAMPLE)piVar1[-0x20]);
26+
*piVar1 = 0;
27+
piVar1 = piVar1 + 1;
28+
iVar3 = iVar3 + -1;
29+
} while (iVar3 != 1);
30+
31+
for (int i = 1; i < this->loadedSoundsCountAndIndex_0x316c; ++i) {
32+
this->soundFileCurrSampleNum_0x28c[i] = -1;
33+
}
34+
this->soundActiveUnk_0x0 = 0;
35+
}
36+
37+
}
38+
}
39+
}

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)