push changes (#522)

This commit is contained in:
Misha 2024-02-03 07:38:57 -05:00 committed by GitHub
parent 2158142b08
commit 83e116defc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 33 additions and 15 deletions

View file

@ -1,26 +1,43 @@
#include "lego3dwavepresenter.h"
// STUB: LEGO1 0x1004a7c0
#include "mxomni.h"
// FUNCTION: LEGO1 0x1004a7c0
MxResult Lego3DWavePresenter::AddToManager()
{
// TODO
return SUCCESS;
MxResult result = MxWavePresenter::AddToManager();
MxWavePresenter::Init();
if (MxOmni::IsSound3D()) {
m_is3d = TRUE;
}
return result;
}
// STUB: LEGO1 0x1004a7f0
// FUNCTION: LEGO1 0x1004a7f0
void Lego3DWavePresenter::Destroy()
{
// TODO
MxWavePresenter::Destroy();
MxWavePresenter::Init();
if (MxOmni::IsSound3D()) {
m_is3d = TRUE;
}
}
// STUB: LEGO1 0x1004a810
void Lego3DWavePresenter::StartingTickle()
{
if (MxOmni::IsSound3D()) {
m_is3d = TRUE;
}
MxWavePresenter::StartingTickle();
// TODO
}
// STUB: LEGO1 0x1004a8b0
void Lego3DWavePresenter::StreamingTickle()
{
MxWavePresenter::StreamingTickle();
// TODO
}

View file

@ -38,11 +38,10 @@ void LegoHideAnimPresenter::Destroy(MxBool p_fromDestructor)
}
}
// STUB: LEGO1 0x1006dab0
// FUNCTION: LEGO1 0x1006dab0
MxResult LegoHideAnimPresenter::AddToManager()
{
// TODO
return SUCCESS;
return LegoAnimPresenter::AddToManager();
}
// FUNCTION: LEGO1 0x1006dac0

View file

@ -1,5 +1,8 @@
#include "legopartpresenter.h"
#include "legoomni.h"
#include "legovideomanager.h"
// GLOBAL: LEGO1 0x100f7aa0
int g_partPresenterConfig1 = 1;
@ -19,10 +22,10 @@ void LegoPartPresenter::configureLegoPartPresenter(MxS32 p_partPresenterConfig1,
g_partPresenterConfig2 = p_partPresenterConfig2;
}
// STUB: LEGO1 0x1007c9b0
// FUNCTION: LEGO1 0x1007c9b0
MxResult LegoPartPresenter::AddToManager()
{
// TODO
VideoManager()->RegisterPresenter(*this);
return SUCCESS;
}

View file

@ -60,10 +60,9 @@ class MxWavePresenter : public MxSoundPresenter {
// MxWavePresenter::`scalar deleting destructor'
protected:
void Init();
void Destroy(MxBool p_fromDestructor);
private:
void Init();
MxS8 GetPlayedChunks();
MxBool FUN_100b1ba0();
void WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length);
@ -74,7 +73,7 @@ class MxWavePresenter : public MxSoundPresenter {
MxU32 m_lockSize; // 0x60
MxU8 m_writtenChunks; // 0x64
MxBool m_started; // 0x65
MxBool m_unk0x66; // 0x66
MxBool m_is3d; // 0x66
MxS8 m_silenceData; // 0x67
MxBool m_paused; // 0x68
};

View file

@ -20,7 +20,7 @@ void MxWavePresenter::Init()
m_lockSize = 0;
m_writtenChunks = 0;
m_started = FALSE;
m_unk0x66 = FALSE;
m_is3d = FALSE;
m_paused = FALSE;
}
@ -156,7 +156,7 @@ void MxWavePresenter::StartingTickle()
memset(&desc, 0, sizeof(desc));
desc.dwSize = sizeof(desc);
if (m_unk0x66) {
if (m_is3d) {
desc.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRL3D | DSBCAPS_CTRLVOLUME;
}
else {