diff --git a/LEGO1/lego/legoomni/include/act3actors.h b/LEGO1/lego/legoomni/include/act3actors.h index 2a9ceaa5..02b3d22d 100644 --- a/LEGO1/lego/legoomni/include/act3actors.h +++ b/LEGO1/lego/legoomni/include/act3actors.h @@ -10,6 +10,44 @@ struct LegoBuildingInfo; struct LegoPlantInfo; class LegoWorld; +// VTABLE: LEGO1 0x100d7920 LegoPathActor +// VTABLE: LEGO1 0x100d79f0 LegoAnimActor +// SIZE 0x1a8 +class Act3Shark : public LegoAnimActor { +public: + Act3Shark(); + + void ParseAction(char*) override; // vtable+0x20 + void Animate(float p_time) override; // vtable+0x70 + + // LegoAnimActor vtable + virtual MxResult EatPizza(Act3Ammo* p_ammo); // vtable+0x10 + + // FUNCTION: LEGO1 0x100430d0 + const char* ClassName() const override // vtable+0x0c + { + // Does not exist in BETA10 + // STRING: LEGO1 0x100f03a0 + return "Act3Shark"; + } + + MxFloat GetUnknown0x2c() { return m_unk0x2c; } + + void SetUnknown0x2c(MxFloat p_unk0x2c) { m_unk0x2c = p_unk0x2c; } + + // SYNTHETIC: LEGO1 0x10043030 + // Act3Shark::`scalar deleting destructor' + +private: + list m_eatPizzas; // 0x1c + Act3Ammo* m_nextPizza; // 0x28 + MxFloat m_unk0x2c; // 0x2c + LegoWorld* m_world; // 0x30 + LegoAnimActorStruct* m_unk0x34; // 0x34 + LegoROI* m_unk0x38; // 0x38 + Mx3DPointFloat m_unk0x3c; // 0x3c +}; + // VTABLE: LEGO1 0x100d7668 LegoPathActor // VTABLE: LEGO1 0x100d7738 LegoAnimActor // VTABLE: BETA10 0x101b8a98 LegoPathActor @@ -17,19 +55,11 @@ class LegoWorld; // SIZE 0x178 class Act3Actor : public LegoAnimActor { public: - struct Act3CopDest { - // name verified by BETA10 0x10018776 - const char* m_bName; // 0x00 - - // name verified by BETA10 0x100187cb - LegoPathBoundary* m_boundary; // 0x04 - - MxFloat m_unk0x08[3]; // 0x08 - MxFloat m_unk0x14[3]; // 0x14 - }; - Act3Actor(); + MxU32 VTable0x90(float p_time, Matrix4& p_transform) override; // vtable+0x90 + MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94 + // FUNCTION: LEGO1 0x100431b0 // FUNCTION: BETA10 0x1001d320 const char* ClassName() const override // vtable+0x0c @@ -38,9 +68,6 @@ class Act3Actor : public LegoAnimActor { return "Act3Actor"; } - MxU32 VTable0x90(float p_time, Matrix4& p_transform) override; // vtable+0x90 - MxResult HitActor(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94 - MxFloat GetUnknown0x1c() { return m_unk0x1c; } void SetUnknown0x1c(MxFloat p_unk0x1c) { m_unk0x1c = p_unk0x1c; } @@ -62,6 +89,17 @@ class Act3Actor : public LegoAnimActor { // SIZE 0x188 class Act3Cop : public Act3Actor { public: + struct Act3CopDest { + // name verified by BETA10 0x10018776 + const char* m_bName; // 0x00 + + // name verified by BETA10 0x100187cb + LegoPathBoundary* m_boundary; // 0x04 + + MxFloat m_unk0x08[3]; // 0x08 + MxFloat m_unk0x14[3]; // 0x14 + }; + Act3Cop(); void ParseAction(char* p_extra) override; // vtable+0x20 @@ -137,44 +175,6 @@ class Act3Brickster : public Act3Actor { MxU8 m_unk0x58; // 0x58 }; -// VTABLE: LEGO1 0x100d7920 LegoPathActor -// VTABLE: LEGO1 0x100d79f0 LegoAnimActor -// SIZE 0x1a8 -class Act3Shark : public LegoAnimActor { -public: - Act3Shark(); - - // FUNCTION: LEGO1 0x100430d0 - const char* ClassName() const override // vtable+0x0c - { - // Does not exist in BETA10 - // STRING: LEGO1 0x100f03a0 - return "Act3Shark"; - } - - void ParseAction(char*) override; // vtable+0x20 - void Animate(float p_time) override; // vtable+0x70 - - // LegoAnimActor vtable - virtual MxResult EatPizza(Act3Ammo* p_ammo); // vtable+0x10 - - MxFloat GetUnknown0x2c() { return m_unk0x2c; } - - void SetUnknown0x2c(MxFloat p_unk0x2c) { m_unk0x2c = p_unk0x2c; } - - // SYNTHETIC: LEGO1 0x10043030 - // Act3Shark::`scalar deleting destructor' - -private: - list m_eatPizzas; // 0x1c - Act3Ammo* m_nextPizza; // 0x28 - MxFloat m_unk0x2c; // 0x2c - LegoWorld* m_world; // 0x30 - LegoAnimActorStruct* m_unk0x34; // 0x34 - LegoROI* m_unk0x38; // 0x38 - Mx3DPointFloat m_unk0x3c; // 0x3c -}; - // FUNCTION: LEGO1 0x1003ff10 // Act3Actor::`vbase destructor' diff --git a/LEGO1/lego/legoomni/include/legoanimactor.h b/LEGO1/lego/legoomni/include/legoanimactor.h index 1d44371b..3f115e97 100644 --- a/LEGO1/lego/legoomni/include/legoanimactor.h +++ b/LEGO1/lego/legoomni/include/legoanimactor.h @@ -42,6 +42,16 @@ class LegoAnimActor : public virtual LegoPathActor { ~LegoAnimActor() override; + void ParseAction(char* p_extra) override; // vtable+0x20 + void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 + void Animate(float p_time) override; // vtable+0x70 + void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 + + virtual MxResult FUN_1001c1f0(float& p_und); + virtual MxResult FUN_1001c360(float, Matrix4& p_transform); + virtual MxResult FUN_1001c450(LegoAnim* p_AnimTreePtr, float p_unk0x00, LegoROI** p_roiMap, MxU32 p_numROIs); + virtual void ClearMaps(); + // FUNCTION: LEGO1 0x1000fba0 // FUNCTION: BETA10 0x10012400 const char* ClassName() const override // vtable+0x0c @@ -57,16 +67,6 @@ class LegoAnimActor : public virtual LegoPathActor { return !strcmp(p_name, LegoAnimActor::ClassName()) || LegoPathActor::IsA(p_name); } - void ParseAction(char* p_extra) override; // vtable+0x20 - void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 - void Animate(float p_time) override; // vtable+0x70 - void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 - - virtual MxResult FUN_1001c1f0(float& p_und); - virtual MxResult FUN_1001c360(float, Matrix4& p_transform); - virtual MxResult FUN_1001c450(LegoAnim* p_AnimTreePtr, float p_unk0x00, LegoROI** p_roiMap, MxU32 p_numROIs); - virtual void ClearMaps(); - // SYNTHETIC: LEGO1 0x1000fb60 // LegoAnimActor::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legopathactor.h b/LEGO1/lego/legoomni/include/legopathactor.h index 840cb5ec..169cdd22 100644 --- a/LEGO1/lego/legoomni/include/legopathactor.h +++ b/LEGO1/lego/legoomni/include/legopathactor.h @@ -37,20 +37,6 @@ class LegoPathActor : public LegoActor { LegoPathActor(); ~LegoPathActor() override; - // FUNCTION: LEGO1 0x1000c430 - // FUNCTION: BETA10 0x10012790 - const char* ClassName() const override // vtable+0x0c - { - // STRING: LEGO1 0x100f0114 - return "LegoPathActor"; - } - - // FUNCTION: LEGO1 0x1000c440 - MxBool IsA(const char* p_name) const override // vtable+0x10 - { - return !strcmp(p_name, LegoPathActor::ClassName()) || LegoActor::IsA(p_name); - } - void ParseAction(char* p_extra) override; // vtable+0x20 virtual MxS32 VTable0x68(Vector3& p_v1, Vector3& p_v2, Vector3& p_v3); // vtable+0x68 virtual MxU32 VTable0x6c( @@ -137,6 +123,20 @@ class LegoPathActor : public LegoActor { // FUNCTION: LEGO1 0x10002de0 virtual void VTable0xc8(MxU8 p_unk0x148) { m_unk0x148 = p_unk0x148; } // vtable+0xc8 + // FUNCTION: LEGO1 0x1000c430 + // FUNCTION: BETA10 0x10012790 + const char* ClassName() const override // vtable+0x0c + { + // STRING: LEGO1 0x100f0114 + return "LegoPathActor"; + } + + // FUNCTION: LEGO1 0x1000c440 + MxBool IsA(const char* p_name) const override // vtable+0x10 + { + return !strcmp(p_name, LegoPathActor::ClassName()) || LegoActor::IsA(p_name); + } + // FUNCTION: BETA10 0x1001ca40 LegoPathBoundary* GetBoundary() { return m_boundary; } diff --git a/LEGO1/lego/legoomni/src/actors/act3actors.cpp b/LEGO1/lego/legoomni/src/actors/act3actors.cpp index e34baf4c..683fcffc 100644 --- a/LEGO1/lego/legoomni/src/actors/act3actors.cpp +++ b/LEGO1/lego/legoomni/src/actors/act3actors.cpp @@ -29,7 +29,7 @@ DECOMP_SIZE_ASSERT(Act3Shark, 0x1a8) // name verified by BETA10 0x10018776 // GLOBAL: LEGO1 0x100f4120 // GLOBAL: BETA10 0x101dcdc8 -Act3Actor::Act3CopDest g_copDest[5] = { +Act3Cop::Act3CopDest g_copDest[5] = { {"INT38", NULL, {3.69, -1.31251, -59.231}, {-0.99601698, 0.0, -0.089166}}, { "EDG02_08", @@ -1012,9 +1012,6 @@ MxResult Act3Brickster::FUN_100417c0() // FUNCTION: BETA10 0x1001b017 MxS32 Act3Brickster::FUN_10042300() { - // TODO: Has poor inlining, can be fixed by changing the assignment operator in vector.h - // See extended comment in vector.h for operator= - Act3* a3 = (Act3*) m_world; assert(a3 && a3->m_cop1 && a3->m_cop2); diff --git a/LEGO1/realtime/matrix.h b/LEGO1/realtime/matrix.h index 307f4ce5..eccc4f04 100644 --- a/LEGO1/realtime/matrix.h +++ b/LEGO1/realtime/matrix.h @@ -49,6 +49,8 @@ class Matrix4 { inline void Swap(int p_d1, int p_d2); float* operator[](int idx) { return m_data[idx]; } + + // FUNCTION: BETA10 0x10017780 const float* operator[](int idx) const { return m_data[idx]; } };