From 9eea48f62956bd239165f64088a9cb8d9fece3e6 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Wed, 10 Jan 2024 17:40:24 -0500 Subject: [PATCH] Fix structure of Lego3DView (#422) --- LEGO1/lego/sources/3dmanager/lego3dview.cpp | 7 ++++--- LEGO1/lego/sources/3dmanager/lego3dview.h | 10 ++++------ LEGO1/viewmanager/viewmanager.cpp | 15 +++++++++++++++ LEGO1/viewmanager/viewmanager.h | 9 ++++++++- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/LEGO1/lego/sources/3dmanager/lego3dview.cpp b/LEGO1/lego/sources/3dmanager/lego3dview.cpp index 04c9ea22..9225e2ea 100644 --- a/LEGO1/lego/sources/3dmanager/lego3dview.cpp +++ b/LEGO1/lego/sources/3dmanager/lego3dview.cpp @@ -10,11 +10,12 @@ DECOMP_SIZE_ASSERT(Lego3DView, 0xa8) ///////////////////////////////////////////////////////////////////////////// // Lego3DView -// STUB: LEGO1 0x100aae90 +// FUNCTION: LEGO1 0x100aae90 Lego3DView::Lego3DView() { m_pViewManager = 0; m_previousRenderTime = 0; + m_unk0x98 = 0; m_pPointOfView = 0; } @@ -53,12 +54,12 @@ BOOL Lego3DView::Create(const TglSurface::CreateStruct& rCreateStruct, Tgl::Rend return TRUE; } -// STUB: LEGO1 0x100ab0b0 +// FUNCTION: LEGO1 0x100ab0b0 void Lego3DView::Destroy() { if (m_pPointOfView) { m_pPointOfView = 0; - // m_pViewManager->SetPOVSource(0); + m_pViewManager->SetPOVSource(0); } delete m_pViewManager; diff --git a/LEGO1/lego/sources/3dmanager/lego3dview.h b/LEGO1/lego/sources/3dmanager/lego3dview.h index f02e7d31..7e68bdcb 100644 --- a/LEGO1/lego/sources/3dmanager/lego3dview.h +++ b/LEGO1/lego/sources/3dmanager/lego3dview.h @@ -3,9 +3,7 @@ #include "decomp.h" #include "legoview1.h" - -class ViewROI; -class ViewManager; +#include "viewmanager/viewmanager.h" ///////////////////////////////////////////////////////////////////////////// // Lego3DView @@ -35,9 +33,9 @@ class Lego3DView : public LegoView1 { private: ViewManager* m_pViewManager; // 0x88 - double m_previousRenderTime; // 0x8c - ViewROI* m_pPointOfView; // 0x94 - undefined m_unk0x98[0x0c]; // 0x98 + double m_previousRenderTime; // 0x90 + double m_unk0x98; // 0x98 + ViewROI* m_pPointOfView; // 0xa0 }; // SYNTHETIC: LEGO1 0x100aaf10 diff --git a/LEGO1/viewmanager/viewmanager.cpp b/LEGO1/viewmanager/viewmanager.cpp index 8ec2aad2..71ab5fcc 100644 --- a/LEGO1/viewmanager/viewmanager.cpp +++ b/LEGO1/viewmanager/viewmanager.cpp @@ -1,7 +1,22 @@ #include "viewmanager.h" +// STUB: LEGO1 0x100a5eb0 +ViewManager::ViewManager(Tgl::Group* scene, const OrientableROI* point_of_view) +{ +} + +// STUB: LEGO1 0x100a60c0 +ViewManager::~ViewManager() +{ +} + // STUB: LEGO1 0x100a64d0 void ViewManager::RemoveAll(ViewROI*) { // TODO } + +// STUB: LEGO1 0x100a6da0 +void ViewManager::SetPOVSource(const OrientableROI* point_of_view) +{ +} diff --git a/LEGO1/viewmanager/viewmanager.h b/LEGO1/viewmanager/viewmanager.h index 2b0d102e..41421b14 100644 --- a/LEGO1/viewmanager/viewmanager.h +++ b/LEGO1/viewmanager/viewmanager.h @@ -1,11 +1,18 @@ #ifndef VIEWMANAGER_H #define VIEWMANAGER_H -class ViewROI; +#include "viewroi.h" +// VTABLE: LEGO1 0x100dbd88 +// SIZE 0x1bc class ViewManager { public: + ViewManager(Tgl::Group* scene, const OrientableROI* point_of_view); + virtual ~ViewManager(); + __declspec(dllexport) void RemoveAll(ViewROI*); + + void SetPOVSource(const OrientableROI* point_of_view); }; #endif // VIEWMANAGER_H