mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-22 16:04:17 +00:00
Implement TglImpl::MeshBuilder::CreateMesh (#635)
* WIP * Change * Fix * Improve match * Rename class * Fix function * Fix annotation * Fix annotations * Fix annotation
This commit is contained in:

committed by
GitHub

parent
53e2353f78
commit
873926afe2
@@ -3,5 +3,5 @@
|
||||
// FUNCTION: LEGO1 0x100a5e40
|
||||
ViewLOD::~ViewLOD()
|
||||
{
|
||||
delete m_unk0x04;
|
||||
delete m_meshBuilder;
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ public:
|
||||
c_bit4 = 0x10
|
||||
};
|
||||
|
||||
ViewLOD(Tgl::Renderer* pRenderer) : m_unk0x04(NULL), m_unk0x08(3) {}
|
||||
ViewLOD(Tgl::Renderer* pRenderer) : m_meshBuilder(NULL), m_unk0x08(3) {}
|
||||
~ViewLOD() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100a6f30
|
||||
@@ -26,8 +26,8 @@ public:
|
||||
// FUNCTION: LEGO1 0x100a6f50
|
||||
int NVerts() const override { return NumPolys() * 2; } // vtable+0x08
|
||||
|
||||
Tgl::Unk* GetUnknown0x04() { return m_unk0x04; }
|
||||
const Tgl::Unk* GetUnknown0x04() const { return m_unk0x04; }
|
||||
Tgl::MeshBuilder* GetMeshBuilder() { return m_meshBuilder; }
|
||||
const Tgl::MeshBuilder* GetMeshBuilder() const { return m_meshBuilder; }
|
||||
unsigned char GetUnknown0x08Test4() { return m_unk0x08 & 0xffffff04; }
|
||||
unsigned char GetUnknown0x08Test8() { return m_unk0x08 & 0xffffff08; }
|
||||
|
||||
@@ -38,8 +38,8 @@ public:
|
||||
// ViewLOD::`scalar deleting destructor'
|
||||
|
||||
protected:
|
||||
Tgl::Unk* m_unk0x04; // 0x04
|
||||
undefined4 m_unk0x08; // 0x08
|
||||
Tgl::MeshBuilder* m_meshBuilder; // 0x04
|
||||
undefined4 m_unk0x08; // 0x08
|
||||
};
|
||||
|
||||
#endif // VIEWLOD_H
|
||||
|
@@ -93,13 +93,13 @@ void ViewManager::FUN_100a66a0(ViewROI* p_roi)
|
||||
const ViewLOD* lod = (const ViewLOD*) p_roi->GetLOD(p_roi->GetUnknown0xe0());
|
||||
|
||||
if (lod != NULL) {
|
||||
const Tgl::Unk* unk = NULL;
|
||||
const Tgl::MeshBuilder* meshBuilder = NULL;
|
||||
Tgl::Group* roiGeometry = p_roi->GetGeometry();
|
||||
|
||||
unk = lod->GetUnknown0x04();
|
||||
meshBuilder = lod->GetMeshBuilder();
|
||||
|
||||
if (unk != NULL) {
|
||||
roiGeometry->Remove(unk);
|
||||
if (meshBuilder != NULL) {
|
||||
roiGeometry->Remove(meshBuilder);
|
||||
}
|
||||
|
||||
scene->Remove(roiGeometry);
|
||||
|
Reference in New Issue
Block a user