mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +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
@@ -11,18 +11,6 @@ DECOMP_SIZE_ASSERT(MxMediaPresenter, 0x50);
|
||||
DECOMP_SIZE_ASSERT(MxStreamChunkList, 0x18);
|
||||
DECOMP_SIZE_ASSERT(MxStreamChunkListCursor, 0x10);
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c550
|
||||
MxMediaPresenter::~MxMediaPresenter()
|
||||
{
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c5b0
|
||||
void MxMediaPresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b54e0
|
||||
void MxMediaPresenter::Init()
|
||||
{
|
||||
@@ -77,8 +65,7 @@ MxStreamChunk* MxMediaPresenter::CurrentChunk()
|
||||
m_subscriber->NextChunk();
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
ProgressTickleState(TickleState_Done);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,8 +84,7 @@ MxStreamChunk* MxMediaPresenter::NextChunk()
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Bit7);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
ProgressTickleState(TickleState_Done);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,8 +181,7 @@ void MxMediaPresenter::StreamingTickle()
|
||||
if (m_currentChunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Repeating;
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
}
|
||||
else if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
LoopChunk(m_currentChunk);
|
||||
@@ -220,16 +205,12 @@ void MxMediaPresenter::RepeatingTickle()
|
||||
|
||||
if (m_currentChunk) {
|
||||
MxLong time = m_currentChunk->GetTime();
|
||||
if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_unk5;
|
||||
}
|
||||
if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount())
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
}
|
||||
else {
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_unk5;
|
||||
}
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration())
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user