mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Implement/match LegoAnimMMPresenter::FUN_1004b450 (#827)
This commit is contained in:

committed by
GitHub

parent
c617139d5b
commit
91d043a9ae
@@ -21,7 +21,7 @@ public:
|
||||
e_starting,
|
||||
e_streaming,
|
||||
e_repeating,
|
||||
e_unk5,
|
||||
e_freezing,
|
||||
e_done,
|
||||
};
|
||||
|
||||
@@ -62,10 +62,10 @@ public:
|
||||
virtual void StreamingTickle() { ProgressTickleState(e_repeating); } // vtable+0x20
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bea0
|
||||
virtual void RepeatingTickle() { ProgressTickleState(e_unk5); } // vtable+0x24
|
||||
virtual void RepeatingTickle() { ProgressTickleState(e_freezing); } // vtable+0x24
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bec0
|
||||
virtual void Unk5Tickle() { ProgressTickleState(e_done); } // vtable+0x28
|
||||
virtual void FreezingTickle() { ProgressTickleState(e_done); } // vtable+0x28
|
||||
|
||||
protected:
|
||||
// FUNCTION: LEGO1 0x1000bee0
|
||||
|
@@ -32,7 +32,7 @@ public:
|
||||
void StartingTickle() override; // vtable+0x1c
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
void RepeatingTickle() override; // vtable+0x24
|
||||
void Unk5Tickle() override; // vtable+0x28
|
||||
void FreezingTickle() override; // vtable+0x28
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c7a0
|
||||
|
@@ -216,12 +216,12 @@ void MxMediaPresenter::RepeatingTickle()
|
||||
if (m_currentChunk) {
|
||||
MxLong time = m_currentChunk->GetTime();
|
||||
if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount()) {
|
||||
ProgressTickleState(e_unk5);
|
||||
ProgressTickleState(e_freezing);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration()) {
|
||||
ProgressTickleState(e_unk5);
|
||||
ProgressTickleState(e_freezing);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -156,11 +156,11 @@ MxResult MxPresenter::Tickle()
|
||||
case e_repeating:
|
||||
this->RepeatingTickle();
|
||||
|
||||
if (m_currentTickleState != e_unk5) {
|
||||
if (m_currentTickleState != e_freezing) {
|
||||
break;
|
||||
}
|
||||
case e_unk5:
|
||||
this->Unk5Tickle();
|
||||
case e_freezing:
|
||||
this->FreezingTickle();
|
||||
|
||||
if (m_currentTickleState != e_done) {
|
||||
break;
|
||||
|
@@ -57,7 +57,7 @@ void MxLoopingFlcPresenter::NextFrame()
|
||||
void MxLoopingFlcPresenter::VTable0x88()
|
||||
{
|
||||
if (m_action->GetDuration() < m_elapsedDuration) {
|
||||
ProgressTickleState(e_unk5);
|
||||
ProgressTickleState(e_freezing);
|
||||
}
|
||||
else {
|
||||
MxStreamChunk* chunk;
|
||||
|
@@ -68,7 +68,7 @@ void MxLoopingSmkPresenter::NextFrame()
|
||||
void MxLoopingSmkPresenter::VTable0x8c()
|
||||
{
|
||||
if (m_action->GetDuration() < m_elapsedDuration) {
|
||||
ProgressTickleState(e_unk5);
|
||||
ProgressTickleState(e_freezing);
|
||||
}
|
||||
else {
|
||||
MxStreamChunk* chunk;
|
||||
|
@@ -143,7 +143,7 @@ void MxStillPresenter::RepeatingTickle()
|
||||
{
|
||||
if (m_action->GetDuration() != -1) {
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration()) {
|
||||
ProgressTickleState(e_unk5);
|
||||
ProgressTickleState(e_freezing);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -506,7 +506,7 @@ void MxVideoPresenter::RepeatingTickle()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b3130
|
||||
void MxVideoPresenter::Unk5Tickle()
|
||||
void MxVideoPresenter::FreezingTickle()
|
||||
{
|
||||
MxLong sustainTime = ((MxDSMediaAction*) m_action)->GetSustainTime();
|
||||
|
||||
@@ -564,7 +564,7 @@ MxResult MxVideoPresenter::PutData()
|
||||
{
|
||||
AUTOLOCK(m_criticalSection);
|
||||
|
||||
if (IsEnabled() && m_currentTickleState >= e_streaming && m_currentTickleState <= e_unk5) {
|
||||
if (IsEnabled() && m_currentTickleState >= e_streaming && m_currentTickleState <= e_freezing) {
|
||||
PutFrame();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user