diff --git a/LEGO1/mxdisplaysurface.cpp b/LEGO1/mxdisplaysurface.cpp index 619f5eef..e22244c5 100644 --- a/LEGO1/mxdisplaysurface.cpp +++ b/LEGO1/mxdisplaysurface.cpp @@ -230,3 +230,9 @@ undefined4 MxDisplaySurface::vtable44(undefined4, undefined4*, undefined4, undef { return 0; } + +// OFFSET: LEGO1 0x100ba640 STUB +void MxDisplaySurface::FUN_100ba640() +{ + // TODO +} diff --git a/LEGO1/mxdisplaysurface.h b/LEGO1/mxdisplaysurface.h index af484716..8e79f6e8 100644 --- a/LEGO1/mxdisplaysurface.h +++ b/LEGO1/mxdisplaysurface.h @@ -19,6 +19,8 @@ class MxDisplaySurface : public MxCore void Reset(); + void FUN_100ba640(); + virtual MxResult Init(MxVideoParam &p_videoParam, LPDIRECTDRAWSURFACE p_ddSurface1, LPDIRECTDRAWSURFACE p_ddSurface2, LPDIRECTDRAWCLIPPER p_ddClipper); virtual MxResult Create(MxVideoParam &p_videoParam); virtual void Clear(); diff --git a/LEGO1/mxtransitionmanager.cpp b/LEGO1/mxtransitionmanager.cpp index efb90604..b844095e 100644 --- a/LEGO1/mxtransitionmanager.cpp +++ b/LEGO1/mxtransitionmanager.cpp @@ -33,12 +33,36 @@ MxTransitionManager::~MxTransitionManager() TickleManager()->UnregisterClient(this); } -// OFFSET: LEGO1 0x1004bac0 STUB +// OFFSET: LEGO1 0x1004bac0 MxResult MxTransitionManager::Tickle() { - // TODO + if (this->m_animationSpeed + this->m_systemTime > timeGetTime()) { + return SUCCESS; + } - return 0; + this->m_systemTime = timeGetTime(); + + switch (this->m_transitionType) { + case NO_ANIMATION: + FUN_1004bcf0(); + break; + case DISSOLVE: + Transition_Dissolve(); + break; + case PIXELATION: + Transition_Pixelation(); + break; + case SCREEN_WIPE: + Transition_Wipe(); + break; + case WINDOWS: + Transition_Windows(); + break; + case BROKEN: + Transition_Broken(); + break; + } + return SUCCESS; } // OFFSET: LEGO1 0x1004bc30 @@ -192,6 +216,33 @@ MxResult MxTransitionManager::StartTransition(TransitionType p_animationType, Mx return FAILURE; } +// OFFSET: LEGO1 0x1004bcf0 +void MxTransitionManager::FUN_1004bcf0() +{ + LegoVideoManager *videoManager = VideoManager(); + videoManager->GetDisplaySurface()->FUN_100ba640(); + EndTransition(TRUE); +} + +// OFFSET: LEGO1 0x1004bed0 STUB +void MxTransitionManager::Transition_Pixelation() +{ + // TODO +} + + +// OFFSET: LEGO1 0x1004c270 STUB +void MxTransitionManager::Transition_Windows() +{ + // TODO +} + +// OFFSET: LEGO1 0x1004c3e0 STUB +void MxTransitionManager::Transition_Broken() +{ + // TODO +} + // OFFSET: LEGO1 0x1004c170 void MxTransitionManager::Transition_Wipe() { diff --git a/LEGO1/mxtransitionmanager.h b/LEGO1/mxtransitionmanager.h index 4ed82229..d3c344ce 100644 --- a/LEGO1/mxtransitionmanager.h +++ b/LEGO1/mxtransitionmanager.h @@ -42,10 +42,17 @@ class MxTransitionManager : public MxCore MxResult StartTransition(TransitionType p_animationType, MxS32 p_speed, MxBool p_doCopy, MxBool p_playMusicInAnim); + private: void EndTransition(MxBool p_notifyWorld); void Transition_Dissolve(); + void Transition_Pixelation(); void Transition_Wipe(); + void Transition_Windows(); + void Transition_Broken(); + + void FUN_1004bcf0(); + void SubmitCopyRect(LPDDSURFACEDESC ddsc); void SetupCopyRect(LPDDSURFACEDESC ddsc);