(Proposal) Adjustments to "decomp" language (#308)

* Adjustments to "decomp" language

* Fix a comment

* Fix accidental clang-formatting

* Fix order

* Fix order

* Remove junk

* Fix OFFSET

* Adjustments based on new suggestions

* Annotate globals

* Globals in ISLE

* More globals

* Merge from parser2 branch

* Allow prepending space for exact marker match

* To eliminate noise, require the 0x prefix on offset for marker match

* fix test from previous

* Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise

* FUNCTION to SYNTHETIC where needed

* Missed marker conversion on SetAtomId

* pylint cleanup, remove unused code

* Fix unexpected function end, add more unit tests

* Be more strict about synthetic name syntax

* Revert "Missed marker conversion on SetAtomId"

This reverts commit d87d665127.

* Revert "FUNCTION to SYNTHETIC where needed"

This reverts commit 8c815418d2.

* Implicit lookup by name for functions

* Fix VTABLE SYNTHETIC and other decomp markers

* Get vtable class name

* Vtable marker should identify struct

* No colon for SIZE comment

* Update README.md

* Update README.md

* Update CONTRIBUTING.md

* Update README.md

* Update README.md

* Update CONTRIBUTING.md

* Update README.md

* Update CONTRIBUTING.md

* Fix destructor/annotation

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

---------

Co-authored-by: disinvite <disinvite@users.noreply.github.com>
This commit is contained in:
Christian Semmler
2023-12-06 07:10:45 -05:00
committed by GitHub
parent 4f5b70013f
commit 494a556f8e
407 changed files with 3505 additions and 2493 deletions

View File

@@ -13,19 +13,19 @@
#include "mxtimer.h"
#include "mxvideomanager.h"
// 0x101015b8
// GLOBAL: LEGO1 0x101015b8
char g_hdPath[1024];
// 0x101019b8
// GLOBAL: LEGO1 0x101019b8
char g_cdPath[1024];
// 0x10101db8
// GLOBAL: LEGO1 0x10101db8
MxBool g_use3dSound;
// 0x101015b0
// GLOBAL: LEGO1 0x101015b0
MxOmni* MxOmni::g_instance = NULL;
// OFFSET: LEGO1 0x100159e0
// FUNCTION: LEGO1 0x100159e0
void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last)
{
MxDSAction action;
@@ -39,108 +39,108 @@ void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last)
}
}
// OFFSET: LEGO1 0x10058a90
// FUNCTION: LEGO1 0x10058a90
MxBool MxOmni::IsTimerRunning()
{
return m_timerRunning;
}
// OFFSET: LEGO1 0x100acea0
// FUNCTION: LEGO1 0x100acea0
MxObjectFactory* ObjectFactory()
{
return MxOmni::GetInstance()->GetObjectFactory();
}
// OFFSET: LEGO1 0x100aceb0
// FUNCTION: LEGO1 0x100aceb0
MxNotificationManager* NotificationManager()
{
return MxOmni::GetInstance()->GetNotificationManager();
}
// OFFSET: LEGO1 0x100acec0
// FUNCTION: LEGO1 0x100acec0
MxTickleManager* TickleManager()
{
return MxOmni::GetInstance()->GetTickleManager();
}
// OFFSET: LEGO1 0x100aced0
// FUNCTION: LEGO1 0x100aced0
MxTimer* Timer()
{
return MxOmni::GetInstance()->GetTimer();
}
// OFFSET: LEGO1 0x100acee0
// FUNCTION: LEGO1 0x100acee0
MxAtomIdCounterSet* AtomIdCounterSet()
{
return MxOmni::GetInstance()->GetAtomIdCounterSet();
}
// OFFSET: LEGO1 0x100acef0
// FUNCTION: LEGO1 0x100acef0
MxStreamer* Streamer()
{
return MxOmni::GetInstance()->GetStreamer();
}
// OFFSET: LEGO1 0x100acf00
// FUNCTION: LEGO1 0x100acf00
MxSoundManager* MSoundManager()
{
return MxOmni::GetInstance()->GetSoundManager();
}
// OFFSET: LEGO1 0x100acf10
// FUNCTION: LEGO1 0x100acf10
MxVideoManager* MVideoManager()
{
return MxOmni::GetInstance()->GetVideoManager();
}
// OFFSET: LEGO1 0x100acf20
// FUNCTION: LEGO1 0x100acf20
MxVariableTable* VariableTable()
{
return MxOmni::GetInstance()->GetVariableTable();
}
// OFFSET: LEGO1 0x100acf30
// FUNCTION: LEGO1 0x100acf30
MxMusicManager* MusicManager()
{
return MxOmni::GetInstance()->GetMusicManager();
}
// OFFSET: LEGO1 0x100acf40
// FUNCTION: LEGO1 0x100acf40
MxEventManager* EventManager()
{
return MxOmni::GetInstance()->GetEventManager();
}
// OFFSET: LEGO1 0x100acf70
// FUNCTION: LEGO1 0x100acf70
MxResult DeleteObject(MxDSAction& p_dsAction)
{
return MxOmni::GetInstance()->DeleteObject(p_dsAction);
}
// OFFSET: LEGO1 0x100aef10
// FUNCTION: LEGO1 0x100aef10
MxOmni::MxOmni()
{
Init();
}
// OFFSET: LEGO1 0x100aefb0
// FUNCTION: LEGO1 0x100aefb0
MxEntity* MxOmni::FindWorld(const char*, MxS32, MxPresenter*)
{
return NULL;
}
// OFFSET: LEGO1 0x100aefc0
// FUNCTION: LEGO1 0x100aefc0
void MxOmni::NotifyCurrentEntity(MxNotificationParam* p_param)
{
}
// OFFSET: LEGO1 0x100aeff0
// FUNCTION: LEGO1 0x100aeff0
MxOmni::~MxOmni()
{
Destroy();
}
// OFFSET: LEGO1 0x100af080
// FUNCTION: LEGO1 0x100af080
void MxOmni::Init()
{
m_windowHandle = NULL;
@@ -158,13 +158,13 @@ void MxOmni::Init()
m_timerRunning = NULL;
}
// OFFSET: LEGO1 0x100af0b0
// FUNCTION: LEGO1 0x100af0b0
void MxOmni::SetInstance(MxOmni* instance)
{
g_instance = instance;
}
// OFFSET: LEGO1 0x100af0c0
// FUNCTION: LEGO1 0x100af0c0
MxResult MxOmni::Create(MxOmniCreateParam& p)
{
MxResult result = FAILURE;
@@ -253,7 +253,7 @@ done:
return result;
}
// OFFSET: LEGO1 0x100afe90
// FUNCTION: LEGO1 0x100afe90
void MxOmni::Destroy()
{
{
@@ -299,7 +299,7 @@ void MxOmni::Destroy()
Init();
}
// OFFSET: LEGO1 0x100b0090
// FUNCTION: LEGO1 0x100b0090
MxResult MxOmni::Start(MxDSAction* p_dsAction)
{
MxResult result = FAILURE;
@@ -310,26 +310,26 @@ MxResult MxOmni::Start(MxDSAction* p_dsAction)
return result;
}
// OFFSET: LEGO1 0x100b00c0 STUB
// STUB: LEGO1 0x100b00c0
MxResult MxOmni::DeleteObject(MxDSAction& p_dsAction)
{
// TODO
return FAILURE;
}
// OFFSET: LEGO1 0x100b00e0 STUB
// STUB: LEGO1 0x100b00e0
void MxOmni::Vtable0x2c()
{
// TODO
}
// OFFSET: LEGO1 0x100b0680
// FUNCTION: LEGO1 0x100b0680
MxOmni* MxOmni::GetInstance()
{
return g_instance;
}
// OFFSET: LEGO1 0x100b0690
// FUNCTION: LEGO1 0x100b0690
void MxOmni::DestroyInstance()
{
if (g_instance != NULL) {
@@ -338,7 +338,7 @@ void MxOmni::DestroyInstance()
}
}
// OFFSET: LEGO1 0x100b07f0
// FUNCTION: LEGO1 0x100b07f0
MxLong MxOmni::Notify(MxParam& p)
{
MxAutoLocker lock(&this->m_criticalsection);
@@ -349,50 +349,50 @@ MxLong MxOmni::Notify(MxParam& p)
return HandleNotificationType2(p);
}
// OFFSET: LEGO1 0x100b0880 STUB
// STUB: LEGO1 0x100b0880
MxResult MxOmni::HandleNotificationType2(MxParam& p_param)
{
// TODO STUB
return FAILURE;
}
// OFFSET: LEGO1 0x100b0900
// FUNCTION: LEGO1 0x100b0900
const char* MxOmni::GetHD()
{
return g_hdPath;
}
// OFFSET: LEGO1 0x100b0910
// FUNCTION: LEGO1 0x100b0910
void MxOmni::SetHD(const char* p_hd)
{
strcpy(g_hdPath, p_hd);
}
// OFFSET: LEGO1 0x100b0940
// FUNCTION: LEGO1 0x100b0940
const char* MxOmni::GetCD()
{
return g_cdPath;
}
// OFFSET: LEGO1 0x100b0950
// FUNCTION: LEGO1 0x100b0950
void MxOmni::SetCD(const char* p_cd)
{
strcpy(g_cdPath, p_cd);
}
// OFFSET: LEGO1 0x100b0980
// FUNCTION: LEGO1 0x100b0980
MxBool MxOmni::IsSound3D()
{
return g_use3dSound;
}
// OFFSET: LEGO1 0x100b0990
// FUNCTION: LEGO1 0x100b0990
void MxOmni::SetSound3D(MxBool p_3dsound)
{
g_use3dSound = p_3dsound;
}
// OFFSET: LEGO1 0x100b09a0
// FUNCTION: LEGO1 0x100b09a0
MxBool MxOmni::DoesEntityExist(MxDSAction& p_dsAction)
{
if (m_streamer->FUN_100b9b30(p_dsAction)) {
@@ -404,7 +404,7 @@ MxBool MxOmni::DoesEntityExist(MxDSAction& p_dsAction)
return FALSE;
}
// OFFSET: LEGO1 0x100b09d0
// FUNCTION: LEGO1 0x100b09d0
void MxOmni::StartTimer()
{
if (m_timerRunning == FALSE && m_timer != NULL && m_soundManager != NULL) {
@@ -414,7 +414,7 @@ void MxOmni::StartTimer()
}
}
// OFFSET: LEGO1 0x100b0a00
// FUNCTION: LEGO1 0x100b0a00
void MxOmni::StopTimer()
{
if (m_timerRunning != FALSE && m_timer != NULL && m_soundManager != NULL) {