From 4c429af75574338cf8fbf802823c32c7176db5d5 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 26 Mar 2024 13:43:17 -0400 Subject: [PATCH] Style --- LEGO1/lego/sources/geom/legoweedge.cpp | 4 +++- LEGO1/lego/sources/geom/legoweedge.h | 8 ++++---- LEGO1/lego/sources/geom/legowegedge.cpp | 4 ++-- LEGO1/lego/sources/geom/legowegedge.h | 3 ++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/LEGO1/lego/sources/geom/legoweedge.cpp b/LEGO1/lego/sources/geom/legoweedge.cpp index 922affd7..ac2ee6b3 100644 --- a/LEGO1/lego/sources/geom/legoweedge.cpp +++ b/LEGO1/lego/sources/geom/legoweedge.cpp @@ -21,9 +21,10 @@ LegoWEEdge::~LegoWEEdge() // FUNCTION: LEGO1 0x1009a5b0 LegoResult LegoWEEdge::VTable0x04() { - for (int i = 0; i < m_numEdges; i++) { + for (LegoS32 i = 0; i < m_numEdges; i++) { Edge* e1 = m_edges[i]; Edge* e2 = (m_numEdges - i) == 1 ? m_edges[0] : m_edges[i + 1]; + if (e2->m_pointA == e1->m_pointA) { e1->m_faceA = this; e2->m_faceB = this; @@ -49,5 +50,6 @@ LegoResult LegoWEEdge::VTable0x04() e2->m_cwA = e1; } } + return SUCCESS; } diff --git a/LEGO1/lego/sources/geom/legoweedge.h b/LEGO1/lego/sources/geom/legoweedge.h index eea83914..0dd672b9 100644 --- a/LEGO1/lego/sources/geom/legoweedge.h +++ b/LEGO1/lego/sources/geom/legoweedge.h @@ -8,7 +8,6 @@ class LegoWEEdge; // SIZE 0x24 struct Edge { -public: undefined4 m_unk0x00; // 0x00 LegoWEEdge* m_faceA; // 0x04 LegoWEEdge* m_faceB; // 0x08 @@ -16,8 +15,8 @@ struct Edge { Edge* m_cwA; // 0x10 Edge* m_ccwB; // 0x14 Edge* m_cwB; // 0x18 - void* m_pointA; // 0x1c - void* m_pointB; // 0x20 + undefined* m_pointA; // 0x1c + undefined* m_pointB; // 0x20 }; // VTABLE: LEGO1 0x100db7c0 @@ -25,7 +24,8 @@ struct Edge { class LegoWEEdge { public: LegoWEEdge(); - virtual ~LegoWEEdge(); // vtable+0x00 + virtual ~LegoWEEdge(); + virtual LegoResult VTable0x04(); // vtable+0x04 // SYNTHETIC: LEGO1 0x1009a570 diff --git a/LEGO1/lego/sources/geom/legowegedge.cpp b/LEGO1/lego/sources/geom/legowegedge.cpp index 7b2cfb0b..36157313 100644 --- a/LEGO1/lego/sources/geom/legowegedge.cpp +++ b/LEGO1/lego/sources/geom/legowegedge.cpp @@ -11,8 +11,8 @@ LegoWEGEdge::LegoWEGEdge() m_edgeNormals = NULL; m_unk0x0c = 0; m_unk0x48 = 0; - m_unk0x4c = 0; - m_unk0x50 = 0; + m_unk0x4c = NULL; + m_unk0x50 = NULL; } // FUNCTION: LEGO1 0x1009a800 diff --git a/LEGO1/lego/sources/geom/legowegedge.h b/LEGO1/lego/sources/geom/legowegedge.h index 40d3e4c3..d4f931a6 100644 --- a/LEGO1/lego/sources/geom/legowegedge.h +++ b/LEGO1/lego/sources/geom/legowegedge.h @@ -10,7 +10,8 @@ class LegoWEGEdge : public LegoWEEdge { public: LegoWEGEdge(); - ~LegoWEGEdge() override; // vtable+0x00 + ~LegoWEGEdge() override; + LegoResult VTable0x04() override; // vtable+0x04 inline LegoU32 GetFlag0x10() { return m_unk0x0c & 0x10 ? FALSE : TRUE; }