(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

@@ -18,7 +18,7 @@ DECOMP_SIZE_ASSERT(Score, 0x104)
// FUNCTION: LEGO1 0x10001000
Score::Score()
{
m_unkf8 = 0;
m_unk0xf8 = 0;
NotificationManager()->Register(this);
}
@@ -72,31 +72,31 @@ void Score::DeleteScript()
}
// FUNCTION: LEGO1 0x10001410
MxLong Score::Notify(MxParam& p)
MxLong Score::Notify(MxParam& p_param)
{
MxLong ret = 0;
LegoWorld::Notify(p);
if (m_unkf6) {
switch (((MxNotificationParam&) p).GetNotification()) {
LegoWorld::Notify(p_param);
if (m_unk0xf6) {
switch (((MxNotificationParam&) p_param).GetNotification()) {
case c_notificationStartAction:
ret = 1;
Paint();
break;
case c_notificationEndAction:
ret = FUN_10001510((MxEndActionNotificationParam&) p);
ret = FUN_10001510((MxEndActionNotificationParam&) p_param);
break;
case c_notificationKeyPress:
if (((LegoEventNotificationParam&) p).GetKey() == 0x20)
if (((LegoEventNotificationParam&) p_param).GetKey() == 0x20)
DeleteScript(); // Shutting down
ret = 1;
break;
case TYPE17:
ret = FUN_100016d0((MxType17NotificationParam&) p);
ret = FUN_100016d0((MxType17NotificationParam&) p_param);
break;
case MXTRANSITIONMANAGER_TRANSITIONENDED:
DeleteObjects(g_infoscorScript, 7, 9);
if (m_unkf8)
GameState()->HandleAction(m_unkf8);
if (m_unk0xf8)
GameState()->HandleAction(m_unk0xf8);
ret = 1;
break;
default:
@@ -107,15 +107,15 @@ MxLong Score::Notify(MxParam& p)
}
// FUNCTION: LEGO1 0x10001510
MxLong Score::FUN_10001510(MxEndActionNotificationParam& p)
MxLong Score::FUN_10001510(MxEndActionNotificationParam& p_param)
{
MxDSAction* action = p.GetAction();
MxDSAction* action = p_param.GetAction();
if (m_atom == action->GetAtomId()) {
MxU32 id = action->GetObjectId();
switch (action->GetObjectId()) {
case 10:
m_unkf8 = 0x38;
m_unk0xf8 = 0x38;
TransitionManager()->StartTransition(MxTransitionManager::PIXELATION, 0x32, 0, 0);
break;
case 0x1f5:
@@ -151,19 +151,19 @@ void Score::Stop()
}
// FUNCTION: LEGO1 0x100016d0
MxLong Score::FUN_100016d0(MxType17NotificationParam& p)
MxLong Score::FUN_100016d0(MxType17NotificationParam& p_param)
{
MxS16 l = p.GetUnknown28();
MxS16 l = p_param.GetUnknown28();
if (l == 1 || p.GetUnknown20() == 4) {
switch (p.GetUnknown20()) {
if (l == 1 || p_param.GetUnknown20() == 4) {
switch (p_param.GetUnknown20()) {
case 1:
m_unkf8 = 2;
m_unk0xf8 = 2;
DeleteScript();
TransitionManager()->StartTransition(MxTransitionManager::PIXELATION, 0x32, 0, 0);
break;
case 2:
m_unkf8 = 3;
m_unk0xf8 = 3;
DeleteScript();
TransitionManager()->StartTransition(MxTransitionManager::PIXELATION, 0x32, 0, 0);
break;
@@ -320,6 +320,6 @@ void Score::FillArea(MxU32 p_x, MxU32 p_y, MxS16 p_color)
MxBool Score::VTable0x64()
{
DeleteScript();
m_unkf8 = 2;
m_unk0xf8 = 2;
return TRUE;
}