From 70c7b5dca1af2d5f49f1a0084837ab0d8403ff1f Mon Sep 17 00:00:00 2001 From: jonschz Date: Sat, 30 Nov 2024 11:25:48 +0100 Subject: [PATCH] Implement `Act2Actor::Act2Actor()`, add structure and BETA10 --- LEGO1/lego/legoomni/include/act2actor.h | 14 +++++++++++++- LEGO1/lego/legoomni/include/legoanimactor.h | 1 + LEGO1/lego/legoomni/include/legopathactor.h | 1 + LEGO1/lego/legoomni/src/actors/act2actor.cpp | 14 +++++++++++++- LEGO1/lego/legoomni/src/paths/legopathactor.cpp | 2 ++ 5 files changed, 30 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/include/act2actor.h b/LEGO1/lego/legoomni/include/act2actor.h index b2446936..ec82cea2 100644 --- a/LEGO1/lego/legoomni/include/act2actor.h +++ b/LEGO1/lego/legoomni/include/act2actor.h @@ -5,9 +5,17 @@ // VTABLE: LEGO1 0x100d6078 LegoPathActor // VTABLE: LEGO1 0x100d6148 LegoAnimActor +// VTABLE: BETA10 0x101b80c0 LegoPathActor +// VTABLE: BETA10 0x101b81b0 LegoAnimActor // SIZE 0x1a8 class Act2Actor : public LegoAnimActor { public: + struct UnknownListStructure { + undefined m_unk0x00[28]; + undefined m_unk0x1c; + undefined m_unk0x1d[3]; + }; + Act2Actor(); void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override; // vtable+0x24 @@ -23,6 +31,10 @@ class Act2Actor : public LegoAnimActor { // SYNTHETIC: LEGO1 0x1001a0a0 // Act2Actor::`scalar deleting destructor' + // GLOBAL: LEGO1 0x100d6070 + // GLOBAL: BETA10 0x101b80b0 + // `vbtable' + private: undefined m_unk0x1c; // 0x1c undefined m_unk0x1d; // 0x1d @@ -30,7 +42,7 @@ class Act2Actor : public LegoAnimActor { MxBool m_unk0x1f; // 0x1f undefined4 m_unk0x20; // 0x20 undefined4 m_unk0x24; // 0x24 - undefined4 m_unk0x28; // 0x28 + undefined m_unk0x28; // 0x28 undefined4 m_unk0x2c; // 0x2c undefined4 m_unk0x30; // 0x30 undefined4 m_unk0x34; // 0x34 diff --git a/LEGO1/lego/legoomni/include/legoanimactor.h b/LEGO1/lego/legoomni/include/legoanimactor.h index f74e8c00..ea4fcb4b 100644 --- a/LEGO1/lego/legoomni/include/legoanimactor.h +++ b/LEGO1/lego/legoomni/include/legoanimactor.h @@ -82,6 +82,7 @@ class LegoAnimActor : public virtual LegoPathActor { // Vector::~Vector // SYNTHETIC: LEGO1 0x10012b90 +// SYNTHETIC: BETA10 0x1000fad0 // LegoAnimActor::`vbase destructor' // TEMPLATE: LEGO1 0x1001c010 diff --git a/LEGO1/lego/legoomni/include/legopathactor.h b/LEGO1/lego/legoomni/include/legopathactor.h index 896d6ccd..8fd8aaaf 100644 --- a/LEGO1/lego/legoomni/include/legopathactor.h +++ b/LEGO1/lego/legoomni/include/legopathactor.h @@ -18,6 +18,7 @@ extern MxLong g_unk0x100f3308; extern const char* g_strHIT_WALL_SOUND; // VTABLE: LEGO1 0x100d6e28 +// VTABLE: BETA10 0x101bdc08 // SIZE 0x154 class LegoPathActor : public LegoActor { public: diff --git a/LEGO1/lego/legoomni/src/actors/act2actor.cpp b/LEGO1/lego/legoomni/src/actors/act2actor.cpp index 6c10caae..bb36d773 100644 --- a/LEGO1/lego/legoomni/src/actors/act2actor.cpp +++ b/LEGO1/lego/legoomni/src/actors/act2actor.cpp @@ -6,8 +6,14 @@ #include "roi/legoroi.h" DECOMP_SIZE_ASSERT(Act2Actor, 0x1a8) +DECOMP_SIZE_ASSERT(Act2Actor::UnknownListStructure, 0x20) -// STUB: LEGO1 0x100187e0 +// TODO: Copy the data once we know more about its fields. Total: 10 entries +// GLOBAL: LEGO1 0x100f0db8 +static Act2Actor::UnknownListStructure g_unk0x100f0db8[] = {{{0}, 0, {0}}}; + +// FUNCTION: LEGO1 0x100187e0 +// FUNCTION: BETA10 0x1000c7fb Act2Actor::Act2Actor() { m_unk0x1c = 0; @@ -26,6 +32,11 @@ Act2Actor::Act2Actor() m_unk0x4c = 0; m_unk0x38 = 0; m_unk0x3c = 0; + + // TODO replace 10 by sizeOfArray once the data are there + for (MxS32 i = 0; i < 10; i++) { + g_unk0x100f0db8[i].m_unk0x1c = 0; + } } // FUNCTION: LEGO1 0x10018940 @@ -55,6 +66,7 @@ MxResult Act2Actor::VTable0x9c() } // STUB: LEGO1 0x10018c30 +// STUB: BETA10 0x1000cb52 void Act2Actor::VTable0x70(float p_und) { // TODO diff --git a/LEGO1/lego/legoomni/src/paths/legopathactor.cpp b/LEGO1/lego/legoomni/src/paths/legopathactor.cpp index f5795934..3a1a5427 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathactor.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathactor.cpp @@ -38,6 +38,7 @@ const char* g_strHIT_WALL_SOUND = "HIT_WALL_SOUND"; MxLong g_unk0x100f3308 = 0; // FUNCTION: LEGO1 0x1002d700 +// FUNCTION: BETA10 0x100ae6e0 LegoPathActor::LegoPathActor() { m_boundary = NULL; @@ -57,6 +58,7 @@ LegoPathActor::LegoPathActor() } // FUNCTION: LEGO1 0x1002d820 +// FUNCTION: BETA10 0x100ae80e LegoPathActor::~LegoPathActor() { if (m_grec) {