diff --git a/LEGO1/legovideomanager.cpp b/LEGO1/legovideomanager.cpp index b940f879..9224ba8e 100644 --- a/LEGO1/legovideomanager.cpp +++ b/LEGO1/legovideomanager.cpp @@ -224,6 +224,31 @@ void LegoVideoManager::MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY) m_cursorY = 463; } +inline void LegoVideoManager::CursorMoved() +{ + if (m_cursorX != m_cursorXCopy || m_cursorY != m_cursorYCopy) { + if (m_cursorX >= 0 && m_cursorY >= 0) { + m_cursorXCopy = m_cursorX; + m_cursorYCopy = m_cursorY; + } + } + + LPDIRECTDRAWSURFACE ddSurface2 = m_displaySurface->GetDirectDrawSurface2(); + + if (!m_unk0x514) { + m_unk0x518.top = 0; + m_unk0x518.left = 0; + m_unk0x518.bottom = 16; + m_unk0x518.right = 16; + m_unk0x514 = MxDisplaySurface::FUN_100bc070(); + + if (!m_unk0x514) + m_cursorMoved = FALSE; + } + + ddSurface2->BltFast(m_cursorXCopy, m_cursorYCopy, m_unk0x514, &m_unk0x518, DDBLTFAST_WAIT | DDBLTFAST_SRCCOLORKEY); +} + // FUNCTION: LEGO1 0x1007b770 MxResult LegoVideoManager::Tickle() { @@ -268,45 +293,18 @@ MxResult LegoVideoManager::Tickle() while (cursor.Next(presenter)) presenter->PutData(); - if (m_cursorMoved) { - if (m_cursorX != m_cursorXCopy || m_cursorY != m_cursorYCopy) { - if (m_cursorX >= 0 && m_cursorY >= 0) { - m_cursorXCopy = m_cursorX; - m_cursorYCopy = m_cursorY; - } - } - - LPDIRECTDRAWSURFACE ddSurface2 = m_displaySurface->GetDirectDrawSurface2(); - - if (!m_unk0x514) { - m_unk0x518.top = 0; - m_unk0x518.left = 0; - m_unk0x518.bottom = 16; - m_unk0x518.right = 16; - m_unk0x514 = MxDisplaySurface::FUN_100bc070(); - - if (!m_unk0x514) - m_cursorMoved = FALSE; - } - - ddSurface2->BltFast( - m_cursorXCopy, - m_cursorYCopy, - m_unk0x514, - &m_unk0x518, - DDBLTFAST_WAIT | DDBLTFAST_SRCCOLORKEY - ); - } + if (m_cursorMoved) + CursorMoved(); if (m_drawFPS) FUN_1007bbc0(); } else if (m_unk0x500) { - MxPresenter* presenter2; - MxPresenterListCursor cursor2(m_presenters); + MxPresenter* presenter; + MxPresenterListCursor cursor(m_presenters); - if (cursor2.Last(presenter2)) - presenter2->PutData(); + if (cursor.Last(presenter)) + presenter->PutData(); } if (!m_initialized) { diff --git a/LEGO1/legovideomanager.h b/LEGO1/legovideomanager.h index eb2156ed..0404f6fa 100644 --- a/LEGO1/legovideomanager.h +++ b/LEGO1/legovideomanager.h @@ -5,6 +5,7 @@ #include "lego3dmanager.h" #include "mxdirect3d.h" #include "mxdirectx/mxstopwatch.h" +#include "mxtransitionmanager.h" #include "mxunknown100d9d00.h" #include "mxvideomanager.h" @@ -45,6 +46,8 @@ class LegoVideoManager : public MxVideoManager { MxResult ConfigureD3DRM(); void FUN_1007bbc0(); + inline void CursorMoved(); + Tgl::Renderer* m_renderer; Lego3DManager* m_3dManager; // 0x68 LegoROI* m_viewROI; // 0x6c diff --git a/LEGO1/mxpresenterlist.h b/LEGO1/mxpresenterlist.h index d8b74a3f..5f218392 100644 --- a/LEGO1/mxpresenterlist.h +++ b/LEGO1/mxpresenterlist.h @@ -62,4 +62,16 @@ class MxPresenterListCursor : public MxPtrListCursor { // SYNTHETIC: LEGO1 0x1001d090 // MxPtrList::`scalar deleting destructor' +// TEMPLATE: LEGO1 0x1001ef40 +// MxPtrListCursor::~MxPtrListCursor + +// TEMPLATE: LEGO1 0x1001f070 +// MxListCursor::~MxListCursor + +// TEMPLATE: LEGO1 0x1001f0c0 +// MxPresenterListCursor::~MxPresenterListCursor + +// TEMPLATE: LEGO1 0x10020760 +// MxListCursor::MxListCursor + #endif // MXPRESENTERLIST_H