diff --git a/LEGO1/mxdirect3d.cpp b/LEGO1/mxdirect3d.cpp index a4a6db89..b1aa54e2 100644 --- a/LEGO1/mxdirect3d.cpp +++ b/LEGO1/mxdirect3d.cpp @@ -9,4 +9,18 @@ MxDirect3D::MxDirect3D() this->m_pDirect3dDevice = NULL; this->m_unk88c = NULL; this->m_pDeviceModeFinder = NULL; +} + +// OFFSET: LEGO1 0x1009b290 +void MxDirect3D::Clear() +{ + if(this->m_pDirect3dDevice) { + this->m_pDirect3dDevice->Release(); + this->m_pDirect3dDevice = NULL; + } + if(this->m_pDirect3d) { + this->m_pDirect3d->Release(); + this->m_pDirect3d = NULL; + } + Destroy(); } \ No newline at end of file diff --git a/LEGO1/mxdirect3d.h b/LEGO1/mxdirect3d.h index 74e485e4..c2e50008 100644 --- a/LEGO1/mxdirect3d.h +++ b/LEGO1/mxdirect3d.h @@ -14,6 +14,7 @@ class MxDirect3D : public MxDirectDraw public: MxDirect3D(); + void Clear(); inline MxDeviceModeFinder *GetDeviceModeFinder() { return this->m_pDeviceModeFinder; }; private: