mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
(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 commitd87d665127
. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit8c815418d2
. * 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:

committed by
GitHub

parent
4f5b70013f
commit
494a556f8e
@@ -19,193 +19,193 @@
|
||||
#include "mxticklemanager.h"
|
||||
#include "mxtransitionmanager.h"
|
||||
|
||||
// 0x100f451c
|
||||
// GLOBAL: LEGO1 0x100f451c
|
||||
MxAtomId* g_copterScript = NULL;
|
||||
|
||||
// 0x100f4520
|
||||
// GLOBAL: LEGO1 0x100f4520
|
||||
MxAtomId* g_dunecarScript = NULL;
|
||||
|
||||
// 0x100f4524
|
||||
// GLOBAL: LEGO1 0x100f4524
|
||||
MxAtomId* g_jetskiScript = NULL;
|
||||
|
||||
// 0x100f4528
|
||||
// GLOBAL: LEGO1 0x100f4528
|
||||
MxAtomId* g_racecarScript = NULL;
|
||||
|
||||
// 0x100f452c
|
||||
// GLOBAL: LEGO1 0x100f452c
|
||||
MxAtomId* g_carraceScript = NULL;
|
||||
|
||||
// 0x100f4530
|
||||
// GLOBAL: LEGO1 0x100f4530
|
||||
MxAtomId* g_carracerScript = NULL;
|
||||
|
||||
// 0x100f4534
|
||||
// GLOBAL: LEGO1 0x100f4534
|
||||
MxAtomId* g_jetraceScript = NULL;
|
||||
|
||||
// 0x100f4538
|
||||
// GLOBAL: LEGO1 0x100f4538
|
||||
MxAtomId* g_jetracerScript = NULL;
|
||||
|
||||
// 0x100f453c
|
||||
// GLOBAL: LEGO1 0x100f453c
|
||||
MxAtomId* g_isleScript = NULL;
|
||||
|
||||
// 0x100f4540
|
||||
// GLOBAL: LEGO1 0x100f4540
|
||||
MxAtomId* g_elevbottScript = NULL;
|
||||
|
||||
// 0x100f4544
|
||||
// GLOBAL: LEGO1 0x100f4544
|
||||
MxAtomId* g_infodoorScript = NULL;
|
||||
|
||||
// 0x100f4548
|
||||
// GLOBAL: LEGO1 0x100f4548
|
||||
MxAtomId* g_infomainScript = NULL;
|
||||
|
||||
// 0x100f454c
|
||||
// GLOBAL: LEGO1 0x100f454c
|
||||
MxAtomId* g_infoscorScript = NULL;
|
||||
|
||||
// 0x100f4550
|
||||
// GLOBAL: LEGO1 0x100f4550
|
||||
MxAtomId* g_regbookScript = NULL;
|
||||
|
||||
// 0x100f4554
|
||||
// GLOBAL: LEGO1 0x100f4554
|
||||
MxAtomId* g_histbookScript = NULL;
|
||||
|
||||
// 0x100f4558
|
||||
// GLOBAL: LEGO1 0x100f4558
|
||||
MxAtomId* g_hospitalScript = NULL;
|
||||
|
||||
// 0x100f455c
|
||||
// GLOBAL: LEGO1 0x100f455c
|
||||
MxAtomId* g_policeScript = NULL;
|
||||
|
||||
// 0x100f4560
|
||||
// GLOBAL: LEGO1 0x100f4560
|
||||
MxAtomId* g_garageScript = NULL;
|
||||
|
||||
// 0x100f4564
|
||||
// GLOBAL: LEGO1 0x100f4564
|
||||
MxAtomId* g_act2mainScript = NULL;
|
||||
|
||||
// 0x100f4568
|
||||
// GLOBAL: LEGO1 0x100f4568
|
||||
MxAtomId* g_act3Script = NULL;
|
||||
|
||||
// 0x100f456c
|
||||
// GLOBAL: LEGO1 0x100f456c
|
||||
MxAtomId* g_jukeboxScript = NULL;
|
||||
|
||||
// 0x100f4570
|
||||
// GLOBAL: LEGO1 0x100f4570
|
||||
MxAtomId* g_pz5Script = NULL;
|
||||
|
||||
// 0x100f4574
|
||||
// GLOBAL: LEGO1 0x100f4574
|
||||
MxAtomId* g_introScript = NULL;
|
||||
|
||||
// 0x100f4578
|
||||
// GLOBAL: LEGO1 0x100f4578
|
||||
MxAtomId* g_testScript = NULL;
|
||||
|
||||
// 0x100f457c
|
||||
// GLOBAL: LEGO1 0x100f457c
|
||||
MxAtomId* g_jukeboxwScript = NULL;
|
||||
|
||||
// 0x100f4580c
|
||||
// GLOBAL: LEGO1 0x100f4580c
|
||||
MxAtomId* g_sndAnimScript = NULL;
|
||||
|
||||
// 0x100f4584
|
||||
// GLOBAL: LEGO1 0x100f4584
|
||||
MxAtomId* g_creditsScript = NULL;
|
||||
|
||||
// 0x100f4588
|
||||
// GLOBAL: LEGO1 0x100f4588
|
||||
MxAtomId* g_nocdSourceName = NULL;
|
||||
|
||||
// 0x100f6718
|
||||
// GLOBAL: LEGO1 0x100f6718
|
||||
const char* g_current = "current";
|
||||
|
||||
// 0x101020e8
|
||||
// GLOBAL: LEGO1 0x101020e8
|
||||
void (*g_omniUserMessage)(const char*, int);
|
||||
|
||||
// OFFSET: LEGO1 0x10015700
|
||||
// FUNCTION: LEGO1 0x10015700
|
||||
LegoOmni* Lego()
|
||||
{
|
||||
return (LegoOmni*) MxOmni::GetInstance();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015710
|
||||
// FUNCTION: LEGO1 0x10015710
|
||||
LegoSoundManager* SoundManager()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetSoundManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015720
|
||||
// FUNCTION: LEGO1 0x10015720
|
||||
LegoVideoManager* VideoManager()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetVideoManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015730
|
||||
// FUNCTION: LEGO1 0x10015730
|
||||
MxBackgroundAudioManager* BackgroundAudioManager()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetBackgroundAudioManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015740
|
||||
// FUNCTION: LEGO1 0x10015740
|
||||
LegoInputManager* InputManager()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetInputManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015750
|
||||
// FUNCTION: LEGO1 0x10015750
|
||||
LegoControlManager* ControlManager()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetInputManager()->GetControlManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015760
|
||||
// FUNCTION: LEGO1 0x10015760
|
||||
LegoGameState* GameState()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetGameState();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015770
|
||||
// FUNCTION: LEGO1 0x10015770
|
||||
LegoAnimationManager* AnimationManager()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetAnimationManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015780
|
||||
// FUNCTION: LEGO1 0x10015780
|
||||
LegoNavController* NavController()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetNavController();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015790
|
||||
// FUNCTION: LEGO1 0x10015790
|
||||
LegoWorld* GetCurrentVehicle()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetCurrentVehicle();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100157a0
|
||||
// FUNCTION: LEGO1 0x100157a0
|
||||
LegoWorld* GetCurrentWorld()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetCurrentWorld();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100157e0
|
||||
// FUNCTION: LEGO1 0x100157e0
|
||||
LegoPlantManager* PlantManager()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetLegoPlantManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100157f0
|
||||
// FUNCTION: LEGO1 0x100157f0
|
||||
LegoBuildingManager* BuildingManager()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetLegoBuildingManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015800
|
||||
// FUNCTION: LEGO1 0x10015800
|
||||
GifManager* GetGifManager()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetGifManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100158e0
|
||||
// FUNCTION: LEGO1 0x100158e0
|
||||
MxDSAction& GetCurrentAction()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetCurrentAction();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015900
|
||||
// FUNCTION: LEGO1 0x10015900
|
||||
MxTransitionManager* TransitionManager()
|
||||
{
|
||||
return LegoOmni::GetInstance()->GetTransitionManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015910
|
||||
// FUNCTION: LEGO1 0x10015910
|
||||
void PlayMusic(MxU32 p_index)
|
||||
{
|
||||
// index is the entityid of the music in jukebox.si
|
||||
@@ -216,27 +216,27 @@ void PlayMusic(MxU32 p_index)
|
||||
LegoOmni::GetInstance()->GetBackgroundAudioManager()->PlayMusic(action, 5, 4);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1001a700 STUB
|
||||
// STUB: LEGO1 0x1001a700
|
||||
void FUN_1001a700()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1003dd70 STUB
|
||||
// STUB: LEGO1 0x1003dd70
|
||||
LegoROI* PickROI(MxLong, MxLong)
|
||||
{
|
||||
// TODO
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1003ddc0 STUB
|
||||
// STUB: LEGO1 0x1003ddc0
|
||||
LegoEntity* PickEntity(MxLong, MxLong)
|
||||
{
|
||||
// TODO
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100528e0
|
||||
// FUNCTION: LEGO1 0x100528e0
|
||||
void RegisterScripts()
|
||||
{
|
||||
g_copterScript = new MxAtomId("\\lego\\scripts\\build\\copter", LookupMode_LowerCase2);
|
||||
@@ -269,7 +269,7 @@ void RegisterScripts()
|
||||
g_nocdSourceName = new MxAtomId("\\lego\\scripts\\nocd", LookupMode_LowerCase2);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100530c0
|
||||
// FUNCTION: LEGO1 0x100530c0
|
||||
void UnregisterScripts()
|
||||
{
|
||||
delete g_copterScript;
|
||||
@@ -332,25 +332,25 @@ void UnregisterScripts()
|
||||
g_nocdSourceName = NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10053430
|
||||
// FUNCTION: LEGO1 0x10053430
|
||||
const char* GetNoCD_SourceName()
|
||||
{
|
||||
return g_nocdSourceName->GetInternal();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058a00
|
||||
// FUNCTION: LEGO1 0x10058a00
|
||||
LegoOmni::LegoOmni()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058b50
|
||||
// FUNCTION: LEGO1 0x10058b50
|
||||
LegoOmni::~LegoOmni()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058bd0
|
||||
// FUNCTION: LEGO1 0x10058bd0
|
||||
void LegoOmni::Init()
|
||||
{
|
||||
MxOmni::Init();
|
||||
@@ -372,13 +372,13 @@ void LegoOmni::Init()
|
||||
m_transitionManager = NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058c30 STUB
|
||||
// STUB: LEGO1 0x10058c30
|
||||
void LegoOmni::Destroy()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058e70
|
||||
// FUNCTION: LEGO1 0x10058e70
|
||||
MxResult LegoOmni::Create(MxOmniCreateParam& p)
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
@@ -451,40 +451,40 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005ac90
|
||||
// FUNCTION: LEGO1 0x1005ac90
|
||||
void LegoOmni::CreateInstance()
|
||||
{
|
||||
MxOmni::DestroyInstance();
|
||||
MxOmni::SetInstance(new LegoOmni());
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005ad10
|
||||
// FUNCTION: LEGO1 0x1005ad10
|
||||
LegoOmni* LegoOmni::GetInstance()
|
||||
{
|
||||
return (LegoOmni*) MxOmni::GetInstance();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005af10 STUB
|
||||
// STUB: LEGO1 0x1005af10
|
||||
void LegoOmni::RemoveWorld(const MxAtomId& p1, MxLong p2)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b0c0 STUB
|
||||
// STUB: LEGO1 0x1005b0c0
|
||||
LegoEntity* LegoOmni::FindByEntityIdOrAtomId(const MxAtomId& p_atom, MxS32 p_entityid)
|
||||
{
|
||||
// TODO
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b1d0 STUB
|
||||
// STUB: LEGO1 0x1005b1d0
|
||||
MxResult LegoOmni::DeleteObject(MxDSAction& ds)
|
||||
{
|
||||
// TODO
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b2f0
|
||||
// FUNCTION: LEGO1 0x1005b2f0
|
||||
MxEntity* LegoOmni::FindWorld(const char* p_id, MxS32 p_entityId, MxPresenter* p_presenter)
|
||||
{
|
||||
LegoWorld* foundEntity = NULL;
|
||||
@@ -502,14 +502,14 @@ MxEntity* LegoOmni::FindWorld(const char* p_id, MxS32 p_entityId, MxPresenter* p
|
||||
return foundEntity;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b3a0
|
||||
// FUNCTION: LEGO1 0x1005b3a0
|
||||
void LegoOmni::NotifyCurrentEntity(MxNotificationParam* p_param)
|
||||
{
|
||||
if (m_currentWorld)
|
||||
NotificationManager()->Send(m_currentWorld, p_param);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b3c0
|
||||
// FUNCTION: LEGO1 0x1005b3c0
|
||||
MxBool LegoOmni::DoesEntityExist(MxDSAction& ds)
|
||||
{
|
||||
if (MxOmni::DoesEntityExist(ds)) {
|
||||
@@ -520,21 +520,21 @@ MxBool LegoOmni::DoesEntityExist(MxDSAction& ds)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b400 STUB
|
||||
// STUB: LEGO1 0x1005b400
|
||||
int LegoOmni::GetCurrPathInfo(LegoPathBoundary**, int&)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b560
|
||||
// FUNCTION: LEGO1 0x1005b560
|
||||
void LegoOmni::CreateBackgroundAudio()
|
||||
{
|
||||
if (m_bkgAudioManager)
|
||||
m_bkgAudioManager->Create(*g_jukeboxScript, 100);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b580
|
||||
// FUNCTION: LEGO1 0x1005b580
|
||||
MxResult LegoOmni::Start(MxDSAction* action)
|
||||
{
|
||||
MxResult result = MxOmni::Start(action);
|
||||
@@ -544,34 +544,34 @@ MxResult LegoOmni::Start(MxDSAction* action)
|
||||
return result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b5f0 STUB
|
||||
// STUB: LEGO1 0x1005b5f0
|
||||
MxLong LegoOmni::Notify(MxParam& p)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b640
|
||||
// FUNCTION: LEGO1 0x1005b640
|
||||
void LegoOmni::StartTimer()
|
||||
{
|
||||
MxOmni::StartTimer();
|
||||
SetAppCursor(2);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b650
|
||||
// FUNCTION: LEGO1 0x1005b650
|
||||
void LegoOmni::StopTimer()
|
||||
{
|
||||
MxOmni::StopTimer();
|
||||
SetAppCursor(0);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100acf50
|
||||
// FUNCTION: LEGO1 0x100acf50
|
||||
MxResult Start(MxDSAction* p_dsAction)
|
||||
{
|
||||
return MxOmni::GetInstance()->Start(p_dsAction);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b6ff0
|
||||
// FUNCTION: LEGO1 0x100b6ff0
|
||||
void MakeSourceName(char* p_output, const char* p_input)
|
||||
{
|
||||
const char* cln = strchr(p_input, ':');
|
||||
@@ -589,7 +589,7 @@ void MakeSourceName(char* p_output, const char* p_input)
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b7050
|
||||
// FUNCTION: LEGO1 0x100b7050
|
||||
MxBool KeyValueStringParse(char* p_outputValue, const char* p_key, const char* p_source)
|
||||
{
|
||||
MxBool didMatch = FALSE;
|
||||
@@ -625,13 +625,13 @@ MxBool KeyValueStringParse(char* p_outputValue, const char* p_key, const char* p
|
||||
return didMatch;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b7210
|
||||
// FUNCTION: LEGO1 0x100b7210
|
||||
void SetOmniUserMessage(void (*p_userMsg)(const char*, int))
|
||||
{
|
||||
g_omniUserMessage = p_userMsg;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0280
|
||||
// FUNCTION: LEGO1 0x100c0280
|
||||
MxDSObject* CreateStreamObject(MxDSFile* p_file, MxS16 p_ofs)
|
||||
{
|
||||
char* buf;
|
||||
|
Reference in New Issue
Block a user