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

@@ -31,6 +31,7 @@ typedef set<LegoPathActor*, LegoPathActorSetCompare> LegoPathActorSet;
typedef set<LegoAnimPresenter*, LegoAnimPresenterSetCompare> LegoAnimPresenterSet;
// VTABLE: LEGO1 0x100d8618
// VTABLE: BETA10 0x101bdd58
// SIZE 0x74
class LegoPathBoundary : public LegoWEGEdge {
public:
@@ -57,6 +58,7 @@ public:
LegoAnimPresenterSet& GetPresenters() { return m_presenters; }
// SYNTHETIC: LEGO1 0x10047a80
// SYNTHETIC: BETA10 0x100bd300
// LegoPathBoundary::`vector deleting destructor'
private:

View File

@@ -2812,7 +2812,11 @@ MxResult LegoAnimationManager::FUN_10064880(const char* p_name, MxS32 p_unk0x0c,
// FUNCTION: BETA10 0x10045daf
void LegoAnimationManager::FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x404)
{
if (m_unk0x402 && p_tranInfo->m_unk0x14) {
if (
#ifndef BETA10
m_unk0x402 &&
#endif
p_tranInfo->m_unk0x14) {
p_tranInfo->m_flags |= LegoTranInfo::c_bit1;
m_unk0x430 = TRUE;
m_unk0x42c = p_tranInfo;
@@ -2833,11 +2837,13 @@ void LegoAnimationManager::FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x
if (location != NULL) {
CalcLocalTransform(location->m_position, location->m_direction, location->m_up, m_unk0x484);
m_unk0x4cc.SetStartEnd(m_unk0x43c, m_unk0x484);
#ifndef BETA10
m_unk0x4cc.NormalizeDirection();
}
else {
p_tranInfo->m_flags &= ~LegoTranInfo::c_bit1;
m_unk0x430 = FALSE;
#endif
}
Mx3DPointFloat vec;

View File

@@ -44,7 +44,7 @@ void LegoModelPresenter::Destroy(MxBool p_fromDestructor)
}
// FUNCTION: LEGO1 0x1007f6b0
// FUNCTION: BETA10 0x1009845e
// STUB: BETA10 0x1009845e
MxResult LegoModelPresenter::CreateROI(MxDSChunk* p_chunk)
{
MxResult result = FAILURE;

View File

@@ -781,6 +781,7 @@ void Act3::GoodEnding(const Matrix4& p_destination)
m_cop2->SetActorState(LegoPathActor::c_disabled);
m_brickster->SetActorState(LegoPathActor::c_disabled);
#ifndef BETA10
m_unk0x4220.Clear();
m_copter->FUN_10004640(p_destination);
@@ -792,6 +793,10 @@ void Act3::GoodEnding(const Matrix4& p_destination)
m_copter->m_unk0x1a8,
m_copter->m_unk0x1f4
);
#else
m_state->m_unk0x08 = 2;
GameState()->SwitchArea(LegoGameState::Area::e_infomain);
#endif
}
// FUNCTION: LEGO1 0x10073500

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;

View File

@@ -132,9 +132,11 @@
// ??_L@YGXPAXIHP6EX0@Z1@Z
// LIBRARY: LEGO1 0x1008c2e0
// LIBRARY: BETA10 0x100f9800
// ??_M@YGXPAXIHP6EX0@Z@Z
// LIBRARY: LEGO1 0x1008c370
// LIBRARY: BETA10 0x100f98b0
// ?__ArrayUnwind@@YGXPAXIHP6EX0@Z@Z
// LIBRARY: LEGO1 0x1008c410
@@ -162,6 +164,7 @@
// __amsg_exit
// LIBRARY: LEGO1 0x1008c980
// LIBRARY: BETA10 0x10101318
// __except_handler3
// LIBRARY: LEGO1 0x1008ca60
@@ -783,6 +786,61 @@
// LIBRARY: BETA10 0x100fa210
// strcat
// LIBRARY: BETA10 0x100fed20
// strncat
// LIBRARY: BETA10 0x100faab0
// strncpy
// LIBRARY: BETA10 0x100ff490
// setvbuf
// LIBRARY: BETA10 0x100ff180
// fflush
// LIBRARY: BETA10 0x100fec40
// __crtMessageBoxA
// LIBRARY: BETA10 0x100fee50
// _itoa
// LIBRARY: BETA10 0x10106f70
// _lock_file
// LIBRARY: BETA10 0x100ff1e0
// _fflush_lk
// LIBRARY: BETA10 0x10107010
// _unlock_file
// LIBRARY: BETA10 0x10106ea0
// _lock
// LIBRARY: BETA10 0x10106f50
// _unlock
// LIBRARY: BETA10 0x100fdaf0
// _getptd
// LIBRARY: BETA10 0x10104040
// _malloc_dbg
// GLOBAL: BETA10 0x101fb7b0
// _locktable
// LIBRARY: BETA10 0x10104c00
// _free_dbg
// LIBRARY: BETA10 0x100fe900
// raise
// GLOBAL: BETA10 0x101fa950
// _iob
// GLOBAL: BETA10 0x102122d0
// _bufin
// LIBRARY: BETA10 0x100f8a88
// ??2@YAPAXI@Z