BETA matches for LegoEdge and related

This commit is contained in:
jonschz 2026-02-07 12:47:50 +01:00
parent 464e59df3e
commit cf11fed971
5 changed files with 56 additions and 17 deletions

View File

@ -194,16 +194,18 @@ void LegoEntity::SetLocation(
}
// FUNCTION: LEGO1 0x10010c30
// FUNCTION: BETA10 0x1007ea5a
void LegoEntity::TransformPointOfView()
{
LegoWorld* world = CurrentWorld();
if (m_cameraFlag && world && world->GetCameraController() && m_roi) {
if (GetCameraFlag() && world && world->GetCameraController() && m_roi) {
world->GetCameraController()->TransformPointOfView(m_roi->GetLocal2World(), 1);
}
}
// FUNCTION: LEGO1 0x10010c60
// FUNCTION: BETA10 0x1007ead0
Mx3DPointFloat LegoEntity::GetWorldDirection()
{
if (m_roi != NULL) {
@ -215,6 +217,7 @@ Mx3DPointFloat LegoEntity::GetWorldDirection()
}
// FUNCTION: LEGO1 0x10010cf0
// FUNCTION: BETA10 0x1007eb47
Mx3DPointFloat LegoEntity::GetWorldUp()
{
if (m_roi != NULL) {

View File

@ -6,6 +6,7 @@
DECOMP_SIZE_ASSERT(LegoEdge, 0x24)
// FUNCTION: LEGO1 0x1009a470
// FUNCTION: BETA10 0x10182250
LegoEdge::LegoEdge()
{
m_faceA = NULL;
@ -19,37 +20,66 @@ LegoEdge::LegoEdge()
}
// FUNCTION: LEGO1 0x1009a4c0
// FUNCTION: BETA10 0x101822c2
LegoEdge::~LegoEdge()
{
}
// FUNCTION: BETA10 0x101822e1
LegoResult LegoEdge::SetCounterclockwiseEdge(LegoWEEdge& p_face, LegoEdge* p_edge)
{
// unreferenced in BETA10, not in LEGO1
if (&p_face == m_faceA) {
m_ccwA = p_edge;
return SUCCESS;
}
if (&p_face == m_faceB) {
m_ccwB = p_edge;
return SUCCESS;
}
return FAILURE;
}
// FUNCTION: BETA10 0x1018233c
LegoResult LegoEdge::SetClockwiseEdge(LegoWEEdge& p_face, LegoEdge* p_edge)
{
// unreferenced in BETA10, not in LEGO1
if (&p_face == m_faceA) {
m_cwA = p_edge;
return SUCCESS;
}
if (&p_face == m_faceB) {
m_cwB = p_edge;
return SUCCESS;
}
return FAILURE;
}
// FUNCTION: LEGO1 0x1009a4d0
// FUNCTION: BETA10 0x10182397
LegoEdge* LegoEdge::GetClockwiseEdge(LegoWEEdge& p_face)
{
if (&p_face == m_faceA) {
return m_cwA;
}
else if (&p_face == m_faceB) {
if (&p_face == m_faceB) {
return m_cwB;
}
else {
return NULL;
}
}
// FUNCTION: LEGO1 0x1009a4f0
// FUNCTION: BETA10 0x101823e5
LegoEdge* LegoEdge::GetCounterclockwiseEdge(LegoWEEdge& p_face)
{
if (&p_face == m_faceA) {
return m_ccwA;
}
else if (&p_face == m_faceB) {
if (&p_face == m_faceB) {
return m_ccwB;
}
else {
return NULL;
}
}
// FUNCTION: LEGO1 0x1009a510
// FUNCTION: BETA10 0x10182433
@ -58,11 +88,9 @@ Vector3* LegoEdge::CWVertex(LegoWEEdge& p_face)
if (m_faceA == &p_face) {
return m_pointB;
}
else {
assert(m_faceB == &p_face);
return m_pointA;
}
}
// FUNCTION: LEGO1 0x1009a530
// FUNCTION: BETA10 0x10182498
@ -71,8 +99,6 @@ Vector3* LegoEdge::CCWVertex(LegoWEEdge& p_face)
if (m_faceB == &p_face) {
return m_pointB;
}
else {
assert(m_faceA == &p_face);
return m_pointA;
}
}

View File

@ -7,11 +7,14 @@ class LegoWEEdge;
class Vector3;
// VTABLE: LEGO1 0x100db7b8
// VTABLE: BETA10 0x101c3728
// SIZE 0x24
struct LegoEdge {
LegoEdge();
virtual ~LegoEdge(); // vtable+0x00
LegoResult SetCounterclockwiseEdge(LegoWEEdge& p_face, LegoEdge* p_edge);
LegoResult SetClockwiseEdge(LegoWEEdge& p_face, LegoEdge* p_edge);
LegoEdge* GetClockwiseEdge(LegoWEEdge& p_face);
LegoEdge* GetCounterclockwiseEdge(LegoWEEdge& p_face);
Vector3* CWVertex(LegoWEEdge& p_face);
@ -32,6 +35,7 @@ struct LegoEdge {
Vector3* GetPointB() { return m_pointB; }
// SYNTHETIC: LEGO1 0x1009a4a0
// SYNTHETIC: BETA10 0x10182b30
// LegoEdge::`scalar deleting destructor'
LegoWEEdge* m_faceA; // 0x04

View File

@ -8,6 +8,7 @@
#include <assert.h>
// VTABLE: LEGO1 0x100db7f4
// VTABLE: BETA10 0x101c3794
// SIZE 0x40
struct LegoOrientedEdge : public LegoEdge {
public:
@ -99,8 +100,12 @@ struct LegoOrientedEdge : public LegoEdge {
inline LegoU32 FUN_10048c40(const Vector3& p_position);
// SYNTHETIC: LEGO1 0x1009a6c0
// SYNTHETIC: BETA10 0x101840f0
// LegoOrientedEdge::`scalar deleting destructor'
// SYNTHETIC: BETA10 0x100bd390
// LegoOrientedEdge::~LegoOrientedEdge
LegoU16 m_flags; // 0x24
Mx3DPointFloat m_dir; // 0x28
float m_length; // 0x3c

View File

@ -29,6 +29,7 @@ void OrientableROI::WrappedSetLocal2WorldWithWorldDataUpdate(const Matrix4& p_lo
}
// FUNCTION: LEGO1 0x100a46b0
// FUNCTION: BETA10 0x1016528f
void OrientableROI::UpdateTransformationRelativeToParent(const Matrix4& p_transform)
{
MxMatrix mat;