mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 09:24:17 +00:00
Further clean up Omni/LegoOmni separation (#423)
* Fix inline functions * Whitespace * Try this * Fix MxEntity * Further fixes * Move main out * Replace tickle code
This commit is contained in:
committed by
GitHub
parent
75f7791d6f
commit
516e16faf6
@@ -5,12 +5,6 @@ DECOMP_SIZE_ASSERT(MxAudioManager, 0x30);
|
||||
// GLOBAL: LEGO1 0x10102108
|
||||
MxS32 MxAudioManager::g_count = 0;
|
||||
|
||||
// FUNCTION: LEGO1 0x10029910
|
||||
MxS32 MxAudioManager::GetVolume()
|
||||
{
|
||||
return this->m_volume;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b8d00
|
||||
MxAudioManager::MxAudioManager()
|
||||
{
|
||||
|
||||
@@ -3,15 +3,3 @@
|
||||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxAudioPresenter, 0x54);
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d260
|
||||
MxS32 MxAudioPresenter::GetVolume()
|
||||
{
|
||||
return m_volume;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d270
|
||||
void MxAudioPresenter::SetVolume(MxS32 p_volume)
|
||||
{
|
||||
m_volume = p_volume;
|
||||
}
|
||||
|
||||
@@ -20,10 +20,8 @@ void MxLoopingMIDIPresenter::StreamingTickle()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
}
|
||||
if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime())
|
||||
ProgressTickleState(TickleState_Done);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2ae0
|
||||
|
||||
@@ -52,8 +52,7 @@ void MxMIDIPresenter::ReadyTickle()
|
||||
if (chunk) {
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,19 +61,15 @@ void MxMIDIPresenter::StartingTickle()
|
||||
{
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Streaming;
|
||||
}
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime())
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2910
|
||||
void MxMIDIPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_chunk) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
}
|
||||
if (m_chunk)
|
||||
ProgressTickleState(TickleState_Done);
|
||||
else
|
||||
m_chunk = NextChunk();
|
||||
}
|
||||
|
||||
@@ -5,18 +5,6 @@
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxSoundPresenter, 0x54)
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d430
|
||||
MxSoundPresenter::~MxSoundPresenter()
|
||||
{
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d490
|
||||
void MxSoundPresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b1a50
|
||||
void MxSoundPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
|
||||
@@ -11,24 +11,6 @@
|
||||
DECOMP_SIZE_ASSERT(MxWavePresenter, 0x6c);
|
||||
DECOMP_SIZE_ASSERT(MxWavePresenter::WaveFormat, 0x1c);
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d640
|
||||
MxWavePresenter::~MxWavePresenter()
|
||||
{
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d6a0
|
||||
void MxWavePresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d6b0
|
||||
MxBool MxWavePresenter::IsPaused()
|
||||
{
|
||||
return m_paused;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b1ad0
|
||||
void MxWavePresenter::Init()
|
||||
{
|
||||
@@ -136,8 +118,7 @@ void MxWavePresenter::ReadyTickle()
|
||||
memcpy(m_waveFormat, chunk->GetData(), chunk->GetLength());
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,8 +169,7 @@ void MxWavePresenter::StartingTickle()
|
||||
}
|
||||
else {
|
||||
SetVolume(((MxDSSound*) m_action)->GetVolume());
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Streaming;
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user