mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 17:04: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
@@ -8,14 +8,6 @@
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxCompositePresenter, 0x4c);
|
||||
|
||||
// FUNCTION: LEGO1 0x1000caf0
|
||||
MxBool MxCompositePresenter::VTable0x64(undefined4 p_undefined)
|
||||
{
|
||||
if (m_compositePresenter)
|
||||
return m_compositePresenter->VTable0x64(p_undefined);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b60b0
|
||||
MxCompositePresenter::MxCompositePresenter()
|
||||
{
|
||||
@@ -229,8 +221,7 @@ void MxCompositePresenter::VTable0x60(MxPresenter* p_presenter)
|
||||
// FUNCTION: LEGO1 0x100b6bc0
|
||||
void MxCompositePresenter::SetTickleState(TickleState p_tickleState)
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = p_tickleState;
|
||||
ProgressTickleState(p_tickleState);
|
||||
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
|
||||
MxPresenter* presenter = *it;
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
|
||||
#include "define.h"
|
||||
|
||||
// FUNCTION: LEGO1 0x10001f70
|
||||
MxResult MxCore::Tickle()
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100ae1a0
|
||||
MxCore::MxCore()
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,96 +18,11 @@
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxPresenter, 0x40);
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be30
|
||||
void MxPresenter::VTable0x14()
|
||||
{
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be40
|
||||
void MxPresenter::ReadyTickle()
|
||||
{
|
||||
ParseExtra();
|
||||
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be60
|
||||
void MxPresenter::StartingTickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Streaming;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be80
|
||||
void MxPresenter::StreamingTickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Repeating;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bea0
|
||||
void MxPresenter::RepeatingTickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_unk5;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bec0
|
||||
void MxPresenter::Unk5Tickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bee0
|
||||
void MxPresenter::DoneTickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Idle;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bf00
|
||||
#ifdef COMPAT_MODE
|
||||
MxPresenter::~MxPresenter()
|
||||
{
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bf70
|
||||
MxResult MxPresenter::AddToManager()
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bf80
|
||||
void MxPresenter::Destroy()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bf90
|
||||
void MxPresenter::SetTickleState(TickleState p_tickleState)
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = p_tickleState;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bfb0
|
||||
MxBool MxPresenter::HasTickleStatePassed(TickleState p_tickleState)
|
||||
{
|
||||
return m_previousTickleStates & (1 << (unsigned char) p_tickleState);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bfc0
|
||||
MxResult MxPresenter::PutData()
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bfd0
|
||||
MxBool MxPresenter::IsHit(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
// FUNCTION: LEGO1 0x100b4d50
|
||||
void MxPresenter::Init()
|
||||
@@ -132,8 +47,7 @@ MxResult MxPresenter::StartAction(MxStreamController*, MxDSAction* p_action)
|
||||
|
||||
this->m_location = MxPoint32(this->m_action->GetLocation()[0], this->m_action->GetLocation()[1]);
|
||||
this->m_displayZ = this->m_action->GetLocation()[2];
|
||||
this->m_previousTickleStates |= 1 << (unsigned char) previousTickleState;
|
||||
this->m_currentTickleState = TickleState_Ready;
|
||||
ProgressTickleState(TickleState_Ready);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -4,21 +4,3 @@
|
||||
#include "mxstring.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxVariable, 0x24)
|
||||
|
||||
// FUNCTION: LEGO1 0x1003bea0
|
||||
MxString* MxVariable::GetValue()
|
||||
{
|
||||
return &m_value;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003beb0
|
||||
void MxVariable::SetValue(const char* p_value)
|
||||
{
|
||||
m_value = p_value;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003bec0
|
||||
void MxVariable::Destroy()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user