fix: Conform with naming scheme

This commit is contained in:
jonschz 2024-06-14 16:30:05 +02:00
parent 5ae92bd12f
commit abc1c091e8
2 changed files with 31 additions and 31 deletions

View File

@ -78,11 +78,11 @@ class AnimState : public LegoState {
// AnimState::`scalar deleting destructor' // AnimState::`scalar deleting destructor'
private: private:
undefined4 m_unk0x08; // 0x08 undefined4 m_unk0x08; // 0x08
undefined4 m_unk0x10_len; // 0x0c undefined4 m_arrayOfUnknownShortsLength; // 0x0c
undefined2* m_unk0x10; // 0x10 undefined2* m_arrayOfUnknownShorts; // 0x10
undefined4 m_unk0x18_len; // 0x14 undefined4 m_arrayOfUnknownBytesLength; // 0x14
undefined* m_unk0x18; // 0x18 undefined* m_arrayOfUnknownBytes; // 0x18
}; };
// VTABLE: LEGO1 0x100d8c18 // VTABLE: LEGO1 0x100d8c18

View File

@ -2826,10 +2826,10 @@ void LegoAnimationManager::FUN_10064b50(MxLong p_time)
// FUNCTION: LEGO1 0x10064ff0 // FUNCTION: LEGO1 0x10064ff0
AnimState::AnimState() AnimState::AnimState()
{ {
m_unk0x10_len = 0; m_arrayOfUnknownShortsLength = 0;
m_unk0x10 = NULL; m_arrayOfUnknownShorts = NULL;
m_unk0x18_len = 0; m_arrayOfUnknownBytesLength = 0;
m_unk0x18 = NULL; m_arrayOfUnknownBytes = NULL;
} }
// STUB: LEGO1 0x10065150 // STUB: LEGO1 0x10065150
@ -2867,45 +2867,45 @@ MxResult AnimState::Serialize(LegoFile* p_file)
Read(p_file, &m_unk0x08); Read(p_file, &m_unk0x08);
// m_unk0x10_len and m_unk0x10 // m_unk0x10_len and m_unk0x10
if (m_unk0x10) { if (m_arrayOfUnknownShorts) {
delete[] m_unk0x10; delete[] m_arrayOfUnknownShorts;
} }
Read(p_file, &m_unk0x10_len); Read(p_file, &m_arrayOfUnknownShortsLength);
if (m_unk0x10_len != 0) { if (m_arrayOfUnknownShortsLength != 0) {
m_unk0x10 = new undefined2[m_unk0x10_len]; m_arrayOfUnknownShorts = new undefined2[m_arrayOfUnknownShortsLength];
} }
else { else {
m_unk0x10 = NULL; m_arrayOfUnknownShorts = NULL;
} }
for (int i = 0; i < m_unk0x10_len; i++) { for (int i = 0; i < m_arrayOfUnknownShortsLength; i++) {
Read(p_file, &m_unk0x10[i]); Read(p_file, &m_arrayOfUnknownShorts[i]);
} }
// m_unk0x18_len and m_unk0x18 // m_unk0x18_len and m_unk0x18
// Note that here we read first and then free memory in contrast to above // Note that here we read first and then free memory in contrast to above
Read(p_file, &m_unk0x18_len); Read(p_file, &m_arrayOfUnknownBytesLength);
if (m_unk0x18) { if (m_arrayOfUnknownBytes) {
delete[] m_unk0x18; delete[] m_arrayOfUnknownBytes;
} }
if (m_unk0x18_len != 0) { if (m_arrayOfUnknownBytesLength != 0) {
m_unk0x18 = new undefined[m_unk0x18_len]; m_arrayOfUnknownBytes = new undefined[m_arrayOfUnknownBytesLength];
} }
else { else {
m_unk0x18 = NULL; m_arrayOfUnknownBytes = NULL;
} }
for (int j = 0; j < m_unk0x18_len; j++) { for (int j = 0; j < m_arrayOfUnknownBytesLength; j++) {
Read(p_file, &m_unk0x18[j]); Read(p_file, &m_arrayOfUnknownBytes[j]);
} }
} }
else if (p_file->IsWriteMode()) { else if (p_file->IsWriteMode()) {
Write(p_file, m_unk0x08); Write(p_file, m_unk0x08);
Write(p_file, m_unk0x10_len); Write(p_file, m_arrayOfUnknownShortsLength);
for (int i = 0; i < m_unk0x10_len; i++) { for (int i = 0; i < m_arrayOfUnknownShortsLength; i++) {
Write(p_file, m_unk0x10[i]); Write(p_file, m_arrayOfUnknownShorts[i]);
} }
Write(p_file, m_unk0x18_len); Write(p_file, m_arrayOfUnknownBytesLength);
for (int j = 0; j < m_unk0x18_len; j++) { for (int j = 0; j < m_arrayOfUnknownBytesLength; j++) {
Write(p_file, m_unk0x18[j]); Write(p_file, m_arrayOfUnknownBytes[j]);
} }
} }