Fixes/matches

This commit is contained in:
Christian Semmler 2023-12-28 12:21:04 -05:00
parent 1be21fefb4
commit 546facb7eb
5 changed files with 24 additions and 16 deletions

View File

@ -29,7 +29,7 @@ void Lego3DManager::Init(MxRenderSettings& p_settings)
m_3dView = new Lego3DView();
MxRenderSettings settings;
settings = p_settings;
MxRenderSettings::CopyFrom(settings, p_settings);
m_3dView->Init(settings, *m_render);
}

View File

@ -3,6 +3,8 @@
#include "legoroi.h"
#include "tgl/tgl.h"
DECOMP_SIZE_ASSERT(Lego3DView, 0xa8)
// STUB: LEGO1 0x100aae90
Lego3DView::Lego3DView()
{

View File

@ -1,14 +1,16 @@
#ifndef LEGO3DVIEW_H
#define LEGO3DVIEW_H
#include "mxrendersettings.h"
#include "mxtypes.h"
#include "tgl/d3drm/impl.h"
#include "viewmanager/viewmanager.h"
class LegoROI;
class MxRenderSettings;
class Tgl::Renderer;
// VTABLE: LEGO1 0x100dbf78
// SIZE 0xa8
class Lego3DView {
public:
Lego3DView();
@ -28,6 +30,7 @@ class Lego3DView {
TglImpl::ViewImpl* m_viewPort; // 0x10
char m_pad[0x78]; // 0x14
ViewManager* m_viewManager; // 0x88
undefined m_unk0x8c[20]; // 0x8c
};
#endif // LEGO3DVIEW_H

View File

@ -2,18 +2,20 @@
#include "decomp.h"
DECOMP_SIZE_ASSERT(MxRenderSettings, 0x28)
// FUNCTION: LEGO1 0x100ab2d0
MxU32 MxRenderSettings::operator=(const MxRenderSettings& p_settings)
MxU32 MxRenderSettings::CopyFrom(MxRenderSettings& p_dest, const MxRenderSettings& p_src)
{
this->m_unk0x00 = p_settings.m_unk0x00;
this->m_hwnd = p_settings.m_hwnd;
this->m_directDraw = p_settings.m_directDraw;
this->m_ddSurface1 = p_settings.m_ddSurface1;
this->m_ddSurface2 = p_settings.m_ddSurface2;
this->m_flags = p_settings.m_flags;
this->m_unk0x18 = p_settings.m_unk0x18;
this->m_flags2 = p_settings.m_flags2;
this->m_direct3d = p_settings.m_direct3d;
this->m_d3dDevice = p_settings.m_d3dDevice;
p_dest.m_unk0x00 = p_src.m_unk0x00;
p_dest.m_hwnd = p_src.m_hwnd;
p_dest.m_directDraw = p_src.m_directDraw;
p_dest.m_ddSurface1 = p_src.m_ddSurface1;
p_dest.m_ddSurface2 = p_src.m_ddSurface2;
p_dest.m_flags = p_src.m_flags;
p_dest.m_unk0x18 = p_src.m_unk0x18;
p_dest.m_flags2 = p_src.m_flags2;
p_dest.m_direct3d = p_src.m_direct3d;
p_dest.m_d3dDevice = p_src.m_d3dDevice;
return 1;
}

View File

@ -1,5 +1,5 @@
#ifndef MXRENDERSETTINGS_H
#define MXRENDERSETTING_H
#define MXRENDERSETTINGS_H
#include "decomp.h"
#include "mxtypes.h"
@ -8,9 +8,10 @@
#include <ddraw.h>
#include <windows.h>
class MxRenderSettings {
// SIZE 0x28
struct MxRenderSettings {
public:
MxU32 operator=(const MxRenderSettings& p_settings);
static MxU32 CopyFrom(MxRenderSettings& p_dest, const MxRenderSettings& p_src);
undefined4 m_unk0x00; // 0x00
HWND m_hwnd; // 0x04