Implement/match some Act2Actor functions (#1148)

This commit is contained in:
Christian Semmler 2024-11-11 11:36:36 -07:00 committed by GitHub
parent 71a1c51596
commit 8e23bfb266
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 64 additions and 19 deletions

View file

@ -12,7 +12,7 @@ class Act2Actor : public LegoAnimActor {
void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override; // vtable+0x24 void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override; // vtable+0x24
void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30
MxS32 VTable0x68(Vector3&, Vector3&, Vector3&) override; // vtable+0x68 MxS32 VTable0x68(Vector3& p_v1, Vector3& p_v2, Vector3& p_v3) override; // vtable+0x68
void VTable0x70(float p_und) override; // vtable+0x70 void VTable0x70(float p_und) override; // vtable+0x70
MxResult VTable0x94(LegoPathActor*, MxBool) override; // vtable+0x94 MxResult VTable0x94(LegoPathActor*, MxBool) override; // vtable+0x94
MxResult VTable0x9c() override; // vtable+0x9c MxResult VTable0x9c() override; // vtable+0x9c
@ -22,7 +22,22 @@ class Act2Actor : public LegoAnimActor {
// Act2Actor::`scalar deleting destructor' // Act2Actor::`scalar deleting destructor'
private: private:
undefined m_unk0x1c[0x34]; // 0x1c undefined m_unk0x1c; // 0x1c
undefined m_unk0x1d; // 0x1d
undefined m_unk0x1e; // 0x1e
MxBool m_unk0x1f; // 0x1f
undefined4 m_unk0x20; // 0x20
undefined4 m_unk0x24; // 0x24
undefined4 m_unk0x28; // 0x28
undefined4 m_unk0x2c; // 0x2c
undefined4 m_unk0x30; // 0x30
undefined4 m_unk0x34; // 0x34
undefined4 m_unk0x38; // 0x38
undefined4 m_unk0x3c; // 0x3c
undefined m_unk0x40; // 0x40
undefined4 m_unk0x44; // 0x44
undefined m_unk0x48; // 0x48
undefined4 m_unk0x4c; // 0x4c
}; };
#endif // ACT2ACTOR_H #endif // ACT2ACTOR_H

View file

@ -1,23 +1,49 @@
#include "act2actor.h" #include "act2actor.h"
#include "legocachesoundmanager.h"
#include "legosoundmanager.h"
#include "misc.h"
#include "roi/legoroi.h"
DECOMP_SIZE_ASSERT(Act2Actor, 0x1a8) DECOMP_SIZE_ASSERT(Act2Actor, 0x1a8)
// STUB: LEGO1 0x100187e0 // STUB: LEGO1 0x100187e0
Act2Actor::Act2Actor() Act2Actor::Act2Actor()
{ {
// TODO m_unk0x1c = 0;
m_unk0x1d = 0;
m_unk0x1f = FALSE;
m_unk0x24 = 0;
m_unk0x20 = 0;
m_unk0x1e = 0;
m_unk0x28 = 4;
m_unk0x2c = 0;
m_unk0x30 = 0;
m_unk0x34 = 0;
m_unk0x44 = 0;
m_unk0x40 = 1;
m_unk0x48 = 0;
m_unk0x4c = 0;
m_unk0x38 = 0;
m_unk0x3c = 0;
} }
// STUB: LEGO1 0x10018940 // FUNCTION: LEGO1 0x10018940
void Act2Actor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) void Act2Actor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
{ {
// TODO LegoAnimActor::SetROI(p_roi, p_bool1, p_bool2);
m_roi->SetVisibility(FALSE);
} }
// STUB: LEGO1 0x100189f0 // FUNCTION: LEGO1 0x100189f0
MxResult Act2Actor::VTable0x94(LegoPathActor*, MxBool) MxResult Act2Actor::VTable0x94(LegoPathActor*, MxBool)
{ {
// TODO if (m_unk0x1f == FALSE) {
m_unk0x1f = TRUE;
m_unk0x20 = 0;
}
SoundManager()->GetCacheSoundManager()->Play("hitactor", NULL, FALSE);
return SUCCESS; return SUCCESS;
} }
@ -34,10 +60,11 @@ void Act2Actor::VTable0x70(float p_und)
// TODO // TODO
} }
// STUB: LEGO1 0x10019280 // FUNCTION: LEGO1 0x10019280
void Act2Actor::SetWorldSpeed(MxFloat p_worldSpeed) void Act2Actor::SetWorldSpeed(MxFloat p_worldSpeed)
{ {
// TODO LegoAnimActor::SetWorldSpeed(p_worldSpeed);
m_unk0x44 = 0;
} }
// STUB: LEGO1 0x100195a0 // STUB: LEGO1 0x100195a0
@ -47,9 +74,12 @@ MxS32 Act2Actor::VTable0xa0()
return 0; return 0;
} }
// STUB: LEGO1 0x1001a180 // FUNCTION: LEGO1 0x1001a180
MxS32 Act2Actor::VTable0x68(Vector3&, Vector3&, Vector3&) MxS32 Act2Actor::VTable0x68(Vector3& p_v1, Vector3& p_v2, Vector3& p_v3)
{ {
// TODO if (m_unk0x1f) {
return 0; return 0;
} }
return LegoAnimActor::VTable0x68(p_v1, p_v2, p_v3);
}