diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h index 8d97db45..018a0059 100644 --- a/LEGO1/lego/legoomni/include/legoanimationmanager.h +++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h @@ -78,11 +78,15 @@ class AnimState : public LegoState { // AnimState::`scalar deleting destructor' private: - undefined4 m_unk0x08; // 0x08 - undefined4 m_arrayOfUnknownShortsLength; // 0x0c - undefined2* m_arrayOfUnknownShorts; // 0x10 - undefined4 m_arrayOfUnknownBytesLength; // 0x14 - undefined* m_arrayOfUnknownBytes; // 0x18 + undefined4 m_unk0x08; // 0x08 + // appears to store the length of m_unk0x10 + undefined4 m_unk0x0c; // 0x0c + // dynamically sized array of two-byte elements + undefined2* m_unk0x10; // 0x10 + // appears to store the length of m_unk0x18 + undefined4 m_unk0x14; // 0x14 + // dynamically sized array of one-byte elements + undefined* m_unk0x18; // 0x18 }; // VTABLE: LEGO1 0x100d8c18 diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index fb8d1210..d249606d 100644 --- a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp @@ -2826,10 +2826,10 @@ void LegoAnimationManager::FUN_10064b50(MxLong p_time) // FUNCTION: LEGO1 0x10064ff0 AnimState::AnimState() { - m_arrayOfUnknownShortsLength = 0; - m_arrayOfUnknownShorts = NULL; - m_arrayOfUnknownBytesLength = 0; - m_arrayOfUnknownBytes = NULL; + m_unk0x0c = 0; + m_unk0x10 = NULL; + m_unk0x14 = 0; + m_unk0x18 = NULL; } // STUB: LEGO1 0x10065150 @@ -2867,45 +2867,45 @@ MxResult AnimState::Serialize(LegoFile* p_file) Read(p_file, &m_unk0x08); // m_unk0x10_len and m_unk0x10 - if (m_arrayOfUnknownShorts) { - delete[] m_arrayOfUnknownShorts; + if (m_unk0x10) { + delete[] m_unk0x10; } - Read(p_file, &m_arrayOfUnknownShortsLength); - if (m_arrayOfUnknownShortsLength != 0) { - m_arrayOfUnknownShorts = new undefined2[m_arrayOfUnknownShortsLength]; + Read(p_file, &m_unk0x0c); + if (m_unk0x0c != 0) { + m_unk0x10 = new undefined2[m_unk0x0c]; } else { - m_arrayOfUnknownShorts = NULL; + m_unk0x10 = NULL; } - for (int i = 0; i < m_arrayOfUnknownShortsLength; i++) { - Read(p_file, &m_arrayOfUnknownShorts[i]); + for (int i = 0; i < m_unk0x0c; i++) { + Read(p_file, &m_unk0x10[i]); } // m_unk0x18_len and m_unk0x18 // Note that here we read first and then free memory in contrast to above - Read(p_file, &m_arrayOfUnknownBytesLength); - if (m_arrayOfUnknownBytes) { - delete[] m_arrayOfUnknownBytes; + Read(p_file, &m_unk0x14); + if (m_unk0x18) { + delete[] m_unk0x18; } - if (m_arrayOfUnknownBytesLength != 0) { - m_arrayOfUnknownBytes = new undefined[m_arrayOfUnknownBytesLength]; + if (m_unk0x14 != 0) { + m_unk0x18 = new undefined[m_unk0x14]; } else { - m_arrayOfUnknownBytes = NULL; + m_unk0x18 = NULL; } - for (int j = 0; j < m_arrayOfUnknownBytesLength; j++) { - Read(p_file, &m_arrayOfUnknownBytes[j]); + for (int j = 0; j < m_unk0x14; j++) { + Read(p_file, &m_unk0x18[j]); } } else if (p_file->IsWriteMode()) { Write(p_file, m_unk0x08); - Write(p_file, m_arrayOfUnknownShortsLength); - for (int i = 0; i < m_arrayOfUnknownShortsLength; i++) { - Write(p_file, m_arrayOfUnknownShorts[i]); + Write(p_file, m_unk0x0c); + for (int i = 0; i < m_unk0x0c; i++) { + Write(p_file, m_unk0x10[i]); } - Write(p_file, m_arrayOfUnknownBytesLength); - for (int j = 0; j < m_arrayOfUnknownBytesLength; j++) { - Write(p_file, m_arrayOfUnknownBytes[j]); + Write(p_file, m_unk0x14); + for (int j = 0; j < m_unk0x14; j++) { + Write(p_file, m_unk0x18[j]); } }