mirror of
https://github.com/isledecomp/isle.git
synced 2026-02-02 21:21:16 +00:00
implement some of MxTransitionManager
start working on MxTransitionManager::StartTransition add TransitionType enum implement/match MxTransitionManager::GetDDrawSurfaceFromVideoManager implement/match global function SetAppCursor
This commit is contained in:
parent
2794525564
commit
39a61de636
@ -28,10 +28,26 @@ class LegoInputManager : public MxPresenter
|
|||||||
|
|
||||||
virtual MxResult Tickle() override; // vtable+0x8
|
virtual MxResult Tickle() override; // vtable+0x8
|
||||||
|
|
||||||
undefined m_pad40[0x15c];
|
undefined m_pad40[0x48];
|
||||||
|
|
||||||
|
MxBool m_unk88;
|
||||||
|
MxU8 m_unk89;
|
||||||
|
MxU8 m_unk8a;
|
||||||
|
MxU8 m_unk8b;
|
||||||
|
|
||||||
|
undefined m_pad8c[0x110];
|
||||||
|
|
||||||
|
// 0x19C
|
||||||
int m_joystickIndex;
|
int m_joystickIndex;
|
||||||
undefined m_pad200[0x194];
|
|
||||||
|
undefined m_pad1a0[0x194];
|
||||||
|
|
||||||
|
// 0x334
|
||||||
MxBool m_useJoystick;
|
MxBool m_useJoystick;
|
||||||
|
|
||||||
|
MxU8 m_unk335;
|
||||||
|
MxBool m_unk336;
|
||||||
|
MxU8 m_unk337;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEGOINPUTMANAGER_H
|
#endif // LEGOINPUTMANAGER_H
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "legoplantmanager.h"
|
#include "legoplantmanager.h"
|
||||||
|
|
||||||
class LegoSoundManager;
|
class LegoSoundManager;
|
||||||
|
class MxTransitionManager;
|
||||||
|
|
||||||
// VTABLE 0x100d8638
|
// VTABLE 0x100d8638
|
||||||
// SIZE: 0x140
|
// SIZE: 0x140
|
||||||
|
|||||||
@ -28,8 +28,9 @@ class MxBackgroundAudioManager : public MxCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
__declspec(dllexport) void Enable(unsigned char p);
|
__declspec(dllexport) void Enable(unsigned char p);
|
||||||
private:
|
|
||||||
void Stop();
|
void Stop();
|
||||||
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
MxBool m_musicEnabled; // 0x8
|
MxBool m_musicEnabled; // 0x8
|
||||||
|
|||||||
@ -33,6 +33,8 @@ class MxDisplaySurface : public MxCore
|
|||||||
virtual void ReleaseDC(HDC p_hdc);
|
virtual void ReleaseDC(HDC p_hdc);
|
||||||
virtual undefined4 vtable44(undefined4, undefined4*, undefined4, undefined4);
|
virtual undefined4 vtable44(undefined4, undefined4*, undefined4, undefined4);
|
||||||
|
|
||||||
|
inline LPDIRECTDRAWSURFACE GetDirectDrawSurface2() { return this->m_ddSurface2; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxVideoParam m_videoParam;
|
MxVideoParam m_videoParam;
|
||||||
LPDIRECTDRAWSURFACE m_ddSurface1;
|
LPDIRECTDRAWSURFACE m_ddSurface1;
|
||||||
|
|||||||
@ -289,3 +289,9 @@ MxEventManager* EventManager()
|
|||||||
{
|
{
|
||||||
return MxOmni::GetInstance()->GetEventManager();
|
return MxOmni::GetInstance()->GetEventManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1003ef40
|
||||||
|
void SetAppCursor(WPARAM p_wparam)
|
||||||
|
{
|
||||||
|
PostMessageA(MxOmni::GetInstance()->GetWindowHandle(), 0x5400, p_wparam, 0);
|
||||||
|
}
|
||||||
|
|||||||
@ -92,4 +92,6 @@ __declspec(dllexport) MxNotificationManager * NotificationManager();
|
|||||||
MxVideoManager * MVideoManager();
|
MxVideoManager * MVideoManager();
|
||||||
MxAtomIdCounterSet* AtomIdCounterSet();
|
MxAtomIdCounterSet* AtomIdCounterSet();
|
||||||
|
|
||||||
|
void SetAppCursor(WPARAM p_wparam); // OFFSET: LEGO 0x1003ef40
|
||||||
|
|
||||||
#endif // MXOMNI_H
|
#endif // MXOMNI_H
|
||||||
|
|||||||
@ -25,3 +25,47 @@ void MxTransitionManager::SetWaitIndicator(MxVideoPresenter *videoPresenter)
|
|||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1004baa0
|
||||||
|
MxResult MxTransitionManager::GetDDrawSurfaceFromVideoManager() // vtable+0x14
|
||||||
|
{
|
||||||
|
LegoVideoManager *videoManager = VideoManager();
|
||||||
|
this->m_ddSurface = videoManager->GetDisplaySurface()->GetDirectDrawSurface2();
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1004bb70
|
||||||
|
MxResult MxTransitionManager::StartTransition(TransitionType p_animationType, MxS32 p_speed,
|
||||||
|
MxU8 p_unk, MxBool p_playMusicInAnim)
|
||||||
|
{
|
||||||
|
// TODO: Incomplete and far from matching
|
||||||
|
|
||||||
|
if (this->m_transitionType == NOT_TRANSITIONING) {
|
||||||
|
if (!p_playMusicInAnim) {
|
||||||
|
MxBackgroundAudioManager *backgroundAudioManager = BackgroundAudioManager();
|
||||||
|
backgroundAudioManager->Stop();
|
||||||
|
}
|
||||||
|
this->m_transitionType = p_animationType;
|
||||||
|
|
||||||
|
// TODO: This part of the function is mangled and I can't make out what it's doing right now
|
||||||
|
|
||||||
|
MxU32 time = timeGetTime();
|
||||||
|
this->m_systemTime = time;
|
||||||
|
|
||||||
|
this->m_animationSpeed = p_speed;
|
||||||
|
|
||||||
|
MxTickleManager *tickleManager = TickleManager();
|
||||||
|
tickleManager->RegisterClient(this, p_speed);
|
||||||
|
|
||||||
|
LegoInputManager *inputManager = InputManager();
|
||||||
|
inputManager->m_unk88 = TRUE;
|
||||||
|
inputManager->m_unk336 = FALSE;
|
||||||
|
|
||||||
|
MxVideoManager *videoManager = VideoManager();
|
||||||
|
videoManager->SetUnkE4(FALSE);
|
||||||
|
|
||||||
|
SetAppCursor(1);
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
@ -2,19 +2,60 @@
|
|||||||
#define MXTRANSITIONMANAGER_H
|
#define MXTRANSITIONMANAGER_H
|
||||||
|
|
||||||
#include "mxcore.h"
|
#include "mxcore.h"
|
||||||
|
#include "mxvideopresenter.h"
|
||||||
|
#include "legovideomanager.h"
|
||||||
|
#include "legoomni.h"
|
||||||
|
|
||||||
class MxVideoPresenter;
|
|
||||||
|
|
||||||
// 0x100d7ea0
|
// VTABLE 0x100d7ea0
|
||||||
class MxTransitionManager : public MxCore
|
class MxTransitionManager : public MxCore
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MxTransitionManager();
|
MxTransitionManager();
|
||||||
virtual ~MxTransitionManager() override; // vtable+0x0
|
virtual ~MxTransitionManager() override; // vtable+0x0
|
||||||
|
|
||||||
__declspec(dllexport) void SetWaitIndicator(MxVideoPresenter *videoPresenter);
|
__declspec(dllexport) void SetWaitIndicator(MxVideoPresenter *videoPresenter);
|
||||||
|
|
||||||
virtual MxResult Tickle(); // vtable+0x8
|
virtual MxResult Tickle(); // vtable+0x8
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1004b950
|
||||||
|
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||||
|
{
|
||||||
|
return "MxTransitionManager";
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1004b960
|
||||||
|
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
|
||||||
|
{
|
||||||
|
return !strcmp(name, MxTransitionManager::ClassName()) || MxCore::IsA(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1004baa0
|
||||||
|
virtual MxResult GetDDrawSurfaceFromVideoManager(); // vtable+0x14
|
||||||
|
|
||||||
|
enum TransitionType {
|
||||||
|
NOT_TRANSITIONING,
|
||||||
|
NO_ANIMATION,
|
||||||
|
DISSOLVE,
|
||||||
|
PIXELATION,
|
||||||
|
SCREEN_WIPE,
|
||||||
|
WINDOWS,
|
||||||
|
BROKEN // Unknown what this is supposed to be, it locks the game up
|
||||||
|
};
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x1004bb70
|
||||||
|
MxResult StartTransition(TransitionType p_animationType, MxS32 p_speed, MxU8 p_unk, MxBool p_playMusicInAnim);
|
||||||
|
|
||||||
|
private:
|
||||||
|
undefined m_pad00[0x20];
|
||||||
|
MxU8 m_unk20;
|
||||||
|
undefined m_pad21[0x03];
|
||||||
|
TransitionType m_transitionType;
|
||||||
|
LPDIRECTDRAWSURFACE m_ddSurface;
|
||||||
|
MxU16 m_animationTimer;
|
||||||
|
undefined m_pad36[0x8c2];
|
||||||
|
MxULong m_systemTime;
|
||||||
|
MxS32 m_animationSpeed;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXTRANSITIONMANAGER_H
|
#endif // MXTRANSITIONMANAGER_H
|
||||||
|
|||||||
@ -26,6 +26,8 @@ class MxVideoManager : public MxMediaManager
|
|||||||
|
|
||||||
inline MxVideoParam& GetVideoParam() { return this->m_videoParam; }
|
inline MxVideoParam& GetVideoParam() { return this->m_videoParam; }
|
||||||
inline LPDIRECTDRAW GetDirectDraw() { return this->m_pDirectDraw; }
|
inline LPDIRECTDRAW GetDirectDraw() { return this->m_pDirectDraw; }
|
||||||
|
inline MxDisplaySurface *GetDisplaySurface() { return this->m_displaySurface; }
|
||||||
|
inline void SetUnkE4(MxBool p_value) { this->m_unke4 = p_value; }
|
||||||
private:
|
private:
|
||||||
MxVideoParam m_videoParam;
|
MxVideoParam m_videoParam;
|
||||||
LPDIRECTDRAW m_pDirectDraw;
|
LPDIRECTDRAW m_pDirectDraw;
|
||||||
@ -33,6 +35,8 @@ class MxVideoManager : public MxMediaManager
|
|||||||
MxDisplaySurface *m_displaySurface;
|
MxDisplaySurface *m_displaySurface;
|
||||||
MxRegion *m_region;
|
MxRegion *m_region;
|
||||||
MxBool m_unk60;
|
MxBool m_unk60;
|
||||||
|
undefined m_pad61[84];
|
||||||
|
MxBool m_unke4;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXVIDEOMANAGER_H
|
#endif // MXVIDEOMANAGER_H
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user