LegoActor: destructor, SetROI

This commit is contained in:
Joshua Peisach 2024-02-23 11:30:58 -05:00
parent 6b1c75ab5a
commit ae74a2f3fa
No known key found for this signature in database
GPG Key ID: 41C3D4189AFEDB5A
2 changed files with 29 additions and 9 deletions

View File

@ -2,7 +2,9 @@
#define LEGOACTOR_H
#include "decomp.h"
#include "legocachesound.h"
#include "legoentity.h"
#include "misc/legotypes.h"
// VTABLE: LEGO1 0x100d6d68
// SIZE 0x78
@ -41,10 +43,10 @@ class LegoActor : public LegoEntity {
virtual void VTable0x64(MxU8 p_unk0x74) { m_unk0x74 = p_unk0x74; } // vtable+0x64
private:
MxFloat m_unk0x68; // 0x68
undefined4 m_unk0x6c; // 0x6c
MxFloat m_unk0x70; // 0x70
MxU8 m_unk0x74; // 0x74
MxFloat m_unk0x68; // 0x68
LegoCacheSound* m_sound; // 0x6c
MxFloat m_unk0x70; // 0x70
LegoChar m_unk0x74; // 0x74
};
// SYNTHETIC: LEGO1 0x1002d300

View File

@ -2,20 +2,25 @@
DECOMP_SIZE_ASSERT(LegoActor, 0x78)
// GLOBAL: LEGO1 0x100f32d0
extern LegoChar* g_unk0x100f32d0[] = {"none", "pepper", "mama", "papa", "nick", "laura"};
// FUNCTION: LEGO1 0x1002d110
LegoActor::LegoActor()
{
m_unk0x68 = 0.0f;
m_unk0x6c = 0;
m_sound = NULL;
m_unk0x70 = 0.0f;
m_unk0x10 = 0;
m_unk0x74 = 0;
}
// STUB: LEGO1 0x1002d320
// FUNCTION: LEGO1 0x1002d320
LegoActor::~LegoActor()
{
// TODO
if (m_sound) {
m_sound->FUN_10006b80();
}
}
// STUB: LEGO1 0x1002d390
@ -24,8 +29,21 @@ void LegoActor::ParseAction(char*)
// TODO
}
// STUB: LEGO1 0x1002d670
// FUNCTION: LEGO1 0x1002d670
void LegoActor::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2)
{
// TODO
const LegoChar* name;
if (p_roi) {
name = p_roi->GetName();
for (int i = 1; i <= 5; i++) {
if (strcmpi(name, g_unk0x100f32d0[i]) == 0) {
m_unk0x59 = 0;
m_unk0x74 = i;
break;
}
}
}
LegoEntity::SetROI(p_roi, p_bool1, p_bool2);
}