improved accuracy of MxTransitionManager::Tickle

This commit is contained in:
MattKC 2023-10-01 17:53:25 -07:00
parent d49908bd89
commit c5ae6f9a0e

View File

@ -19,34 +19,31 @@ MxTransitionManager::~MxTransitionManager()
// OFFSET: LEGO1 0x1004bac0 // OFFSET: LEGO1 0x1004bac0
MxResult MxTransitionManager::Tickle() MxResult MxTransitionManager::Tickle()
{ {
MxS32 speed = this->m_animationSpeed; if (this->m_animationSpeed + this->m_systemTime > timeGetTime()) {
MxULong storedTime = this->m_systemTime; return SUCCESS;
MxULong realTime = timeGetTime(); }
if (speed + storedTime <= realTime) { this->m_systemTime = timeGetTime();
storedTime = timeGetTime();
this->m_systemTime = storedTime;
switch (this->m_transitionType) { switch (this->m_transitionType) {
case NO_ANIMATION: case NO_ANIMATION:
FUN_1004bcf0(); FUN_1004bcf0();
return SUCCESS; break;
case DISSOLVE: case DISSOLVE:
FUN_1004bd10(); FUN_1004bd10();
return SUCCESS; break;
case PIXELATION: case PIXELATION:
FUN_1004bed0(); FUN_1004bed0();
return SUCCESS; break;
case SCREEN_WIPE: case SCREEN_WIPE:
FUN_1004c170(); FUN_1004c170();
return SUCCESS; break;
case WINDOWS: case WINDOWS:
FUN_1004c270(); FUN_1004c270();
return SUCCESS; break;
case BROKEN: case BROKEN:
FUN_1004c3e0(); FUN_1004c3e0();
} break;
return SUCCESS;
} }
return SUCCESS; return SUCCESS;
} }