(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

@@ -69,16 +69,15 @@ MxStreamController* MxStreamer::Open(const char* p_name, MxU16 p_lookupType)
}
// FUNCTION: LEGO1 0x100b9570
MxLong MxStreamer::Close(const char* p)
MxLong MxStreamer::Close(const char* p_name)
{
MxDSAction ds;
ds.SetUnknown24(-2);
for (list<MxStreamController*>::iterator it = m_openStreams.begin(); it != m_openStreams.end(); it++) {
MxStreamController* c = *it;
if (!p || !strcmp(p, c->GetAtom().GetInternal())) {
if (!p_name || !strcmp(p_name, c->GetAtom().GetInternal())) {
m_openStreams.erase(it);
if (!c->FUN_100c20d0(ds)) {
@@ -120,10 +119,10 @@ MxStreamController* MxStreamer::GetOpenStream(const char* p_name)
}
// FUNCTION: LEGO1 0x100b9930
MxResult MxStreamer::AddStreamControllerToOpenList(MxStreamController* stream)
MxResult MxStreamer::AddStreamControllerToOpenList(MxStreamController* p_stream)
{
if (find(m_openStreams.begin(), m_openStreams.end(), stream) == m_openStreams.end()) {
m_openStreams.push_back(stream);
if (find(m_openStreams.begin(), m_openStreams.end(), p_stream) == m_openStreams.end()) {
m_openStreams.push_back(p_stream);
return SUCCESS;
}
@@ -139,7 +138,7 @@ MxResult MxStreamer::FUN_100b99b0(MxDSAction* p_action)
if (controller == NULL) {
return FAILURE;
}
return controller->vtable0x20(p_action);
return controller->VTable0x20(p_action);
}
return FAILURE;
}
@@ -154,14 +153,14 @@ MxBool MxStreamer::FUN_100b9b30(MxDSObject& p_dsObject)
}
// FUNCTION: LEGO1 0x100b9b60
MxLong MxStreamer::Notify(MxParam& p)
MxLong MxStreamer::Notify(MxParam& p_param)
{
if (((MxNotificationParam&) p).GetNotification() == MXSTREAMER_DELETE_NOTIFY) {
if (((MxNotificationParam&) p_param).GetNotification() == MXSTREAMER_DELETE_NOTIFY) {
MxDSAction ds;
ds.SetUnknown24(-2);
MxStreamController* c = static_cast<MxStreamerNotification&>(p).GetController();
MxStreamController* c = static_cast<MxStreamerNotification&>(p_param).GetController();
if (!c->FUN_100c20d0(ds)) {
MxStreamerNotification notif(MXSTREAMER_DELETE_NOTIFY, NULL, c);
@@ -176,11 +175,11 @@ MxLong MxStreamer::Notify(MxParam& p)
}
// No offset, function is always inlined
MxStreamerSubClass1::MxStreamerSubClass1(undefined4 size)
MxStreamerSubClass1::MxStreamerSubClass1(undefined4 p_size)
{
m_buffer = NULL;
m_size = size;
undefined4* ptr = &m_unk08;
m_size = p_size;
undefined4* ptr = &m_unk0x08;
for (int i = 0; i >= 0; i--) {
ptr[i] = 0;
}