Reccmp: Use symbol names in asm output (#433)

* Name substitution for reccmp asm output

* Decomp marker corrections

* Fix a few annotations

* Fix IslePathActor dtor

* Fix audio presenter

* Fix LegoEntity::Create

* Fix Pizza and related

* Fix path part

* Add missing annotations

* Add missing annotations

* Add more missing annotations

* Fix MxNotificationParam

* More fixes

* More fixes

* Add missing annotations

* Fixes

* More annotations

* More annotations

* More annotations

* More annotations

* Fixes and annotations

* Find imports and thunk functions

* Fix more bugs

* Add some markers for LEGO1 imports, fix SIZE comment

* Add more annotations

* Rename annotation

* Fix bugs and annotations

* Fix bug

* Order

* Update legoanimpresenter.h

* Re-enable print-rec-addr option

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
MS
2024-01-14 16:28:46 -05:00
committed by GitHub
parent 7f7e6e37dd
commit 7e9d3bde65
73 changed files with 1357 additions and 427 deletions

View File

@@ -20,4 +20,10 @@ public:
}
};
// SYNTHETIC: LEGO1 0x1000e940
// IsleActor::~IsleActor
// SYNTHETIC: LEGO1 0x1000e990
// IsleActor::`scalar deleting destructor'
#endif // ISLEACTOR_H

View File

@@ -13,6 +13,8 @@
class IslePathActor : public LegoPathActor {
public:
IslePathActor();
// FUNCTION: LEGO1 0x10002e10
inline virtual ~IslePathActor() override { IslePathActor::Destroy(TRUE); } // vtable+0x0
// FUNCTION: LEGO1 0x10002ea0
@@ -29,6 +31,7 @@ public:
}
virtual MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18
virtual void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c
// FUNCTION: LEGO1 0x10002e70
virtual MxU32 VTable0xcc() { return 0; } // vtable+0xcc
// FUNCTION: LEGO1 0x10002df0

View File

@@ -9,6 +9,7 @@
class LegoActor : public LegoEntity {
public:
LegoActor();
virtual ~LegoActor() override;
// FUNCTION: LEGO1 0x1002d210
inline virtual const char* ClassName() const override // vtable+0x0c
@@ -43,4 +44,7 @@ private:
MxU8 m_unk0x74; // 0x74
};
// SYNTHETIC: LEGO1 0x1002d300
// LegoActor::`scalar deleting destructor'
#endif // LEGOACTOR_H

View File

@@ -7,6 +7,7 @@
class LegoAnimPresenter : public MxVideoPresenter {
public:
LegoAnimPresenter();
virtual ~LegoAnimPresenter() override;
// FUNCTION: LEGO1 0x10068530
inline virtual const char* ClassName() const override // vtable+0x0c
@@ -25,4 +26,7 @@ private:
void Init();
};
// SYNTHETIC: LEGO1 0x10068650
// LegoAnimPresenter::`scalar deleting destructor'
#endif // LEGOANIMPRESENTER_H

View File

@@ -7,6 +7,7 @@
#include <stdlib.h>
// VTABLE: LEGO1 0x100d6aa0
// SIZE 0x20
class LegoEventNotificationParam : public MxNotificationParam {
public:
inline LegoEventNotificationParam() : MxNotificationParam(PARAM_NONE, NULL) {}
@@ -22,7 +23,6 @@ public:
{
}
virtual ~LegoEventNotificationParam() override {} // vtable+0x0 (scalar deleting destructor)
inline MxU8 GetKey() const { return m_key; }
protected:
@@ -33,4 +33,10 @@ protected:
MxU32 m_unk0x1c; // 0x1c
};
// SYNTHETIC: LEGO1 0x10028770
// LegoEventNotificationParam::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x100287e0
// LegoEventNotificationParam::~LegoEventNotificationParam
#endif // LEGOEVENTNOTIFICATIONPARAM_H

View File

@@ -8,6 +8,7 @@
class LegoHideAnimPresenter : public LegoLoopingAnimPresenter {
public:
LegoHideAnimPresenter();
virtual ~LegoHideAnimPresenter() override;
// FUNCTION: LEGO1 0x1006d880
inline const char* ClassName() const override // vtable+0xc
@@ -26,4 +27,7 @@ private:
void Init();
};
// SYNTHETIC: LEGO1 0x1006d9d0
// LegoHideAnimPresenter::`scalar deleting destructor'
#endif // LEGOHIDEANIMPRESENTER_H

View File

@@ -94,6 +94,9 @@ public:
// TEMPLATE: LEGO1 0x1005bb80
// MxCollection<LegoEventNotificationParam>::Compare
// TEMPLATE: LEGO1 0x1005bbe0
// MxCollection<LegoEventNotificationParam>::~MxCollection<LegoEventNotificationParam>
// TEMPLATE: LEGO1 0x1005bc30
// MxCollection<LegoEventNotificationParam>::Destroy
@@ -109,6 +112,9 @@ public:
// SYNTHETIC: LEGO1 0x1005beb0
// LegoEventQueue::`scalar deleting destructor'
// TEMPLATE: LEGO1 0x1005bf20
// MxQueue<LegoEventNotificationParam>::~MxQueue<LegoEventNotificationParam>
// SYNTHETIC: LEGO1 0x1005bf70
// MxQueue<LegoEventNotificationParam>::`scalar deleting destructor'

View File

@@ -21,4 +21,10 @@ public:
}
};
// SYNTHETIC: LEGO1 0x1006d000
// LegoLoopingAnimPresenter::~LegoLoopingAnimPresenter
// SYNTHETIC: LEGO1 0x1000f440
// LegoLoopingAnimPresenter::`scalar deleting destructor'
#endif // LEGOLOOPINGANIMPRESENTER_H

View File

@@ -18,7 +18,8 @@ class MxVariableTable;
class LegoStream {
public:
LegoStream() : m_mode(0) {}
inline virtual ~LegoStream(){};
// FUNCTION: LEGO1 0x10045ad0
inline virtual ~LegoStream() {}
virtual MxResult Read(void* p_buffer, MxU32 p_size) = 0;
virtual MxResult Write(const void* p_buffer, MxU32 p_size) = 0;
@@ -41,11 +42,14 @@ protected:
MxU8 m_mode;
};
// SYNTHETIC: LEGO1 0x10045b00
// LegoStream::`scalar deleting destructor'
// VTABLE: LEGO1 0x100db730
class LegoFileStream : public LegoStream {
public:
LegoFileStream();
virtual ~LegoFileStream();
virtual ~LegoFileStream() override;
MxResult Read(void* p_buffer, MxU32 p_size) override;
MxResult Write(const void* p_buffer, MxU32 p_size) override;
@@ -60,11 +64,13 @@ private:
FILE* m_hFile;
};
// SYNTHETIC: LEGO1 0x10099230
// LegoFileStream::`scalar deleting destructor'
// VTABLE: LEGO1 0x100db710
class LegoMemoryStream : public LegoStream {
public:
LegoMemoryStream(char* p_buffer);
~LegoMemoryStream() {}
MxResult Read(void* p_buffer, MxU32 p_size) override;
MxResult Write(const void* p_buffer, MxU32 p_size) override;
@@ -76,4 +82,10 @@ private:
MxU32 m_offset;
};
// SYNTHETIC: LEGO1 0x10045a80
// LegoMemoryStream::~LegoMemoryStream
// SYNTHETIC: LEGO1 0x100990f0
// LegoMemoryStream::`scalar deleting destructor'
#endif // LEGOSTREAM_H

View File

@@ -4,6 +4,7 @@
#include "decomp.h"
#include "mxstring.h"
// VTABLE: LEGO1 0x100d7c88
class LegoUnknown100d7c88 {
public:
~LegoUnknown100d7c88();

View File

@@ -27,9 +27,15 @@ public:
// TEMPLATE: LEGO1 0x1007b300
// MxCollection<LegoUnknown100d7c88 *>::Compare
// TEMPLATE: LEGO1 0x1007b310
// MxCollection<LegoUnknown100d7c88 *>::~MxCollection<LegoUnknown100d7c88 *>
// TEMPLATE: LEGO1 0x1007b360
// MxCollection<LegoUnknown100d7c88 *>::Destroy
// TEMPLATE: LEGO1 0x1007b370
// MxList<LegoUnknown100d7c88 *>::~MxList<LegoUnknown100d7c88 *>
// SYNTHETIC: LEGO1 0x1007b400
// LegoUnknown100d9d00::`scalar deleting destructor'

View File

@@ -6,6 +6,7 @@ DECOMP_SIZE_ASSERT(GifMap, 0x08);
DECOMP_SIZE_ASSERT(GifManagerBase, 0x14);
DECOMP_SIZE_ASSERT(GifManager, 0x30);
// GLOBAL: LEGO1 0x100f0100
GifMapEntry* g_unk0x100f0100;
// FUNCTION: LEGO1 0x10001cc0

View File

@@ -7,8 +7,13 @@
DECOMP_SIZE_ASSERT(LegoBackgroundColor, 0x30)
// GLOBAL: LEGO1 0x100f3fb0
const char* g_delimiter = "\t";
// GLOBAL: LEGO1 0x100f3fb4
const char* g_set = "set";
// GLOBAL: LEGO1 0x100f3fb8
const char* g_reset = "reset";
// FUNCTION: LEGO1 0x1003bfb0

View File

@@ -7,10 +7,10 @@
DECOMP_SIZE_ASSERT(LegoFullScreenMovie, 0x24)
// GLOBAL: LEGO1 0x100f3be8
// GLOBAL: LEGO1 0x100f3fbc
const char* g_strEnable = "enable";
// GLOBAL: LEGO1 0x100f3bf4
// GLOBAL: LEGO1 0x100f3fc0
const char* g_strDisable = "disable";
// FUNCTION: LEGO1 0x1003c500

View File

@@ -19,15 +19,15 @@
// There may be other members that come after.
DECOMP_SIZE_ASSERT(LegoGameState, 0x430)
// GLOBAL: LEGO1 0x100f3e24
const char* g_historyGSI = "History.gsi";
// GLOBAL: LEGO1 0x100f3e30
const char* g_playersGSI = "Players.gsi";
// GLOBAL: LEGO1 0x100f3e40
const char* g_fileExtensionGS = ".GS";
// GLOBAL: LEGO1 0x100f3e44
const char* g_playersGSI = "Players.gsi";
// GLOBAL: LEGO1 0x100f3e48
const char* g_historyGSI = "History.gsi";
// GLOBAL: LEGO1 0x100f3e58
ColorStringStruct g_colorSaveData[43] = {
{"c_dbbkfny0", "lego red"}, {"c_dbbkxly0", "lego white"}, {"c_chbasey0", "lego black"},
@@ -168,7 +168,7 @@ void LegoGameState::GetFileSavePath(MxString* p_outPath, MxULong p_slotn)
strcpy(path, m_savePath);
// Slot: "G0", "G1", ...
strcat(path, "G");
strcat(path, "\\G");
baseForSlot[0] += p_slotn;
strcat(path, baseForSlot);

View File

@@ -11,3 +11,9 @@ LegoActor::LegoActor()
m_unk0x10 = 0;
m_unk0x74 = 0;
}
// STUB: LEGO1 0x1002d320
LegoActor::~LegoActor()
{
// TODO
}

View File

@@ -46,7 +46,7 @@ MxResult LegoEntity::Create(MxDSAction& p_dsAction)
{
m_mxEntityId = p_dsAction.GetObjectId();
m_atom = p_dsAction.GetAtomId();
Init();
SetWorld();
return SUCCESS;
}

View File

@@ -17,6 +17,13 @@ MxResult IslePathActor::Create(MxDSAction& p_dsAction)
return MxEntity::Create(p_dsAction);
}
// FUNCTION: LEGO1 0x1001a2a0
void IslePathActor::Destroy(MxBool p_fromDestructor)
{
if (!p_fromDestructor)
LegoPathActor::Destroy(FALSE);
}
// STUB: LEGO1 0x1001a350
void IslePathActor::VTable0xe0()
{

View File

@@ -100,7 +100,7 @@ MxAtomId* g_testScript = NULL;
// GLOBAL: LEGO1 0x100f457c
MxAtomId* g_jukeboxwScript = NULL;
// GLOBAL: LEGO1 0x100f4580c
// GLOBAL: LEGO1 0x100f4580
MxAtomId* g_sndAnimScript = NULL;
// GLOBAL: LEGO1 0x100f4584
@@ -118,7 +118,7 @@ MxBool g_isWorldActive = TRUE;
// FUNCTION: LEGO1 0x10015700
LegoOmni* Lego()
{
return (LegoOmni*) MxOmni::GetInstance();
return LegoOmni::GetInstance();
}
// FUNCTION: LEGO1 0x10015710

View File

@@ -6,6 +6,12 @@ LegoAnimPresenter::LegoAnimPresenter()
// TODO
}
// STUB: LEGO1 0x10068670
LegoAnimPresenter::~LegoAnimPresenter()
{
// TODO
}
// STUB: LEGO1 0x100686f0
void LegoAnimPresenter::Init()
{

View File

@@ -6,6 +6,12 @@ LegoHideAnimPresenter::LegoHideAnimPresenter()
Init();
}
// STUB: LEGO1 0x1006d9f0
LegoHideAnimPresenter::~LegoHideAnimPresenter()
{
// TODO
}
// STUB: LEGO1 0x1006da50
void LegoHideAnimPresenter::Init()
{

View File

@@ -13,7 +13,7 @@ class Camera;
/////////////////////////////////////////////////////////////////////////////
// LegoView
// VTABLE: 0x100dc000
// VTABLE: LEGO1 0x100dc000
// SIZE 0x78
class LegoView : public TglSurface {
public: