Add BETA10 matches on LegoWEGEdge and others (#1655)

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
jonschz
2025-07-25 23:49:16 +02:00
committed by GitHub
parent a9e261606d
commit d555df6a58
10 changed files with 108 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ LegoWEEdge::LegoWEEdge()
}
// FUNCTION: LEGO1 0x1009a590
// FUNCTION: BETA10 0x10182530
LegoWEEdge::~LegoWEEdge()
{
if (m_edges) {
@@ -20,31 +21,52 @@ LegoWEEdge::~LegoWEEdge()
}
// FUNCTION: LEGO1 0x1009a5b0
// FUNCTION: BETA10 0x10182577
LegoS32 LegoWEEdge::LinkEdgesAndFaces()
{
assert(m_edges);
assert(m_numEdges);
for (LegoS32 i = 0; i < m_numEdges; i++) {
LegoOrientedEdge* e1 = m_edges[i];
LegoOrientedEdge* e2 = (m_numEdges - i) == 1 ? m_edges[0] : m_edges[i + 1];
LegoOrientedEdge* e2 = (m_numEdges - 1) == i ? m_edges[0] : m_edges[i + 1];
if (e2->m_pointA == e1->m_pointA) {
assert(e1->m_faceA == NULL || e1->m_faceA == this);
assert(e2->m_faceB == NULL || e2->m_faceB == this);
assert(e1->m_ccwA == NULL || e1->m_ccwA == e2);
assert(e2->m_cwB == NULL || e2->m_cwB == e1);
e1->m_faceA = this;
e2->m_faceB = this;
e1->m_ccwA = e2;
e2->m_cwB = e1;
}
else if (e2->m_pointB == e1->m_pointA) {
assert(e1->m_faceA == NULL || e1->m_faceA == this);
assert(e2->m_faceA == NULL || e2->m_faceA == this);
assert(e1->m_ccwA == NULL || e1->m_ccwA == e2);
assert(e2->m_cwA == NULL || e2->m_cwA == e1);
e1->m_faceA = this;
e2->m_faceA = this;
e1->m_ccwA = e2;
e2->m_cwA = e1;
}
else if (e1->m_pointB == e2->m_pointA) {
assert(e1->m_faceB == NULL || e1->m_faceB == this);
assert(e2->m_faceB == NULL || e2->m_faceB == this);
assert(e1->m_ccwB == NULL || e1->m_ccwB == e2);
assert(e2->m_cwB == NULL || e2->m_cwB == e1);
e1->m_faceB = this;
e2->m_faceB = this;
e1->m_ccwB = e2;
e2->m_cwB = e1;
}
else {
assert(e1->m_pointB == e2->m_pointB);
assert(e1->m_faceB == NULL || e1->m_faceB == this);
assert(e2->m_faceA == NULL || e2->m_faceA == this);
assert(e1->m_ccwB == NULL || e1->m_ccwB == e2);
assert(e2->m_cwA == NULL || e2->m_cwA == e1);
e1->m_faceB = this;
e2->m_faceA = this;
e1->m_ccwB = e2;

View File

@@ -6,8 +6,8 @@
struct LegoOrientedEdge;
// might be a struct with public members
// VTABLE: LEGO1 0x100db7c0
// VTABLE: BETA10 0x101c3730
// SIZE 0x0c
class LegoWEEdge {
public:
@@ -33,6 +33,7 @@ public:
}
// SYNTHETIC: LEGO1 0x1009a570
// SYNTHETIC: BETA10 0x10182b70
// LegoWEEdge::`scalar deleting destructor'
protected:

View File

@@ -22,6 +22,7 @@ LegoWEGEdge::LegoWEGEdge()
}
// FUNCTION: LEGO1 0x1009a800
// FUNCTION: BETA10 0x101831bd
LegoWEGEdge::~LegoWEGEdge()
{
if (m_edges) {

View File

@@ -29,6 +29,7 @@ struct PathWithTrigger {
// might be a struct with public members
// VTABLE: LEGO1 0x100db7f8
// VTABLE: BETA10 0x101c3798
// SIZE 0x54
class LegoWEGEdge : public LegoWEEdge {
public:
@@ -80,6 +81,7 @@ public:
LegoU8 GetMask0x03() { return m_flags & (c_bit1 | c_bit2); }
// SYNTHETIC: LEGO1 0x1009a7e0
// SYNTHETIC: BETA10 0x10184130
// LegoWEGEdge::`scalar deleting destructor'
friend class LegoPathController;

View File

@@ -9,6 +9,7 @@
#include "shape/legobox.h"
#include "shape/legosphere.h"
#include <crtdbg.h>
#include <string.h>
#include <vec.h>
@@ -410,8 +411,7 @@ LegoResult LegoROI::ApplyChildAnimationTransformation(
roi->m_local2world.Product(mat, p_matrix);
roi->UpdateWorldData();
LegoBool visibility = data->GetVisibility(p_time);
roi->SetVisibility(visibility);
roi->SetVisibility(data->GetVisibility(p_time));
for (LegoU32 i = 0; i < p_node->GetNumChildren(); i++) {
ApplyChildAnimationTransformation(p_node->GetChild(i), roi->m_local2world, p_time, roi);
@@ -419,6 +419,11 @@ LegoResult LegoROI::ApplyChildAnimationTransformation(
}
else {
FUN_100a81b0("%s ROI Not found\n", name);
#ifdef BETA10
_RPT1(_CRT_ASSERT, "%s ROI Not Found", name);
// Note that the macro inserts an INT3, which breaks the assumption that INT3
// only occurs as a filler for empty space in the binary.
#endif
}
return SUCCESS;