Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/OpenSHC/Audio/mss/SndSystemTimeCallback.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include "../mss.func.hpp"

#include "OpenSHC/Audio/MSS/SoundSystem.func.hpp"

#include "OpenSHC/Globals/DAT_SoundEffectsHelperData1.hpp"
#include "OpenSHC/Globals/DAT_SoundSystemState.hpp"

namespace OpenSHC {
namespace Audio {
namespace MSS {

// FUNCTION: STRONGHOLDCRUSADER 0x0047B510
void __stdcall SndSystemTimeCallback(UINT uTimerID, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2)
{
if (DAT_SoundEffectsHelperData1::instance.field14_0x54 || DAT_SoundEffectsHelperData1::instance.field15_0x58
|| !DAT_SoundSystemState::instance.waveOutOpenUnk_0x8) {
return;
}
DAT_SoundEffectsHelperData1::instance.field15_0x58 = TRUE;
if (!DAT_SoundSystemState::instance.streamPaused_0x15c[0]
&& DAT_SoundSystemState::instance.streamActiveUnk_0x20[0]) {
if (AIL_sample_status(DAT_SoundSystemState::instance.musicSampleUnk_0x170) != SMP_PLAYING) {
MACRO_CALL_MEMBER(SoundSystem_Func::stopMusicPlayback, DAT_SoundSystemState::ptr)();
} else {
MACRO_CALL_MEMBER(SoundSystem_Func::playMusicUnk, DAT_SoundSystemState::ptr)();
}
}
DAT_SoundEffectsHelperData1::instance.field15_0x58 = FALSE;
}

}
}
}
2 changes: 1 addition & 1 deletion status/addresses-SHC-3BB0A8C1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10926,7 +10926,7 @@ SHC_3BB0A8C1_0x0047B250 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x0047B2F0 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x0047B3C0 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x0047B490 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x0047B510 | 0.0% | Pending
SHC_3BB0A8C1_0x0047B510 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x0047B590 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x0047B5C0 | 100.0% | Reimplemented
SHC_3BB0A8C1_0x0047B5F0 | 100.0% | Reimplemented
Expand Down