diff --git a/CMakeLists.txt b/CMakeLists.txt index 37d29eb3..d2556961 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,9 +150,11 @@ add_library(geom STATIC LEGO1/lego/sources/geom/legoedge.cpp LEGO1/lego/sources/geom/legomesh.cpp LEGO1/lego/sources/geom/legosphere.cpp + LEGO1/lego/sources/geom/legounkown100db7f4.cpp LEGO1/lego/sources/geom/legovertex.cpp LEGO1/lego/sources/geom/legoweedge.cpp LEGO1/lego/sources/geom/legowegedge.cpp + ) register_lego1_target(geom) set_property(TARGET geom PROPERTY ARCHIVE_OUTPUT_NAME "geom$<$:d>") diff --git a/LEGO1/lego/legoomni/include/legopathactor.h b/LEGO1/lego/legoomni/include/legopathactor.h index 43674fee..22d0fb1b 100644 --- a/LEGO1/lego/legoomni/include/legopathactor.h +++ b/LEGO1/lego/legoomni/include/legopathactor.h @@ -1,6 +1,7 @@ #ifndef LEGOPATHACTOR_H #define LEGOPATHACTOR_H +#include "geom/legounkown100db7f4.h" #include "legoactor.h" #include "legopathboundary.h" #include "misc/legounknown.h" @@ -53,7 +54,7 @@ class LegoPathActor : public LegoActor { float p_time, LegoEdge& p_edge1, float p_scale1, - LegoEdge& p_edge2, + LegoUnknown100db7f4& p_edge2, float p_scale2 ); // vtable+0x88 virtual void VTable0x8c(); // vtable+0x8c diff --git a/LEGO1/lego/legoomni/src/paths/legopathactor.cpp b/LEGO1/lego/legoomni/src/paths/legopathactor.cpp index f061dbed..43f15ef8 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathactor.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathactor.cpp @@ -58,7 +58,7 @@ MxResult LegoPathActor::VTable0x88( float p_time, LegoEdge& p_srcEdge, float p_srcScale, - LegoEdge& p_dstEdge, + LegoUnknown100db7f4& p_dstEdge, float p_dstScale ) { diff --git a/LEGO1/lego/sources/geom/legoedge.cpp b/LEGO1/lego/sources/geom/legoedge.cpp index 478e5830..63e988c0 100644 --- a/LEGO1/lego/sources/geom/legoedge.cpp +++ b/LEGO1/lego/sources/geom/legoedge.cpp @@ -4,14 +4,6 @@ DECOMP_SIZE_ASSERT(LegoEdge, 0x24) -// TODO Based on the offset, this should be in the header, but as a stub it's getting inlined when there... -// STUB: LEGO1 0x1002ddc0 -LegoResult LegoEdge::FUN_1002ddc0(LegoWEEdge* p_face, Vector3& p_point) -{ - // TODO - return SUCCESS; -} - // FUNCTION: LEGO1 0x1009a470 LegoEdge::LegoEdge() { diff --git a/LEGO1/lego/sources/geom/legounkown100db7f4.cpp b/LEGO1/lego/sources/geom/legounkown100db7f4.cpp new file mode 100644 index 00000000..79ba66cb --- /dev/null +++ b/LEGO1/lego/sources/geom/legounkown100db7f4.cpp @@ -0,0 +1,3 @@ +#include "legounkown100db7f4.h" + +DECOMP_SIZE_ASSERT(LegoUnknown100db7f4, 0x40) diff --git a/LEGO1/lego/sources/geom/legounkown100db7f4.h b/LEGO1/lego/sources/geom/legounkown100db7f4.h new file mode 100644 index 00000000..bb5e6116 --- /dev/null +++ b/LEGO1/lego/sources/geom/legounkown100db7f4.h @@ -0,0 +1,31 @@ +#ifndef __LEGOUNKNOWN100DB7F4_H +#define __LEGOUNKNOWN100DB7F4_H + +#include "legoedge.h" +#include "mxgeometry/mxgeometry3d.h" + +// VTABLE: LEGO1 0x100db7f4 +// SIZE 0x40 +class LegoUnknown100db7f4 : public LegoEdge { +public: + // FUNCTION: LEGO1 0x1002ddc0 + LegoResult FUN_1002ddc0(LegoWEEdge* p_face, Vector3& p_point) + { + if (p_face == m_faceA) { + p_point[0] = -m_unk0x28[0]; + p_point[1] = -m_unk0x28[1]; + p_point[2] = -m_unk0x28[2]; + } + else { + p_point = m_unk0x28; + } + return SUCCESS; + } + +private: + LegoU16 m_unk0x24; // 0x24 + Mx3DPointFloat m_unk0x28; // 0x28 + LegoU32 m_unk0x3c; // 0x3c +}; + +#endif // __LEGOUNKNOWN100DB7F4_H