address feedback

This commit is contained in:
Ramen2X 2023-09-29 10:42:50 -04:00
parent c3aa91518b
commit 12c9027d74
5 changed files with 76 additions and 78 deletions

View File

@ -31,11 +31,7 @@ class LegoInputManager : public MxPresenter
undefined m_pad40[0x48]; undefined m_pad40[0x48];
MxBool m_unk88; MxBool m_unk88;
MxU8 m_unk89; undefined m_unk89[0x113];
MxU8 m_unk8a;
MxU8 m_unk8b;
undefined m_pad8c[0x110];
// 0x19C // 0x19C
int m_joystickIndex; int m_joystickIndex;
@ -45,9 +41,9 @@ class LegoInputManager : public MxPresenter
// 0x334 // 0x334
MxBool m_useJoystick; MxBool m_useJoystick;
MxU8 m_unk335; undefined m_unk335;
MxBool m_unk336; MxBool m_unk336;
MxU8 m_unk337; undefined m_unk337;
}; };
#endif // LEGOINPUTMANAGER_H #endif // LEGOINPUTMANAGER_H

View File

@ -23,6 +23,7 @@ class LegoVideoManager : public MxVideoManager
inline MxDirect3D *GetDirect3D() { return this->m_direct3d; } inline MxDirect3D *GetDirect3D() { return this->m_direct3d; }
void SetSkyColor(float r, float g, float b); void SetSkyColor(float r, float g, float b);
inline void SetUnkE4(MxBool p_value) { this->m_unke4 = p_value; }
private: private:
undefined4 m_unk64; undefined4 m_unk64;
@ -30,6 +31,8 @@ class LegoVideoManager : public MxVideoManager
undefined4 m_unk6c; undefined4 m_unk6c;
undefined4 m_unk70; undefined4 m_unk70;
MxDirect3D *m_direct3d; MxDirect3D *m_direct3d;
undefined m_pad78[0x6c];
MxBool m_unke4;
}; };
#endif // LEGOVIDEOMANAGER_H #endif // LEGOVIDEOMANAGER_H

View File

@ -1,4 +1,7 @@
#include "mxtransitionmanager.h" #include "mxtransitionmanager.h"
#include "legovideomanager.h"
DECOMP_SIZE_ASSERT(MxTransitionManager, 0x900);
// OFFSET: LEGO1 0x1004b8d0 STUB // OFFSET: LEGO1 0x1004b8d0 STUB
MxTransitionManager::MxTransitionManager() MxTransitionManager::MxTransitionManager()
@ -29,43 +32,43 @@ void MxTransitionManager::SetWaitIndicator(MxVideoPresenter *videoPresenter)
// OFFSET: LEGO1 0x1004baa0 // OFFSET: LEGO1 0x1004baa0
MxResult MxTransitionManager::GetDDrawSurfaceFromVideoManager() // vtable+0x14 MxResult MxTransitionManager::GetDDrawSurfaceFromVideoManager() // vtable+0x14
{ {
LegoVideoManager *videoManager = VideoManager(); LegoVideoManager *videoManager = VideoManager();
this->m_ddSurface = videoManager->GetDisplaySurface()->GetDirectDrawSurface2(); this->m_ddSurface = videoManager->GetDisplaySurface()->GetDirectDrawSurface2();
return SUCCESS; return SUCCESS;
} }
// OFFSET: LEGO1 0x1004bb70 // OFFSET: LEGO1 0x1004bb70
MxResult MxTransitionManager::StartTransition(TransitionType p_animationType, MxS32 p_speed, MxResult MxTransitionManager::StartTransition(TransitionType p_animationType, MxS32 p_speed,
MxU8 p_unk, MxBool p_playMusicInAnim) undefined p_unk, MxBool p_playMusicInAnim)
{ {
// TODO: Incomplete and far from matching // TODO: Incomplete and far from matching
if (this->m_transitionType == NOT_TRANSITIONING) { if (this->m_transitionType == NOT_TRANSITIONING) {
if (!p_playMusicInAnim) { if (!p_playMusicInAnim) {
MxBackgroundAudioManager *backgroundAudioManager = BackgroundAudioManager(); MxBackgroundAudioManager *backgroundAudioManager = BackgroundAudioManager();
backgroundAudioManager->Stop(); 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; 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;
LegoVideoManager *videoManager = VideoManager();
videoManager->SetUnkE4(FALSE);
SetAppCursor(1);
return SUCCESS;
}
return FAILURE;
} }

View File

@ -3,7 +3,6 @@
#include "mxcore.h" #include "mxcore.h"
#include "mxvideopresenter.h" #include "mxvideopresenter.h"
#include "legovideomanager.h"
#include "legoomni.h" #include "legoomni.h"
@ -11,49 +10,49 @@
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 // OFFSET: LEGO1 0x1004b950
inline virtual const char *ClassName() const override // vtable+0x0c inline virtual const char *ClassName() const override // vtable+0x0c
{ {
return "MxTransitionManager"; return "MxTransitionManager";
} }
// OFFSET: LEGO1 0x1004b960 // OFFSET: LEGO1 0x1004b960
inline virtual MxBool IsA(const char *name) const override // vtable+0x10 inline virtual MxBool IsA(const char *name) const override // vtable+0x10
{ {
return !strcmp(name, MxTransitionManager::ClassName()) || MxCore::IsA(name); return !strcmp(name, MxTransitionManager::ClassName()) || MxCore::IsA(name);
} }
virtual MxResult GetDDrawSurfaceFromVideoManager(); // vtable+0x14 virtual MxResult GetDDrawSurfaceFromVideoManager(); // vtable+0x14
enum TransitionType { enum TransitionType {
NOT_TRANSITIONING, NOT_TRANSITIONING,
NO_ANIMATION, NO_ANIMATION,
DISSOLVE, DISSOLVE,
PIXELATION, PIXELATION,
SCREEN_WIPE, SCREEN_WIPE,
WINDOWS, WINDOWS,
BROKEN // Unknown what this is supposed to be, it locks the game up BROKEN // Unknown what this is supposed to be, it locks the game up
}; };
MxResult StartTransition(TransitionType p_animationType, MxS32 p_speed, MxU8 p_unk, MxBool p_playMusicInAnim); MxResult StartTransition(TransitionType p_animationType, MxS32 p_speed, undefined p_unk, MxBool p_playMusicInAnim);
private: private:
undefined m_pad00[0x20]; undefined m_pad00[0x20];
MxU8 m_unk20; MxU8 m_unk20;
undefined m_pad21[0x03]; undefined m_pad21[0x03];
TransitionType m_transitionType; TransitionType m_transitionType;
LPDIRECTDRAWSURFACE m_ddSurface; LPDIRECTDRAWSURFACE m_ddSurface;
MxU16 m_animationTimer; MxU16 m_animationTimer;
undefined m_pad36[0x8c2]; undefined m_pad36[0x8c2];
MxULong m_systemTime; MxULong m_systemTime;
MxS32 m_animationSpeed; MxS32 m_animationSpeed;
}; };
#endif // MXTRANSITIONMANAGER_H #endif // MXTRANSITIONMANAGER_H

View File

@ -27,7 +27,6 @@ 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 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;
@ -35,8 +34,6 @@ 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