(Proposal) Introduction of naming convention checker (ncc) (#322)

* Add ncc tool

* Add symlink

* Fixes

* Try this

* Try this

* Try this

* Try this

* Add include path

* Update style

* Update style

* Add more rules

* Fix style

* Update styles

* Fix name parameter

* Fix MxParam p

* Fix m_unk0x pattern

* Allow 4 digits for relative hex

* Add missing offset

* Fix some parameters

* Fix some vtables

* Fix more vtables

* Update rules, fixes

* More fixes

* More fixes

* More fixes

* More fixes

* More fixes

* More fixes

* More fixes

* Fix last issue

* Update readme

* Update readme

* Update CONTRIBUTING.md

* Fix annotations

* Rename

* Update CONTRIBUTING.md

* Update README.md
This commit is contained in:
Christian Semmler
2023-12-13 05:48:14 -05:00
committed by GitHub
parent 3b155bfe38
commit bc5ca621a4
303 changed files with 2592 additions and 1844 deletions

View File

@@ -10,7 +10,7 @@
DECOMP_SIZE_ASSERT(MxDSAction, 0x94)
// GLOBAL: LEGO1 0x10101410
MxU16 g_unkSep = TWOCC(',', ' ');
MxU16 g_sep = TWOCC(',', ' ');
// FUNCTION: LEGO1 0x100ad810
MxDSAction::MxDSAction()
@@ -26,10 +26,10 @@ MxDSAction::MxDSAction()
this->m_location.Fill(FLT_MAX);
this->m_direction.Fill(FLT_MAX);
this->m_up.Fill(FLT_MAX);
this->m_unk84 = NULL;
this->m_unk88 = 0;
this->m_unk0x84 = NULL;
this->m_unk0x88 = 0;
this->m_origin = NULL;
this->m_unkTimingField = INT_MIN;
this->m_unk0x90 = INT_MIN;
}
// FUNCTION: LEGO1 0x100ad940
@@ -51,15 +51,15 @@ MxBool MxDSAction::HasId(MxU32 p_objectId)
}
// FUNCTION: LEGO1 0x100ada40
void MxDSAction::SetUnkTimingField(MxLong p_unkTimingField)
void MxDSAction::SetUnknown90(MxLong p_unk0x90)
{
this->m_unkTimingField = p_unkTimingField;
this->m_unk0x90 = p_unk0x90;
}
// FUNCTION: LEGO1 0x100ada50
MxLong MxDSAction::GetUnkTimingField()
MxLong MxDSAction::GetUnknown90()
{
return this->m_unkTimingField;
return this->m_unk0x90;
}
// FUNCTION: LEGO1 0x100ada80
@@ -82,10 +82,10 @@ void MxDSAction::CopyFrom(MxDSAction& p_dsAction)
this->m_up.CopyFrom(p_dsAction.m_up);
AppendData(p_dsAction.m_extraLength, p_dsAction.m_extraData);
this->m_unk84 = p_dsAction.m_unk84;
this->m_unk88 = p_dsAction.m_unk88;
this->m_unk0x84 = p_dsAction.m_unk0x84;
this->m_unk0x88 = p_dsAction.m_unk0x88;
this->m_origin = p_dsAction.m_origin;
this->m_unkTimingField = p_dsAction.m_unkTimingField;
this->m_unk0x90 = p_dsAction.m_unk0x90;
}
// FUNCTION: LEGO1 0x100adbe0
@@ -124,7 +124,7 @@ MxDSAction* MxDSAction::Clone()
// FUNCTION: LEGO1 0x100adcd0
MxLong MxDSAction::GetElapsedTime()
{
return Timer()->GetTime() - this->m_unkTimingField;
return Timer()->GetTime() - this->m_unk0x90;
}
// FUNCTION: LEGO1 0x100add00
@@ -165,8 +165,8 @@ void MxDSAction::MergeFrom(MxDSAction& p_dsAction)
// Taking those references forces the compiler to move the values onto the stack.
// The original code most likely looked different, but this yields a 100% match.
MxU16& _extraLength = extraLength;
char*& _extraData = extraData;
MxU16& extraLengthRef = extraLength;
char*& extraDataRef = extraData;
if (extraLength && extraData) {
if (!this->m_extraData || !strncmp("XXX", this->m_extraData, 3)) {
delete[] this->m_extraData;
@@ -183,13 +183,13 @@ void MxDSAction::AppendData(MxU16 p_extraLength, const char* p_extraData)
return;
if (this->m_extraLength) {
char* concat = new char[p_extraLength + this->m_extraLength + sizeof(g_unkSep)];
char* concat = new char[p_extraLength + this->m_extraLength + sizeof(g_sep)];
memcpy(concat, this->m_extraData, this->m_extraLength);
*(MxU16*) &concat[this->m_extraLength] = g_unkSep;
memcpy(&concat[this->m_extraLength + sizeof(g_unkSep)], p_extraData, p_extraLength);
*(MxU16*) &concat[this->m_extraLength] = g_sep;
memcpy(&concat[this->m_extraLength + sizeof(g_sep)], p_extraData, p_extraLength);
this->m_extraLength += p_extraLength + sizeof(g_unkSep);
this->m_extraLength += p_extraLength + sizeof(g_sep);
delete[] this->m_extraData;
this->m_extraData = concat;
}
@@ -205,9 +205,9 @@ void MxDSAction::AppendData(MxU16 p_extraLength, const char* p_extraData)
}
// FUNCTION: LEGO1 0x100adf70
void MxDSAction::Deserialize(char** p_source, MxS16 p_unk24)
void MxDSAction::Deserialize(char** p_source, MxS16 p_unk0x24)
{
MxDSObject::Deserialize(p_source, p_unk24);
MxDSObject::Deserialize(p_source, p_unk0x24);
GetScalar(p_source, this->m_flags);
GetScalar(p_source, this->m_startTime);