From fbd6abf6fd6ae5f0e199077070f7e5085bea737b Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 23 Feb 2024 12:43:22 -0500 Subject: [PATCH] Fixes --- LEGO1/lego/legoomni/include/legoactor.h | 8 ++++++-- LEGO1/lego/legoomni/src/entity/legoactor.cpp | 11 +++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legoactor.h b/LEGO1/lego/legoomni/include/legoactor.h index 5397e8ab..114bf4bb 100644 --- a/LEGO1/lego/legoomni/include/legoactor.h +++ b/LEGO1/lego/legoomni/include/legoactor.h @@ -4,7 +4,6 @@ #include "decomp.h" #include "legocachesound.h" #include "legoentity.h" -#include "misc/legotypes.h" // VTABLE: LEGO1 0x100d6d68 // SIZE 0x78 @@ -31,14 +30,19 @@ class LegoActor : public LegoEntity { // FUNCTION: LEGO1 0x10002cc0 virtual MxFloat VTable0x50() { return m_unk0x68; } // vtable+0x50 + // FUNCTION: LEGO1 0x10002cd0 virtual void VTable0x54(MxFloat p_unk0x68) { m_unk0x68 = p_unk0x68; } // vtable+0x54 + // FUNCTION: LEGO1 0x10002ce0 virtual void VTable0x58(MxFloat p_unk0x70) { m_unk0x70 = p_unk0x70; } // vtable+0x58 + // FUNCTION: LEGO1 0x10002cf0 virtual MxFloat VTable0x5c() { return m_unk0x70; } // vtable+0x5c + // FUNCTION: LEGO1 0x10002d00 virtual MxU8 VTable0x60() { return m_unk0x74; } // vtable+0x60 + // FUNCTION: LEGO1 0x10002d10 virtual void VTable0x64(MxU8 p_unk0x74) { m_unk0x74 = p_unk0x74; } // vtable+0x64 @@ -46,7 +50,7 @@ class LegoActor : public LegoEntity { MxFloat m_unk0x68; // 0x68 LegoCacheSound* m_sound; // 0x6c MxFloat m_unk0x70; // 0x70 - LegoChar m_unk0x74; // 0x74 + MxU8 m_unk0x74; // 0x74 }; // SYNTHETIC: LEGO1 0x1002d300 diff --git a/LEGO1/lego/legoomni/src/entity/legoactor.cpp b/LEGO1/lego/legoomni/src/entity/legoactor.cpp index 553e868e..4fc0daa2 100644 --- a/LEGO1/lego/legoomni/src/entity/legoactor.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoactor.cpp @@ -3,7 +3,7 @@ DECOMP_SIZE_ASSERT(LegoActor, 0x78) // GLOBAL: LEGO1 0x100f32d0 -extern LegoChar* g_unk0x100f32d0[] = {"none", "pepper", "mama", "papa", "nick", "laura"}; +const char* g_unk0x100f32d0[] = {"none", "pepper", "mama", "papa", "nick", "laura", "The_Brickster!"}; // FUNCTION: LEGO1 0x1002d110 LegoActor::LegoActor() @@ -32,12 +32,11 @@ void LegoActor::ParseAction(char*) // FUNCTION: LEGO1 0x1002d670 void LegoActor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) { - const LegoChar* name; - if (p_roi) { - name = p_roi->GetName(); - for (int i = 1; i <= 5; i++) { - if (strcmpi(name, g_unk0x100f32d0[i]) == 0) { + const char* name = p_roi->GetName(); + + for (MxU32 i = 1; i <= _countof(g_unk0x100f32d0) - 1; i++) { + if (!strcmpi(name, g_unk0x100f32d0[i])) { m_unk0x59 = 0; m_unk0x74 = i; break;