mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Replace m_unk0x04
and m_unk0x08
with m_modelDataLength
and m_modelDataOffset
(#1456)
This commit is contained in:
@@ -342,15 +342,15 @@ MxResult LegoWorldPresenter::FUN_10067360(ModelDbPart& p_part, FILE* p_wdbFile)
|
||||
// FUNCTION: LEGO1 0x100674b0
|
||||
MxResult LegoWorldPresenter::FUN_100674b0(ModelDbModel& p_model, FILE* p_wdbFile, LegoWorld* p_world)
|
||||
{
|
||||
MxU8* buff = new MxU8[p_model.m_unk0x04];
|
||||
MxU8* buff = new MxU8[p_model.m_modelDataLength];
|
||||
|
||||
fseek(p_wdbFile, p_model.m_unk0x08, SEEK_SET);
|
||||
if (fread(buff, p_model.m_unk0x04, 1, p_wdbFile) != 1) {
|
||||
fseek(p_wdbFile, p_model.m_modelDataOffset, SEEK_SET);
|
||||
if (fread(buff, p_model.m_modelDataLength, 1, p_wdbFile) != 1) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
MxDSChunk chunk;
|
||||
chunk.SetLength(p_model.m_unk0x04);
|
||||
chunk.SetLength(p_model.m_modelDataLength);
|
||||
chunk.SetData(buff);
|
||||
|
||||
MxDSAction action;
|
||||
|
@@ -28,10 +28,10 @@ MxResult ModelDbModel::Read(FILE* p_file)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (fread(&m_unk0x04, sizeof(m_unk0x04), 1, p_file) != 1) {
|
||||
if (fread(&m_modelDataLength, sizeof(m_modelDataLength), 1, p_file) != 1) {
|
||||
return FAILURE;
|
||||
}
|
||||
if (fread(&m_unk0x08, sizeof(m_unk0x08), 1, p_file) != 1) {
|
||||
if (fread(&m_modelDataOffset, sizeof(m_modelDataOffset), 1, p_file) != 1) {
|
||||
return FAILURE;
|
||||
}
|
||||
if (fread(&len, sizeof(len), 1, p_file) != 1) {
|
||||
|
@@ -94,14 +94,14 @@ struct ModelDbModel {
|
||||
void Free();
|
||||
MxResult Read(FILE* p_file);
|
||||
|
||||
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
|
||||
char* m_modelName; // 0x00
|
||||
MxU32 m_modelDataLength; // 0x04
|
||||
MxU32 m_modelDataOffset; // 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
|
||||
|
Reference in New Issue
Block a user