mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
Minor fixes
This commit is contained in:
parent
434deecee4
commit
b4c9d78eb4
3 changed files with 17 additions and 15 deletions
|
@ -7,9 +7,11 @@ MxResult Lego3DWavePresenter::AddToManager()
|
|||
{
|
||||
MxResult result = MxWavePresenter::AddToManager();
|
||||
MxWavePresenter::Init();
|
||||
|
||||
if (MxOmni::IsSound3D()) {
|
||||
m_is3d = TRUE;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -30,6 +32,7 @@ void Lego3DWavePresenter::StartingTickle()
|
|||
if (MxOmni::IsSound3D()) {
|
||||
m_is3d = TRUE;
|
||||
}
|
||||
|
||||
MxWavePresenter::StartingTickle();
|
||||
|
||||
// TODO
|
||||
|
|
|
@ -17,7 +17,7 @@ LegoSoundManager::~LegoSoundManager()
|
|||
// FUNCTION: LEGO1 0x100299a0
|
||||
void LegoSoundManager::Init()
|
||||
{
|
||||
m_unk0x40 = 0;
|
||||
m_unk0x40 = NULL;
|
||||
m_listener = NULL;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ MxResult LegoSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
|||
locked = TRUE;
|
||||
|
||||
if (MxOmni::IsSound3D()) {
|
||||
if (m_dsBuffer->QueryInterface(IID_IDirectSound3DListener, (LPVOID*) &m_listener) != S_OK) {
|
||||
if (m_dsBuffer->QueryInterface(IID_IDirectSound3DListener, (LPVOID*) &m_listener) != DS_OK) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ void LegoSoundManager::Destroy()
|
|||
// FUNCTION: LEGO1 0x1002a3a0
|
||||
MxResult LegoSoundManager::Tickle()
|
||||
{
|
||||
MxMediaManager::Tickle();
|
||||
MxSoundManager::Tickle();
|
||||
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
return m_unk0x40->Tickle();
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "mxpresenter.h"
|
||||
#include "mxstreamer.h"
|
||||
#include "mxticklemanager.h"
|
||||
#include "mxutil.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxBackgroundAudioManager, 0x150)
|
||||
|
||||
|
@ -161,26 +162,24 @@ void MxBackgroundAudioManager::FUN_1007ef40()
|
|||
// FUNCTION: LEGO1 0x1007f0e0
|
||||
void MxBackgroundAudioManager::FadeInOrFadeOut()
|
||||
{
|
||||
// This function probably is the fade in/out routine
|
||||
MxS32 volume, compare;
|
||||
|
||||
if (m_unk0xa0 != NULL) {
|
||||
undefined4 volume = m_unk0xa0->GetVolume();
|
||||
MxU32 compare = 30;
|
||||
if (m_unk0x148 == 0) {
|
||||
volume = m_unk0xa0->GetVolume();
|
||||
|
||||
if (m_unk0x148 != 0) {
|
||||
compare = 30;
|
||||
}
|
||||
else {
|
||||
compare = m_targetVolume;
|
||||
}
|
||||
|
||||
if (volume < compare) {
|
||||
volume = m_unk0x140 + volume;
|
||||
if (compare <= volume) {
|
||||
volume = compare;
|
||||
}
|
||||
volume = Min(volume + m_unk0x140, compare);
|
||||
m_unk0xa0->SetVolume(volume);
|
||||
}
|
||||
else if (compare < volume) {
|
||||
volume = volume - m_unk0x140;
|
||||
if (volume <= compare) {
|
||||
volume = compare;
|
||||
}
|
||||
volume = Max(volume - m_unk0x140, compare);
|
||||
m_unk0xa0->SetVolume(volume);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue