mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 02:31:15 +00:00
Minor style fixes
This commit is contained in:
parent
d45844a942
commit
8748e26ab3
@ -9,64 +9,65 @@ DECOMP_SIZE_ASSERT(ModelDbPartListCursor, 0x10)
|
|||||||
// FUNCTION: LEGO1 0x100276b0
|
// FUNCTION: LEGO1 0x100276b0
|
||||||
MxResult ModelDbModel::Read(FILE* p_file)
|
MxResult ModelDbModel::Read(FILE* p_file)
|
||||||
{
|
{
|
||||||
MxU32 charSize;
|
MxU32 len;
|
||||||
|
|
||||||
if (fread(&charSize, sizeof(MxU32), 1, p_file) != 1) {
|
if (fread(&len, sizeof(MxU32), 1, p_file) != 1) {
|
||||||
return FAILURE;
|
|
||||||
}
|
|
||||||
m_modelName = new char[charSize];
|
|
||||||
|
|
||||||
if (fread(m_modelName, charSize, 1, p_file) != 1) {
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fread(&m_unk0x04, sizeof(undefined4), 1, p_file) != 1) {
|
m_modelName = new char[len];
|
||||||
return FAILURE;
|
if (fread(m_modelName, len, 1, p_file) != 1) {
|
||||||
}
|
|
||||||
if (fread(&m_unk0x08, sizeof(undefined4), 1, p_file) != 1) {
|
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fread(&charSize, sizeof(MxU32), 1, p_file) != 1) {
|
if (fread(&m_unk0x04, sizeof(m_unk0x04), 1, p_file) != 1) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
if (fread(&m_unk0x08, sizeof(m_unk0x08), 1, p_file) != 1) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
if (fread(&len, sizeof(len), 1, p_file) != 1) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_presenter = new char[charSize];
|
m_presenterName = new char[len];
|
||||||
if (fread(m_presenter, charSize, 1, p_file) != 1) {
|
if (fread(m_presenterName, len, 1, p_file) != 1) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fread(&m_unk0x10, sizeof(undefined4), 3, p_file) != 3) {
|
if (fread(&m_unk0x10, sizeof(*m_unk0x10), 3, p_file) != 3) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
if (fread(&m_unk0x1c, sizeof(undefined4), 3, p_file) != 3) {
|
if (fread(&m_unk0x1c, sizeof(*m_unk0x1c), 3, p_file) != 3) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
if (fread(&m_unk0x28, sizeof(undefined4), 3, p_file) != 3) {
|
if (fread(&m_unk0x28, sizeof(*m_unk0x28), 3, p_file) != 3) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return fread(&m_unk0x34, sizeof(undefined), 1, p_file) == 1 ? SUCCESS : FAILURE;
|
return fread(&m_unk0x34, sizeof(m_unk0x34), 1, p_file) == 1 ? SUCCESS : FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10027850
|
// FUNCTION: LEGO1 0x10027850
|
||||||
MxResult ModelDbPart::Read(FILE* p_file)
|
MxResult ModelDbPart::Read(FILE* p_file)
|
||||||
{
|
{
|
||||||
MxU32 size;
|
MxU32 len;
|
||||||
char roiNameBuffer[128];
|
char buff[128];
|
||||||
if (fread(&size, sizeof(MxU32), 1, p_file) != 1) {
|
|
||||||
return FAILURE;
|
|
||||||
}
|
|
||||||
if (fread(roiNameBuffer, size, 1, p_file) != 1) {
|
|
||||||
return FAILURE;
|
|
||||||
}
|
|
||||||
m_roiName = roiNameBuffer;
|
|
||||||
|
|
||||||
if (fread(&m_unk0x10, sizeof(undefined4), 1, p_file) != 1) {
|
if (fread(&len, sizeof(len), 1, p_file) != 1) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
if (fread(buff, len, 1, p_file) != 1) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return fread(&m_unk0x14, sizeof(undefined4), 1, p_file) == 1 ? SUCCESS : FAILURE;
|
m_roiName = buff;
|
||||||
|
|
||||||
|
if (fread(&m_unk0x10, sizeof(m_unk0x10), 1, p_file) != 1) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return fread(&m_unk0x14, sizeof(m_unk0x14), 1, p_file) == 1 ? SUCCESS : FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10027910
|
// FUNCTION: LEGO1 0x10027910
|
||||||
|
|||||||
@ -96,7 +96,7 @@ struct ModelDbModel {
|
|||||||
char* m_modelName; // 0x00
|
char* m_modelName; // 0x00
|
||||||
undefined4 m_unk0x04; // 0x04
|
undefined4 m_unk0x04; // 0x04
|
||||||
undefined4 m_unk0x08; // 0x08
|
undefined4 m_unk0x08; // 0x08
|
||||||
char* m_presenter; // 0x0c
|
char* m_presenterName; // 0x0c
|
||||||
undefined4 m_unk0x10[3]; // 0x10
|
undefined4 m_unk0x10[3]; // 0x10
|
||||||
undefined4 m_unk0x1c[3]; // 0x1c
|
undefined4 m_unk0x1c[3]; // 0x1c
|
||||||
undefined4 m_unk0x28[3]; // 0x28
|
undefined4 m_unk0x28[3]; // 0x28
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user