From abc1c091e89af98a92cfa5e7558eaa942d9ed6ac Mon Sep 17 00:00:00 2001 From: jonschz Date: Fri, 14 Jun 2024 16:30:05 +0200 Subject: [PATCH] fix: Conform with naming scheme --- .../legoomni/include/legoanimationmanager.h | 10 ++-- .../src/common/legoanimationmanager.cpp | 52 +++++++++---------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legoanimationmanager.h b/LEGO1/lego/legoomni/include/legoanimationmanager.h index 84d4fac4..8d97db45 100644 --- a/LEGO1/lego/legoomni/include/legoanimationmanager.h +++ b/LEGO1/lego/legoomni/include/legoanimationmanager.h @@ -78,11 +78,11 @@ class AnimState : public LegoState { // AnimState::`scalar deleting destructor' private: - undefined4 m_unk0x08; // 0x08 - undefined4 m_unk0x10_len; // 0x0c - undefined2* m_unk0x10; // 0x10 - undefined4 m_unk0x18_len; // 0x14 - undefined* m_unk0x18; // 0x18 + undefined4 m_unk0x08; // 0x08 + undefined4 m_arrayOfUnknownShortsLength; // 0x0c + undefined2* m_arrayOfUnknownShorts; // 0x10 + undefined4 m_arrayOfUnknownBytesLength; // 0x14 + undefined* m_arrayOfUnknownBytes; // 0x18 }; // VTABLE: LEGO1 0x100d8c18 diff --git a/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp b/LEGO1/lego/legoomni/src/common/legoanimationmanager.cpp index a7a4a6a1..fb8d1210 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_unk0x10_len = 0; - m_unk0x10 = NULL; - m_unk0x18_len = 0; - m_unk0x18 = NULL; + m_arrayOfUnknownShortsLength = 0; + m_arrayOfUnknownShorts = NULL; + m_arrayOfUnknownBytesLength = 0; + m_arrayOfUnknownBytes = 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_unk0x10) { - delete[] m_unk0x10; + if (m_arrayOfUnknownShorts) { + delete[] m_arrayOfUnknownShorts; } - Read(p_file, &m_unk0x10_len); - if (m_unk0x10_len != 0) { - m_unk0x10 = new undefined2[m_unk0x10_len]; + Read(p_file, &m_arrayOfUnknownShortsLength); + if (m_arrayOfUnknownShortsLength != 0) { + m_arrayOfUnknownShorts = new undefined2[m_arrayOfUnknownShortsLength]; } else { - m_unk0x10 = NULL; + m_arrayOfUnknownShorts = NULL; } - for (int i = 0; i < m_unk0x10_len; i++) { - Read(p_file, &m_unk0x10[i]); + for (int i = 0; i < m_arrayOfUnknownShortsLength; i++) { + Read(p_file, &m_arrayOfUnknownShorts[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_unk0x18_len); - if (m_unk0x18) { - delete[] m_unk0x18; + Read(p_file, &m_arrayOfUnknownBytesLength); + if (m_arrayOfUnknownBytes) { + delete[] m_arrayOfUnknownBytes; } - if (m_unk0x18_len != 0) { - m_unk0x18 = new undefined[m_unk0x18_len]; + if (m_arrayOfUnknownBytesLength != 0) { + m_arrayOfUnknownBytes = new undefined[m_arrayOfUnknownBytesLength]; } else { - m_unk0x18 = NULL; + m_arrayOfUnknownBytes = NULL; } - for (int j = 0; j < m_unk0x18_len; j++) { - Read(p_file, &m_unk0x18[j]); + for (int j = 0; j < m_arrayOfUnknownBytesLength; j++) { + Read(p_file, &m_arrayOfUnknownBytes[j]); } } else if (p_file->IsWriteMode()) { Write(p_file, m_unk0x08); - Write(p_file, m_unk0x10_len); - for (int i = 0; i < m_unk0x10_len; i++) { - Write(p_file, m_unk0x10[i]); + Write(p_file, m_arrayOfUnknownShortsLength); + for (int i = 0; i < m_arrayOfUnknownShortsLength; i++) { + Write(p_file, m_arrayOfUnknownShorts[i]); } - Write(p_file, m_unk0x18_len); - for (int j = 0; j < m_unk0x18_len; j++) { - Write(p_file, m_unk0x18[j]); + Write(p_file, m_arrayOfUnknownBytesLength); + for (int j = 0; j < m_arrayOfUnknownBytesLength; j++) { + Write(p_file, m_arrayOfUnknownBytes[j]); } }