Skip to content

Commit 173a7cf

Browse files
committed
[EXPERIMENTAL/MSS] clean sound functions and test effects
1 parent adabcb9 commit 173a7cf

6 files changed

Lines changed: 9 additions & 29 deletions

File tree

src/OpenSHC/Audio/mss/SoundSystem.func.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ namespace Audio {
2222
meth_0x424700;
2323

2424
MACRO_FUNCTION_RESOLVER(
25-
void (SoundSystem::*)(), true, Address::SHC_3BB0A8C1_0x00467810, &SoundSystem::stopMusicPlayback)
25+
void (SoundSystem::*)(), false, Address::SHC_3BB0A8C1_0x00467810, &SoundSystem::stopMusicPlayback)
2626
stopMusicPlayback;
2727

2828
MACRO_FUNCTION_RESOLVER(
2929
void (SoundSystem::*)(), false, Address::SHC_3BB0A8C1_0x00467830, &SoundSystem::endSoundStreamsUnk)
3030
endSoundStreamsUnk;
3131

32-
MACRO_FUNCTION_RESOLVER(void (SoundSystem::*)(SHC_SoundStreamInt), true, Address::SHC_3BB0A8C1_0x004799A0,
32+
MACRO_FUNCTION_RESOLVER(void (SoundSystem::*)(SHC_SoundStreamInt), false, Address::SHC_3BB0A8C1_0x004799A0,
3333
&SoundSystem::endSoundStream)
3434
endSoundStream;
3535

src/OpenSHC/Audio/mss/SoundSystem/endSoundStream.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55

66
#include "OpenSHC/OS.func.hpp"
77

8-
#include "OpenSHC/Globals/DAT_00df3844.hpp"
8+
#include "OpenSHC/Globals/DAT_SoundEffectsHelperData1.hpp"
99

10-
// - DAT_00df3844 did not exist before and is therefore wrongly sorted into the status file
11-
// - "UnkSoundFlagsAndLoopCount" plays not nice with any number-like operation, the more likely thing therefore are
12-
// either a union, which allows to access the different parts separately, but this would likely compile to WORD
13-
// operations, or a bitfield, maybe like this:
10+
// NOTE:
11+
// "UnkSoundFlagsAndLoopCount" might be a bitfield, maybe like this:
1412
// int loopCount : 16;
1513
// int reserved : 13;
1614
// int unknownFlag1 : 1;
@@ -32,7 +30,7 @@ namespace Audio {
3230

3331
if (sndStreamIndex == enums::SND_STR_MUSIC) {
3432
this->streamActiveUnk_0x20[0] = 0;
35-
*DAT_00df3844::ptr = 1;
33+
DAT_SoundEffectsHelperData1::ptr->field14_0x54 = true;
3634
if (this->musicSampleFileHandleUnk_0x174 != -1) {
3735
AIL_end_sample(this->musicSampleUnk_0x170);
3836
MACRO_CALL(OS_Func::_ucrt_close)(this->musicSampleFileHandleUnk_0x174);
@@ -43,7 +41,7 @@ namespace Audio {
4341
this->musicFileHandle_0x178 = -1;
4442
this->musicSampleFileHandleUnk_0x174 = -1;
4543
this->mbr_0x188 = 1;
46-
*DAT_00df3844::ptr = 0;
44+
DAT_SoundEffectsHelperData1::ptr->field14_0x54 = false;
4745
this->sec_Section1055_0x3274 = 0;
4846
return;
4947
}

src/OpenSHC/Globals/DAT_00df3844.hpp

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/OpenSHC/OS.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ namespace OS {
2626

2727
BOOLEnum __cdecl isEqualGUID(GUID* param_1, GUID* param_2);
2828

29-
int __cdecl __isnan(double _X);
30-
3129
tm* __cdecl _localtime(time_t* _Time);
3230

3331
__time64_t __cdecl __time64(__time64_t* _Time);

src/precomp/addresses-SHC-3BB0A8C1.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98109,7 +98109,6 @@ enum {
9810998109
// location:
9811098110
// type: /byte[1708]
9811198111
SHC_3BB0A8C1_0x02490954 = 0x02490954,
98112-
// type: /undefined4
98113-
SHC_3BB0A8C1_0x00df3844 = 0x00df3844,
98112+
9811498113
};
9811598114
}

status/addresses-SHC-3BB0A8C1.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10880,7 +10880,7 @@ SHC_3BB0A8C1_0x00479369 | 0.0% | Pending
1088010880
SHC_3BB0A8C1_0x00479400 | 0.0% | Pending
1088110881
SHC_3BB0A8C1_0x00479540 | 0.0% | Pending
1088210882
SHC_3BB0A8C1_0x00479790 | 0.0% | Pending
10883-
SHC_3BB0A8C1_0x004799A0 | 96.36% | "_close" is seen as unknown offset call by reccmp
10883+
SHC_3BB0A8C1_0x004799A0 | 100.00% | Reimplemented
1088410884
SHC_3BB0A8C1_0x00479A60 | 0.0% | Pending
1088510885
SHC_3BB0A8C1_0x00479AB0 | 0.0% | Pending
1088610886
SHC_3BB0A8C1_0x00479AF0 | 0.0% | Pending
@@ -42943,4 +42943,3 @@ SHC_3BB0A8C1_0x02490916 | 0.0% | Pending
4294342943
SHC_3BB0A8C1_0x02490930 | 0.0% | Pending
4294442944
SHC_3BB0A8C1_0x02490936 | 0.0% | Pending
4294542945
SHC_3BB0A8C1_0x02490954 | 0.0% | Pending
42946-
SHC_3BB0A8C1_0x00df3844 | 0.0% | Pending

0 commit comments

Comments
 (0)