From 39f49a2847f7c6bb09e63e4dcd815664b18b12a6 Mon Sep 17 00:00:00 2001 From: Misha <106913236+MishaProductions@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:17:43 -0500 Subject: [PATCH] commit --- LEGO1/legovideomanager.cpp | 50 +++++++++++++++++++++++++++++++++++--- LEGO1/legovideomanager.h | 30 ++++++++++++++++++++--- 2 files changed, 72 insertions(+), 8 deletions(-) diff --git a/LEGO1/legovideomanager.cpp b/LEGO1/legovideomanager.cpp index 775c2e8c..cfe6790e 100644 --- a/LEGO1/legovideomanager.cpp +++ b/LEGO1/legovideomanager.cpp @@ -2,16 +2,58 @@ DECOMP_SIZE_ASSERT(LegoVideoManager, 0x590); -// OFFSET: LEGO1 0x1007aa20 STUB +// OFFSET: LEGO1 0x1007aa20 LegoVideoManager::LegoVideoManager() { - // TODO + m_unk64 = 0; + m_3dManager = NULL; + m_unk6c = 0; + m_direct3d = 0; + m_unk0xe6 = FALSE; + memset(m_unk0x78, 0, sizeof(m_unk0x78)); + m_unk0x78[0] = 0x6c; + m_unk4e8 = 0; + m_isFullscreenMovie = FALSE; + m_palette = NULL; + m_prefCounter = NULL; + m_cursorMoved = FALSE; + m_cursorX = m_cursorY; + m_cursorYCopy = m_cursorY; + m_cursorXCopy = m_cursorY; + m_unk0x514 = 0; + m_unk0x500 = FALSE; + m_drawFPS = FALSE; + m_unk0x528 = 0; + m_arialFont = NULL; + m_unk0xe5 = FALSE; + m_unk0x554 = 0; + m_initialized = FALSE; } -// OFFSET: LEGO1 0x1007ab40 STUB +// OFFSET: LEGO1 0x1007ab40 LegoVideoManager::~LegoVideoManager() { - // TODO + Destroy(); + delete m_palette; +} + +// OFFSET: LEGO1 0x1007b5e0 +void LegoVideoManager::Destroy() +{ + // todo: delete m_unk0x512 + // todo: delete m_unk0x258 + if (m_arialFont != NULL) + { + DeleteObject(m_arialFont); + m_arialFont = NULL; + } + + // delete m_unk64; //TODO: delete d3drm + + delete m_3dManager; + MxVideoManager::Destroy(); + // todo: delete m_unk4e8 + delete[] m_prefCounter; } // OFFSET: LEGO1 0x1007c560 STUB diff --git a/LEGO1/legovideomanager.h b/LEGO1/legovideomanager.h index b845e8a8..ed666c75 100644 --- a/LEGO1/legovideomanager.h +++ b/LEGO1/legovideomanager.h @@ -33,20 +33,42 @@ class LegoVideoManager : public MxVideoManager { this->m_videoParam.GetPalette()->SetOverrideSkyColor(p_shouldOverride); } + virtual void Destroy() override; // vtable+0x18 + private: undefined4 m_unk64; Lego3DManager* m_3dManager; undefined4 m_unk6c; undefined4 m_unk70; MxDirect3D* m_direct3d; - undefined m_pad0x78[0x6c]; + undefined4 m_unk0x78[27]; MxBool m_unk0xe4; - undefined m_pad0xe8[0x41c]; + MxBool m_unk0xe5; + MxBool m_unk0xe6; + PALETTEENTRY m_paletteEntries[256]; + char m_padding0x4e7; + undefined4 m_unk4e8; + MxBool m_isFullscreenMovie; // 0x4ec + MxPalette* m_palette; // 0x4f0 + LARGE_INTEGER* m_prefCounter; // 0x4f4 + undefined m_padding0x4f4[8]; + MxBool m_unk0x500; MxBool m_cursorMoved; // 0x501 - undefined m_pad0x502[0x8]; + MxS32 m_cursorXCopy; + MxS32 m_cursorYCopy; MxS32 m_cursorX; // 0x50c MxS32 m_cursorY; // 0x510 - undefined m_pad0x514[0x7c]; + undefined4 m_unk0x514; + undefined m_pad0x518[0x10]; + undefined4 m_unk0x528; + MxBool m_drawFPS; + RECT m_fpsRect; + HFONT m_arialFont; + SIZE m_fpsSize; + undefined m_pad0x54c[8]; + undefined m_unk0x554; + MxBool m_initialized; + undefined m_pad0x556[0x39]; }; #endif // LEGOVIDEOMANAGER_H