From 72bd6ccf9bf40f49ebf58e844ffc9f30f0e31843 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 17 Jan 2025 17:12:28 -0700 Subject: [PATCH] More order --- .../legoomni/src/paths/legopathcontroller.cpp | 2 +- LEGO1/lego/sources/geom/legowegedge.cpp | 2 +- LEGO1/lego/sources/geom/legowegedge.h | 38 ++++++++++--------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp index f81f4011..d9027245 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathcontroller.cpp @@ -687,7 +687,7 @@ MxResult LegoPathController::ReadBoundaries(LegoStorage* p_storage) if (boundary.m_numTriggers > 0) { boundary.m_unk0x50 = new Mx3DPointFloat; - boundary.m_pathTrigger = new LegoWEGEdge::PathWithTrigger[boundary.m_numTriggers]; + boundary.m_pathTrigger = new PathWithTrigger[boundary.m_numTriggers]; for (j = 0; j < boundary.m_numTriggers; j++) { if (p_storage->Read(&s, sizeof(s)) != SUCCESS) { diff --git a/LEGO1/lego/sources/geom/legowegedge.cpp b/LEGO1/lego/sources/geom/legowegedge.cpp index 61e2214c..110cd2c6 100644 --- a/LEGO1/lego/sources/geom/legowegedge.cpp +++ b/LEGO1/lego/sources/geom/legowegedge.cpp @@ -5,7 +5,7 @@ #include DECOMP_SIZE_ASSERT(LegoWEGEdge, 0x54) -DECOMP_SIZE_ASSERT(LegoWEGEdge::PathWithTrigger, 0x0c) +DECOMP_SIZE_ASSERT(PathWithTrigger, 0x0c) // FUNCTION: LEGO1 0x1009a730 // FUNCTION: BETA10 0x101830ec diff --git a/LEGO1/lego/sources/geom/legowegedge.h b/LEGO1/lego/sources/geom/legowegedge.h index 350e31b7..86ac5f1a 100644 --- a/LEGO1/lego/sources/geom/legowegedge.h +++ b/LEGO1/lego/sources/geom/legowegedge.h @@ -1,13 +1,31 @@ #ifndef __LEGOWEGEDGE_H #define __LEGOWEGEDGE_H +class LegoPathStruct; + +// This struct might have been defined elsewhere (legopathstruct.h?). +// Must be defined before the inclusion of Mx4DPointFloat for correct order +// SIZE 0x0c +struct PathWithTrigger { + // FUNCTION: LEGO1 0x10048280 + // FUNCTION: BETA10 0x100bd450 + PathWithTrigger() + { + m_pathStruct = NULL; + m_data = 0; + m_unk0x08 = 0.0f; + } + + LegoPathStruct* m_pathStruct; // 0x00 + unsigned int m_data; // 0x04 + float m_unk0x08; // 0x08 +}; + #include "decomp.h" #include "legoweedge.h" #include "mxgeometry/mxgeometry3d.h" #include "mxgeometry/mxgeometry4d.h" -class LegoPathStruct; - // might be a struct with public members // VTABLE: LEGO1 0x100db7f8 // SIZE 0x54 @@ -20,22 +38,6 @@ class LegoWEGEdge : public LegoWEEdge { c_bit5 = 0x10 }; - // SIZE 0x0c - struct PathWithTrigger { - // FUNCTION: LEGO1 0x10048280 - // FUNCTION: BETA10 0x100bd450 - PathWithTrigger() - { - m_pathStruct = NULL; - m_data = 0; - m_unk0x08 = 0.0f; - } - - LegoPathStruct* m_pathStruct; // 0x00 - unsigned int m_data; // 0x04 - float m_unk0x08; // 0x08 - }; - LegoWEGEdge(); ~LegoWEGEdge() override;