isle-portable/LEGO1/omni/src/video/mxloopingflcpresenter.cpp
Misha f50b771fff
begin implementation of InfoCenter class (#444)
* Push changes

* fixes

* Implement Infocenter::HandleEndAction

* match Infocenter::StopCutScene

* implement Infocenter::HandleKeyPress

* fixes

* Update infocenter.cpp

* Update legoworld.cpp

* use enums

* WIP Fixes

* Fix

* Fix

* Fix

* Rename function

* Change enum

* Update enums

* Refactor another enum

* Refactor MxDSType

* Refactor HashTableOpt

* Fixes

* Refactor tickle enum

* Update other enums

* Add EnumConstantName to ncc

* Move enum to global namespace

* Rename enum

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2024-01-17 17:53:53 +01:00

53 lines
978 B
C++

#include "mxloopingflcpresenter.h"
#include "decomp.h"
DECOMP_SIZE_ASSERT(MxLoopingFlcPresenter, 0x6c);
// FUNCTION: LEGO1 0x100b4310
MxLoopingFlcPresenter::MxLoopingFlcPresenter()
{
Init();
}
// FUNCTION: LEGO1 0x100b43b0
MxLoopingFlcPresenter::~MxLoopingFlcPresenter()
{
Destroy(TRUE);
}
// FUNCTION: LEGO1 0x100b4410
void MxLoopingFlcPresenter::Init()
{
this->m_unk0x68 = 0;
this->m_flags &= ~c_bit2;
this->m_flags &= ~c_bit3;
}
// FUNCTION: LEGO1 0x100b4430
void MxLoopingFlcPresenter::Destroy(MxBool p_fromDestructor)
{
m_criticalSection.Enter();
Init();
m_criticalSection.Leave();
if (!p_fromDestructor)
MxFlcPresenter::Destroy(FALSE);
}
// FUNCTION: LEGO1 0x100b4470
void MxLoopingFlcPresenter::NextFrame()
{
MxStreamChunk* chunk = NextChunk();
if (chunk->GetFlags() & MxDSChunk::c_end)
ProgressTickleState(e_repeating);
else {
LoadFrame(chunk);
LoopChunk(chunk);
m_unk0x68 += m_flicHeader->speed;
}
m_subscriber->DestroyChunk(chunk);
}