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 " OpenSHC/Audio/mss/SoundSystem.func.hpp"
2+
3+ #include " OpenSHC/Globals/DAT_SoundEffectsHelperData1.hpp"
4+
5+ namespace OpenSHC {
6+ namespace Audio {
7+ namespace MSS {
8+
9+ // TODO: Remove, only test
10+ // GLOBAL: STRONGHOLDCRUSADER 0x00df3828
11+ int test;
12+
13+ // FUNCTION: STRONGHOLDCRUSADER 0x00479C80
14+ void SoundSystem::findSamplePlaceForSoundUnk (int soundIndex)
15+ {
16+ if (this ->soundFileCurrSampleNum_0x28c [soundIndex] >= 0 ) {
17+ return ;
18+ }
19+
20+ test = 0 ; // DAT_SoundEffectsHelperData1::ptr->DAT_NumberOfUsedSoundSamplePlaces = 0;
21+
22+ for (int i = 1 ; i < 32 ; ++i) {
23+ if (this ->sampleSoundIndex_0x20c [i]) {
24+ ++test; // ++DAT_SoundEffectsHelperData1::ptr->DAT_NumberOfUsedSoundSamplePlaces;
25+ }
26+ }
27+
28+ for (int i = 1 ; i < 32 ; ++i) {
29+ if (this ->sampleSoundIndex_0x20c [i]) {
30+ continue ;
31+ }
32+ this ->sampleSoundIndex_0x20c [i] = soundIndex;
33+ this ->soundFileCurrSampleNum_0x28c [soundIndex] = i;
34+ return ;
35+ }
36+ }
37+
38+ }
39+ }
40+ }
You can’t perform that action at this time.
0 commit comments