implement various LegoWorldPresenter functions (#621)

* implement LegoWorldPresenterFunctions

* fix typo

* Fixes/match

* Fix

* Match

* Fixes

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha
2024-03-03 20:34:55 -05:00
committed by GitHub
parent 7f5ad98749
commit c2a46b058b
17 changed files with 152 additions and 50 deletions

View File

@@ -35,13 +35,13 @@ MxResult ModelDbModel::Read(FILE* p_file)
return FAILURE;
}
if (fread(&m_unk0x10, sizeof(*m_unk0x10), 3, p_file) != 3) {
if (fread(&m_location, sizeof(*m_location), 3, p_file) != 3) {
return FAILURE;
}
if (fread(&m_unk0x1c, sizeof(*m_unk0x1c), 3, p_file) != 3) {
if (fread(&m_direction, sizeof(*m_direction), 3, p_file) != 3) {
return FAILURE;
}
if (fread(&m_unk0x28, sizeof(*m_unk0x28), 3, p_file) != 3) {
if (fread(&m_up, sizeof(*m_up), 3, p_file) != 3) {
return FAILURE;
}
@@ -65,11 +65,11 @@ MxResult ModelDbPart::Read(FILE* p_file)
m_roiName = buff;
if (fread(&m_unk0x10, sizeof(m_unk0x10), 1, p_file) != 1) {
if (fread(&m_partDataLength, sizeof(m_partDataLength), 1, p_file) != 1) {
return FAILURE;
}
return fread(&m_unk0x14, sizeof(m_unk0x14), 1, p_file) == 1 ? SUCCESS : FAILURE;
return fread(&m_partDataOffset, sizeof(m_partDataOffset), 1, p_file) == 1 ? SUCCESS : FAILURE;
}
// FUNCTION: LEGO1 0x10027910

View File

@@ -12,9 +12,9 @@
struct ModelDbPart {
MxResult Read(FILE* p_file);
MxString m_roiName; // 0x00
undefined4 m_unk0x10; // 0x10
undefined4 m_unk0x14; // 0x14
MxString m_roiName; // 0x00
undefined4 m_partDataLength; // 0x10
undefined4 m_partDataOffset; // 0x14
};
// VTABLE: LEGO1 0x100d6888
@@ -35,8 +35,8 @@ public:
MxS32 compare = strcmpi(p_a->m_roiName.GetData(), p_b->m_roiName.GetData());
if (compare == 0) {
p_b->m_unk0x10 = p_a->m_unk0x10;
p_b->m_unk0x14 = p_a->m_unk0x14;
p_b->m_partDataLength = p_a->m_partDataLength;
p_b->m_partDataOffset = p_a->m_partDataOffset;
}
return compare;
@@ -93,14 +93,14 @@ public:
struct ModelDbModel {
MxResult Read(FILE* p_file);
char* m_modelName; // 0x00
undefined4 m_unk0x04; // 0x04
undefined4 m_unk0x08; // 0x08
char* m_presenterName; // 0x0c
undefined4 m_unk0x10[3]; // 0x10
undefined4 m_unk0x1c[3]; // 0x1c
undefined4 m_unk0x28[3]; // 0x28
undefined m_unk0x34; // 0x34
char* m_modelName; // 0x00
undefined4 m_unk0x04; // 0x04
undefined4 m_unk0x08; // 0x08
char* m_presenterName; // 0x0c
float m_location[3]; // 0x10
float m_direction[3]; // 0x1c
float m_up[3]; // 0x28
undefined m_unk0x34; // 0x34
};
// SIZE 0x18