File tree Expand file tree Collapse file tree
src/OpenSHC/Audio/mss/SoundSystem Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #include " ../SoundSystem.func.hpp"
2+
3+ #include " OpenSHC/Audio/SFX/SFXState.func.hpp"
4+ #include " OpenSHC/DE/SHCDE/eMusicIDs.hpp"
5+
6+ #include " OpenSHC/Globals/DAT_GameCore.hpp"
7+ #include " OpenSHC/Globals/DAT_SFXDefinedData.hpp"
8+ #include " OpenSHC/Globals/DAT_SFXState.hpp"
9+
10+ namespace OpenSHC {
11+ namespace Audio {
12+ namespace MSS {
13+
14+ // FUNCTION: STRONGHOLDCRUSADER 0x0047A1B0
15+ void SoundSystem::setupVolumeAndSoundID (eMusicIDsInt soundID)
16+ {
17+ // NOTE: Is this certain that these ids fit to the original game?
18+ if (soundID == DE ::SHCDE ::MUSIC_TUNE_NARR1 ) {
19+ // missionNumber1to20 might be unsigned, but found signs inconclusive
20+ if (DAT_GameCore::ptr->missionNumber1to20 - 1U <= 19 ) {
21+ soundID = DAT_GameCore::ptr->missionNumber1to20 + 46 ;
22+ } else {
23+ soundID = DE ::SHCDE ::MUSIC_TUNE_OFF ;
24+ }
25+ }
26+
27+ if (soundID == this ->currentSoundID_0x3278 ) {
28+ return ;
29+ }
30+ this ->currentSoundID_0x3278 = soundID;
31+ int const fileVolume = MACRO_CALL_MEMBER (SFX ::SFXState_Func::getSoundVolumeForFilename, DAT_SFXState::ptr)(
32+ DAT_SFXDefinedData::ptr->DAT_SFX_Pointers [soundID].musicFile );
33+ this ->currentSoundIDVolumeUnk_0x327c = (fileVolume * 100 ) / 0x7f ;
34+ this ->mbr_0x3280 = 0 ;
35+ }
36+
37+ }
38+ }
39+ }
Original file line number Diff line number Diff line change @@ -10895,7 +10895,7 @@ SHC_3BB0A8C1_0x00479F30 | 100.0% | Reimplemented
1089510895SHC_3BB0A8C1_0x00479FC0 | 100.0% | Reimplemented
1089610896SHC_3BB0A8C1_0x0047A080 | 0.0% | Pending
1089710897SHC_3BB0A8C1_0x0047A130 | 0.0% | Pending
10898- SHC_3BB0A8C1_0x0047A1B0 | 0 .0% | Pending
10898+ SHC_3BB0A8C1_0x0047A1B0 | 100 .0% | Reimplemented
1089910899SHC_3BB0A8C1_0x0047A220 | 0.0% | Pending
1090010900SHC_3BB0A8C1_0x0047A290 | 0.0% | Pending
1090110901SHC_3BB0A8C1_0x0047A2A0 | 0.0% | Pending
You can’t perform that action at this time.
0 commit comments