diff --git a/LEGO1/lego/legoomni/include/legovideomanager.h b/LEGO1/lego/legoomni/include/legovideomanager.h index eb7a0b90..ffdcbdcc 100644 --- a/LEGO1/lego/legoomni/include/legovideomanager.h +++ b/LEGO1/lego/legoomni/include/legovideomanager.h @@ -88,7 +88,7 @@ class LegoVideoManager : public MxVideoManager { MxS32 m_cursorY; // 0x510 LPDIRECTDRAWSURFACE m_cursorSurface; // 0x514 RECT m_cursorRect; // 0x518 - undefined4 m_unk0x528; // 0x528 + LPDIRECTDRAWSURFACE m_unk0x528; // 0x528 MxBool m_drawFPS; // 0x52c RECT m_fpsRect; // 0x530 HFONT m_arialFont; // 0x540 diff --git a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp index f790c7da..d1767f16 100644 --- a/LEGO1/lego/legoomni/src/video/legovideomanager.cpp +++ b/LEGO1/lego/legoomni/src/video/legovideomanager.cpp @@ -43,7 +43,7 @@ LegoVideoManager::LegoVideoManager() m_cursorSurface = NULL; m_fullScreenMovie = FALSE; m_drawFPS = FALSE; - m_unk0x528 = 0; + m_unk0x528 = NULL; m_arialFont = NULL; m_unk0xe5 = FALSE; m_unk0x554 = FALSE; @@ -220,17 +220,34 @@ MxResult LegoVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyM // FUNCTION: LEGO1 0x1007b5e0 void LegoVideoManager::Destroy() { - // todo: delete m_unk0x512 - // todo: delete m_unk0x258 + if (m_cursorSurface != NULL) { + m_cursorSurface->Release(); + m_cursorSurface = NULL; + } + + if (m_unk0x528 != NULL) { + m_unk0x528->Release(); + m_unk0x528 = NULL; + } + if (m_arialFont != NULL) { DeleteObject(m_arialFont); m_arialFont = NULL; } - // delete m_unk0x64; //TODO: delete d3drm + delete m_renderer; + + if (m_viewROI != NULL) { + if (m_3dManager != NULL) { + m_3dManager->Remove(*m_viewROI); + } + + delete m_viewROI; + } delete m_3dManager; MxVideoManager::Destroy(); + delete m_phonemeRefList; delete m_stopWatch; }