From 9dbb8d4f0babeea5c3e497cd9cffafc668f8f668 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 8 Oct 2023 15:52:08 -0400 Subject: [PATCH] Minor improvements --- LEGO1/legovideomanager.cpp | 19 +++++++++---------- LEGO1/legovideomanager.h | 25 +++++++++++-------------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/LEGO1/legovideomanager.cpp b/LEGO1/legovideomanager.cpp index 14a727d2..ca7926b9 100644 --- a/LEGO1/legovideomanager.cpp +++ b/LEGO1/legovideomanager.cpp @@ -1,5 +1,7 @@ #include "legovideomanager.h" +DECOMP_SIZE_ASSERT(LegoVideoManager, 0x590); + // OFFSET: LEGO1 0x1007aa20 STUB LegoVideoManager::LegoVideoManager() { @@ -39,20 +41,17 @@ void LegoVideoManager::EnableFullScreenMovie(MxBool p_enable, MxBool p_scale) } // OFFSET: LEGO1 0x1007b6a0 -void LegoVideoManager::MoveCursor(int p_x, int p_y) +void LegoVideoManager::MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY) { - m_cursorX = p_x; - m_cursorY = p_y; + m_cursorX = p_cursorX; + m_cursorY = p_cursorY; m_cursorMoved = TRUE; - if(623 < p_x) - { - m_cursorX = 623; - } - if (463 < p_y) - { + if (623 < p_cursorX) + m_cursorX = 623; + + if (463 < p_cursorY) m_cursorY = 463; - } } // OFFSET: LEGO1 0x1007c440 diff --git a/LEGO1/legovideomanager.h b/LEGO1/legovideomanager.h index 5fd2a063..cc051f16 100644 --- a/LEGO1/legovideomanager.h +++ b/LEGO1/legovideomanager.h @@ -5,7 +5,8 @@ #include "mxdirect3d.h" #include "lego3dmanager.h" #include "decomp.h" -#include "ddraw.h" + +#include // VTABLE 0x100d9c88 // SIZE 0x590 @@ -25,7 +26,7 @@ class LegoVideoManager : public MxVideoManager inline MxDirect3D *GetDirect3D() { return this->m_direct3d; } void SetSkyColor(float r, float g, float b); - inline void SetUnkE4(MxBool p_value) { this->m_unke4 = p_value; } + inline void SetUnkE4(MxBool p_unk0xe4) { this->m_unk0xe4 = p_unk0xe4; } // OFFSET: LEGO1 0x1007c4c0 void OverrideSkyColor(MxBool p_shouldOverride) { this->m_videoParam.GetPalette()->SetOverrideSkyColor(p_shouldOverride);} @@ -36,18 +37,14 @@ class LegoVideoManager : public MxVideoManager undefined4 m_unk6c; undefined4 m_unk70; MxDirect3D *m_direct3d; - undefined m_pad78[0x6c]; - MxBool m_unke4; - undefined m_pade5[2]; - PALETTEENTRY m_paletteEntries[256]; - MxBool m_unk4e7; - undefined4 m_unk4e8; - MxBool m_isFullScreenMovie; - undefined m_pad4ed[0x14]; - MxBool m_cursorMoved; - undefined m_pad4f8[8]; - int m_cursorX; - int m_cursorY; + undefined m_pad0x78[0x6c]; + MxBool m_unk0xe4; + undefined m_pad0xe8[0x41c]; + MxBool m_cursorMoved; // 0x501 + undefined m_pad0x502[0x8]; + MxS32 m_cursorX; // 0x50c + MxS32 m_cursorY; // 0x510 + undefined m_pad0x514[0x7c]; }; #endif // LEGOVIDEOMANAGER_H