mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 17:34:05 +00:00
Implement/match LegoActor::Mute (#992)
This commit is contained in:
committed by
GitHub
parent
4898a55508
commit
0c7c77aad3
@@ -29,7 +29,7 @@ void LegoCacheSound::Init()
|
||||
m_unk0x70 = FALSE;
|
||||
m_looping = TRUE;
|
||||
m_volume = 79;
|
||||
m_unk0x84 = 0;
|
||||
m_muted = FALSE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10006710
|
||||
@@ -226,7 +226,7 @@ void LegoCacheSound::FUN_10006be0()
|
||||
}
|
||||
}
|
||||
|
||||
if (m_unk0x74.GetLength() != 0 && !m_unk0x84) {
|
||||
if (m_unk0x74.GetLength() != 0 && !m_muted) {
|
||||
if (!m_sound.UpdatePosition(m_dsBuffer)) {
|
||||
if (m_unk0x6a) {
|
||||
return;
|
||||
@@ -253,6 +253,22 @@ void LegoCacheSound::FUN_10006cd0(undefined4, undefined4)
|
||||
{
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10006d40
|
||||
// FUNCTION: BETA10 0x10066ec8
|
||||
void LegoCacheSound::Mute(MxBool p_muted)
|
||||
{
|
||||
if (m_muted != p_muted) {
|
||||
m_muted = p_muted;
|
||||
|
||||
if (m_muted) {
|
||||
m_dsBuffer->Stop();
|
||||
}
|
||||
else {
|
||||
m_dsBuffer->Play(0, 0, m_looping);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10006d80
|
||||
// FUNCTION: BETA10 0x100670e7
|
||||
MxString LegoCacheSound::FUN_10006d80(const MxString& p_str)
|
||||
|
||||
Reference in New Issue
Block a user