2024-01-06 21:29:32 -05:00
|
|
|
#ifndef _Lego3DManager_h
|
|
|
|
#define _Lego3DManager_h
|
|
|
|
|
|
|
|
#include "assert.h"
|
|
|
|
#include "lego3dview.h"
|
|
|
|
|
2024-01-10 17:34:32 -05:00
|
|
|
namespace Tgl
|
|
|
|
{
|
|
|
|
class Renderer;
|
|
|
|
class Group;
|
|
|
|
} // namespace Tgl
|
|
|
|
|
2024-01-06 21:29:32 -05:00
|
|
|
class ViewROI;
|
|
|
|
|
|
|
|
// ??? for now
|
|
|
|
class ViewLODListManager;
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Lego3DManager
|
|
|
|
|
|
|
|
// VTABLE: LEGO1 0x100dbfa4
|
|
|
|
// SIZE 0x10
|
|
|
|
class Lego3DManager {
|
|
|
|
public:
|
|
|
|
// SIZE 0x28
|
|
|
|
struct CreateStruct {
|
|
|
|
const GUID* m_pDriverGUID; // 0x00
|
|
|
|
HWND m_hWnd; // 0x04
|
|
|
|
IDirectDraw* m_pDirectDraw; // 0x08
|
|
|
|
IDirectDrawSurface* m_pFrontBuffer; // 0x0c
|
|
|
|
IDirectDrawSurface* m_pBackBuffer; // 0x10
|
|
|
|
IDirectDrawPalette* m_pPalette; // 0x14
|
|
|
|
BOOL m_isFullScreen; // 0x18
|
|
|
|
BOOL m_isWideViewAngle; // 0x1c
|
|
|
|
IDirect3D2* m_direct3d; // 0x20
|
|
|
|
IDirect3DDevice2* m_d3dDevice; // 0x24
|
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
|
|
|
Lego3DManager();
|
|
|
|
virtual ~Lego3DManager();
|
|
|
|
|
|
|
|
BOOL Create(CreateStruct&);
|
|
|
|
void Destroy();
|
|
|
|
|
|
|
|
BOOL Add(ViewROI&);
|
|
|
|
BOOL Remove(ViewROI&);
|
|
|
|
BOOL Moved(ViewROI&);
|
|
|
|
BOOL SetPointOfView(ViewROI&);
|
|
|
|
|
|
|
|
double Render(double p_und);
|
|
|
|
|
2024-02-24 08:55:00 -05:00
|
|
|
int SetFrustrum(float p_fov, float p_front, float p_back);
|
|
|
|
|
2024-01-06 21:29:32 -05:00
|
|
|
Tgl::Renderer* GetRenderer();
|
|
|
|
Tgl::Group* GetScene();
|
|
|
|
Lego3DView* GetLego3DView();
|
|
|
|
// ??? for now
|
|
|
|
ViewLODListManager* GetViewLODListManager();
|
|
|
|
|
2024-01-18 08:34:14 -05:00
|
|
|
// SYNTHETIC: LEGO1 0x100ab340
|
|
|
|
// Lego3DManager::`scalar deleting destructor'
|
|
|
|
|
2024-01-06 21:29:32 -05:00
|
|
|
private:
|
|
|
|
Tgl::Renderer* m_pRenderer; // 0x04
|
|
|
|
|
|
|
|
Lego3DView* m_pLego3DView; // 0x08
|
|
|
|
ViewLODListManager* m_pViewLODListManager; // 0x0c
|
|
|
|
};
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Lego3DManager implementaion
|
|
|
|
|
2024-11-23 22:37:24 -05:00
|
|
|
// FUNCTION: BETA10 0x10079bd0
|
2024-01-06 21:29:32 -05:00
|
|
|
inline BOOL Lego3DManager::Add(ViewROI& rROI)
|
|
|
|
{
|
|
|
|
assert(m_pLego3DView);
|
|
|
|
|
|
|
|
return m_pLego3DView->Add(rROI);
|
|
|
|
}
|
|
|
|
|
2024-11-23 22:37:24 -05:00
|
|
|
// FUNCTION: BETA10 0x10037430
|
2024-01-06 21:29:32 -05:00
|
|
|
inline BOOL Lego3DManager::Remove(ViewROI& rROI)
|
|
|
|
{
|
|
|
|
assert(m_pLego3DView);
|
|
|
|
|
|
|
|
return m_pLego3DView->Remove(rROI);
|
|
|
|
}
|
|
|
|
|
2024-11-23 22:37:24 -05:00
|
|
|
// FUNCTION: BETA10 0x100d8990
|
2024-01-06 21:29:32 -05:00
|
|
|
inline BOOL Lego3DManager::SetPointOfView(ViewROI& rROI)
|
|
|
|
{
|
|
|
|
assert(m_pLego3DView);
|
|
|
|
|
|
|
|
return m_pLego3DView->SetPointOfView(rROI);
|
|
|
|
}
|
|
|
|
|
2024-11-23 22:37:24 -05:00
|
|
|
// FUNCTION: BETA10 0x1004af70
|
2024-01-06 21:29:32 -05:00
|
|
|
inline BOOL Lego3DManager::Moved(ViewROI& rROI)
|
|
|
|
{
|
|
|
|
assert(m_pLego3DView);
|
|
|
|
|
|
|
|
return m_pLego3DView->Moved(rROI);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline Tgl::Renderer* Lego3DManager::GetRenderer()
|
|
|
|
{
|
|
|
|
return m_pRenderer;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline Tgl::Group* Lego3DManager::GetScene()
|
|
|
|
{
|
|
|
|
assert(m_pLego3DView);
|
|
|
|
|
|
|
|
return m_pLego3DView->GetScene();
|
|
|
|
}
|
|
|
|
|
2024-09-03 16:50:30 -04:00
|
|
|
// FUNCTION: BETA10 0x10011840
|
2024-01-06 21:29:32 -05:00
|
|
|
inline Lego3DView* Lego3DManager::GetLego3DView()
|
|
|
|
{
|
|
|
|
return m_pLego3DView;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline ViewLODListManager* Lego3DManager::GetViewLODListManager()
|
|
|
|
{
|
|
|
|
return m_pViewLODListManager;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _Lego3DManager_h */
|