Refactor tickle enum

This commit is contained in:
Christian Semmler 2024-01-17 10:26:34 -05:00
parent 8dad6b50bf
commit fb803394ac
25 changed files with 117 additions and 117 deletions

View File

@ -77,13 +77,13 @@ void MxBackgroundAudioManager::DestroyMusic()
MxResult MxBackgroundAudioManager::Tickle()
{
switch (m_unk0x13c) {
case MxPresenter::TickleState_Starting:
case MxPresenter::e_starting:
FadeInOrFadeOut();
return SUCCESS;
case MxPresenter::TickleState_Streaming:
case MxPresenter::e_streaming:
FUN_1007ee70();
return SUCCESS;
case MxPresenter::TickleState_Repeating:
case MxPresenter::e_repeating:
FUN_1007ef40();
return SUCCESS;
default:

View File

@ -19,7 +19,7 @@ void LegoActionControlPresenter::ReadyTickle()
if (chunk) {
ParseExtra();
ProgressTickleState(TickleState_Starting);
ProgressTickleState(e_starting);
m_subscriber->DestroyChunk(chunk);
if (m_compositePresenter) {
@ -46,7 +46,7 @@ void LegoActionControlPresenter::RepeatingTickle()
#else
InvokeAction(m_unk0x50, MxAtomId(m_unk0x54.GetData(), MxAtomId::e_lowerCase2), m_unk0x64, NULL);
#endif
ProgressTickleState(TickleState_Done);
ProgressTickleState(e_done);
}
}

View File

@ -55,7 +55,7 @@ MxResult MxCompositeMediaPresenter::StartAction(MxStreamController* p_controller
if (presenter && presenter->AddToManager() == SUCCESS) {
presenter->SetCompositePresenter(this);
if (presenter->StartAction(p_controller, action) == SUCCESS) {
presenter->SetTickleState(TickleState_Idle);
presenter->SetTickleState(e_idle);
if (presenter->IsA("MxVideoPresenter"))
VideoManager()->UnregisterPresenter(*presenter);
@ -75,7 +75,7 @@ MxResult MxCompositeMediaPresenter::StartAction(MxStreamController* p_controller
}
if (!m_compositePresenter) {
SetTickleState(TickleState_Ready);
SetTickleState(e_ready);
MxLong time = Timer()->GetTime();
m_action->SetUnknown90(time);
}
@ -93,10 +93,10 @@ void MxCompositeMediaPresenter::StartingTickle()
if (!m_unk0x4e) {
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
if ((*it)->GetCurrentTickleState() < TickleState_Streaming) {
if ((*it)->GetCurrentTickleState() < e_streaming) {
(*it)->Tickle();
if ((*it)->GetCurrentTickleState() == TickleState_Streaming ||
if ((*it)->GetCurrentTickleState() == e_streaming ||
((*it)->GetAction() && (*it)->GetAction()->GetStartTime()))
m_unk0x4c++;
}
@ -123,7 +123,7 @@ void MxCompositeMediaPresenter::StartingTickle()
}
if (!m_unk0x4c) {
ProgressTickleState(TickleState_Streaming);
ProgressTickleState(e_streaming);
MxLong time = Timer()->GetTime();
m_action->SetUnknown90(time);
}
@ -136,15 +136,15 @@ MxResult MxCompositeMediaPresenter::Tickle()
MxAutoLocker lock(&m_criticalSection);
switch (m_currentTickleState) {
case TickleState_Ready:
ProgressTickleState(TickleState_Starting);
case TickleState_Starting:
case e_ready:
ProgressTickleState(e_starting);
case e_starting:
StartingTickle();
break;
case TickleState_Streaming:
case TickleState_Repeating:
case TickleState_unk5:
case TickleState_Done: {
case e_streaming:
case e_repeating:
case e_unk5:
case e_done: {
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++)
(*it)->Tickle();
break;
@ -161,7 +161,7 @@ MxResult MxCompositeMediaPresenter::PutData()
{
MxAutoLocker lock(&m_criticalSection);
if (m_currentTickleState >= TickleState_Streaming && m_currentTickleState <= TickleState_Done) {
if (m_currentTickleState >= e_streaming && m_currentTickleState <= e_done) {
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++)
(*it)->PutData();
}

View File

@ -106,7 +106,7 @@ void MxControlPresenter::ReadyTickle()
{
MxPresenter::ParseExtra();
TickleManager()->UnregisterClient(this);
ProgressTickleState(TickleState_Repeating);
ProgressTickleState(e_repeating);
}
// STUB: LEGO1 0x10044640

View File

@ -12,7 +12,7 @@ void LegoActorPresenter::ReadyTickle()
SetEntityLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp());
m_entity->Create(*m_action);
}
ProgressTickleState(TickleState_Starting);
ProgressTickleState(e_starting);
}
}
@ -20,7 +20,7 @@ void LegoActorPresenter::ReadyTickle()
void LegoActorPresenter::StartingTickle()
{
if (m_entity->GetROI()) {
ProgressTickleState(TickleState_Streaming);
ProgressTickleState(e_streaming);
ParseExtra();
}
}

View File

@ -69,7 +69,7 @@ void LegoEntityPresenter::ReadyTickle()
m_entity->SetLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp(), TRUE);
ParseExtra();
}
ProgressTickleState(TickleState_Starting);
ProgressTickleState(e_starting);
}
}

View File

@ -91,7 +91,7 @@ MxResult LegoWorldPresenter::StartAction(MxStreamController* p_controller, MxDSA
if (presenter && presenter->AddToManager() == SUCCESS) {
presenter->SetCompositePresenter(this);
if (presenter->StartAction(p_controller, action) == SUCCESS) {
presenter->SetTickleState(TickleState_Idle);
presenter->SetTickleState(e_idle);
success = TRUE;
}
}
@ -123,7 +123,7 @@ void LegoWorldPresenter::ReadyTickle()
}
ParseExtra();
ProgressTickleState(TickleState_Starting);
ProgressTickleState(e_starting);
}
// FUNCTION: LEGO1 0x10066ac0
@ -131,19 +131,19 @@ void LegoWorldPresenter::StartingTickle()
{
if (m_action->IsA("MxDSSerialAction")) {
MxPresenter* presenter = *m_list.begin();
if (presenter->GetCurrentTickleState() == TickleState_Idle) {
presenter->SetTickleState(TickleState_Ready);
if (presenter->GetCurrentTickleState() == e_idle) {
presenter->SetTickleState(e_ready);
}
}
else {
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
if ((*it)->GetCurrentTickleState() == TickleState_Idle) {
(*it)->SetTickleState(TickleState_Ready);
if ((*it)->GetCurrentTickleState() == e_idle) {
(*it)->SetTickleState(e_ready);
}
}
}
ProgressTickleState(TickleState_Streaming);
ProgressTickleState(e_streaming);
}
// FUNCTION: LEGO1 0x10067a70

View File

@ -61,7 +61,7 @@ void LegoPathPresenter::Destroy()
void LegoPathPresenter::ReadyTickle()
{
// TODO
ProgressTickleState(TickleState_Starting); // Allow initialization process to continue
ProgressTickleState(e_starting); // Allow initialization process to continue
}
// FUNCTION: LEGO1 0x10044d00
@ -71,7 +71,7 @@ void LegoPathPresenter::StreamingTickle()
if (chunk) {
if (chunk->GetFlags() & MxStreamChunk::Flag_End) {
ProgressTickleState(TickleState_Repeating);
ProgressTickleState(e_repeating);
}
m_subscriber->DestroyChunk(chunk);

View File

@ -114,7 +114,7 @@ void LegoAnimPresenter::ReadyTickle()
m_subscriber->DestroyChunk(chunk);
if (result == SUCCESS) {
ProgressTickleState(TickleState_Starting);
ProgressTickleState(e_starting);
ParseExtra();
}
else {
@ -128,7 +128,7 @@ void LegoAnimPresenter::ReadyTickle()
void LegoAnimPresenter::StartingTickle()
{
// TODO
ProgressTickleState(TickleState_Streaming);
ProgressTickleState(e_streaming);
EndAction(); // Allow game to start
}
@ -146,7 +146,7 @@ void LegoAnimPresenter::StreamingTickle()
}
}
else {
ProgressTickleState(TickleState_Done);
ProgressTickleState(e_done);
if (m_compositePresenter) {
if (m_compositePresenter->IsA("LegoAnimMMPresenter")) {
m_compositePresenter->VTable0x60(this);

View File

@ -31,7 +31,7 @@ void LegoModelPresenter::Destroy(MxBool p_fromDestructor)
void LegoModelPresenter::ReadyTickle()
{
// TODO
SetTickleState(TickleState_Starting);
SetTickleState(e_starting);
}
// STUB: LEGO1 0x100801b0

View File

@ -77,7 +77,7 @@ void LegoPalettePresenter::ReadyTickle()
if (chunk) {
if (chunk->GetTime() <= m_action->GetElapsedTime()) {
ParseExtra();
ProgressTickleState(TickleState_Starting);
ProgressTickleState(e_starting);
chunk = m_subscriber->NextChunk();
MxResult result = ParsePalette(chunk);

View File

@ -28,7 +28,7 @@ MxResult LegoTexturePresenter::PutData()
void LegoTexturePresenter::DoneTickle()
{
if (this->m_compositePresenter && !this->m_compositePresenter->VTable0x64(2)) {
SetTickleState(TickleState_Idle);
SetTickleState(e_idle);
return;
}

View File

@ -488,7 +488,7 @@ void MxTransitionManager::SetWaitIndicator(MxVideoPresenter* p_waitIndicator)
LegoVideoManager* videoManager = VideoManager();
videoManager->UnregisterPresenter(*m_waitIndicator);
if (m_waitIndicator->GetCurrentTickleState() < MxPresenter::TickleState_Streaming) {
if (m_waitIndicator->GetCurrentTickleState() < MxPresenter::e_streaming) {
m_waitIndicator->Tickle();
}
}
@ -542,7 +542,7 @@ void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC p_ddsc)
m_waitIndicator->Tickle();
// Check if wait indicator has started
if (m_waitIndicator->GetCurrentTickleState() >= MxPresenter::TickleState_Streaming) {
if (m_waitIndicator->GetCurrentTickleState() >= MxPresenter::e_streaming) {
// Setup the copy rect
MxU32 copyPitch = (p_ddsc->ddpfPixelFormat.dwRGBBitCount / 8) *
(m_copyRect.right - m_copyRect.left + 1); // This uses m_copyRect, seemingly erroneously

View File

@ -17,13 +17,13 @@ class MxEntity;
class MxPresenter : public MxCore {
public:
enum TickleState {
TickleState_Idle = 0,
TickleState_Ready,
TickleState_Starting,
TickleState_Streaming,
TickleState_Repeating,
TickleState_unk5,
TickleState_Done,
e_idle = 0,
e_ready,
e_starting,
e_streaming,
e_repeating,
e_unk5,
e_done,
};
MxPresenter() { Init(); }
@ -57,27 +57,27 @@ class MxPresenter : public MxCore {
virtual void ReadyTickle()
{
ParseExtra();
ProgressTickleState(TickleState_Starting);
ProgressTickleState(e_starting);
} // vtable+0x18
// FUNCTION: LEGO1 0x1000be60
virtual void StartingTickle() { ProgressTickleState(TickleState_Streaming); } // vtable+0x1c
virtual void StartingTickle() { ProgressTickleState(e_streaming); } // vtable+0x1c
// FUNCTION: LEGO1 0x1000be80
virtual void StreamingTickle() { ProgressTickleState(TickleState_Repeating); }; // vtable+0x20
virtual void StreamingTickle() { ProgressTickleState(e_repeating); }; // vtable+0x20
// FUNCTION: LEGO1 0x1000bea0
virtual void RepeatingTickle() { ProgressTickleState(TickleState_unk5); }; // vtable+0x24
virtual void RepeatingTickle() { ProgressTickleState(e_unk5); }; // vtable+0x24
// FUNCTION: LEGO1 0x1000bec0
virtual void Unk5Tickle() { ProgressTickleState(TickleState_Done); }; // vtable+0x28
virtual void Unk5Tickle() { ProgressTickleState(e_done); }; // vtable+0x28
protected:
#ifdef ISLE_APP
__declspec(dllexport) virtual void DoneTickle(); // vtable+0x2c
#else
// FUNCTION: LEGO1 0x1000bee0
__declspec(dllexport) virtual void DoneTickle() { ProgressTickleState(TickleState_Idle); }; // vtable+0x2c
__declspec(dllexport) virtual void DoneTickle() { ProgressTickleState(e_idle); }; // vtable+0x2c
#endif
__declspec(dllexport) virtual void ParseExtra(); // vtable+0x30

View File

@ -21,7 +21,7 @@ void MxLoopingMIDIPresenter::StreamingTickle()
}
if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime())
ProgressTickleState(TickleState_Done);
ProgressTickleState(e_done);
}
// FUNCTION: LEGO1 0x100c2ae0
@ -38,7 +38,7 @@ MxResult MxLoopingMIDIPresenter::PutData()
{
m_criticalSection.Enter();
if (m_currentTickleState == TickleState_Streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
if (m_currentTickleState == e_streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
SetVolume(((MxDSSound*) m_action)->GetVolume());
MusicManager()->FUN_100c09c0(m_chunk->GetData(), !m_action->GetLoopCount() ? -1 : m_action->GetLoopCount());
}

View File

@ -52,7 +52,7 @@ void MxMIDIPresenter::ReadyTickle()
if (chunk) {
m_subscriber->DestroyChunk(chunk);
ParseExtra();
ProgressTickleState(TickleState_Starting);
ProgressTickleState(e_starting);
}
}
@ -62,14 +62,14 @@ void MxMIDIPresenter::StartingTickle()
MxStreamChunk* chunk = CurrentChunk();
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime())
ProgressTickleState(TickleState_Streaming);
ProgressTickleState(e_streaming);
}
// FUNCTION: LEGO1 0x100c2910
void MxMIDIPresenter::StreamingTickle()
{
if (m_chunk)
ProgressTickleState(TickleState_Done);
ProgressTickleState(e_done);
else
m_chunk = NextChunk();
}
@ -92,7 +92,7 @@ MxResult MxMIDIPresenter::PutData()
{
m_criticalSection.Enter();
if (m_currentTickleState == TickleState_Streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
if (m_currentTickleState == e_streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
SetVolume(((MxDSSound*) m_action)->GetVolume());
if (MusicManager()->FUN_100c09c0(m_chunk->GetData(), 1))

View File

@ -118,7 +118,7 @@ void MxWavePresenter::ReadyTickle()
memcpy(m_waveFormat, chunk->GetData(), chunk->GetLength());
m_subscriber->DestroyChunk(chunk);
ParseExtra();
ProgressTickleState(TickleState_Starting);
ProgressTickleState(e_starting);
}
}
@ -169,7 +169,7 @@ void MxWavePresenter::StartingTickle()
}
else {
SetVolume(((MxDSSound*) m_action)->GetVolume());
ProgressTickleState(TickleState_Streaming);
ProgressTickleState(e_streaming);
}
}
}
@ -231,7 +231,7 @@ MxResult MxWavePresenter::PutData()
if (IsEnabled()) {
switch (m_currentTickleState) {
case TickleState_Streaming:
case e_streaming:
if (m_currentChunk && FUN_100b1ba0()) {
WriteToSoundBuffer(m_currentChunk->GetData(), m_currentChunk->GetLength());
m_subscriber->DestroyChunk(m_currentChunk);
@ -245,7 +245,7 @@ MxResult MxWavePresenter::PutData()
m_started = TRUE;
}
break;
case TickleState_Repeating:
case e_repeating:
if (m_started)
break;
@ -339,13 +339,13 @@ void MxWavePresenter::Resume()
if (m_paused) {
if (m_dsBuffer && m_started) {
switch (m_currentTickleState) {
case TickleState_Streaming:
case e_streaming:
m_dsBuffer->Play(0, 0, DSBPLAY_LOOPING);
break;
case TickleState_Repeating:
case e_repeating:
m_dsBuffer->Play(0, 0, m_action->GetLoopCount() > 1);
break;
case TickleState_Done:
case e_done:
m_dsBuffer->Play(0, 0, 0);
}
}

View File

@ -155,8 +155,8 @@ void MxCompositePresenter::VTable0x58(MxEndActionNotificationParam& p_param)
else {
if (m_action->IsA("MxDSSerialAction") && it != m_list.end()) {
MxPresenter* presenter = *it;
if (presenter->GetCurrentTickleState() == TickleState_Idle)
presenter->SetTickleState(TickleState_Ready);
if (presenter->GetCurrentTickleState() == e_idle)
presenter->SetTickleState(e_ready);
}
}
}
@ -171,8 +171,8 @@ void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param)
if (*it == presenter) {
m_list.erase(it++);
if (presenter->GetCurrentTickleState() == TickleState_Idle)
presenter->SetTickleState(TickleState_Ready);
if (presenter->GetCurrentTickleState() == e_idle)
presenter->SetTickleState(e_ready);
MxDSActionList* actions = ((MxDSMultiAction*) m_action)->GetActionList();
MxDSActionListCursor cursor(actions);
@ -186,8 +186,8 @@ void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param)
else {
if (m_action->IsA("MxDSSerialAction")) {
MxPresenter* presenter = *it;
if (presenter->GetCurrentTickleState() == TickleState_Idle)
presenter->SetTickleState(TickleState_Ready);
if (presenter->GetCurrentTickleState() == e_idle)
presenter->SetTickleState(e_ready);
}
}
@ -210,8 +210,8 @@ void MxCompositePresenter::VTable0x60(MxPresenter* p_presenter)
}
else if (m_action->IsA("MxDSSerialAction")) {
MxPresenter* presenter = *it;
if (presenter->GetCurrentTickleState() == TickleState_Idle)
presenter->SetTickleState(TickleState_Ready);
if (presenter->GetCurrentTickleState() == e_idle)
presenter->SetTickleState(e_ready);
}
return;
}
@ -227,7 +227,7 @@ void MxCompositePresenter::SetTickleState(TickleState p_tickleState)
MxPresenter* presenter = *it;
presenter->SetTickleState(p_tickleState);
if (m_action->IsA("MxDSSerialAction") && p_tickleState == TickleState_Ready)
if (m_action->IsA("MxDSSerialAction") && p_tickleState == e_ready)
return;
}
}

View File

@ -65,7 +65,7 @@ MxStreamChunk* MxMediaPresenter::CurrentChunk()
m_subscriber->NextChunk();
m_subscriber->DestroyChunk(chunk);
chunk = NULL;
ProgressTickleState(TickleState_Done);
ProgressTickleState(e_done);
}
}
@ -84,7 +84,7 @@ MxStreamChunk* MxMediaPresenter::NextChunk()
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Bit7);
m_subscriber->DestroyChunk(chunk);
chunk = NULL;
ProgressTickleState(TickleState_Done);
ProgressTickleState(e_done);
}
}
@ -134,7 +134,7 @@ void MxMediaPresenter::EndAction()
if (m_action->GetFlags() & MxDSAction::Flag_World &&
(!m_compositePresenter || !m_compositePresenter->VTable0x64(2))) {
MxPresenter::Enable(FALSE);
SetTickleState(TickleState_Idle);
SetTickleState(e_idle);
}
else {
MxDSAction* action = m_action;
@ -181,7 +181,7 @@ void MxMediaPresenter::StreamingTickle()
if (m_currentChunk->GetFlags() & MxDSChunk::Flag_End) {
m_subscriber->DestroyChunk(m_currentChunk);
m_currentChunk = NULL;
ProgressTickleState(TickleState_Repeating);
ProgressTickleState(e_repeating);
}
else if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
LoopChunk(m_currentChunk);
@ -206,11 +206,11 @@ void MxMediaPresenter::RepeatingTickle()
if (m_currentChunk) {
MxLong time = m_currentChunk->GetTime();
if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount())
ProgressTickleState(TickleState_unk5);
ProgressTickleState(e_unk5);
}
else {
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration())
ProgressTickleState(TickleState_unk5);
ProgressTickleState(e_unk5);
}
}
}
@ -219,7 +219,7 @@ void MxMediaPresenter::RepeatingTickle()
void MxMediaPresenter::DoneTickle()
{
m_previousTickleStates |= 1 << m_currentTickleState;
m_currentTickleState = TickleState_Idle;
m_currentTickleState = e_idle;
EndAction();
}
@ -246,13 +246,13 @@ void MxMediaPresenter::Enable(MxBool p_enable)
if (p_enable) {
MxLong time = Timer()->GetTime();
m_action->SetUnknown90(time);
SetTickleState(TickleState_Repeating);
SetTickleState(e_repeating);
}
else {
if (m_loopingChunkCursor)
m_loopingChunkCursor->Reset();
m_currentChunk = NULL;
SetTickleState(TickleState_Done);
SetTickleState(e_done);
}
}
}

View File

@ -21,7 +21,7 @@ DECOMP_SIZE_ASSERT(MxPresenter, 0x40);
// FUNCTION: LEGO1 0x100b4d50
void MxPresenter::Init()
{
m_currentTickleState = TickleState_Idle;
m_currentTickleState = e_idle;
m_action = NULL;
m_location = MxPoint32(0, 0);
m_displayZ = 0;
@ -41,7 +41,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];
ProgressTickleState(TickleState_Ready);
ProgressTickleState(e_ready);
return SUCCESS;
}
@ -70,7 +70,7 @@ void MxPresenter::EndAction()
this->m_action = NULL;
MxS32 previousTickleState = 1 << m_currentTickleState;
this->m_previousTickleStates |= previousTickleState;
this->m_currentTickleState = TickleState_Idle;
this->m_currentTickleState = e_idle;
}
// FUNCTION: LEGO1 0x100b4fc0
@ -130,32 +130,32 @@ MxResult MxPresenter::Tickle()
MxAutoLocker lock(&this->m_criticalSection);
switch (this->m_currentTickleState) {
case TickleState_Ready:
case e_ready:
this->ReadyTickle();
if (m_currentTickleState != TickleState_Starting)
if (m_currentTickleState != e_starting)
break;
case TickleState_Starting:
case e_starting:
this->StartingTickle();
if (m_currentTickleState != TickleState_Streaming)
if (m_currentTickleState != e_streaming)
break;
case TickleState_Streaming:
case e_streaming:
this->StreamingTickle();
if (m_currentTickleState != TickleState_Repeating)
if (m_currentTickleState != e_repeating)
break;
case TickleState_Repeating:
case e_repeating:
this->RepeatingTickle();
if (m_currentTickleState != TickleState_unk5)
if (m_currentTickleState != e_unk5)
break;
case TickleState_unk5:
case e_unk5:
this->Unk5Tickle();
if (m_currentTickleState != TickleState_Done)
if (m_currentTickleState != e_done)
break;
case TickleState_Done:
case e_done:
this->DoneTickle();
default:
break;

View File

@ -71,7 +71,7 @@ void MxEventPresenter::ReadyTickle()
CopyData(chunk);
m_subscriber->DestroyChunk(chunk);
ParseExtra();
ProgressTickleState(TickleState_Starting);
ProgressTickleState(e_starting);
}
}
@ -81,7 +81,7 @@ void MxEventPresenter::StartingTickle()
MxStreamChunk* chunk = CurrentChunk();
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime())
ProgressTickleState(TickleState_Streaming);
ProgressTickleState(e_streaming);
}
// FUNCTION: LEGO1 0x100c2ef0
@ -90,8 +90,8 @@ MxResult MxEventPresenter::PutData()
MxAutoLocker lock(&m_criticalSection);
if (IsEnabled()) {
if (m_currentTickleState >= TickleState_Streaming &&
(m_currentTickleState <= TickleState_Repeating || m_currentTickleState == TickleState_Done)) {
if (m_currentTickleState >= e_streaming &&
(m_currentTickleState <= e_repeating || m_currentTickleState == e_done)) {
if (m_currentChunk && m_currentChunk->GetLength()) {
if (m_data[12] == 2) {
const char* data = (const char*) m_currentChunk->GetData();
@ -103,7 +103,7 @@ MxResult MxEventPresenter::PutData()
variableTable->SetVariable(key, value);
}
if (m_currentTickleState == TickleState_Streaming)
if (m_currentTickleState == e_streaming)
m_subscriber->DestroyChunk(m_currentChunk);
m_currentChunk = NULL;
}

View File

@ -41,7 +41,7 @@ void MxLoopingFlcPresenter::NextFrame()
MxStreamChunk* chunk = NextChunk();
if (chunk->GetFlags() & MxDSChunk::Flag_End)
ProgressTickleState(TickleState_Repeating);
ProgressTickleState(e_repeating);
else {
LoadFrame(chunk);
LoopChunk(chunk);

View File

@ -52,7 +52,7 @@ void MxLoopingSmkPresenter::NextFrame()
MxStreamChunk* chunk = NextChunk();
if (chunk->GetFlags() & MxDSChunk::Flag_End)
ProgressTickleState(TickleState_Repeating);
ProgressTickleState(e_repeating);
else {
LoadFrame(chunk);
LoopChunk(chunk);
@ -66,7 +66,7 @@ void MxLoopingSmkPresenter::NextFrame()
void MxLoopingSmkPresenter::VTable0x8c()
{
if (m_action->GetDuration() < m_elapsedDuration)
ProgressTickleState(TickleState_unk5);
ProgressTickleState(e_unk5);
else {
MxStreamChunk* chunk;
m_loopingChunkCursor->Current(chunk);
@ -108,7 +108,7 @@ void MxLoopingSmkPresenter::RepeatingTickle()
m_loopingChunkCursor->Next(chunk);
if (m_currentTickleState != TickleState_Repeating)
if (m_currentTickleState != e_repeating)
break;
}
}

View File

@ -109,7 +109,7 @@ void MxStillPresenter::StartingTickle()
{
MxVideoPresenter::StartingTickle();
if (m_currentTickleState == TickleState_Streaming && ((MxDSMediaAction*) m_action)->GetPaletteManagement())
if (m_currentTickleState == e_streaming && ((MxDSMediaAction*) m_action)->GetPaletteManagement())
RealizePalette();
}
@ -121,7 +121,7 @@ void MxStillPresenter::StreamingTickle()
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
m_chunkTime = chunk->GetTime();
NextFrame();
ProgressTickleState(TickleState_Repeating);
ProgressTickleState(e_repeating);
if (m_action->GetDuration() == -1 && m_compositePresenter)
m_compositePresenter->VTable0x60(this);
@ -133,7 +133,7 @@ void MxStillPresenter::RepeatingTickle()
{
if (m_action->GetDuration() != -1) {
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration())
ProgressTickleState(TickleState_unk5);
ProgressTickleState(e_unk5);
}
}

View File

@ -170,7 +170,7 @@ void MxVideoPresenter::NextFrame()
if (chunk->GetFlags() & MxDSChunk::Flag_End) {
m_subscriber->DestroyChunk(chunk);
ProgressTickleState(TickleState_Repeating);
ProgressTickleState(e_repeating);
}
else {
LoadFrame(chunk);
@ -387,7 +387,7 @@ void MxVideoPresenter::ReadyTickle()
LoadHeader(chunk);
m_subscriber->DestroyChunk(chunk);
ParseExtra();
ProgressTickleState(TickleState_Starting);
ProgressTickleState(e_starting);
}
}
@ -398,7 +398,7 @@ void MxVideoPresenter::StartingTickle()
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
CreateBitmap();
ProgressTickleState(TickleState_Streaming);
ProgressTickleState(e_streaming);
}
}
@ -431,7 +431,7 @@ void MxVideoPresenter::StreamingTickle()
m_currentChunk = NULL;
m_flags |= Flag_Bit1;
if (m_currentTickleState != TickleState_Streaming)
if (m_currentTickleState != e_streaming)
break;
}
@ -469,7 +469,7 @@ void MxVideoPresenter::RepeatingTickle()
m_currentChunk = NULL;
m_flags |= Flag_Bit1;
if (m_currentTickleState != TickleState_Repeating)
if (m_currentTickleState != e_repeating)
break;
}
@ -490,10 +490,10 @@ void MxVideoPresenter::Unk5Tickle()
m_unk0x60 = m_action->GetElapsedTime();
if (m_action->GetElapsedTime() >= m_unk0x60 + ((MxDSMediaAction*) m_action)->GetSustainTime())
ProgressTickleState(TickleState_Done);
ProgressTickleState(e_done);
}
else
ProgressTickleState(TickleState_Done);
ProgressTickleState(e_done);
}
}
@ -535,7 +535,7 @@ MxResult MxVideoPresenter::PutData()
{
MxAutoLocker lock(&m_criticalSection);
if (IsEnabled() && m_currentTickleState >= TickleState_Streaming && m_currentTickleState <= TickleState_unk5)
if (IsEnabled() && m_currentTickleState >= e_streaming && m_currentTickleState <= e_unk5)
PutFrame();
return SUCCESS;