diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 99f25975..1a698a7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,9 +23,14 @@ This repository currently has only one goal: accuracy to the original executable ## Overview -* `3rdparty`: Contains code obtained from third parties, not including Mindscape. Generally, these are libraries that have been placed in the public domain or are freely available on the web. As these are unaltered files, our style guide (see below) does not apply. -* `ISLE`: Decompilation of `ISLE.EXE`. It depends on some code in `LEGO1`. -* `LEGO1`: Decompilation of `LEGO1.DLL`. This folder contains code from Mindscape's custom in-house engine called **Omni** (file pattern: `mx*`), the LEGO Island-specific extensions for Omni and the game's code (file pattern: `lego*`) as well as several utility libraries (`realtime`, `tgl`, `viewmanager`) developed by Mindscape. +* [`3rdparty`](/3rdparty): Contains code obtained from third parties, not including Mindscape. Generally, these are libraries that have been placed in the public domain or are freely available on the web. As these are unaltered files, our style guide (see below) does not apply. +* [`ISLE`](/ISLE): Decompilation of `ISLE.EXE`. It depends on some code in `LEGO1`. +* [`LEGO1`](/LEGO1): Decompilation of `LEGO1.DLL`. This folder contains code from Mindscape's custom in-house engine called **Omni** (file pattern: `mx*`), the LEGO Island-specific extensions for Omni and the game's code (file pattern: `lego*`) as well as several utility libraries developed by Mindscape. +* [`tools`](/tools): A set of tools aiding in the decompilation effort. + +## Tooling + +Please make yourself familiar with the [available tooling and annotations](/tools/README.md). ## Code Style diff --git a/ISLE/define.cpp b/ISLE/define.cpp index 30319fba..c1f020fa 100644 --- a/ISLE/define.cpp +++ b/ISLE/define.cpp @@ -1,40 +1,40 @@ #include "define.h" -// 0x410030 +// GLOBAL: ISLE 0x410030 IsleApp* g_isle = 0; -// 0x410034 +// GLOBAL: ISLE 0x410034 unsigned char g_mousedown = 0; -// 0x410038 +// GLOBAL: ISLE 0x410038 unsigned char g_mousemoved = 0; -// 0x41003c +// GLOBAL: ISLE 0x41003c int g_closed = 0; -// 0x410040 +// GLOBAL: ISLE 0x410040 RECT g_windowRect = {0, 0, 640, 480}; -// 0x410050 +// GLOBAL: ISLE 0x410050 int g_rmDisabled = 0; -// 0x410054 +// GLOBAL: ISLE 0x410054 int g_waitingForTargetDepth = 1; -// 0x410058 +// GLOBAL: ISLE 0x410058 int g_targetWidth = 640; -// 0x41005c +// GLOBAL: ISLE 0x41005c int g_targetHeight = 480; -// 0x410060 +// GLOBAL: ISLE 0x410060 int g_targetDepth = 16; -// 0x410064 +// GLOBAL: ISLE 0x410064 int g_reqEnableRMDevice = 0; -// 0x4101bc +// GLOBAL: ISLE 0x4101bc int g_startupDelay = 200; -// 0x4101c0 +// GLOBAL: ISLE 0x4101c0 MxLong g_lastFrameTime = 0; diff --git a/ISLE/define.h b/ISLE/define.h index 0743b933..aac9f28d 100644 --- a/ISLE/define.h +++ b/ISLE/define.h @@ -8,9 +8,9 @@ class IsleApp; extern IsleApp* g_isle; extern int g_closed; -// 0x4101c4 +// GLOBAL: ISLE 0x4101c4 #define WNDCLASS_NAME "Lego Island MainNoM App" -// 0x4101dc +// GLOBAL: ISLE 0x4101dc #define WINDOW_TITLE "LEGO\xAE" extern unsigned char g_mousedown; extern unsigned char g_mousemoved; diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index b3c1ae05..1d4d4641 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -24,7 +24,7 @@ #include -// OFFSET: ISLE 0x401000 +// FUNCTION: ISLE 0x401000 IsleApp::IsleApp() { m_hdPath = NULL; @@ -61,7 +61,7 @@ IsleApp::IsleApp() LegoOmni::CreateInstance(); } -// OFFSET: ISLE 0x4011a0 +// FUNCTION: ISLE 0x4011a0 IsleApp::~IsleApp() { if (LegoOmni::GetInstance()) { @@ -86,7 +86,7 @@ IsleApp::~IsleApp() } } -// OFFSET: ISLE 0x401260 +// FUNCTION: ISLE 0x401260 void IsleApp::Close() { MxDSAction ds; @@ -121,7 +121,7 @@ void IsleApp::Close() } } -// OFFSET: ISLE 0x4013b0 +// FUNCTION: ISLE 0x4013b0 BOOL IsleApp::SetupLegoOmni() { BOOL result = FALSE; @@ -140,7 +140,7 @@ BOOL IsleApp::SetupLegoOmni() return result; } -// OFFSET: ISLE 0x401560 +// FUNCTION: ISLE 0x401560 void IsleApp::SetupVideoFlags( BOOL fullScreen, BOOL flipSurfaces, @@ -172,7 +172,7 @@ void IsleApp::SetupVideoFlags( BOOL FindExistingInstance(void); BOOL StartDirectSound(void); -// OFFSET: ISLE 0x401610 +// FUNCTION: ISLE 0x401610 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { // Look for another instance, if we find one, bring it to the foreground instead @@ -281,10 +281,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine return msg.wParam; } -// OFFSET: ISLE 0x401c40 TEMPLATE +// FUNCTION: ISLE 0x401c40 // MxDSObject::SetAtomId -// OFFSET: ISLE 0x401ca0 +// FUNCTION: ISLE 0x401ca0 BOOL FindExistingInstance(void) { HWND hWnd = FindWindowA(WNDCLASS_NAME, WINDOW_TITLE); @@ -297,7 +297,7 @@ BOOL FindExistingInstance(void) return 1; } -// OFFSET: ISLE 0x401ce0 +// FUNCTION: ISLE 0x401ce0 BOOL StartDirectSound(void) { LPDIRECTSOUND lpDS = NULL; @@ -310,7 +310,7 @@ BOOL StartDirectSound(void) return FALSE; } -// OFFSET: ISLE 0x401d20 +// FUNCTION: ISLE 0x401d20 LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { NotificationId type; @@ -481,7 +481,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return 0; } -// OFFSET: ISLE 0x4023e0 +// FUNCTION: ISLE 0x4023e0 MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine) { WNDCLASSA wndclass; @@ -627,7 +627,7 @@ MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine) return SUCCESS; } -// OFFSET: ISLE 0x402740 +// FUNCTION: ISLE 0x402740 BOOL IsleApp::ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize) { HKEY hKey; @@ -646,7 +646,7 @@ BOOL IsleApp::ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize) return out; } -// OFFSET: ISLE 0x4027b0 +// FUNCTION: ISLE 0x4027b0 int IsleApp::ReadRegBool(LPCSTR name, BOOL* out) { char buffer[256]; @@ -668,7 +668,7 @@ int IsleApp::ReadRegBool(LPCSTR name, BOOL* out) return read; } -// OFFSET: ISLE 0x402880 +// FUNCTION: ISLE 0x402880 int IsleApp::ReadRegInt(LPCSTR name, int* out) { char buffer[256]; @@ -681,7 +681,7 @@ int IsleApp::ReadRegInt(LPCSTR name, int* out) return read; } -// OFFSET: ISLE 0x4028d0 +// FUNCTION: ISLE 0x4028d0 void IsleApp::LoadConfig() { char buffer[1024]; @@ -747,7 +747,7 @@ void IsleApp::LoadConfig() } } -// OFFSET: ISLE 0x402c20 +// FUNCTION: ISLE 0x402c20 inline void IsleApp::Tick(BOOL sleepIfNotNextFrame) { if (!this->m_windowActive) { @@ -819,7 +819,7 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame) Sleep(0); } -// OFFSET: ISLE 0x402e80 +// FUNCTION: ISLE 0x402e80 void IsleApp::SetupCursor(WPARAM wParam) { switch (wParam) { diff --git a/LEGO1/act1state.cpp b/LEGO1/act1state.cpp index c3e730b4..c013b502 100644 --- a/LEGO1/act1state.cpp +++ b/LEGO1/act1state.cpp @@ -1,6 +1,6 @@ #include "act1state.h" -// OFFSET: LEGO1 0x100334b0 STUB +// STUB: LEGO1 0x100334b0 Act1State::Act1State() { // TODO diff --git a/LEGO1/act1state.h b/LEGO1/act1state.h index 2724cb84..09a3ecd8 100644 --- a/LEGO1/act1state.h +++ b/LEGO1/act1state.h @@ -3,20 +3,20 @@ #include "legostate.h" -// VTABLE 0x100d7028 +// VTABLE: LEGO1 0x100d7028 // SIZE 0x26c class Act1State : public LegoState { public: Act1State(); - // OFFSET: LEGO1 0x100338a0 + // FUNCTION: LEGO1 0x100338a0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0154 + // GLOBAL: LEGO1 0x100f0154 return "Act1State"; }; - // OFFSET: LEGO1 0x100338b0 + // FUNCTION: LEGO1 0x100338b0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Act1State::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/act2brick.cpp b/LEGO1/act2brick.cpp index 7baeb6ab..01face28 100644 --- a/LEGO1/act2brick.cpp +++ b/LEGO1/act2brick.cpp @@ -1,29 +1,29 @@ #include "act2brick.h" -// OFFSET: LEGO1 0x1007a2b0 STUB +// STUB: LEGO1 0x1007a2b0 Act2Brick::Act2Brick() { // TODO } -// OFFSET: LEGO1 0x1007a470 STUB +// STUB: LEGO1 0x1007a470 Act2Brick::~Act2Brick() { // TODO } -// STUB OFFSET: LEGO1 0x1007a8c0 STUB -MxLong Act2Brick::Notify(MxParam& p) -{ - // TODO - - return 0; -} - -// OFFSET: LEGO1 0x1007a7f0 STUB +// STUB: LEGO1 0x1007a7f0 MxResult Act2Brick::Tickle() { // TODO return SUCCESS; } + +// STUB: LEGO1 0x1007a8c0 +MxLong Act2Brick::Notify(MxParam& p) +{ + // TODO + + return 0; +} diff --git a/LEGO1/act2brick.h b/LEGO1/act2brick.h index 573b8330..220be48a 100644 --- a/LEGO1/act2brick.h +++ b/LEGO1/act2brick.h @@ -3,7 +3,7 @@ #include "legopathactor.h" -// VTABLE 0x100d9b60 +// VTABLE: LEGO1 0x100d9b60 // SIZE 0x194 class Act2Brick : public LegoPathActor { public: @@ -13,14 +13,14 @@ class Act2Brick : public LegoPathActor { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 virtual MxResult Tickle() override; // vtable+0x08 - // OFFSET: LEGO1 0x1007a360 + // FUNCTION: LEGO1 0x1007a360 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0438 + // GLOBAL: LEGO1 0x100f0438 return "Act2Brick"; } - // OFFSET: LEGO1 0x1007a370 + // FUNCTION: LEGO1 0x1007a370 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(Act2Brick::ClassName(), name) || LegoEntity::IsA(name); diff --git a/LEGO1/act2policestation.cpp b/LEGO1/act2policestation.cpp index 16570d44..aa6c024b 100644 --- a/LEGO1/act2policestation.cpp +++ b/LEGO1/act2policestation.cpp @@ -1,6 +1,6 @@ #include "act2policestation.h" -// OFFSET: LEGO1 0x1004e0e0 STUB +// STUB: LEGO1 0x1004e0e0 MxLong Act2PoliceStation::Notify(MxParam& p) { // TODO diff --git a/LEGO1/act2policestation.h b/LEGO1/act2policestation.h index 8799db16..05ca5155 100644 --- a/LEGO1/act2policestation.h +++ b/LEGO1/act2policestation.h @@ -3,20 +3,20 @@ #include "legoentity.h" -// VTABLE 0x100d53a8 +// VTABLE: LEGO1 0x100d53a8 // SIZE 0x68 class Act2PoliceStation : public LegoEntity { public: virtual MxLong Notify(MxParam& p) override; // vtable+0x4 - // OFFSET: LEGO1 0x1000e200 + // FUNCTION: LEGO1 0x1000e200 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f03fc + // GLOBAL: LEGO1 0x100f03fc return "Act2PoliceStation"; } - // OFFSET: LEGO1 0x1000e210 + // FUNCTION: LEGO1 0x1000e210 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Act2PoliceStation::ClassName()) || LegoEntity::IsA(name); diff --git a/LEGO1/act3.cpp b/LEGO1/act3.cpp index 6bb3d6f2..149e19a7 100644 --- a/LEGO1/act3.cpp +++ b/LEGO1/act3.cpp @@ -2,13 +2,13 @@ DECOMP_SIZE_ASSERT(Act3, 0x4274) -// OFFSET: LEGO1 0x10072270 STUB +// STUB: LEGO1 0x10072270 Act3::Act3() { // TODO } -// OFFSET: LEGO1 0x100726a0 STUB +// STUB: LEGO1 0x100726a0 Act3::~Act3() { // TODO diff --git a/LEGO1/act3.h b/LEGO1/act3.h index 7587373f..edc88571 100644 --- a/LEGO1/act3.h +++ b/LEGO1/act3.h @@ -3,7 +3,7 @@ #include "legoworld.h" -// VTABLE 0x100d9628 +// VTABLE: LEGO1 0x100d9628 // SIZE 0x4274 class Act3 : public LegoWorld { public: @@ -11,14 +11,14 @@ class Act3 : public LegoWorld { virtual ~Act3() override; // vtable+00 - // OFFSET: LEGO1 0x10072510 + // FUNCTION: LEGO1 0x10072510 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f013c + // GLOBAL: LEGO1 0x100f013c return "Act3"; } - // OFFSET: LEGO1 0x10072520 + // FUNCTION: LEGO1 0x10072520 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Act3::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/act3actor.h b/LEGO1/act3actor.h index 0bd25b46..ef756436 100644 --- a/LEGO1/act3actor.h +++ b/LEGO1/act3actor.h @@ -5,10 +5,10 @@ // class' ClassName() function, but none of them call it directly. class Act3Actor { public: - // OFFSET: LEGO1 0x100431b0 + // FUNCTION: LEGO1 0x100431b0 inline virtual const char* ClassName() override { - // 0x100f03ac + // GLOBAL: LEGO1 0x100f03ac return "Act3Actor"; } }; diff --git a/LEGO1/act3shark.h b/LEGO1/act3shark.h index 35d0833f..63a4e7a6 100644 --- a/LEGO1/act3shark.h +++ b/LEGO1/act3shark.h @@ -3,13 +3,13 @@ #include "legoanimactor.h" -// VTABLE 0x100d7920 +// VTABLE: LEGO1 0x100d7920 class Act3Shark : public LegoAnimActor { public: - // OFFSET: LEGO1 0x100430c0 + // FUNCTION: LEGO1 0x100430c0 inline virtual const char* ClassName() const override { - // 0x100f03a0 + // GLOBAL: LEGO1 0x100f03a0 return "Act3Shark"; } }; diff --git a/LEGO1/act3state.cpp b/LEGO1/act3state.cpp index 32ec0985..32b45eb3 100644 --- a/LEGO1/act3state.cpp +++ b/LEGO1/act3state.cpp @@ -1,6 +1,6 @@ #include "act3state.h" -// OFFSET: LEGO1 0x1000e2f0 +// FUNCTION: LEGO1 0x1000e2f0 MxBool Act3State::VTable0x14() { return FALSE; diff --git a/LEGO1/act3state.h b/LEGO1/act3state.h index 72c126e7..accb6ee7 100644 --- a/LEGO1/act3state.h +++ b/LEGO1/act3state.h @@ -3,20 +3,20 @@ #include "legostate.h" -// VTABLE 0x100d4fc8 +// VTABLE: LEGO1 0x100d4fc8 // SIZE 0xc class Act3State : public LegoState { public: inline Act3State() { m_unk08 = 0; } - // OFFSET: LEGO1 0x1000e300 + // FUNCTION: LEGO1 0x1000e300 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f03f0 + // GLOBAL: LEGO1 0x100f03f0 return "Act3State"; } - // OFFSET: LEGO1 0x1000e310 + // FUNCTION: LEGO1 0x1000e310 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Act3State::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/ambulance.cpp b/LEGO1/ambulance.cpp index 81e71a4c..24a67146 100644 --- a/LEGO1/ambulance.cpp +++ b/LEGO1/ambulance.cpp @@ -4,7 +4,7 @@ DECOMP_SIZE_ASSERT(Ambulance, 0x184); -// OFFSET: LEGO1 0x10035ee0 +// FUNCTION: LEGO1 0x10035ee0 Ambulance::Ambulance() { this->m_unk168 = 0; diff --git a/LEGO1/ambulance.h b/LEGO1/ambulance.h index 1b5272bb..ff74df56 100644 --- a/LEGO1/ambulance.h +++ b/LEGO1/ambulance.h @@ -3,20 +3,20 @@ #include "islepathactor.h" -// VTABLE 0x100d71a8 +// VTABLE: LEGO1 0x100d71a8 // SIZE 0x184 class Ambulance : public IslePathActor { public: Ambulance(); - // OFFSET: LEGO1 0x10035fa0 + // FUNCTION: LEGO1 0x10035fa0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f03c4 + // GLOBAL: LEGO1 0x100f03c4 return "Ambulance"; } - // OFFSET: LEGO1 0x10035fb0 + // FUNCTION: LEGO1 0x10035fb0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Ambulance::ClassName()) || IslePathActor::IsA(name); diff --git a/LEGO1/ambulancemissionstate.cpp b/LEGO1/ambulancemissionstate.cpp index 030fb128..54f32b41 100644 --- a/LEGO1/ambulancemissionstate.cpp +++ b/LEGO1/ambulancemissionstate.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(AmbulanceMissionState, 0x24); -// OFFSET: LEGO1 0x100373a0 STUB +// STUB: LEGO1 0x100373a0 AmbulanceMissionState::AmbulanceMissionState() { // TODO diff --git a/LEGO1/ambulancemissionstate.h b/LEGO1/ambulancemissionstate.h index 74bc4fa5..ee848999 100644 --- a/LEGO1/ambulancemissionstate.h +++ b/LEGO1/ambulancemissionstate.h @@ -3,20 +3,20 @@ #include "legostate.h" -// VTABLE 0x100d72a0 +// VTABLE: LEGO1 0x100d72a0 // SIZE 0x24 class AmbulanceMissionState : public LegoState { public: AmbulanceMissionState(); - // OFFSET: LEGO1 0x10037600 + // FUNCTION: LEGO1 0x10037600 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f00e8 + // GLOBAL: LEGO1 0x100f00e8 return "AmbulanceMissionState"; } - // OFFSET: LEGO1 0x10037610 + // FUNCTION: LEGO1 0x10037610 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, AmbulanceMissionState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/animstate.cpp b/LEGO1/animstate.cpp index f9e37f9e..7377475b 100644 --- a/LEGO1/animstate.cpp +++ b/LEGO1/animstate.cpp @@ -1,12 +1,12 @@ #include "animstate.h" -// OFFSET: LEGO1 0x10064ff0 STUB +// STUB: LEGO1 0x10064ff0 AnimState::AnimState() { // TODO } -// OFFSET: LEGO1 0x10065150 STUB +// STUB: LEGO1 0x10065150 AnimState::~AnimState() { // TODO diff --git a/LEGO1/animstate.h b/LEGO1/animstate.h index 2affcffd..d2692441 100644 --- a/LEGO1/animstate.h +++ b/LEGO1/animstate.h @@ -3,21 +3,21 @@ #include "legostate.h" -// VTABLE 0x100d8d80 +// VTABLE: LEGO1 0x100d8d80 // SIZE 0x1c class AnimState : public LegoState { public: AnimState(); virtual ~AnimState() override; // vtable+0x0 - // OFFSET: LEGO1 0x10065070 + // FUNCTION: LEGO1 0x10065070 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0460 + // GLOBAL: LEGO1 0x100f0460 return "AnimState"; } - // OFFSET: LEGO1 0x10065080 + // FUNCTION: LEGO1 0x10065080 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, AnimState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/beachhouseentity.cpp b/LEGO1/beachhouseentity.cpp index 49c6aa7b..60d58285 100644 --- a/LEGO1/beachhouseentity.cpp +++ b/LEGO1/beachhouseentity.cpp @@ -1,6 +1,6 @@ #include "beachhouseentity.h" -// OFFSET: LEGO1 0x100150a0 STUB +// STUB: LEGO1 0x100150a0 MxLong BeachHouseEntity::Notify(MxParam& p) { // TODO diff --git a/LEGO1/beachhouseentity.h b/LEGO1/beachhouseentity.h index 0c769c51..007c9cf6 100644 --- a/LEGO1/beachhouseentity.h +++ b/LEGO1/beachhouseentity.h @@ -3,20 +3,20 @@ #include "buildingentity.h" -// VTABLE 0x100d4a18 +// VTABLE: LEGO1 0x100d4a18 // SIZE 0x68 class BeachHouseEntity : public BuildingEntity { public: virtual MxLong Notify(MxParam& p) override; // vtable+04 - // OFFSET: LEGO1 0x1000ee80 + // FUNCTION: LEGO1 0x1000ee80 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0314 + // GLOBAL: LEGO1 0x100f0314 return "BeachHouseEntity"; } - // OFFSET: LEGO1 0x1000ee90 + // FUNCTION: LEGO1 0x1000ee90 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, BeachHouseEntity::ClassName()) || BuildingEntity::IsA(name); diff --git a/LEGO1/bike.cpp b/LEGO1/bike.cpp index 48b37707..ac79db87 100644 --- a/LEGO1/bike.cpp +++ b/LEGO1/bike.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(Bike, 0x164); -// OFFSET: LEGO1 0x10076670 +// FUNCTION: LEGO1 0x10076670 Bike::Bike() { this->m_unk13c = 20.0; diff --git a/LEGO1/bike.h b/LEGO1/bike.h index 2aeed45e..5e85784b 100644 --- a/LEGO1/bike.h +++ b/LEGO1/bike.h @@ -4,20 +4,20 @@ #include "decomp.h" #include "islepathactor.h" -// VTABLE 0x100d9808 +// VTABLE: LEGO1 0x100d9808 // SIZE 0x164 class Bike : public IslePathActor { public: Bike(); - // OFFSET: LEGO1 0x100766f0 + // FUNCTION: LEGO1 0x100766f0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f03d0 + // GLOBAL: LEGO1 0x100f03d0 return "Bike"; } - // OFFSET: LEGO1 0x10076700 + // FUNCTION: LEGO1 0x10076700 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Bike::ClassName()) || IslePathActor::IsA(name); diff --git a/LEGO1/buildingentity.cpp b/LEGO1/buildingentity.cpp index b36f6294..37a09f2f 100644 --- a/LEGO1/buildingentity.cpp +++ b/LEGO1/buildingentity.cpp @@ -1,12 +1,12 @@ #include "buildingentity.h" -// OFFSET: LEGO1 0x10014e20 STUB +// STUB: LEGO1 0x10014e20 BuildingEntity::BuildingEntity() { // TODO } -// OFFSET: LEGO1 0x10015030 STUB +// STUB: LEGO1 0x10015030 BuildingEntity::~BuildingEntity() { // TODO diff --git a/LEGO1/buildingentity.h b/LEGO1/buildingentity.h index 2f22e5ff..6948031d 100644 --- a/LEGO1/buildingentity.h +++ b/LEGO1/buildingentity.h @@ -3,21 +3,21 @@ #include "legoentity.h" -// VTABLE 0x100d5c88 +// VTABLE: LEGO1 0x100d5c88 // SIZE <= 0x68, hard to tell because it's always constructed as a derivative class BuildingEntity : public LegoEntity { public: BuildingEntity(); virtual ~BuildingEntity() override; // vtable+0x0 - // OFFSET: LEGO1 0x10014f20 + // FUNCTION: LEGO1 0x10014f20 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f07e8 + // GLOBAL: LEGO1 0x100f07e8 return "BuildingEntity"; } - // OFFSET: LEGO1 0x10014f30 + // FUNCTION: LEGO1 0x10014f30 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, BuildingEntity::ClassName()) || LegoEntity::IsA(name); diff --git a/LEGO1/bumpbouy.h b/LEGO1/bumpbouy.h index 14b18850..9c581c16 100644 --- a/LEGO1/bumpbouy.h +++ b/LEGO1/bumpbouy.h @@ -4,17 +4,17 @@ #include "legoanimactor.h" #include "mxtypes.h" -// VTABLE 0x100d6790 +// VTABLE: LEGO1 0x100d6790 class BumpBouy : public LegoAnimActor { public: - // OFFSET: LEGO1 0x100274e0 + // FUNCTION: LEGO1 0x100274e0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0394 + // GLOBAL: LEGO1 0x100f0394 return "BumpBouy"; } - // OFFSET: LEGO1 0x10027500 + // FUNCTION: LEGO1 0x10027500 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, BumpBouy::ClassName()) || LegoAnimActor::IsA(name); diff --git a/LEGO1/carrace.cpp b/LEGO1/carrace.cpp index 0303a171..6da96168 100644 --- a/LEGO1/carrace.cpp +++ b/LEGO1/carrace.cpp @@ -1,6 +1,6 @@ #include "carrace.h" -// OFFSET: LEGO1 0x10016a90 STUB +// STUB: LEGO1 0x10016a90 CarRace::CarRace() { // TODO diff --git a/LEGO1/carrace.h b/LEGO1/carrace.h index 503b3421..ee57aacc 100644 --- a/LEGO1/carrace.h +++ b/LEGO1/carrace.h @@ -3,20 +3,20 @@ #include "legorace.h" -// VTABLE 0x100d5e50 +// VTABLE: LEGO1 0x100d5e50 // SIZE 0x154 class CarRace : public LegoRace { public: CarRace(); - // OFFSET: LEGO1 0x10016b20 + // FUNCTION: LEGO1 0x10016b20 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0528 + // GLOBAL: LEGO1 0x100f0528 return "CarRace"; } - // OFFSET: LEGO1 0x10016b30 + // FUNCTION: LEGO1 0x10016b30 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, CarRace::ClassName()) || LegoRace::IsA(name); diff --git a/LEGO1/carracestate.h b/LEGO1/carracestate.h index 9e1adff4..523e109e 100644 --- a/LEGO1/carracestate.h +++ b/LEGO1/carracestate.h @@ -3,18 +3,18 @@ #include "racestate.h" -// VTABLE 0x100d4b70 +// VTABLE: LEGO1 0x100d4b70 // SIZE 0x2c class CarRaceState : public RaceState { public: - // OFFSET: LEGO1 0x1000dd30 + // FUNCTION: LEGO1 0x1000dd30 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f009c + // GLOBAL: LEGO1 0x100f009c return "CarRaceState"; } - // OFFSET: LEGO1 0x1000dd40 + // FUNCTION: LEGO1 0x1000dd40 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, CarRaceState::ClassName()) || RaceState::IsA(name); diff --git a/LEGO1/define.cpp b/LEGO1/define.cpp index 4e592157..31f1e521 100644 --- a/LEGO1/define.cpp +++ b/LEGO1/define.cpp @@ -1,6 +1,6 @@ #include "define.h" -// 0x1010141c +// GLOBAL: LEGO1 0x1010141c MxU32 g_mxcoreCount[101] = {0, -6643, -5643, -5058, -4643, -4321, -4058, -3836, -3643, -3473, -3321, -3184, -3058, -2943, -2836, -2736, -2643, -2556, -2473, -2395, -2321, -2251, -2184, -2120, -2058, -2000, -1943, -1888, -1836, -1785, -1736, -1689, -1643, -1599, -1556, -1514, -1473, -1434, -1395, @@ -10,17 +10,17 @@ MxU32 g_mxcoreCount[101] = {0, -6643, -5643, -5058, -4643, -4321, -4058, -38 -358, -340, -321, -304, -286, -268, -251, -234, -217, -200, -184, -168, -152, -136, -120, -104, -89, -74, -58, -43, -29, -14, 0}; -// 0x10101eac +// GLOBAL: LEGO1 0x10101eac const char* g_parseExtraTokens = ":;"; -// 0x10101edc +// GLOBAL: LEGO1 0x10101edc const char* g_strWORLD = "WORLD"; -// 0x10101f20 +// GLOBAL: LEGO1 0x10101f20 const char* g_strSOUND = "SOUND"; -// 0x10102040 +// GLOBAL: LEGO1 0x10102040 const char* g_strACTION = "ACTION"; -// 0x101020cc +// GLOBAL: LEGO1 0x101020cc const char* g_strVISIBILITY = "VISIBILITY"; diff --git a/LEGO1/dllmain.cpp b/LEGO1/dllmain.cpp index eb16b61b..f760aeae 100644 --- a/LEGO1/dllmain.cpp +++ b/LEGO1/dllmain.cpp @@ -1,6 +1,6 @@ #include -// OFFSET: LEGO1 0x10091ee0 +// FUNCTION: LEGO1 0x10091ee0 __declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { return TRUE; diff --git a/LEGO1/doors.h b/LEGO1/doors.h index b9346122..032525e0 100644 --- a/LEGO1/doors.h +++ b/LEGO1/doors.h @@ -3,18 +3,18 @@ #include "legopathactor.h" -// VTABLE 0x100d4788 +// VTABLE: LEGO1 0x100d4788 // SIZE 0x1f8 class Doors : public LegoPathActor { public: - // OFFSET: LEGO1 0x1000e430 + // FUNCTION: LEGO1 0x1000e430 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f03e8 + // GLOBAL: LEGO1 0x100f03e8 return "Doors"; } - // OFFSET: LEGO1 0x1000e440 + // FUNCTION: LEGO1 0x1000e440 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Doors::ClassName()) || LegoPathActor::IsA(name); diff --git a/LEGO1/dunebuggy.cpp b/LEGO1/dunebuggy.cpp index 3219c718..ac1be042 100644 --- a/LEGO1/dunebuggy.cpp +++ b/LEGO1/dunebuggy.cpp @@ -4,7 +4,7 @@ DECOMP_SIZE_ASSERT(DuneBuggy, 0x16c); -// OFFSET: LEGO1 0x10067bb0 +// FUNCTION: LEGO1 0x10067bb0 DuneBuggy::DuneBuggy() { this->m_unk13c = 25.0; diff --git a/LEGO1/dunebuggy.h b/LEGO1/dunebuggy.h index 31622497..c31cdbb3 100644 --- a/LEGO1/dunebuggy.h +++ b/LEGO1/dunebuggy.h @@ -4,20 +4,20 @@ #include "decomp.h" #include "islepathactor.h" -// VTABLE 0x100d8f98 +// VTABLE: LEGO1 0x100d8f98 // SIZE 0x16c class DuneBuggy : public IslePathActor { public: DuneBuggy(); - // OFFSET: LEGO1 0x10067c30 + // FUNCTION: LEGO1 0x10067c30 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0410 + // GLOBAL: LEGO1 0x100f0410 return "DuneBuggy"; } - // OFFSET: LEGO1 0x10067c40 + // FUNCTION: LEGO1 0x10067c40 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, DuneBuggy::ClassName()) || IslePathActor::IsA(name); diff --git a/LEGO1/elevatorbottom.cpp b/LEGO1/elevatorbottom.cpp index 737344b8..434db69e 100644 --- a/LEGO1/elevatorbottom.cpp +++ b/LEGO1/elevatorbottom.cpp @@ -1,18 +1,18 @@ #include "elevatorbottom.h" -// OFFSET: LEGO1 0x10017e90 STUB +// STUB: LEGO1 0x10017e90 ElevatorBottom::ElevatorBottom() { // TODO } -// OFFSET: LEGO1 0x10018060 STUB +// STUB: LEGO1 0x10018060 ElevatorBottom::~ElevatorBottom() { // TODO } -// OFFSET: LEGO1 0x10018150 STUB +// STUB: LEGO1 0x10018150 MxLong ElevatorBottom::Notify(MxParam& p) { // TODO diff --git a/LEGO1/elevatorbottom.h b/LEGO1/elevatorbottom.h index b2ee9016..1c957f50 100644 --- a/LEGO1/elevatorbottom.h +++ b/LEGO1/elevatorbottom.h @@ -3,7 +3,7 @@ #include "legoworld.h" -// VTABLE 0x100d5f20 +// VTABLE: LEGO1 0x100d5f20 class ElevatorBottom : public LegoWorld { public: ElevatorBottom(); @@ -11,14 +11,14 @@ class ElevatorBottom : public LegoWorld { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 - // OFFSET: LEGO1 0x10017f20 + // FUNCTION: LEGO1 0x10017f20 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f04ac + // GLOBAL: LEGO1 0x100f04ac return "ElevatorBottom"; } - // OFFSET: LEGO1 0x10017f30 + // FUNCTION: LEGO1 0x10017f30 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, ElevatorBottom::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/gasstation.cpp b/LEGO1/gasstation.cpp index 0eb3ce3d..dc5c441b 100644 --- a/LEGO1/gasstation.cpp +++ b/LEGO1/gasstation.cpp @@ -1,18 +1,18 @@ #include "gasstation.h" -// OFFSET: LEGO1 0x100046a0 STUB +// STUB: LEGO1 0x100046a0 GasStation::GasStation() { // TODO } -// OFFSET: LEGO1 0x100048c0 STUB +// STUB: LEGO1 0x100048c0 GasStation::~GasStation() { // TODO } -// OFFSET: LEGO1 0x10004a60 STUB +// STUB: LEGO1 0x10004a60 MxLong GasStation::Notify(MxParam& p) { // TODO @@ -20,7 +20,7 @@ MxLong GasStation::Notify(MxParam& p) return 0; } -// OFFSET: LEGO1 0x10005c90 STUB +// STUB: LEGO1 0x10005c90 MxResult GasStation::Tickle() { // TODO diff --git a/LEGO1/gasstation.h b/LEGO1/gasstation.h index 15757a6b..201b287c 100644 --- a/LEGO1/gasstation.h +++ b/LEGO1/gasstation.h @@ -3,7 +3,7 @@ #include "legoworld.h" -// VTABLE 0x100d4650 +// VTABLE: LEGO1 0x100d4650 // SIZE 0x128 // Radio variable at 0x46, in constructor class GasStation : public LegoWorld { @@ -14,14 +14,14 @@ class GasStation : public LegoWorld { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 virtual MxResult Tickle() override; // vtable+0x8 - // OFFSET: LEGO1 0x10004780 + // FUNCTION: LEGO1 0x10004780 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0168 + // GLOBAL: LEGO1 0x100f0168 return "GasStation"; } - // OFFSET: LEGO1 0x10004790 + // FUNCTION: LEGO1 0x10004790 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, GasStation::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/gasstationentity.h b/LEGO1/gasstationentity.h index 8564593a..2b345843 100644 --- a/LEGO1/gasstationentity.h +++ b/LEGO1/gasstationentity.h @@ -3,18 +3,18 @@ #include "buildingentity.h" -// VTABLE 0x100d5258 +// VTABLE: LEGO1 0x100d5258 // SIZE 0x68 class GasStationEntity : public BuildingEntity { public: - // OFFSET: LEGO1 0x1000eb20 + // FUNCTION: LEGO1 0x1000eb20 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0348 + // GLOBAL: LEGO1 0x100f0348 return "GasStationEntity"; } - // OFFSET: LEGO1 0x1000eb30 + // FUNCTION: LEGO1 0x1000eb30 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, GasStationEntity::ClassName()) || BuildingEntity::IsA(name); diff --git a/LEGO1/gasstationstate.cpp b/LEGO1/gasstationstate.cpp index 06ae35a7..bf9f0ed9 100644 --- a/LEGO1/gasstationstate.cpp +++ b/LEGO1/gasstationstate.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(GasStationState, 0x24); -// OFFSET: LEGO1 0x10005eb0 +// FUNCTION: LEGO1 0x10005eb0 GasStationState::GasStationState() { m_unk0x18 = 0; diff --git a/LEGO1/gasstationstate.h b/LEGO1/gasstationstate.h index f59a8a2f..8e3df658 100644 --- a/LEGO1/gasstationstate.h +++ b/LEGO1/gasstationstate.h @@ -3,20 +3,20 @@ #include "legostate.h" -// VTABLE 0x100d46e0 +// VTABLE: LEGO1 0x100d46e0 // SIZE 0x24 class GasStationState : public LegoState { public: GasStationState(); - // OFFSET: LEGO1 0x100061d0 + // FUNCTION: LEGO1 0x100061d0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0174 + // GLOBAL: LEGO1 0x100f0174 return "GasStationState"; } - // OFFSET: LEGO1 0x100061e0 + // FUNCTION: LEGO1 0x100061e0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, GasStationState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/gifmanager.cpp b/LEGO1/gifmanager.cpp index dc004b16..ef4beb22 100644 --- a/LEGO1/gifmanager.cpp +++ b/LEGO1/gifmanager.cpp @@ -8,7 +8,7 @@ DECOMP_SIZE_ASSERT(GifManager, 0x30); GifMapEntry* DAT_100f0100; -// OFFSET: LEGO1 0x10001cc0 +// FUNCTION: LEGO1 0x10001cc0 GifMapEntry* GifMap::FindNode(const char*& string) { GifMapEntry* ret = m_unk4; diff --git a/LEGO1/gifmanager.h b/LEGO1/gifmanager.h index 37661abd..b5c52971 100644 --- a/LEGO1/gifmanager.h +++ b/LEGO1/gifmanager.h @@ -42,10 +42,10 @@ class GifMap { GifMapEntry* m_unk4; }; -// VTABLE 0x100d86d4 +// VTABLE: LEGO1 0x100d86d4 class GifManagerBase { public: - // OFFSET: LEGO1 0x1005a310 STUB + // STUB: LEGO1 0x1005a310 virtual ~GifManagerBase() {} // vtable+00 inline GifData* Get(const char* name) { return m_unk8.Get(name); } @@ -56,10 +56,10 @@ class GifManagerBase { GifMap m_unk8; }; -// VTABLE 0x100d86fc +// VTABLE: LEGO1 0x100d86fc class GifManager : public GifManagerBase { public: - // OFFSET: LEGO1 0x1005a580 STUB + // STUB: LEGO1 0x1005a580 virtual ~GifManager() {} // vtable+00 protected: diff --git a/LEGO1/helicopter.cpp b/LEGO1/helicopter.cpp index 6e159a26..4397ae55 100644 --- a/LEGO1/helicopter.cpp +++ b/LEGO1/helicopter.cpp @@ -10,20 +10,20 @@ DECOMP_SIZE_ASSERT(Helicopter, 0x230) -// OFFSET: LEGO1 0x10001e60 +// FUNCTION: LEGO1 0x10001e60 Helicopter::Helicopter() { m_unk13c = 60; } -// OFFSET: LEGO1 0x10003230 +// FUNCTION: LEGO1 0x10003230 Helicopter::~Helicopter() { ControlManager()->Unregister(this); IslePathActor::Destroy(TRUE); } -// OFFSET: LEGO1 0x100032c0 +// FUNCTION: LEGO1 0x100032c0 MxResult Helicopter::Create(MxDSObject& p_dsObject) { MxResult result = IslePathActor::Create(p_dsObject); @@ -39,7 +39,7 @@ MxResult Helicopter::Create(MxDSObject& p_dsObject) return result; } -// OFFSET: LEGO1 0x10003320 +// FUNCTION: LEGO1 0x10003320 void Helicopter::GetState() { m_state = (HelicopterState*) GameState()->GetState("HelicopterState"); @@ -47,7 +47,7 @@ void Helicopter::GetState() m_state = (HelicopterState*) GameState()->CreateState("HelicopterState"); } -// OFFSET: LEGO1 0x10003360 +// FUNCTION: LEGO1 0x10003360 void Helicopter::VTable0xe4() { if (!GameState()->GetUnknown10()) { diff --git a/LEGO1/helicopter.h b/LEGO1/helicopter.h index 0701c437..8bf00412 100644 --- a/LEGO1/helicopter.h +++ b/LEGO1/helicopter.h @@ -5,20 +5,20 @@ #include "islepathactor.h" #include "realtime/matrix.h" -// VTABLE 0x100d40f8 +// VTABLE: LEGO1 0x100d40f8 // SIZE 0x230 class Helicopter : public IslePathActor { public: Helicopter(); - // OFFSET: LEGO1 0x10003070 + // FUNCTION: LEGO1 0x10003070 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0130 + // GLOBAL: LEGO1 0x100f0130 return "Helicopter"; } - // OFFSET: LEGO1 0x10003080 + // FUNCTION: LEGO1 0x10003080 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Helicopter::ClassName()) || IslePathActor::IsA(name); @@ -27,7 +27,7 @@ class Helicopter : public IslePathActor { virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+0x18 virtual void VTable0xe4() override; - // OFFSET: LEGO1 0x10003210 TEMPLATE + // SYNTHETIC: LEGO1 0x10003210 // Helicopter::`scalar deleting destructor' virtual ~Helicopter() override; // vtable+0x0 diff --git a/LEGO1/helicopterstate.h b/LEGO1/helicopterstate.h index bd09c90a..f95e331b 100644 --- a/LEGO1/helicopterstate.h +++ b/LEGO1/helicopterstate.h @@ -4,18 +4,18 @@ #include "decomp.h" #include "legostate.h" -// VTABLE 0x100d5418 +// VTABLE: LEGO1 0x100d5418 // SIZE 0xc class HelicopterState : public LegoState { public: - // OFFSET: LEGO1 0x1000e0d0 + // FUNCTION: LEGO1 0x1000e0d0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0144 + // GLOBAL: LEGO1 0x100f0144 return "HelicopterState"; } - // OFFSET: LEGO1 0x1000e0e0 + // FUNCTION: LEGO1 0x1000e0e0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, HelicopterState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/historybook.cpp b/LEGO1/historybook.cpp index 3dddef5d..f41930e6 100644 --- a/LEGO1/historybook.cpp +++ b/LEGO1/historybook.cpp @@ -1,18 +1,18 @@ #include "historybook.h" -// OFFSET: LEGO1 0x100822f0 STUB +// STUB: LEGO1 0x100822f0 HistoryBook::HistoryBook() { // TODO } -// OFFSET: LEGO1 0x100824d0 STUB +// STUB: LEGO1 0x100824d0 HistoryBook::~HistoryBook() { // TODO } -// OFFSET: LEGO1 0x10082680 STUB +// STUB: LEGO1 0x10082680 MxLong HistoryBook::Notify(MxParam& p) { // TODO diff --git a/LEGO1/historybook.h b/LEGO1/historybook.h index 94cfa53a..5d75c7b9 100644 --- a/LEGO1/historybook.h +++ b/LEGO1/historybook.h @@ -3,7 +3,7 @@ #include "legoworld.h" -// VTABLE 0x100da328 +// VTABLE: LEGO1 0x100da328 // SIZE 0x3e4 class HistoryBook : public LegoWorld { public: @@ -12,14 +12,14 @@ class HistoryBook : public LegoWorld { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 - // OFFSET: LEGO1 0x10082390 + // FUNCTION: LEGO1 0x10082390 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f04bc + // GLOBAL: LEGO1 0x100f04bc return "HistoryBook"; } - // OFFSET: LEGO1 0x100823a0 + // FUNCTION: LEGO1 0x100823a0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, HistoryBook::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/hospital.cpp b/LEGO1/hospital.cpp index da8c0130..09e9c1e0 100644 --- a/LEGO1/hospital.cpp +++ b/LEGO1/hospital.cpp @@ -1,18 +1,18 @@ #include "hospital.h" -// OFFSET: LEGO1 0x100745e0 STUB +// STUB: LEGO1 0x100745e0 Hospital::Hospital() { // TODO } -// OFFSET: LEGO1 0x100747f0 STUB +// STUB: LEGO1 0x100747f0 Hospital::~Hospital() { // TODO } -// OFFSET: LEGO1 0x10074990 STUB +// STUB: LEGO1 0x10074990 MxLong Hospital::Notify(MxParam& p) { // TODO diff --git a/LEGO1/hospital.h b/LEGO1/hospital.h index 2a4c9de5..07cd2a9d 100644 --- a/LEGO1/hospital.h +++ b/LEGO1/hospital.h @@ -3,7 +3,7 @@ #include "legoworld.h" -// VTABLE 0x100d9730 +// VTABLE: LEGO1 0x100d9730 // SIZE 0x12c class Hospital : public LegoWorld { public: @@ -12,14 +12,14 @@ class Hospital : public LegoWorld { virtual MxLong Notify(MxParam& p) override; // vtable+0x04 - // OFFSET: LEGO1 0x100746b0 + // FUNCTION: LEGO1 0x100746b0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0490 + // GLOBAL: LEGO1 0x100f0490 return "Hospital"; } - // OFFSET: LEGO1 0x100746c0 + // FUNCTION: LEGO1 0x100746c0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Hospital::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/hospitalentity.h b/LEGO1/hospitalentity.h index 15e38426..0b9e5596 100644 --- a/LEGO1/hospitalentity.h +++ b/LEGO1/hospitalentity.h @@ -3,18 +3,18 @@ #include "buildingentity.h" -// VTABLE 0x100d5068 +// VTABLE: LEGO1 0x100d5068 // SIZE 0x68 class HospitalEntity : public BuildingEntity { public: - // OFFSET: LEGO1 0x1000ec40 + // FUNCTION: LEGO1 0x1000ec40 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0338 + // GLOBAL: LEGO1 0x100f0338 return "HospitalEntity"; } - // OFFSET: LEGO1 0x1000ec50 + // FUNCTION: LEGO1 0x1000ec50 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, HospitalEntity::ClassName()) || BuildingEntity::IsA(name); diff --git a/LEGO1/hospitalstate.cpp b/LEGO1/hospitalstate.cpp index dac67988..b1727b74 100644 --- a/LEGO1/hospitalstate.cpp +++ b/LEGO1/hospitalstate.cpp @@ -1,6 +1,6 @@ #include "hospitalstate.h" -// OFFSET: LEGO1 0x10076370 STUB +// STUB: LEGO1 0x10076370 HospitalState::HospitalState() { // TODO diff --git a/LEGO1/hospitalstate.h b/LEGO1/hospitalstate.h index db967097..cb0a52e0 100644 --- a/LEGO1/hospitalstate.h +++ b/LEGO1/hospitalstate.h @@ -3,20 +3,20 @@ #include "legostate.h" -// VTABLE 0x100d97a0 +// VTABLE: LEGO1 0x100d97a0 // SIZE 0x18 class HospitalState : public LegoState { public: HospitalState(); - // OFFSET: LEGO1 0x10076400 + // FUNCTION: LEGO1 0x10076400 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0480 + // GLOBAL: LEGO1 0x100f0480 return "HospitalState"; } - // OFFSET: LEGO1 0x10076410 + // FUNCTION: LEGO1 0x10076410 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, HospitalState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/infocenter.cpp b/LEGO1/infocenter.cpp index dcf02e1d..35968db9 100644 --- a/LEGO1/infocenter.cpp +++ b/LEGO1/infocenter.cpp @@ -1,18 +1,18 @@ #include "infocenter.h" -// OFFSET: LEGO1 0x1006ea20 STUB +// STUB: LEGO1 0x1006ea20 Infocenter::Infocenter() { // TODO } -// OFFSET: LEGO1 0x1006ec90 STUB +// STUB: LEGO1 0x1006ec90 Infocenter::~Infocenter() { // TODO } -// OFFSET: LEGO1 0x1006ef10 STUB +// STUB: LEGO1 0x1006ef10 MxLong Infocenter::Notify(MxParam& p) { // TODO @@ -20,7 +20,7 @@ MxLong Infocenter::Notify(MxParam& p) return 0; } -// OFFSET: LEGO1 0x10070af0 STUB +// STUB: LEGO1 0x10070af0 MxResult Infocenter::Tickle() { // TODO diff --git a/LEGO1/infocenter.h b/LEGO1/infocenter.h index a581a1fb..bce246a5 100644 --- a/LEGO1/infocenter.h +++ b/LEGO1/infocenter.h @@ -3,7 +3,7 @@ #include "legoworld.h" -// VTABLE 0x100d9338 +// VTABLE: LEGO1 0x100d9338 // SIZE 0x1d8 class Infocenter : public LegoWorld { public: @@ -13,14 +13,14 @@ class Infocenter : public LegoWorld { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 virtual MxResult Tickle() override; // vtable+0x8 - // OFFSET: LEGO1 0x1006eb40 + // FUNCTION: LEGO1 0x1006eb40 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f04ec + // GLOBAL: LEGO1 0x100f04ec return "Infocenter"; } - // OFFSET: LEGO1 0x1006eb50 + // FUNCTION: LEGO1 0x1006eb50 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Infocenter::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/infocenterdoor.cpp b/LEGO1/infocenterdoor.cpp index d2590970..ed23a6ac 100644 --- a/LEGO1/infocenterdoor.cpp +++ b/LEGO1/infocenterdoor.cpp @@ -1,18 +1,18 @@ #include "infocenterdoor.h" -// OFFSET: LEGO1 0x10037730 STUB +// STUB: LEGO1 0x10037730 InfocenterDoor::InfocenterDoor() { // TODO } -// OFFSET: LEGO1 0x100378f0 STUB +// STUB: LEGO1 0x100378f0 InfocenterDoor::~InfocenterDoor() { // TODO } -// OFFSET: LEGO1 0x100379e0 STUB +// STUB: LEGO1 0x100379e0 MxLong InfocenterDoor::Notify(MxParam& p) { // TODO diff --git a/LEGO1/infocenterdoor.h b/LEGO1/infocenterdoor.h index b53ff9a2..0fe6f9d6 100644 --- a/LEGO1/infocenterdoor.h +++ b/LEGO1/infocenterdoor.h @@ -3,7 +3,7 @@ #include "legoworld.h" -// VTABLE 0x100d72d8 +// VTABLE: LEGO1 0x100d72d8 // SIZE 0xfc class InfocenterDoor : public LegoWorld { public: @@ -12,14 +12,14 @@ class InfocenterDoor : public LegoWorld { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 - // OFFSET: LEGO1 0x100377b0 + // FUNCTION: LEGO1 0x100377b0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f049c + // GLOBAL: LEGO1 0x100f049c return "InfocenterDoor"; } - // OFFSET: LEGO1 0x100377c0 + // FUNCTION: LEGO1 0x100377c0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, InfocenterDoor::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/infocenterentity.h b/LEGO1/infocenterentity.h index 384395e6..9d37244c 100644 --- a/LEGO1/infocenterentity.h +++ b/LEGO1/infocenterentity.h @@ -3,18 +3,18 @@ #include "buildingentity.h" -// VTABLE 0x100d4b90 +// VTABLE: LEGO1 0x100d4b90 // SIZE 0x68 class InfoCenterEntity : public BuildingEntity { public: - // OFFSET: LEGO1 0x1000ea00 + // FUNCTION: LEGO1 0x1000ea00 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f035c + // GLOBAL: LEGO1 0x100f035c return "InfoCenterEntity"; } - // OFFSET: LEGO1 0x1000ea10 + // FUNCTION: LEGO1 0x1000ea10 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, InfoCenterEntity::ClassName()) || BuildingEntity::IsA(name); diff --git a/LEGO1/infocenterstate.cpp b/LEGO1/infocenterstate.cpp index c91180f8..47a31fbb 100644 --- a/LEGO1/infocenterstate.cpp +++ b/LEGO1/infocenterstate.cpp @@ -2,13 +2,13 @@ DECOMP_SIZE_ASSERT(InfocenterState, 0x94); -// OFFSET: LEGO1 0x10071600 STUB +// STUB: LEGO1 0x10071600 InfocenterState::InfocenterState() { // TODO } -// OFFSET: LEGO1 0x10071920 STUB +// STUB: LEGO1 0x10071920 InfocenterState::~InfocenterState() { // TODO diff --git a/LEGO1/infocenterstate.h b/LEGO1/infocenterstate.h index 84d7b0d3..5dc27c61 100644 --- a/LEGO1/infocenterstate.h +++ b/LEGO1/infocenterstate.h @@ -4,21 +4,21 @@ #include "decomp.h" #include "legostate.h" -// VTABLE 0x100d93a8 +// VTABLE: LEGO1 0x100d93a8 // SIZE 0x94 class InfocenterState : public LegoState { public: InfocenterState(); virtual ~InfocenterState(); - // OFFSET: LEGO1 0x10071840 + // FUNCTION: LEGO1 0x10071840 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f04dc + // GLOBAL: LEGO1 0x100f04dc return "InfocenterState"; } - // OFFSET: LEGO1 0x10071850 + // FUNCTION: LEGO1 0x10071850 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, InfocenterState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/isle.cpp b/LEGO1/isle.cpp index fe4f86b2..dc81f0be 100644 --- a/LEGO1/isle.cpp +++ b/LEGO1/isle.cpp @@ -1,6 +1,6 @@ #include "isle.h" -// OFFSET: LEGO1 0x10030820 STUB +// STUB: LEGO1 0x10030820 Isle::Isle() { // TODO diff --git a/LEGO1/isle.h b/LEGO1/isle.h index 4b31ae70..da83a203 100644 --- a/LEGO1/isle.h +++ b/LEGO1/isle.h @@ -3,21 +3,21 @@ #include "legoworld.h" -// VTABLE 0x100d6fb8 +// VTABLE: LEGO1 0x100d6fb8 // SIZE 0x140 // Radio at 0x12c class Isle : public LegoWorld { public: Isle(); - // OFFSET: LEGO1 0x10030910 + // FUNCTION: LEGO1 0x10030910 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0458 + // GLOBAL: LEGO1 0x100f0458 return "Isle"; } - // OFFSET: LEGO1 0x10030920 + // FUNCTION: LEGO1 0x10030920 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Isle::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/isleactor.h b/LEGO1/isleactor.h index 5f7fa3f2..3dbc528a 100644 --- a/LEGO1/isleactor.h +++ b/LEGO1/isleactor.h @@ -3,17 +3,17 @@ #include "legoactor.h" -// VTABLE 0x100d5178 +// VTABLE: LEGO1 0x100d5178 class IsleActor : public LegoActor { public: - // OFFSET: LEGO1 0x1000e660 + // FUNCTION: LEGO1 0x1000e660 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f07dc + // GLOBAL: LEGO1 0x100f07dc return "IsleActor"; } - // OFFSET: LEGO1 0x1000e670 + // FUNCTION: LEGO1 0x1000e670 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, IsleActor::ClassName()) || LegoActor::IsA(name); diff --git a/LEGO1/islepathactor.cpp b/LEGO1/islepathactor.cpp index 21fca59a..805fc287 100644 --- a/LEGO1/islepathactor.cpp +++ b/LEGO1/islepathactor.cpp @@ -3,38 +3,38 @@ DECOMP_SIZE_ASSERT(IslePathActor, 0x160) // Probably in header -// OFFSET: LEGO1 0x10002df0 STUB +// STUB: LEGO1 0x10002df0 void IslePathActor::VTable0xd0() { // TODO } -// OFFSET: LEGO1 0x10002e00 STUB +// STUB: LEGO1 0x10002e00 void IslePathActor::VTable0xdc() { // TODO } -// OFFSET: LEGO1 0x10002e70 STUB +// STUB: LEGO1 0x10002e70 void IslePathActor::VTable0xcc() { // TODO } -// OFFSET: LEGO1 0x10002e80 STUB +// STUB: LEGO1 0x10002e80 void IslePathActor::VTable0xd4() { // TODO } -// OFFSET: LEGO1 0x10002e90 STUB +// STUB: LEGO1 0x10002e90 void IslePathActor::VTable0xd8() { // TODO } // End header -// OFFSET: LEGO1 0x1001a200 +// FUNCTION: LEGO1 0x1001a200 IslePathActor::IslePathActor() { this->m_pLegoWorld = NULL; @@ -43,31 +43,31 @@ IslePathActor::IslePathActor() this->m_unk158 = 0; } -// OFFSET: LEGO1 0x1001a280 +// FUNCTION: LEGO1 0x1001a280 MxResult IslePathActor::Create(MxDSObject& p_dsObject) { return MxEntity::Create(p_dsObject); } -// OFFSET: LEGO1 0x1001a350 STUB +// STUB: LEGO1 0x1001a350 void IslePathActor::VTable0xe0() { // TODO } -// OFFSET: LEGO1 0x1001a3f0 STUB +// STUB: LEGO1 0x1001a3f0 void IslePathActor::VTable0xe4() { // TODO } -// OFFSET: LEGO1 0x1001b2a0 STUB +// STUB: LEGO1 0x1001b2a0 void IslePathActor::VTable0xe8(MxU32 p_1, MxBool p_2, MxU8 p_3) { // TODO } -// OFFSET: LEGO1 0x1001b5b0 STUB +// STUB: LEGO1 0x1001b5b0 void IslePathActor::VTable0xec() { // TODO diff --git a/LEGO1/islepathactor.h b/LEGO1/islepathactor.h index 7885fbb2..be728a74 100644 --- a/LEGO1/islepathactor.h +++ b/LEGO1/islepathactor.h @@ -5,26 +5,26 @@ #include "legoworld.h" #include "mxtypes.h" -// VTABLE 0x100d4398 +// VTABLE: LEGO1 0x100d4398 // SIZE 0x160 class IslePathActor : public LegoPathActor { public: IslePathActor(); - // OFFSET: LEGO1 0x10002ea0 + // FUNCTION: LEGO1 0x10002ea0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0104 + // GLOBAL: LEGO1 0x100f0104 return "IslePathActor"; } - // OFFSET: LEGO1 0x10002eb0 + // FUNCTION: LEGO1 0x10002eb0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, IslePathActor::ClassName()) || LegoPathActor::IsA(name); } - // OFFSET: LEGO1 0x10002ff0 TEMPLATE + // SYNTHETIC: LEGO1 0x10002ff0 // IslePathActor::`scalar deleting destructor' inline virtual ~IslePathActor() override { IslePathActor::Destroy(TRUE); } diff --git a/LEGO1/jetski.cpp b/LEGO1/jetski.cpp index fa6293b2..859e9ff9 100644 --- a/LEGO1/jetski.cpp +++ b/LEGO1/jetski.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(Jetski, 0x164); -// OFFSET: LEGO1 0x1007e3b0 +// FUNCTION: LEGO1 0x1007e3b0 Jetski::Jetski() { this->m_unk13c = 25.0; diff --git a/LEGO1/jetski.h b/LEGO1/jetski.h index 2f3d0aa3..e4ca95d9 100644 --- a/LEGO1/jetski.h +++ b/LEGO1/jetski.h @@ -4,20 +4,20 @@ #include "decomp.h" #include "islepathactor.h" -// VTABLE 0x100d9ec8 +// VTABLE: LEGO1 0x100d9ec8 // SIZE 0x164 class Jetski : public IslePathActor { public: Jetski(); - // OFFSET: LEGO1 0x1007e430 + // FUNCTION: LEGO1 0x1007e430 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f03d8 + // GLOBAL: LEGO1 0x100f03d8 return "Jetski"; } - // OFFSET: LEGO1 0x1007e440 + // FUNCTION: LEGO1 0x1007e440 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Jetski::ClassName()) || IslePathActor::IsA(name); diff --git a/LEGO1/jetskirace.h b/LEGO1/jetskirace.h index 7acd68ef..3d7c2a09 100644 --- a/LEGO1/jetskirace.h +++ b/LEGO1/jetskirace.h @@ -3,18 +3,18 @@ #include "legorace.h" -// VTABLE 0x100d4fe8 +// VTABLE: LEGO1 0x100d4fe8 // SIZE 0x144 class JetskiRace : public LegoRace { public: - // OFFSET: LEGO1 0x1000daf0 + // FUNCTION: LEGO1 0x1000daf0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0530 + // GLOBAL: LEGO1 0x100f0530 return "JetskiRace"; } - // OFFSET: LEGO1 0x1000db00 + // FUNCTION: LEGO1 0x1000db00 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, JetskiRace::ClassName()) || LegoRace::IsA(name); diff --git a/LEGO1/jetskiracestate.h b/LEGO1/jetskiracestate.h index 41b2ca84..fe419433 100644 --- a/LEGO1/jetskiracestate.h +++ b/LEGO1/jetskiracestate.h @@ -3,18 +3,18 @@ #include "racestate.h" -// VTABLE 0x100d4fa8 +// VTABLE: LEGO1 0x100d4fa8 // SIZE 0x2c class JetskiRaceState : public RaceState { public: - // OFFSET: LEGO1 0x1000dc40 + // FUNCTION: LEGO1 0x1000dc40 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f00ac + // GLOBAL: LEGO1 0x100f00ac return "JetskiRaceState"; } - // OFFSET: LEGO1 0x1000dc50 + // FUNCTION: LEGO1 0x1000dc50 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, JetskiRaceState::ClassName()) || RaceState::IsA(name); diff --git a/LEGO1/jukebox.cpp b/LEGO1/jukebox.cpp index 028c757f..b13b1f82 100644 --- a/LEGO1/jukebox.cpp +++ b/LEGO1/jukebox.cpp @@ -1,6 +1,6 @@ #include "jukebox.h" -// OFFSET: LEGO1 0x1005d660 STUB +// STUB: LEGO1 0x1005d660 JukeBox::JukeBox() { // TODO diff --git a/LEGO1/jukebox.h b/LEGO1/jukebox.h index 941173b4..11bf1a02 100644 --- a/LEGO1/jukebox.h +++ b/LEGO1/jukebox.h @@ -3,20 +3,20 @@ #include "legoworld.h" -// VTABLE 0x100d8958 +// VTABLE: LEGO1 0x100d8958 // SIZE 0x104 class JukeBox : public LegoWorld { public: JukeBox(); - // OFFSET: LEGO1 0x1005d6f0 + // FUNCTION: LEGO1 0x1005d6f0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f02cc + // GLOBAL: LEGO1 0x100f02cc return "JukeBox"; } - // OFFSET: LEGO1 0x1005d700 + // FUNCTION: LEGO1 0x1005d700 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, JukeBox::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/jukeboxentity.cpp b/LEGO1/jukeboxentity.cpp index d2f58e78..73071896 100644 --- a/LEGO1/jukeboxentity.cpp +++ b/LEGO1/jukeboxentity.cpp @@ -1,12 +1,12 @@ #include "jukeboxentity.h" -// OFFSET: LEGO1 0x10085bc0 STUB +// STUB: LEGO1 0x10085bc0 JukeBoxEntity::JukeBoxEntity() { // TODO } -// OFFSET: LEGO1 0x10085dd0 STUB +// STUB: LEGO1 0x10085dd0 JukeBoxEntity::~JukeBoxEntity() { // TODO diff --git a/LEGO1/jukeboxentity.h b/LEGO1/jukeboxentity.h index 1af53195..03510a6f 100644 --- a/LEGO1/jukeboxentity.h +++ b/LEGO1/jukeboxentity.h @@ -3,21 +3,21 @@ #include "legoentity.h" -// VTABLE 0x100da8a0 +// VTABLE: LEGO1 0x100da8a0 // SIZE 0x6c class JukeBoxEntity : public LegoEntity { public: JukeBoxEntity(); virtual ~JukeBoxEntity() override; // vtable+0x0 - // OFFSET: LEGO1 0x10085cc0 + // FUNCTION: LEGO1 0x10085cc0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f02f0 + // GLOBAL: LEGO1 0x100f02f0 return "JukeBoxEntity"; } - // OFFSET: LEGO1 0x10085cd0 + // FUNCTION: LEGO1 0x10085cd0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, JukeBoxEntity::ClassName()) || LegoEntity::IsA(name); diff --git a/LEGO1/jukeboxstate.cpp b/LEGO1/jukeboxstate.cpp index 68085f17..d8245a7d 100644 --- a/LEGO1/jukeboxstate.cpp +++ b/LEGO1/jukeboxstate.cpp @@ -1,6 +1,6 @@ #include "jukeboxstate.h" -// OFFSET: LEGO1 0x1000f300 +// FUNCTION: LEGO1 0x1000f300 MxBool JukeBoxState::VTable0x14() { return FALSE; diff --git a/LEGO1/jukeboxstate.h b/LEGO1/jukeboxstate.h index 99584807..ee1a5436 100644 --- a/LEGO1/jukeboxstate.h +++ b/LEGO1/jukeboxstate.h @@ -3,18 +3,18 @@ #include "legostate.h" -// VTABLE 0x100d4a90 +// VTABLE: LEGO1 0x100d4a90 // SIZE 0x10 class JukeBoxState : public LegoState { public: - // OFFSET: LEGO1 0x1000f310 + // FUNCTION: LEGO1 0x1000f310 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f02bc + // GLOBAL: LEGO1 0x100f02bc return "JukeBoxState"; } - // OFFSET: LEGO1 0x1000f320 + // FUNCTION: LEGO1 0x1000f320 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, JukeBoxState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/lego3dwavepresenter.h b/LEGO1/lego3dwavepresenter.h index 20679b0e..b33c623d 100644 --- a/LEGO1/lego3dwavepresenter.h +++ b/LEGO1/lego3dwavepresenter.h @@ -3,18 +3,18 @@ #include "legowavepresenter.h" -// VTABLE 0x100d52b0 +// VTABLE: LEGO1 0x100d52b0 // SIZE 0xa0 class Lego3DWavePresenter : public LegoWavePresenter { public: - // OFFSET: LEGO1 0x1000d890 + // FUNCTION: LEGO1 0x1000d890 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f058c + // GLOBAL: LEGO1 0x100f058c return "Lego3DWavePresenter"; } - // OFFSET: LEGO1 0x1000d8a0 + // FUNCTION: LEGO1 0x1000d8a0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Lego3DWavePresenter::ClassName()) || MxWavePresenter::IsA(name); diff --git a/LEGO1/legoact2state.h b/LEGO1/legoact2state.h index 8c4a5b27..01194600 100644 --- a/LEGO1/legoact2state.h +++ b/LEGO1/legoact2state.h @@ -3,18 +3,18 @@ #include "legostate.h" -// VTABLE 0x100d4a70 +// VTABLE: LEGO1 0x100d4a70 // SIZE 0x10 class LegoAct2State : public LegoState { public: - // OFFSET: LEGO1 0x1000df80 + // FUNCTION: LEGO1 0x1000df80 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0428 + // GLOBAL: LEGO1 0x100f0428 return "LegoAct2State"; } - // OFFSET: LEGO1 0x1000df90 + // FUNCTION: LEGO1 0x1000df90 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoAct2State::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/legoactioncontrolpresenter.cpp b/LEGO1/legoactioncontrolpresenter.cpp index 2c6d0f17..88c3143f 100644 --- a/LEGO1/legoactioncontrolpresenter.cpp +++ b/LEGO1/legoactioncontrolpresenter.cpp @@ -10,19 +10,19 @@ DECOMP_SIZE_ASSERT(LegoActionControlPresenter, 0x68) -// OFFSET: LEGO1 0x10043ce0 STUB +// STUB: LEGO1 0x10043ce0 void LegoActionControlPresenter::ReadyTickle() { // TODO } -// OFFSET: LEGO1 0x10043d40 STUB +// STUB: LEGO1 0x10043d40 void LegoActionControlPresenter::RepeatingTickle() { // TODO } -// OFFSET: LEGO1 0x10043df0 +// FUNCTION: LEGO1 0x10043df0 MxResult LegoActionControlPresenter::AddToManager() { MxResult result = FAILURE; @@ -35,7 +35,7 @@ MxResult LegoActionControlPresenter::AddToManager() return result; } -// OFFSET: LEGO1 0x10043e20 +// FUNCTION: LEGO1 0x10043e20 void LegoActionControlPresenter::Destroy(MxBool p_fromDestructor) { if (TickleManager()) { @@ -47,7 +47,7 @@ void LegoActionControlPresenter::Destroy(MxBool p_fromDestructor) } } -// OFFSET: LEGO1 0x10043e50 +// FUNCTION: LEGO1 0x10043e50 void LegoActionControlPresenter::ParseExtra() { MxU32 len = m_action->GetExtraLength(); diff --git a/LEGO1/legoactioncontrolpresenter.h b/LEGO1/legoactioncontrolpresenter.h index 188747d4..880ee148 100644 --- a/LEGO1/legoactioncontrolpresenter.h +++ b/LEGO1/legoactioncontrolpresenter.h @@ -5,28 +5,28 @@ #include "legoutil.h" #include "mxmediapresenter.h" -// VTABLE 0x100d5118 +// VTABLE: LEGO1 0x100d5118 // SIZE 0x68 class LegoActionControlPresenter : public MxMediaPresenter { public: inline LegoActionControlPresenter() { m_unk0x50 = ExtraActionType_none; } virtual ~LegoActionControlPresenter() override { Destroy(TRUE); }; // vtable+0x00 - // OFFSET: LEGO1 0x1000d0e0 + // FUNCTION: LEGO1 0x1000d0e0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f05bc + // GLOBAL: LEGO1 0x100f05bc return "LegoActionControlPresenter"; } - // OFFSET: LEGO1 0x1000d0f0 + // FUNCTION: LEGO1 0x1000d0f0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoActionControlPresenter::ClassName()) || MxMediaPresenter::IsA(name); } // TODO: Find proper compilation unit to put this - // OFFSET: LEGO1 0x1000d1d0 TEMPLATE + // SYNTHETIC: LEGO1 0x1000d1d0 // LegoActionControlPresenter::`scalar deleting destructor' virtual void ReadyTickle() override; // vtable+0x18 diff --git a/LEGO1/legoactor.cpp b/LEGO1/legoactor.cpp index 31c6da6f..c67a792f 100644 --- a/LEGO1/legoactor.cpp +++ b/LEGO1/legoactor.cpp @@ -3,44 +3,44 @@ DECOMP_SIZE_ASSERT(LegoActor, 0x78) // Probably in header -// OFFSET: LEGO1 0x10002cc0 +// FUNCTION: LEGO1 0x10002cc0 MxFloat LegoActor::VTable0x50() { return m_unk68; } -// OFFSET: LEGO1 0x10002cd0 +// FUNCTION: LEGO1 0x10002cd0 void LegoActor::VTable0x54(MxFloat p_unk) { m_unk68 = p_unk; } -// OFFSET: LEGO1 0x10002ce0 +// FUNCTION: LEGO1 0x10002ce0 void LegoActor::VTable0x58(MxFloat p_unk) { m_unk70 = p_unk; } -// OFFSET: LEGO1 0x10002cf0 +// FUNCTION: LEGO1 0x10002cf0 MxFloat LegoActor::VTable0x5c() { return m_unk70; } -// OFFSET: LEGO1 0x10002d00 +// FUNCTION: LEGO1 0x10002d00 undefined LegoActor::VTable0x60() { return m_unk74; } -// OFFSET: LEGO1 0x10002d10 +// FUNCTION: LEGO1 0x10002d10 void LegoActor::VTable0x64(undefined p_unk) { m_unk74 = p_unk; } // End header -// OFFSET: LEGO1 0x1002d110 +// FUNCTION: LEGO1 0x1002d110 LegoActor::LegoActor() { m_unk68 = 0.0f; diff --git a/LEGO1/legoactor.h b/LEGO1/legoactor.h index f4096b06..f0223e5b 100644 --- a/LEGO1/legoactor.h +++ b/LEGO1/legoactor.h @@ -4,20 +4,20 @@ #include "decomp.h" #include "legoentity.h" -// VTABLE 0x100d6d68 +// VTABLE: LEGO1 0x100d6d68 // SIZE 0x78 class LegoActor : public LegoEntity { public: LegoActor(); - // OFFSET: LEGO1 0x1002d210 + // FUNCTION: LEGO1 0x1002d210 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0124 + // GLOBAL: LEGO1 0x100f0124 return "LegoActor"; } - // OFFSET: LEGO1 0x1002d220 + // FUNCTION: LEGO1 0x1002d220 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoActor::ClassName()) || LegoEntity::IsA(name); diff --git a/LEGO1/legoactorpresenter.h b/LEGO1/legoactorpresenter.h index a4646cc4..ff7fef74 100644 --- a/LEGO1/legoactorpresenter.h +++ b/LEGO1/legoactorpresenter.h @@ -3,18 +3,18 @@ #include "legoentitypresenter.h" -// VTABLE 0x100d5320 +// VTABLE: LEGO1 0x100d5320 // SIZE 0x50 class LegoActorPresenter : public LegoEntityPresenter { public: - // OFFSET: LEGO1 0x1000cb10 + // FUNCTION: LEGO1 0x1000cb10 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f06a4 + // GLOBAL: LEGO1 0x100f06a4 return "LegoActorPresenter"; } - // OFFSET: LEGO1 0x1000cb20 + // FUNCTION: LEGO1 0x1000cb20 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoActorPresenter::ClassName()) || LegoEntityPresenter::IsA(name); diff --git a/LEGO1/legoanimationmanager.cpp b/LEGO1/legoanimationmanager.cpp index 4a865acf..ffb420f6 100644 --- a/LEGO1/legoanimationmanager.cpp +++ b/LEGO1/legoanimationmanager.cpp @@ -1,39 +1,39 @@ #include "legoanimationmanager.h" -// 0x100f74f8 +// GLOBAL: LEGO1 0x100f74f8 int g_legoAnimationManagerConfig = 1; -// OFFSET: LEGO1 0x1005eb50 +// FUNCTION: LEGO1 0x1005eb50 void LegoAnimationManager::configureLegoAnimationManager(int param_1) { g_legoAnimationManagerConfig = param_1; } -// OFFSET: LEGO1 0x1005eb60 STUB +// STUB: LEGO1 0x1005eb60 LegoAnimationManager::LegoAnimationManager() { // TODO } -// OFFSET: LEGO1 0x1005ed30 STUB +// STUB: LEGO1 0x1005ed30 LegoAnimationManager::~LegoAnimationManager() { // TODO } -// OFFSET: LEGO1 0x1005f130 STUB +// STUB: LEGO1 0x1005f130 void LegoAnimationManager::Init() { // TODO } -// OFFSET: LEGO1 0x1005f6d0 STUB +// STUB: LEGO1 0x1005f6d0 void LegoAnimationManager::FUN_1005f6d0(MxBool p) { // TODO } -// OFFSET: LEGO1 0x100619f0 STUB +// STUB: LEGO1 0x100619f0 MxLong LegoAnimationManager::Notify(MxParam& p) { // TODO @@ -41,7 +41,7 @@ MxLong LegoAnimationManager::Notify(MxParam& p) return 0; } -// OFFSET: LEGO1 0x10061cc0 STUB +// STUB: LEGO1 0x10061cc0 MxResult LegoAnimationManager::Tickle() { // TODO diff --git a/LEGO1/legoanimationmanager.h b/LEGO1/legoanimationmanager.h index a99544eb..89fb427c 100644 --- a/LEGO1/legoanimationmanager.h +++ b/LEGO1/legoanimationmanager.h @@ -3,7 +3,7 @@ #include "mxcore.h" -// VTABLE 0x100d8c18 +// VTABLE: LEGO1 0x100d8c18 // SIZE 0x500 class LegoAnimationManager : public MxCore { public: @@ -13,14 +13,14 @@ class LegoAnimationManager : public MxCore { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 virtual MxResult Tickle() override; // vtable+0x8 - // OFFSET: LEGO1 0x1005ec80 + // FUNCTION: LEGO1 0x1005ec80 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f7508 + // GLOBAL: LEGO1 0x100f7508 return "LegoAnimationManager"; } - // OFFSET: LEGO1 0x1005ec90 + // FUNCTION: LEGO1 0x1005ec90 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/legoanimmmpresenter.cpp b/LEGO1/legoanimmmpresenter.cpp index 2e21d6f4..a6e20919 100644 --- a/LEGO1/legoanimmmpresenter.cpp +++ b/LEGO1/legoanimmmpresenter.cpp @@ -1,6 +1,6 @@ #include "legoanimmmpresenter.h" -// OFFSET: LEGO1 0x1004a8d0 STUB +// STUB: LEGO1 0x1004a8d0 LegoAnimMMPresenter::LegoAnimMMPresenter() { // TODO diff --git a/LEGO1/legoanimmmpresenter.h b/LEGO1/legoanimmmpresenter.h index b596ccc6..ddcabeee 100644 --- a/LEGO1/legoanimmmpresenter.h +++ b/LEGO1/legoanimmmpresenter.h @@ -3,20 +3,20 @@ #include "mxcompositepresenter.h" -// VTABLE 0x100d7de8 +// VTABLE: LEGO1 0x100d7de8 // SIZE 0x74 class LegoAnimMMPresenter : public MxCompositePresenter { public: LegoAnimMMPresenter(); - // OFFSET: LEGO1 0x1004a950 + // FUNCTION: LEGO1 0x1004a950 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f046c + // GLOBAL: LEGO1 0x100f046c return "LegoAnimMMPresenter"; } - // OFFSET: LEGO1 0x1004a960 + // FUNCTION: LEGO1 0x1004a960 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoAnimMMPresenter::ClassName()) || MxCompositePresenter::IsA(name); diff --git a/LEGO1/legoanimpresenter.cpp b/LEGO1/legoanimpresenter.cpp index e6c71d03..2bdd7475 100644 --- a/LEGO1/legoanimpresenter.cpp +++ b/LEGO1/legoanimpresenter.cpp @@ -1,12 +1,12 @@ #include "legoanimpresenter.h" -// OFFSET: LEGO1 0x10068420 STUB +// STUB: LEGO1 0x10068420 LegoAnimPresenter::LegoAnimPresenter() { // TODO } -// OFFSET: LEGO1 0x100686f0 STUB +// STUB: LEGO1 0x100686f0 void LegoAnimPresenter::Init() { // TODO diff --git a/LEGO1/legoanimpresenter.h b/LEGO1/legoanimpresenter.h index 4599be12..532d8c8a 100644 --- a/LEGO1/legoanimpresenter.h +++ b/LEGO1/legoanimpresenter.h @@ -3,19 +3,19 @@ #include "mxvideopresenter.h" -// VTABLE 0x100d90c8 +// VTABLE: LEGO1 0x100d90c8 class LegoAnimPresenter : public MxVideoPresenter { public: LegoAnimPresenter(); - // OFFSET: LEGO1 0x10068530 + // FUNCTION: LEGO1 0x10068530 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f071c + // GLOBAL: LEGO1 0x100f071c return "LegoAnimPresenter"; } - // OFFSET: LEGO1 0x10068540 + // FUNCTION: LEGO1 0x10068540 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoAnimPresenter::ClassName()) || MxVideoPresenter::IsA(name); diff --git a/LEGO1/legobackgroundcolor.cpp b/LEGO1/legobackgroundcolor.cpp index 36a190e2..f25bdf9e 100644 --- a/LEGO1/legobackgroundcolor.cpp +++ b/LEGO1/legobackgroundcolor.cpp @@ -11,7 +11,7 @@ const char* g_delimiter = "\t"; const char* g_set = "set"; const char* g_reset = "reset"; -// OFFSET: LEGO1 0x1003bfb0 +// FUNCTION: LEGO1 0x1003bfb0 LegoBackgroundColor::LegoBackgroundColor(const char* p_key, const char* p_value) { m_key = p_key; @@ -19,7 +19,7 @@ LegoBackgroundColor::LegoBackgroundColor(const char* p_key, const char* p_value) SetValue(p_value); } -// OFFSET: LEGO1 0x1003c070 +// FUNCTION: LEGO1 0x1003c070 void LegoBackgroundColor::SetValue(const char* p_colorString) { m_value = p_colorString; diff --git a/LEGO1/legobackgroundcolor.h b/LEGO1/legobackgroundcolor.h index 26143be2..0d9c7c5f 100644 --- a/LEGO1/legobackgroundcolor.h +++ b/LEGO1/legobackgroundcolor.h @@ -3,7 +3,7 @@ #include "mxvariable.h" -// VTABLE 0x100d74a8 +// VTABLE: LEGO1 0x100d74a8 // SIZE 0x30 class LegoBackgroundColor : public MxVariable { public: diff --git a/LEGO1/legobuildingmanager.cpp b/LEGO1/legobuildingmanager.cpp index 6cbd14fb..19a49bf6 100644 --- a/LEGO1/legobuildingmanager.cpp +++ b/LEGO1/legobuildingmanager.cpp @@ -1,27 +1,27 @@ #include "legobuildingmanager.h" -// 0x100f37cc +// GLOBAL: LEGO1 0x100f37cc int g_buildingManagerConfig = 1; -// OFFSET: LEGO1 0x1002f8b0 +// FUNCTION: LEGO1 0x1002f8b0 void LegoBuildingManager::configureLegoBuildingManager(int param_1) { g_buildingManagerConfig = param_1; } -// OFFSET: LEGO1 0x1002f8c0 +// FUNCTION: LEGO1 0x1002f8c0 LegoBuildingManager::LegoBuildingManager() { Init(); } -// OFFSET: LEGO1 0x1002f960 STUB +// STUB: LEGO1 0x1002f960 LegoBuildingManager::~LegoBuildingManager() { // TODO } -// OFFSET: LEGO1 0x1002f9d0 STUB +// STUB: LEGO1 0x1002f9d0 void LegoBuildingManager::Init() { // TODO diff --git a/LEGO1/legobuildingmanager.h b/LEGO1/legobuildingmanager.h index e2662bd4..4a822bcf 100644 --- a/LEGO1/legobuildingmanager.h +++ b/LEGO1/legobuildingmanager.h @@ -3,17 +3,17 @@ #include "mxcore.h" -// VTABLE 0x100d6f50 +// VTABLE: LEGO1 0x100d6f50 // SIZE 0x30 class LegoBuildingManager : public MxCore { public: LegoBuildingManager(); virtual ~LegoBuildingManager() override; - // OFFSET: LEGO1 0x1002f930 + // FUNCTION: LEGO1 0x1002f930 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f37d0 + // GLOBAL: LEGO1 0x100f37d0 return "LegoBuildingManager"; } diff --git a/LEGO1/legocachesound.cpp b/LEGO1/legocachesound.cpp index dddd6849..eb58278c 100644 --- a/LEGO1/legocachesound.cpp +++ b/LEGO1/legocachesound.cpp @@ -1,18 +1,18 @@ #include "legocachesound.h" -// OFFSET: LEGO1 0x100064d0 +// FUNCTION: LEGO1 0x100064d0 LegoCacheSound::LegoCacheSound() { Init(); } -// OFFSET: LEGO1 0x10006630 STUB +// STUB: LEGO1 0x10006630 LegoCacheSound::~LegoCacheSound() { // TODO } -// OFFSET: LEGO1 0x100066d0 STUB +// STUB: LEGO1 0x100066d0 void LegoCacheSound::Init() { // TODO diff --git a/LEGO1/legocachesound.h b/LEGO1/legocachesound.h index 1292d1b2..61daa73b 100644 --- a/LEGO1/legocachesound.h +++ b/LEGO1/legocachesound.h @@ -3,21 +3,21 @@ #include "mxcore.h" -// VTABLE 0x100d4718 +// VTABLE: LEGO1 0x100d4718 // SIZE 0x88 class LegoCacheSound : public MxCore { public: LegoCacheSound(); virtual ~LegoCacheSound() override; // vtable+0x0 - // OFFSET: LEGO1 0x10006580 + // FUNCTION: LEGO1 0x10006580 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f01c4 + // GLOBAL: LEGO1 0x100f01c4 return "LegoCacheSound"; } - // OFFSET: LEGO1 0x10006590 + // FUNCTION: LEGO1 0x10006590 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoCacheSound::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/legocameracontroller.cpp b/LEGO1/legocameracontroller.cpp index 779d2b1f..cf68f0d1 100644 --- a/LEGO1/legocameracontroller.cpp +++ b/LEGO1/legocameracontroller.cpp @@ -1,12 +1,12 @@ #include "legocameracontroller.h" -// OFFSET: LEGO1 0x10011d50 STUB +// STUB: LEGO1 0x10011d50 LegoCameraController::LegoCameraController() { // TODO } -// OFFSET: LEGO1 0x10011f70 STUB +// STUB: LEGO1 0x10011f70 LegoCameraController::~LegoCameraController() { // TODO diff --git a/LEGO1/legocameracontroller.h b/LEGO1/legocameracontroller.h index a1249b5c..d12f333d 100644 --- a/LEGO1/legocameracontroller.h +++ b/LEGO1/legocameracontroller.h @@ -3,21 +3,21 @@ #include "mxcore.h" -// VTABLE 0x100d57b0 +// VTABLE: LEGO1 0x100d57b0 // SIZE 0xc8 class LegoCameraController : public MxCore { public: LegoCameraController(); virtual ~LegoCameraController() override; // vtable+0x0 - // OFFSET: LEGO1 0x10011ec0 + // FUNCTION: LEGO1 0x10011ec0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0850 + // GLOBAL: LEGO1 0x100f0850 return "LegoCameraController"; } - // OFFSET: LEGO1 0x10011ed0 + // FUNCTION: LEGO1 0x10011ed0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/legocarbuild.cpp b/LEGO1/legocarbuild.cpp index faf504d8..86c9ba09 100644 --- a/LEGO1/legocarbuild.cpp +++ b/LEGO1/legocarbuild.cpp @@ -1,18 +1,18 @@ #include "legocarbuild.h" -// OFFSET: LEGO1 0x100226d0 STUB +// STUB: LEGO1 0x100226d0 LegoCarBuild::LegoCarBuild() { // TODO } -// OFFSET: LEGO1 0x10022a80 STUB +// STUB: LEGO1 0x10022a80 LegoCarBuild::~LegoCarBuild() { // TODO } -// OFFSET: LEGO1 0x100238b0 STUB +// STUB: LEGO1 0x100238b0 MxResult LegoCarBuild::Tickle() { // TODO @@ -20,7 +20,7 @@ MxResult LegoCarBuild::Tickle() return 0; } -// OFFSET: LEGO1 0x10024050 STUB +// STUB: LEGO1 0x10024050 MxLong LegoCarBuild::Notify(MxParam& p) { // TODO diff --git a/LEGO1/legocarbuild.h b/LEGO1/legocarbuild.h index cb8d7e6f..2f2fbcd2 100644 --- a/LEGO1/legocarbuild.h +++ b/LEGO1/legocarbuild.h @@ -3,7 +3,7 @@ #include "legoworld.h" -// VTABLE 0x100d6658 +// VTABLE: LEGO1 0x100d6658 // SIZE 0x34c class LegoCarBuild : public LegoWorld { public: @@ -13,14 +13,14 @@ class LegoCarBuild : public LegoWorld { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 virtual MxResult Tickle() override; // vtable+0x8 - // OFFSET: LEGO1 0x10022940 + // FUNCTION: LEGO1 0x10022940 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0504 + // GLOBAL: LEGO1 0x100f0504 return "LegoCarBuild"; } - // OFFSET: LEGO1 0x10022950 + // FUNCTION: LEGO1 0x10022950 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoCarBuild::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/legocarbuildanimpresenter.cpp b/LEGO1/legocarbuildanimpresenter.cpp index d48fad36..0b5ba549 100644 --- a/LEGO1/legocarbuildanimpresenter.cpp +++ b/LEGO1/legocarbuildanimpresenter.cpp @@ -1,12 +1,12 @@ #include "legocarbuildanimpresenter.h" -// OFFSET: LEGO1 0x10078400 STUB +// STUB: LEGO1 0x10078400 LegoCarBuildAnimPresenter::LegoCarBuildAnimPresenter() { // TODO } -// OFFSET: LEGO1 0x10078680 STUB +// STUB: LEGO1 0x10078680 LegoCarBuildAnimPresenter::~LegoCarBuildAnimPresenter() { // TODO diff --git a/LEGO1/legocarbuildanimpresenter.h b/LEGO1/legocarbuildanimpresenter.h index a0a9bf70..0003a917 100644 --- a/LEGO1/legocarbuildanimpresenter.h +++ b/LEGO1/legocarbuildanimpresenter.h @@ -3,21 +3,21 @@ #include "legoanimpresenter.h" -// VTABLE 0x100d99e0 +// VTABLE: LEGO1 0x100d99e0 // SIZE 0x150 class LegoCarBuildAnimPresenter : public LegoAnimPresenter { public: LegoCarBuildAnimPresenter(); virtual ~LegoCarBuildAnimPresenter() override; // vtable+0x0 - // OFFSET: LEGO1 0x10078510 + // FUNCTION: LEGO1 0x10078510 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f05ec + // GLOBAL: LEGO1 0x100f05ec return "LegoCarBuildAnimPresenter"; } - // OFFSET: LEGO1 0x10078520 + // FUNCTION: LEGO1 0x10078520 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoCarBuildAnimPresenter::ClassName()) || LegoAnimPresenter::IsA(name); diff --git a/LEGO1/legocarraceactor.h b/LEGO1/legocarraceactor.h index b74a070f..592dfdb3 100644 --- a/LEGO1/legocarraceactor.h +++ b/LEGO1/legocarraceactor.h @@ -3,17 +3,17 @@ #include "legoraceactor.h" -// VTABLE 0x100da0d8 +// VTABLE: LEGO1 0x100da0d8 class LegoCarRaceActor : public LegoRaceActor { public: - // OFFSET: LEGO1 0x10081650 + // FUNCTION: LEGO1 0x10081650 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0568 + // GLOBAL: LEGO1 0x100f0568 return "LegoCarRaceActor"; } - // OFFSET: LEGO1 0x10081670 + // FUNCTION: LEGO1 0x10081670 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoCarRaceActor::ClassName()) || LegoRaceActor::IsA(name); diff --git a/LEGO1/legocontrolmanager.cpp b/LEGO1/legocontrolmanager.cpp index 70a3502c..f3c70c50 100644 --- a/LEGO1/legocontrolmanager.cpp +++ b/LEGO1/legocontrolmanager.cpp @@ -1,30 +1,30 @@ #include "legocontrolmanager.h" -// OFFSET: LEGO1 0x10028520 STUB +// STUB: LEGO1 0x10028520 LegoControlManager::LegoControlManager() { // TODO } -// OFFSET: LEGO1 0x10028d60 STUB +// STUB: LEGO1 0x10028d60 LegoControlManager::~LegoControlManager() { // TODO } -// OFFSET: LEGO1 0x10028e10 STUB +// STUB: LEGO1 0x10028e10 void LegoControlManager::Register(MxCore* p_listener) { // TODO } -// OFFSET: LEGO1 0x10028ea0 STUB +// STUB: LEGO1 0x10028ea0 void LegoControlManager::Unregister(MxCore* p_listener) { // TODO } -// OFFSET: LEGO1 0x10029600 STUB +// STUB: LEGO1 0x10029600 MxResult LegoControlManager::Tickle() { // TODO diff --git a/LEGO1/legocontrolmanager.h b/LEGO1/legocontrolmanager.h index 1c060c24..68ca2faa 100644 --- a/LEGO1/legocontrolmanager.h +++ b/LEGO1/legocontrolmanager.h @@ -3,7 +3,7 @@ #include "mxcore.h" -// VTABLE 0x100d6a80 +// VTABLE: LEGO1 0x100d6a80 class LegoControlManager : public MxCore { public: LegoControlManager(); @@ -11,14 +11,14 @@ class LegoControlManager : public MxCore { virtual MxResult Tickle() override; // vtable+0x8 - // OFFSET: LEGO1 0x10028cb0 + // FUNCTION: LEGO1 0x10028cb0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f31b8 + // GLOBAL: LEGO1 0x100f31b8 return "LegoControlManager"; } - // OFFSET: LEGO1 0x10028cc0 + // FUNCTION: LEGO1 0x10028cc0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoControlManager::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/legoentity.cpp b/LEGO1/legoentity.cpp index 497cb9e3..7e8a953f 100644 --- a/LEGO1/legoentity.cpp +++ b/LEGO1/legoentity.cpp @@ -7,16 +7,16 @@ DECOMP_SIZE_ASSERT(LegoEntity, 0x68) -// OFFSET: LEGO1 0x10001090 TEMPLATE +// FUNCTION: LEGO1 0x10001090 // LegoEntity::SetWorldSpeed -// OFFSET: LEGO1 0x1000c290 +// FUNCTION: LEGO1 0x1000c290 LegoEntity::~LegoEntity() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100105f0 +// FUNCTION: LEGO1 0x100105f0 void LegoEntity::Init() { m_worldLocation.Fill(0); @@ -32,19 +32,19 @@ void LegoEntity::Init() m_unk59 = 4; } -// OFFSET: LEGO1 0x10010650 STUB +// STUB: LEGO1 0x10010650 void LegoEntity::ResetWorldTransform(MxBool p_inVehicle) { // TODO } -// OFFSET: LEGO1 0x10010790 STUB +// STUB: LEGO1 0x10010790 void LegoEntity::SetWorldTransform(Vector3Impl& p_loc, Vector3Impl& p_dir, Vector3Impl& p_up) { // TODO } -// OFFSET: LEGO1 0x100107e0 +// FUNCTION: LEGO1 0x100107e0 MxResult LegoEntity::Create(MxDSObject& p_dsObject) { m_mxEntityId = p_dsObject.GetObjectId(); @@ -53,7 +53,7 @@ MxResult LegoEntity::Create(MxDSObject& p_dsObject) return SUCCESS; } -// OFFSET: LEGO1 0x10010810 STUB +// STUB: LEGO1 0x10010810 void LegoEntity::Destroy(MxBool p_fromDestructor) { if (m_roi) { @@ -64,7 +64,7 @@ void LegoEntity::Destroy(MxBool p_fromDestructor) Init(); } -// OFFSET: LEGO1 0x10010880 +// FUNCTION: LEGO1 0x10010880 void LegoEntity::SetWorld() { LegoWorld* world = GetCurrentWorld(); @@ -73,13 +73,13 @@ void LegoEntity::SetWorld() } } -// OFFSET: LEGO1 0x100108a0 STUB +// STUB: LEGO1 0x100108a0 void LegoEntity::SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) { // TODO } -// OFFSET: LEGO1 0x10010e10 +// FUNCTION: LEGO1 0x10010e10 void LegoEntity::ParseAction(char* p_extra) { char copy[1024]; @@ -102,49 +102,49 @@ void LegoEntity::ParseAction(char* p_extra) } } -// OFFSET: LEGO1 0x10010f10 STUB +// STUB: LEGO1 0x10010f10 void LegoEntity::VTable0x34() { // TODO } -// OFFSET: LEGO1 0x10011070 STUB +// STUB: LEGO1 0x10011070 void LegoEntity::VTable0x38() { // TODO } -// OFFSET: LEGO1 0x10011300 STUB +// STUB: LEGO1 0x10011300 void LegoEntity::VTable0x3c() { // TODO } -// OFFSET: LEGO1 0x10011360 STUB +// STUB: LEGO1 0x10011360 void LegoEntity::VTable0x40() { // TODO } -// OFFSET: LEGO1 0x100113c0 STUB +// STUB: LEGO1 0x100113c0 void LegoEntity::VTable0x44() { // TODO } -// OFFSET: LEGO1 0x10011420 STUB +// STUB: LEGO1 0x10011420 void LegoEntity::VTable0x48() { // TODO } -// OFFSET: LEGO1 0x10011470 STUB +// STUB: LEGO1 0x10011470 void LegoEntity::VTable0x4c() { // TODO } -// OFFSET: LEGO1 0x100114f0 STUB +// STUB: LEGO1 0x100114f0 MxLong LegoEntity::Notify(MxParam& p) { // TODO diff --git a/LEGO1/legoentity.h b/LEGO1/legoentity.h index a15eaffb..f3da7325 100644 --- a/LEGO1/legoentity.h +++ b/LEGO1/legoentity.h @@ -8,7 +8,7 @@ #include "mxentity.h" #include "realtime/vector.h" -// VTABLE 0x100d4858 +// VTABLE: LEGO1 0x100d4858 // SIZE 0x68 (probably) class LegoEntity : public MxEntity { public: @@ -19,14 +19,14 @@ class LegoEntity : public MxEntity { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 - // OFFSET: LEGO1 0x1000c2f0 + // FUNCTION: LEGO1 0x1000c2f0 inline const char* ClassName() const override // vtable+0xc { - // 0x100f0064 + // GLOBAL: LEGO1 0x100f0064 return "LegoEntity"; } - // OFFSET: LEGO1 0x1000c300 + // FUNCTION: LEGO1 0x1000c300 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoEntity::ClassName()) || MxEntity::IsA(name); diff --git a/LEGO1/legoentitypresenter.cpp b/LEGO1/legoentitypresenter.cpp index f3ac23c5..05bcb7bf 100644 --- a/LEGO1/legoentitypresenter.cpp +++ b/LEGO1/legoentitypresenter.cpp @@ -5,32 +5,32 @@ DECOMP_SIZE_ASSERT(LegoEntityPresenter, 0x50); -// OFFSET: LEGO1 0x10053440 +// FUNCTION: LEGO1 0x10053440 LegoEntityPresenter::LegoEntityPresenter() { Init(); } -// OFFSET: LEGO1 0x100535c0 +// FUNCTION: LEGO1 0x100535c0 void LegoEntityPresenter::Init() { m_unk4c = 0; } -// OFFSET: LEGO1 0x100535d0 +// FUNCTION: LEGO1 0x100535d0 LegoEntityPresenter::~LegoEntityPresenter() { Destroy(TRUE); } -// OFFSET: LEGO1 0x10053630 +// FUNCTION: LEGO1 0x10053630 undefined4 LegoEntityPresenter::vtable6c(undefined4 p_unknown) { m_unk4c = p_unknown; return 0; } -// OFFSET: LEGO1 0x10053640 +// FUNCTION: LEGO1 0x10053640 void LegoEntityPresenter::Destroy(MxBool p_fromDestructor) { if (VideoManager()) { @@ -40,7 +40,7 @@ void LegoEntityPresenter::Destroy(MxBool p_fromDestructor) Init(); } -// OFFSET: LEGO1 0x10053670 +// FUNCTION: LEGO1 0x10053670 void LegoEntityPresenter::Destroy() { Destroy(FALSE); diff --git a/LEGO1/legoentitypresenter.h b/LEGO1/legoentitypresenter.h index 2ee9f701..efa85b50 100644 --- a/LEGO1/legoentitypresenter.h +++ b/LEGO1/legoentitypresenter.h @@ -3,21 +3,21 @@ #include "mxcompositepresenter.h" -// VTABLE 0x100d8398 +// VTABLE: LEGO1 0x100d8398 // SIZE 0x50 class LegoEntityPresenter : public MxCompositePresenter { public: LegoEntityPresenter(); virtual ~LegoEntityPresenter() override; // vtable+0x0 - // OFFSET: LEGO1 0x100534b0 + // FUNCTION: LEGO1 0x100534b0 inline const char* ClassName() const override // vtable+0xc { - // 0x100f06b8 + // GLOBAL: LEGO1 0x100f06b8 return "LegoEntityPresenter"; } - // OFFSET: LEGO1 0x100534c0 + // FUNCTION: LEGO1 0x100534c0 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoEntityPresenter::ClassName()) || MxCompositePresenter::IsA(name); diff --git a/LEGO1/legoeventnotificationparam.h b/LEGO1/legoeventnotificationparam.h index 3916771d..30b77a35 100644 --- a/LEGO1/legoeventnotificationparam.h +++ b/LEGO1/legoeventnotificationparam.h @@ -4,7 +4,7 @@ #include "mxnotificationparam.h" #include "mxtypes.h" -// VTABLE 0x100d6aa0 +// VTABLE: LEGO1 0x100d6aa0 class LegoEventNotificationParam : public MxNotificationParam { public: inline LegoEventNotificationParam() : MxNotificationParam(PARAM_NONE, NULL) {} diff --git a/LEGO1/legoextraactor.h b/LEGO1/legoextraactor.h index 63b124cf..f0838e45 100644 --- a/LEGO1/legoextraactor.h +++ b/LEGO1/legoextraactor.h @@ -3,17 +3,17 @@ #include "legoanimactor.h" -// VTABLE 0x100d6c10 +// VTABLE: LEGO1 0x100d6c10 class LegoExtraActor : public LegoAnimActor { public: - // OFFSET: LEGO1 0x1002b7a0 + // FUNCTION: LEGO1 0x1002b7a0 inline const char* ClassName() const override // vtable+0xc { - // 0x100f3204 + // GLOBAL: LEGO1 0x100f3204 return "LegoExtraActor"; } - // OFFSET: LEGO1 0x1002b7c0 + // FUNCTION: LEGO1 0x1002b7c0 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoExtraActor::ClassName()) || LegoAnimActor::IsA(name); diff --git a/LEGO1/legoflctexturepresenter.cpp b/LEGO1/legoflctexturepresenter.cpp index 52bf5f16..29a49814 100644 --- a/LEGO1/legoflctexturepresenter.cpp +++ b/LEGO1/legoflctexturepresenter.cpp @@ -1,6 +1,6 @@ #include "legoflctexturepresenter.h" -// OFFSET: LEGO1 0x1005de80 STUB +// STUB: LEGO1 0x1005de80 LegoFlcTexturePresenter::LegoFlcTexturePresenter() { // TODO diff --git a/LEGO1/legoflctexturepresenter.h b/LEGO1/legoflctexturepresenter.h index 9d8c2bfd..c68d045d 100644 --- a/LEGO1/legoflctexturepresenter.h +++ b/LEGO1/legoflctexturepresenter.h @@ -3,16 +3,16 @@ #include "mxflcpresenter.h" -// VTABLE 0x100d89e0 +// VTABLE: LEGO1 0x100d89e0 // SIZE 0x70 class LegoFlcTexturePresenter : public MxFlcPresenter { public: LegoFlcTexturePresenter(); - // OFFSET: LEGO1 0x1005def0 + // FUNCTION: LEGO1 0x1005def0 inline const char* ClassName() const override // vtable+0xc { - // 0x100f0634 + // GLOBAL: LEGO1 0x100f0634 return "LegoFlcTexturePresenter"; } }; diff --git a/LEGO1/legofullscreenmovie.cpp b/LEGO1/legofullscreenmovie.cpp index f007a955..d2db6ac2 100644 --- a/LEGO1/legofullscreenmovie.cpp +++ b/LEGO1/legofullscreenmovie.cpp @@ -7,13 +7,13 @@ DECOMP_SIZE_ASSERT(LegoFullScreenMovie, 0x24) -// 0x100f3be8 +// GLOBAL: LEGO1 0x100f3be8 const char* g_str_enable = "enable"; -// 0x100f3bf4 +// GLOBAL: LEGO1 0x100f3bf4 const char* g_str_disable = "disable"; -// OFFSET: LEGO1 0x1003c500 +// FUNCTION: LEGO1 0x1003c500 LegoFullScreenMovie::LegoFullScreenMovie(const char* p_key, const char* p_value) { m_key = p_key; @@ -21,7 +21,7 @@ LegoFullScreenMovie::LegoFullScreenMovie(const char* p_key, const char* p_value) SetValue(p_value); } -// OFFSET: LEGO1 0x1003c5c0 +// FUNCTION: LEGO1 0x1003c5c0 void LegoFullScreenMovie::SetValue(const char* p_option) { m_value = p_option; diff --git a/LEGO1/legofullscreenmovie.h b/LEGO1/legofullscreenmovie.h index 443d45ab..f2cdaae4 100644 --- a/LEGO1/legofullscreenmovie.h +++ b/LEGO1/legofullscreenmovie.h @@ -3,7 +3,7 @@ #include "mxvariable.h" -// VTABLE 0x100d74b8 +// VTABLE: LEGO1 0x100d74b8 // SIZE 0x24 class LegoFullScreenMovie : public MxVariable { public: diff --git a/LEGO1/legogamestate.cpp b/LEGO1/legogamestate.cpp index dfdfcde2..99e3f47e 100644 --- a/LEGO1/legogamestate.cpp +++ b/LEGO1/legogamestate.cpp @@ -13,10 +13,10 @@ // There may be other members that come after. DECOMP_SIZE_ASSERT(LegoGameState, 0x430) -// GLOBAL OFFSET: LEGO1 0x100f3e40 +// GLOBAL: LEGO1 0x100f3e40 const char* g_fileExtensionGS = ".GS"; -// GLOBAL OFFSET: LEGO1 0x100f3e58 +// GLOBAL: LEGO1 0x100f3e58 ColorStringStruct g_colorSaveData[43] = { {"c_dbbkfny0", "lego red"}, {"c_dbbkxly0", "lego white"}, {"c_chbasey0", "lego black"}, {"c_chbacky0", "lego black"}, {"c_chdishy0", "lego white"}, {"c_chhorny0", "lego black"}, @@ -37,10 +37,10 @@ ColorStringStruct g_colorSaveData[43] = { // NOTE: This offset = the end of the variables table, the last entry // in that table is a special entry, the string "END_OF_VARIABLES" -// GLOBAL OFFSET: LEGO1 0x100f3e50 +// GLOBAL: LEGO1 0x100f3e50 extern const char* s_endOfVariables; -// OFFSET: LEGO1 0x10039550 +// FUNCTION: LEGO1 0x10039550 LegoGameState::LegoGameState() { // TODO @@ -60,7 +60,7 @@ LegoGameState::LegoGameState() SerializeScoreHistory(1); } -// OFFSET: LEGO1 0x10039720 +// FUNCTION: LEGO1 0x10039720 LegoGameState::~LegoGameState() { LegoROI::SetSomeHandlerFunction(NULL); @@ -78,7 +78,7 @@ LegoGameState::~LegoGameState() delete[] m_savePath; } -// OFFSET: LEGO1 0x10039980 +// FUNCTION: LEGO1 0x10039980 MxResult LegoGameState::Save(MxULong p_slot) { MxResult result; @@ -116,14 +116,14 @@ MxResult LegoGameState::Save(MxULong p_slot) return result; } -// OFFSET: LEGO1 0x10039c60 STUB +// STUB: LEGO1 0x10039c60 MxResult LegoGameState::Load(MxULong) { // TODO return 0; } -// OFFSET: LEGO1 0x10039f00 +// FUNCTION: LEGO1 0x10039f00 void LegoGameState::SetSavePath(char* p_savePath) { if (m_savePath != NULL) @@ -137,7 +137,7 @@ void LegoGameState::SetSavePath(char* p_savePath) m_savePath = NULL; } -// OFFSET: LEGO1 0x1003a020 +// FUNCTION: LEGO1 0x1003a020 MxResult LegoGameState::WriteEndOfVariables(LegoStream* p_stream) { MxU8 len = strlen(s_endOfVariables); @@ -146,7 +146,7 @@ MxResult LegoGameState::WriteEndOfVariables(LegoStream* p_stream) return FAILURE; } -// OFFSET: LEGO1 0x1003a170 +// FUNCTION: LEGO1 0x1003a170 void LegoGameState::GetFileSavePath(MxString* p_outPath, MxULong p_slotn) { char baseForSlot[2] = "0"; @@ -166,31 +166,31 @@ void LegoGameState::GetFileSavePath(MxString* p_outPath, MxULong p_slotn) *p_outPath = MxString(path); } -// OFFSET: LEGO1 0x1003a2e0 STUB +// STUB: LEGO1 0x1003a2e0 void LegoGameState::SerializePlayersInfo(MxS16 p) { // TODO } -// OFFSET: LEGO1 0x1003a720 STUB +// STUB: LEGO1 0x1003a720 void LegoGameState::FUN_1003a720(MxU32 p_unk) { // TODO } -// OFFSET: LEGO1 0x1003b060 STUB +// STUB: LEGO1 0x1003b060 void LegoGameState::HandleAction(MxU32 p_unk) { // TODO } -// OFFSET: LEGO1 0x1003bac0 +// FUNCTION: LEGO1 0x1003bac0 void LegoGameState::SetROIHandlerFunction() { LegoROI::SetSomeHandlerFunction(&ROIHandlerFunction); } -// OFFSET: LEGO1 0x1003bad0 +// FUNCTION: LEGO1 0x1003bad0 MxBool ROIHandlerFunction(char* p_input, char* p_output, MxU32 p_copyLen) { if (p_output != NULL && p_copyLen != 0 && @@ -211,7 +211,7 @@ MxBool ROIHandlerFunction(char* p_input, char* p_output, MxU32 p_copyLen) return FALSE; } -// OFFSET: LEGO1 0x1003bbb0 +// FUNCTION: LEGO1 0x1003bbb0 LegoState* LegoGameState::GetState(COMPAT_CONST char* p_stateName) { for (MxS32 i = 0; i < m_stateCount; ++i) @@ -220,7 +220,7 @@ LegoState* LegoGameState::GetState(COMPAT_CONST char* p_stateName) return NULL; } -// OFFSET: LEGO1 0x1003bc00 +// FUNCTION: LEGO1 0x1003bc00 LegoState* LegoGameState::CreateState(COMPAT_CONST char* p_stateName) { LegoState* newState = (LegoState*) ObjectFactory()->Create(p_stateName); @@ -229,7 +229,7 @@ LegoState* LegoGameState::CreateState(COMPAT_CONST char* p_stateName) return newState; } -// OFFSET: LEGO1 0x1003bc30 +// FUNCTION: LEGO1 0x1003bc30 void LegoGameState::RegisterState(LegoState* p_state) { MxS32 targetIndex; @@ -255,13 +255,13 @@ void LegoGameState::RegisterState(LegoState* p_state) m_stateArray[targetIndex] = p_state; } -// OFFSET: LEGO1 0x1003cdd0 STUB +// STUB: LEGO1 0x1003cdd0 void LegoGameState::SerializeScoreHistory(MxS16 p) { // TODO } -// OFFSET: LEGO1 0x1003cea0 +// FUNCTION: LEGO1 0x1003cea0 void LegoGameState::SetSomeEnumState(undefined4 p_state) { m_unk10 = p_state; diff --git a/LEGO1/legohideanimpresenter.cpp b/LEGO1/legohideanimpresenter.cpp index f1b8b88b..f13165cc 100644 --- a/LEGO1/legohideanimpresenter.cpp +++ b/LEGO1/legohideanimpresenter.cpp @@ -1,12 +1,12 @@ #include "legohideanimpresenter.h" -// OFFSET: LEGO1 0x1006d7e0 +// FUNCTION: LEGO1 0x1006d7e0 LegoHideAnimPresenter::LegoHideAnimPresenter() { Init(); } -// OFFSET: LEGO1 0x1006da50 STUB +// STUB: LEGO1 0x1006da50 void LegoHideAnimPresenter::Init() { } diff --git a/LEGO1/legohideanimpresenter.h b/LEGO1/legohideanimpresenter.h index e2720a33..a2334e5b 100644 --- a/LEGO1/legohideanimpresenter.h +++ b/LEGO1/legohideanimpresenter.h @@ -3,20 +3,20 @@ #include "legoloopinganimpresenter.h" -// VTABLE 0x100d9278 +// VTABLE: LEGO1 0x100d9278 // SIZE 0xc4 class LegoHideAnimPresenter : public LegoLoopingAnimPresenter { public: LegoHideAnimPresenter(); - // OFFSET: LEGO1 0x1006d880 + // FUNCTION: LEGO1 0x1006d880 inline const char* ClassName() const override // vtable+0xc { - // 0x100f06cc + // GLOBAL: LEGO1 0x100f06cc return "LegoHideAnimPresenter"; } - // OFFSET: LEGO1 0x1006d890 + // FUNCTION: LEGO1 0x1006d890 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, ClassName()) || LegoAnimPresenter::IsA(name); diff --git a/LEGO1/legoinputmanager.cpp b/LEGO1/legoinputmanager.cpp index fb0fc079..3572c9bd 100644 --- a/LEGO1/legoinputmanager.cpp +++ b/LEGO1/legoinputmanager.cpp @@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(LegoInputManager, 0x338); DECOMP_SIZE_ASSERT(LegoEventQueue, 0x18); -// OFFSET: LEGO1 0x1005b790 +// FUNCTION: LEGO1 0x1005b790 LegoInputManager::LegoInputManager() { m_unk0x5c = NULL; @@ -34,20 +34,20 @@ LegoInputManager::LegoInputManager() m_timeout = 1000; } -// OFFSET: LEGO1 0x1005b8b0 STUB +// STUB: LEGO1 0x1005b8b0 MxResult LegoInputManager::Tickle() { ProcessEvents(); return SUCCESS; } -// OFFSET: LEGO1 0x1005b8f0 +// FUNCTION: LEGO1 0x1005b8f0 LegoInputManager::~LegoInputManager() { Destroy(); } -// OFFSET: LEGO1 0x1005b960 +// FUNCTION: LEGO1 0x1005b960 MxResult LegoInputManager::Create(HWND p_hwnd) { // TODO @@ -56,28 +56,28 @@ MxResult LegoInputManager::Create(HWND p_hwnd) return SUCCESS; } -// OFFSET: LEGO1 0x1005bb80 TEMPLATE +// TEMPLATE: LEGO1 0x1005bb80 // MxCollection::Compare -// OFFSET: LEGO1 0x1005bc30 TEMPLATE +// TEMPLATE: LEGO1 0x1005bc30 // MxCollection::Destroy -// OFFSET: LEGO1 0x1005bc80 TEMPLATE +// TEMPLATE: LEGO1 0x1005bc80 // MxList::~MxList -// OFFSET: LEGO1 0x1005bd50 TEMPLATE +// SYNTHETIC: LEGO1 0x1005bd50 // MxCollection::`scalar deleting destructor' -// OFFSET: LEGO1 0x1005bdc0 TEMPLATE +// SYNTHETIC: LEGO1 0x1005bdc0 // MxList::`scalar deleting destructor' -// OFFSET: LEGO1 0x1005beb0 TEMPLATE +// SYNTHETIC: LEGO1 0x1005beb0 // LegoEventQueue::`scalar deleting destructor' -// OFFSET: LEGO1 0x1005bf70 TEMPLATE +// SYNTHETIC: LEGO1 0x1005bf70 // MxQueue::`scalar deleting destructor' -// OFFSET: LEGO1 0x1005bfe0 +// FUNCTION: LEGO1 0x1005bfe0 void LegoInputManager::Destroy() { ReleaseDX(); @@ -94,7 +94,7 @@ void LegoInputManager::Destroy() delete m_controlManager; } -// OFFSET: LEGO1 0x1005c030 +// FUNCTION: LEGO1 0x1005c030 void LegoInputManager::CreateAndAcquireKeyboard(HWND hwnd) { HINSTANCE hinstance = (HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE); @@ -110,7 +110,7 @@ void LegoInputManager::CreateAndAcquireKeyboard(HWND hwnd) } } -// OFFSET: LEGO1 0x1005c0a0 +// FUNCTION: LEGO1 0x1005c0a0 void LegoInputManager::ReleaseDX() { if (m_directInputDevice != NULL) { @@ -125,7 +125,7 @@ void LegoInputManager::ReleaseDX() } } -// OFFSET: LEGO1 0x1005c240 +// FUNCTION: LEGO1 0x1005c240 MxResult LegoInputManager::GetJoystickId() { JOYINFOEX joyinfoex; @@ -157,7 +157,7 @@ MxResult LegoInputManager::GetJoystickId() return FAILURE; } -// OFFSET: LEGO1 0x1005c320 +// FUNCTION: LEGO1 0x1005c320 MxResult LegoInputManager::GetJoystickState( MxU32* joystick_x, MxU32* joystick_y, @@ -210,43 +210,43 @@ MxResult LegoInputManager::GetJoystickState( return FAILURE; } -// OFFSET: LEGO1 0x1005c470 STUB +// STUB: LEGO1 0x1005c470 void LegoInputManager::Register(MxCore*) { // TODO } -// OFFSET: LEGO1 0x1005c5c0 STUB +// STUB: LEGO1 0x1005c5c0 void LegoInputManager::UnRegister(MxCore*) { // TODO } -// OFFSET: LEGO1 0x1005c700 +// FUNCTION: LEGO1 0x1005c700 void LegoInputManager::SetCamera(LegoCameraController* p_camera) { m_camera = p_camera; } -// OFFSET: LEGO1 0x1005c710 +// FUNCTION: LEGO1 0x1005c710 void LegoInputManager::ClearCamera() { m_camera = NULL; } -// OFFSET: LEGO1 0x1005c720 +// FUNCTION: LEGO1 0x1005c720 void LegoInputManager::SetWorld(LegoWorld* p_world) { m_world = p_world; } -// OFFSET: LEGO1 0x1005c730 +// FUNCTION: LEGO1 0x1005c730 void LegoInputManager::ClearWorld() { m_world = NULL; } -// OFFSET: LEGO1 0x1005c740 +// FUNCTION: LEGO1 0x1005c740 void LegoInputManager::QueueEvent(NotificationId p_id, MxU8 p_modifier, MxLong p_x, MxLong p_y, MxU8 p_key) { LegoEventNotificationParam param = LegoEventNotificationParam(p_id, NULL, p_modifier, p_x, p_y, p_key); @@ -257,7 +257,7 @@ void LegoInputManager::QueueEvent(NotificationId p_id, MxU8 p_modifier, MxLong p } } -// OFFSET: LEGO1 0x1005c820 +// FUNCTION: LEGO1 0x1005c820 void LegoInputManager::ProcessEvents() { MxAutoLocker lock(&m_criticalSection); @@ -269,14 +269,14 @@ void LegoInputManager::ProcessEvents() } } -// OFFSET: LEGO1 0x1005c9c0 STUB +// STUB: LEGO1 0x1005c9c0 MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param) { // TODO return FALSE; } -// OFFSET: LEGO1 0x1005cfb0 +// FUNCTION: LEGO1 0x1005cfb0 void LegoInputManager::SetTimer() { LegoOmni* omni = LegoOmni::GetInstance(); @@ -284,7 +284,7 @@ void LegoInputManager::SetTimer() m_timer = timer; } -// OFFSET: LEGO1 0x1005cfd0 +// FUNCTION: LEGO1 0x1005cfd0 void LegoInputManager::KillTimer() { if (m_timer != 0) { @@ -293,5 +293,5 @@ void LegoInputManager::KillTimer() } } -// OFFSET: LEGO1 0x1005d010 TEMPLATE +// TEMPLATE: LEGO1 0x1005d010 // MxListEntry::GetValue diff --git a/LEGO1/legoinputmanager.h b/LEGO1/legoinputmanager.h index 542bd02d..9a4fe6e7 100644 --- a/LEGO1/legoinputmanager.h +++ b/LEGO1/legoinputmanager.h @@ -12,20 +12,20 @@ class LegoControlManager; -// VTABLE 0x100d87b8 TEMPLATE +// VTABLE: LEGO1 0x100d87b8 // class MxCollection -// VTABLE 0x100d87d0 TEMPLATE +// VTABLE: LEGO1 0x100d87d0 // class MxList -// VTABLE 0x100d87e8 TEMPLATE +// VTABLE: LEGO1 0x100d87e8 // class MxQueue -// VTABLE 0x100d8800 +// VTABLE: LEGO1 0x100d8800 // SIZE 0x18 class LegoEventQueue : public MxQueue {}; -// VTABLE 0x100d8760 +// VTABLE: LEGO1 0x100d8760 // SIZE 0x338 class LegoInputManager : public MxPresenter { public: diff --git a/LEGO1/legojetski.h b/LEGO1/legojetski.h index 4f6ce941..ca3d8da7 100644 --- a/LEGO1/legojetski.h +++ b/LEGO1/legojetski.h @@ -3,17 +3,17 @@ #include "legojetskiraceactor.h" -// VTABLE 0x100d5a40 +// VTABLE: LEGO1 0x100d5a40 class LegoJetski : public LegoJetskiRaceActor { public: - // OFFSET: LEGO1 0x10013e80 + // FUNCTION: LEGO1 0x10013e80 inline const char* ClassName() const override // vtable+0xc { - // 0x100f053c + // GLOBAL: LEGO1 0x100f053c return "LegoJetski"; } - // OFFSET: LEGO1 0x10013ea0 + // FUNCTION: LEGO1 0x10013ea0 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoJetski::ClassName()) || LegoJetskiRaceActor::IsA(name); diff --git a/LEGO1/legojetskiraceactor.h b/LEGO1/legojetskiraceactor.h index 7ec6256b..b7f04043 100644 --- a/LEGO1/legojetskiraceactor.h +++ b/LEGO1/legojetskiraceactor.h @@ -3,17 +3,17 @@ #include "legocarraceactor.h" -// VTABLE 0x100da240 +// VTABLE: LEGO1 0x100da240 class LegoJetskiRaceActor : public LegoCarRaceActor { public: - // OFFSET: LEGO1 0x10081d80 + // FUNCTION: LEGO1 0x10081d80 inline const char* ClassName() const override // vtable+0xc { - // 0x100f0554 + // GLOBAL: LEGO1 0x100f0554 return "LegoJetskiRaceActor"; } - // OFFSET: LEGO1 0x10081da0 + // FUNCTION: LEGO1 0x10081da0 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoJetskiRaceActor::ClassName()) || LegoCarRaceActor::IsA(name); diff --git a/LEGO1/legoloadcachesoundpresenter.cpp b/LEGO1/legoloadcachesoundpresenter.cpp index 5ee18887..4bc2cbd6 100644 --- a/LEGO1/legoloadcachesoundpresenter.cpp +++ b/LEGO1/legoloadcachesoundpresenter.cpp @@ -1,18 +1,18 @@ #include "legoloadcachesoundpresenter.h" -// OFFSET: LEGO1 0x10018340 +// FUNCTION: LEGO1 0x10018340 LegoLoadCacheSoundPresenter::LegoLoadCacheSoundPresenter() { Init(); } -// OFFSET: LEGO1 0x10018480 STUB +// STUB: LEGO1 0x10018480 LegoLoadCacheSoundPresenter::~LegoLoadCacheSoundPresenter() { // TODO } -// OFFSET: LEGO1 0x100184e0 STUB +// STUB: LEGO1 0x100184e0 void LegoLoadCacheSoundPresenter::Init() { // TODO diff --git a/LEGO1/legoloadcachesoundpresenter.h b/LEGO1/legoloadcachesoundpresenter.h index b765ec2d..6f9f473b 100644 --- a/LEGO1/legoloadcachesoundpresenter.h +++ b/LEGO1/legoloadcachesoundpresenter.h @@ -3,17 +3,17 @@ #include "mxwavepresenter.h" -// VTABLE 0x100d5fa8 +// VTABLE: LEGO1 0x100d5fa8 // SIZE 0x90 class LegoLoadCacheSoundPresenter : public MxWavePresenter { public: LegoLoadCacheSoundPresenter(); virtual ~LegoLoadCacheSoundPresenter() override; - // OFFSET: LEGO1 0x10018450 + // FUNCTION: LEGO1 0x10018450 inline const char* ClassName() const override // vtable+0xc { - // 0x100f05a0 + // GLOBAL: LEGO1 0x100f05a0 return "LegoLoadCacheSoundPresenter"; } diff --git a/LEGO1/legolocomotionanimpresenter.cpp b/LEGO1/legolocomotionanimpresenter.cpp index c73462c9..27d6e421 100644 --- a/LEGO1/legolocomotionanimpresenter.cpp +++ b/LEGO1/legolocomotionanimpresenter.cpp @@ -1,12 +1,12 @@ #include "legolocomotionanimpresenter.h" -// OFFSET: LEGO1 0x1006cdd0 +// FUNCTION: LEGO1 0x1006cdd0 LegoLocomotionAnimPresenter::LegoLocomotionAnimPresenter() { Init(); } -// OFFSET: LEGO1 0x1006d0b0 STUB +// STUB: LEGO1 0x1006d0b0 void LegoLocomotionAnimPresenter::Init() { // TODO diff --git a/LEGO1/legolocomotionanimpresenter.h b/LEGO1/legolocomotionanimpresenter.h index 93c84794..8a4cf5a6 100644 --- a/LEGO1/legolocomotionanimpresenter.h +++ b/LEGO1/legolocomotionanimpresenter.h @@ -3,19 +3,19 @@ #include "legoloopinganimpresenter.h" -// VTABLE 0x100d9170 +// VTABLE: LEGO1 0x100d9170 class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter { public: LegoLocomotionAnimPresenter(); - // OFFSET: LEGO1 0x1006ce50 + // FUNCTION: LEGO1 0x1006ce50 inline const char* ClassName() const override // vtable+0xc { - // 0x100f06e4 + // GLOBAL: LEGO1 0x100f06e4 return "LegoLocomotionAnimPresenter"; } - // OFFSET: LEGO1 0x1006ce60 + // FUNCTION: LEGO1 0x1006ce60 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, ClassName()) || LegoLoopingAnimPresenter::IsA(name); diff --git a/LEGO1/legoloopinganimpresenter.h b/LEGO1/legoloopinganimpresenter.h index 5cb431c2..b3ea4fb8 100644 --- a/LEGO1/legoloopinganimpresenter.h +++ b/LEGO1/legoloopinganimpresenter.h @@ -3,18 +3,18 @@ #include "legoanimpresenter.h" -// VTABLE 0x100d4900 +// VTABLE: LEGO1 0x100d4900 // SIZE 0xc0 (discovered through inlined constructor at 0x10009ecd) class LegoLoopingAnimPresenter : public LegoAnimPresenter { public: - // OFFSET: LEGO1 0x1000c9a0 + // FUNCTION: LEGO1 0x1000c9a0 inline const char* ClassName() const override // vtable+0xc { - // 0x100f0700 + // GLOBAL: LEGO1 0x100f0700 return "LegoLoopingAnimPresenter"; } - // OFFSET: LEGO1 0x1000c9b0 + // FUNCTION: LEGO1 0x1000c9b0 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, ClassName()) || LegoAnimPresenter::IsA(name); diff --git a/LEGO1/legometerpresenter.h b/LEGO1/legometerpresenter.h index 2803003b..023a7bfa 100644 --- a/LEGO1/legometerpresenter.h +++ b/LEGO1/legometerpresenter.h @@ -3,7 +3,7 @@ #include "mxstillpresenter.h" -// VTABLE 0x100d7ac8 +// VTABLE: LEGO1 0x100d7ac8 // SIZE 0x94 (from 0x1000a163) class LegoMeterPresenter : public MxStillPresenter { public: diff --git a/LEGO1/legomodelpresenter.cpp b/LEGO1/legomodelpresenter.cpp index effaf5b9..99e73b65 100644 --- a/LEGO1/legomodelpresenter.cpp +++ b/LEGO1/legomodelpresenter.cpp @@ -1,9 +1,9 @@ #include "legomodelpresenter.h" -// 0x100f7ae0 +// GLOBAL: LEGO1 0x100f7ae0 int g_modelPresenterConfig = 1; -// OFFSET: LEGO1 0x1007f660 +// FUNCTION: LEGO1 0x1007f660 void LegoModelPresenter::configureLegoModelPresenter(int param_1) { g_modelPresenterConfig = param_1; diff --git a/LEGO1/legomodelpresenter.h b/LEGO1/legomodelpresenter.h index 1d36e015..c389cb0e 100644 --- a/LEGO1/legomodelpresenter.h +++ b/LEGO1/legomodelpresenter.h @@ -3,20 +3,20 @@ #include "mxvideopresenter.h" -// VTABLE 0x100d4e50 +// VTABLE: LEGO1 0x100d4e50 // SIZE 0x6c (discovered through inline constructor at 0x10009ae6) class LegoModelPresenter : public MxVideoPresenter { public: __declspec(dllexport) static void configureLegoModelPresenter(int param_1); - // OFFSET: LEGO1 0x1000ccb0 + // FUNCTION: LEGO1 0x1000ccb0 inline const char* ClassName() const override // vtable+0xc { - // 0x100f067c + // GLOBAL: LEGO1 0x100f067c return "LegoModelPresenter"; } - // OFFSET: LEGO1 0x1000ccc0 + // FUNCTION: LEGO1 0x1000ccc0 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoModelPresenter::ClassName()) || MxVideoPresenter::IsA(name); diff --git a/LEGO1/legonavcontroller.cpp b/LEGO1/legonavcontroller.cpp index 0ba619e6..b4bf4f0f 100644 --- a/LEGO1/legonavcontroller.cpp +++ b/LEGO1/legonavcontroller.cpp @@ -5,32 +5,32 @@ #include "legoutil.h" #include "legovideomanager.h" -// 0x100f4c28 +// GLOBAL: LEGO1 0x100f4c28 int g_mouseDeadzone = 40; -// 0x100f4c2c +// GLOBAL: LEGO1 0x100f4c2c float g_zeroThreshold = 0.001f; -// 0x100f4c30 +// GLOBAL: LEGO1 0x100f4c30 float g_movementMaxSpeed = 40.0f; -// 0x100f4c34 +// GLOBAL: LEGO1 0x100f4c34 float g_turnMaxSpeed = 20.0f; -// 0x100f4c38 +// GLOBAL: LEGO1 0x100f4c38 float g_movementMaxAccel = 15.0f; -// 0x100f4c3c +// GLOBAL: LEGO1 0x100f4c3c float g_turnMaxAccel = 30.0f; -// 0x100f4c40 +// GLOBAL: LEGO1 0x100f4c40 float g_movementMinAccel = 4.0f; -// 0x100f4c44 +// GLOBAL: LEGO1 0x100f4c44 float g_turnMinAccel = 15.0f; -// 0x100f4c48 +// GLOBAL: LEGO1 0x100f4c48 float g_movementDecel = 50.0f; -// 0x100f4c4c +// GLOBAL: LEGO1 0x100f4c4c float g_turnDecel = 50.0f; -// 0x100f4c50 +// GLOBAL: LEGO1 0x100f4c50 float g_turnSensitivity = 0.4f; -// 0x100f4c54 +// GLOBAL: LEGO1 0x100f4c54 MxBool g_turnUseVelocity = FALSE; -// OFFSET: LEGO1 0x10054ac0 +// FUNCTION: LEGO1 0x10054ac0 LegoNavController::LegoNavController() { ResetToDefault(); @@ -54,13 +54,13 @@ LegoNavController::LegoNavController() InputManager()->Register(this); } -// OFFSET: LEGO1 0x10054c30 +// FUNCTION: LEGO1 0x10054c30 LegoNavController::~LegoNavController() { InputManager()->UnRegister(this); } -// OFFSET: LEGO1 0x10054ca0 +// FUNCTION: LEGO1 0x10054ca0 void LegoNavController::SetControlMax(int p_hMax, int p_vMax) { this->m_hMax = p_hMax; @@ -72,7 +72,7 @@ void LegoNavController::SetControlMax(int p_hMax, int p_vMax) } } -// OFFSET: LEGO1 0x10054cd0 +// FUNCTION: LEGO1 0x10054cd0 void LegoNavController::ResetToDefault() { this->m_mouseDeadzone = g_mouseDeadzone; @@ -89,7 +89,7 @@ void LegoNavController::ResetToDefault() this->m_turnSensitivity = g_turnSensitivity; } -// OFFSET: LEGO1 0x10054d40 +// FUNCTION: LEGO1 0x10054d40 void LegoNavController::GetDefaults( int* p_mouseDeadzone, float* p_movementMaxSpeed, @@ -117,7 +117,7 @@ void LegoNavController::GetDefaults( *p_turnUseVelocity = g_turnUseVelocity; } -// OFFSET: LEGO1 0x10054dd0 +// FUNCTION: LEGO1 0x10054dd0 void LegoNavController::SetDefaults( int p_mouseDeadzone, float p_movementMaxSpeed, @@ -145,7 +145,7 @@ void LegoNavController::SetDefaults( g_turnUseVelocity = p_turnUseVelocity; } -// OFFSET: LEGO1 0x10054e40 +// FUNCTION: LEGO1 0x10054e40 void LegoNavController::SetTargets(int p_hPos, int p_vPos, MxBool p_accel) { if (this->m_trackDefault != FALSE) @@ -172,7 +172,7 @@ void LegoNavController::SetTargets(int p_hPos, int p_vPos, MxBool p_accel) } } -// OFFSET: LEGO1 0x10054f10 +// FUNCTION: LEGO1 0x10054f10 float LegoNavController::CalculateNewTargetSpeed(int p_pos, int p_center, float p_maxSpeed) { float result; @@ -188,7 +188,7 @@ float LegoNavController::CalculateNewTargetSpeed(int p_pos, int p_center, float return result; } -// OFFSET: LEGO1 0x10054f90 +// FUNCTION: LEGO1 0x10054f90 float LegoNavController::CalculateNewAccel(int p_pos, int p_center, float p_maxAccel, int p_minAccel) { float result; @@ -202,7 +202,7 @@ float LegoNavController::CalculateNewAccel(int p_pos, int p_center, float p_maxA return result; } -// OFFSET: LEGO1 0x10054fe0 +// FUNCTION: LEGO1 0x10054fe0 float LegoNavController::CalculateNewVel(float p_targetVel, float p_currentVel, float p_accel, float p_time) { float newVel = p_currentVel; diff --git a/LEGO1/legonavcontroller.h b/LEGO1/legonavcontroller.h index f7cfa3da..1758b6af 100644 --- a/LEGO1/legonavcontroller.h +++ b/LEGO1/legonavcontroller.h @@ -5,7 +5,7 @@ #include "mxtimer.h" #include "mxtypes.h" -// VTABLE 0x100d85b8 +// VTABLE: LEGO1 0x100d85b8 // SIZE 0x70 class LegoNavController : public MxCore { public: @@ -39,14 +39,14 @@ class LegoNavController : public MxCore { LegoNavController(); virtual ~LegoNavController() override; // vtable+0x0 - // OFFSET: LEGO1 0x10054b80 + // FUNCTION: LEGO1 0x10054b80 inline const char* ClassName() const override // vtable+0xc { - // 0x100f66d8 + // GLOBAL: LEGO1 0x100f66d8 return "LegoNavController"; } - // OFFSET: LEGO1 0x10054b90 + // FUNCTION: LEGO1 0x10054b90 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/legoobjectfactory.cpp b/LEGO1/legoobjectfactory.cpp index db59ad5e..2c77c7a9 100644 --- a/LEGO1/legoobjectfactory.cpp +++ b/LEGO1/legoobjectfactory.cpp @@ -6,7 +6,7 @@ // TODO: Uncomment once we have all the relevant types ready // DECOMP_SIZE_ASSERT(LegoObjectFactory, 0x1c8); -// OFFSET: LEGO1 0x10006e40 +// FUNCTION: LEGO1 0x10006e40 LegoObjectFactory::LegoObjectFactory() { #define X(V) this->m_id##V = MxAtomId(#V, LookupMode_Exact); @@ -14,7 +14,7 @@ LegoObjectFactory::LegoObjectFactory() #undef X } -// OFFSET: LEGO1 0x10009a90 +// FUNCTION: LEGO1 0x10009a90 MxCore* LegoObjectFactory::Create(const char* p_name) { MxAtomId atom(p_name, LookupMode_Exact); @@ -31,7 +31,7 @@ MxCore* LegoObjectFactory::Create(const char* p_name) } } -// OFFSET: LEGO1 0x1000fb30 +// FUNCTION: LEGO1 0x1000fb30 void LegoObjectFactory::Destroy(MxCore* p_object) { delete p_object; diff --git a/LEGO1/legoobjectfactory.h b/LEGO1/legoobjectfactory.h index ca0d8d60..82117d34 100644 --- a/LEGO1/legoobjectfactory.h +++ b/LEGO1/legoobjectfactory.h @@ -5,7 +5,7 @@ #define FOR_LEGOOBJECTFACTORY_OBJECTS(X) X(InfocenterState) -// VTABLE 0x100d4768 +// VTABLE: LEGO1 0x100d4768 class LegoObjectFactory : public MxObjectFactory { public: LegoObjectFactory(); diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index 50c800fa..887b8cad 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -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; diff --git a/LEGO1/legoomni.h b/LEGO1/legoomni.h index 3406bd6c..d5063235 100644 --- a/LEGO1/legoomni.h +++ b/LEGO1/legoomni.h @@ -55,7 +55,7 @@ extern MxAtomId* g_sndAnimScript; extern MxAtomId* g_creditsScript; extern MxAtomId* g_nocdSourceName; -// VTABLE 0x100d8638 +// VTABLE: LEGO1 0x100d8638 // SIZE: 0x140 class LegoOmni : public MxOmni { public: @@ -70,14 +70,14 @@ class LegoOmni : public MxOmni { virtual MxLong Notify(MxParam& p) override; // vtable+04 - // OFFSET: LEGO1 0x10058aa0 + // FUNCTION: LEGO1 0x10058aa0 inline virtual const char* ClassName() const override // vtable+0c { - // 0x100f671c + // GLOBAL: LEGO1 0x100f671c return "LegoOmni"; } - // OFFSET: LEGO1 0x10058ab0 + // FUNCTION: LEGO1 0x10058ab0 inline virtual MxBool IsA(const char* name) const override // vtable+10 { return !strcmp(name, LegoOmni::ClassName()) || MxOmni::IsA(name); diff --git a/LEGO1/legopalettepresenter.cpp b/LEGO1/legopalettepresenter.cpp index 6b3981a7..5ee9279f 100644 --- a/LEGO1/legopalettepresenter.cpp +++ b/LEGO1/legopalettepresenter.cpp @@ -2,25 +2,25 @@ DECOMP_SIZE_ASSERT(LegoPalettePresenter, 0x68) -// OFFSET: LEGO1 0x10079e50 +// FUNCTION: LEGO1 0x10079e50 LegoPalettePresenter::LegoPalettePresenter() { Init(); } -// OFFSET: LEGO1 0x1007a070 +// FUNCTION: LEGO1 0x1007a070 LegoPalettePresenter::~LegoPalettePresenter() { Destroy(TRUE); } -// OFFSET: LEGO1 0x1007a0d0 +// FUNCTION: LEGO1 0x1007a0d0 void LegoPalettePresenter::Init() { m_palette = NULL; } -// OFFSET: LEGO1 0x1007a0e0 +// FUNCTION: LEGO1 0x1007a0e0 void LegoPalettePresenter::Destroy(MxBool p_fromDestructor) { m_criticalSection.Enter(); @@ -34,7 +34,7 @@ void LegoPalettePresenter::Destroy(MxBool p_fromDestructor) } } -// OFFSET: LEGO1 0x1007a120 +// FUNCTION: LEGO1 0x1007a120 void LegoPalettePresenter::Destroy() { Destroy(FALSE); diff --git a/LEGO1/legopalettepresenter.h b/LEGO1/legopalettepresenter.h index 1f68fac8..c0b001fd 100644 --- a/LEGO1/legopalettepresenter.h +++ b/LEGO1/legopalettepresenter.h @@ -5,21 +5,21 @@ #include "mxpalette.h" #include "mxvideopresenter.h" -// VTABLE 0x100d9aa0 +// VTABLE: LEGO1 0x100d9aa0 // SIZE 0x68 class LegoPalettePresenter : public MxVideoPresenter { public: LegoPalettePresenter(); virtual ~LegoPalettePresenter() override; // vtable+0x0 - // OFFSET: LEGO1 0x10079f30 + // FUNCTION: LEGO1 0x10079f30 inline const char* ClassName() const override // vtable+0xc { - // 0x100f061c + // GLOBAL: LEGO1 0x100f061c return "LegoPalettePresenter"; } - // OFFSET: LEGO1 0x10079f40 + // FUNCTION: LEGO1 0x10079f40 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, ClassName()) || MxVideoPresenter::IsA(name); diff --git a/LEGO1/legopartpresenter.cpp b/LEGO1/legopartpresenter.cpp index 5a60a824..6733081f 100644 --- a/LEGO1/legopartpresenter.cpp +++ b/LEGO1/legopartpresenter.cpp @@ -1,12 +1,12 @@ #include "legopartpresenter.h" -// 0x100f7aa0 +// GLOBAL: LEGO1 0x100f7aa0 int g_partPresenterConfig1 = 1; -// 0x100f7aa4 +// GLOBAL: LEGO1 0x100f7aa4 int g_partPresenterConfig2 = 100; -// OFFSET: LEGO1 0x1007c990 +// FUNCTION: LEGO1 0x1007c990 void LegoPartPresenter::configureLegoPartPresenter(int param_1, int param_2) { g_partPresenterConfig1 = param_1; diff --git a/LEGO1/legopartpresenter.h b/LEGO1/legopartpresenter.h index baee2dfd..7c1be719 100644 --- a/LEGO1/legopartpresenter.h +++ b/LEGO1/legopartpresenter.h @@ -3,18 +3,18 @@ #include "mxmediapresenter.h" -// VTABLE 0x100d4df0 +// VTABLE: LEGO1 0x100d4df0 // SIZE 0x54 (from inlined construction at 0x10009fac) class LegoPartPresenter : public MxMediaPresenter { public: - // OFFSET: LEGO1 0x1000cf70 + // FUNCTION: LEGO1 0x1000cf70 inline const char* ClassName() const override // vtable+0xc { - // 0x100f05d8 + // GLOBAL: LEGO1 0x100f05d8 return "LegoPartPresenter"; } - // OFFSET: LEGO1 0x1000cf80 + // FUNCTION: LEGO1 0x1000cf80 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoPartPresenter::ClassName()) || MxMediaPresenter::IsA(name); diff --git a/LEGO1/legopathactor.cpp b/LEGO1/legopathactor.cpp index 58e9371b..a87355f6 100644 --- a/LEGO1/legopathactor.cpp +++ b/LEGO1/legopathactor.cpp @@ -3,164 +3,164 @@ DECOMP_SIZE_ASSERT(LegoPathActor, 0x154) // Probably in header -// OFFSET: LEGO1 0x10002d20 STUB +// STUB: LEGO1 0x10002d20 void LegoPathActor::VTable0x78() { // TODO } -// OFFSET: LEGO1 0x10002d30 STUB +// STUB: LEGO1 0x10002d30 void LegoPathActor::VTable0x7c() { // TODO } -// OFFSET: LEGO1 0x10002d40 STUB +// STUB: LEGO1 0x10002d40 void LegoPathActor::VTable0x90() { // TODO } -// OFFSET: LEGO1 0x10002d50 STUB +// STUB: LEGO1 0x10002d50 void LegoPathActor::VTable0x94() { // TODO } -// OFFSET: LEGO1 0x10002d60 STUB +// STUB: LEGO1 0x10002d60 void LegoPathActor::VTable0xa0() { // TODO } -// OFFSET: LEGO1 0x10002d70 STUB +// STUB: LEGO1 0x10002d70 void LegoPathActor::VTable0xac() { // TODO } -// OFFSET: LEGO1 0x10002d80 STUB +// STUB: LEGO1 0x10002d80 void LegoPathActor::VTable0xb0() { // TODO } -// OFFSET: LEGO1 0x10002d90 STUB +// STUB: LEGO1 0x10002d90 void LegoPathActor::VTable0xb4() { // TODO } -// OFFSET: LEGO1 0x10002da0 STUB +// STUB: LEGO1 0x10002da0 void LegoPathActor::VTable0xb8() { // TODO } -// OFFSET: LEGO1 0x10002db0 STUB +// STUB: LEGO1 0x10002db0 void LegoPathActor::VTable0xbc() { // TODO } -// OFFSET: LEGO1 0x10002dc0 STUB +// STUB: LEGO1 0x10002dc0 void LegoPathActor::VTable0xc0() { // TODO } -// OFFSET: LEGO1 0x10002dd0 STUB +// STUB: LEGO1 0x10002dd0 void LegoPathActor::VTable0xc4() { // TODO } -// OFFSET: LEGO1 0x10002de0 STUB +// STUB: LEGO1 0x10002de0 void LegoPathActor::VTable0xc8() { // TODO } // End header -// OFFSET: LEGO1 0x1002d700 STUB +// STUB: LEGO1 0x1002d700 LegoPathActor::LegoPathActor() { // TODO } -// OFFSET: LEGO1 0x1002d820 STUB +// STUB: LEGO1 0x1002d820 LegoPathActor::~LegoPathActor() { // TODO } -// OFFSET: LEGO1 0x1002d8d0 STUB +// STUB: LEGO1 0x1002d8d0 void LegoPathActor::VTable0x80() { // TODO } -// OFFSET: LEGO1 0x1002d9c0 STUB +// STUB: LEGO1 0x1002d9c0 void LegoPathActor::VTable0x88() { // TODO } -// OFFSET: LEGO1 0x1002de10 STUB +// STUB: LEGO1 0x1002de10 void LegoPathActor::VTable0x84() { // TODO } -// OFFSET: LEGO1 0x1002e100 STUB +// STUB: LEGO1 0x1002e100 void LegoPathActor::VTable0x8c() { // TODO } -// OFFSET: LEGO1 0x1002e740 STUB +// STUB: LEGO1 0x1002e740 void LegoPathActor::VTable0x74() { // TODO } -// OFFSET: LEGO1 0x1002e790 STUB +// STUB: LEGO1 0x1002e790 void LegoPathActor::VTable0x70() { // TODO } -// OFFSET: LEGO1 0x1002e8b0 STUB +// STUB: LEGO1 0x1002e8b0 void LegoPathActor::VTable0x98() { // TODO } -// OFFSET: LEGO1 0x1002e8d0 STUB +// STUB: LEGO1 0x1002e8d0 void LegoPathActor::VTable0x6c() { // TODO } -// OFFSET: LEGO1 0x1002ebe0 STUB +// STUB: LEGO1 0x1002ebe0 void LegoPathActor::VTable0x68() { // TODO } -// OFFSET: LEGO1 0x1002f1b0 STUB +// STUB: LEGO1 0x1002f1b0 void LegoPathActor::VTable0x9c() { // TODO } -// OFFSET: LEGO1 0x1002f650 STUB +// STUB: LEGO1 0x1002f650 void LegoPathActor::VTable0xa4() { // TODO } -// OFFSET: LEGO1 0x1002f700 STUB +// STUB: LEGO1 0x1002f700 void LegoPathActor::VTable0xa8() { // TODO diff --git a/LEGO1/legopathactor.h b/LEGO1/legopathactor.h index df6f30af..fbf2a51c 100644 --- a/LEGO1/legopathactor.h +++ b/LEGO1/legopathactor.h @@ -4,7 +4,7 @@ #include "legoactor.h" #include "mxtypes.h" -// VTABLE 0x100d6e28 +// VTABLE: LEGO1 0x100d6e28 // SIZE 0x154 (from inlined construction at 0x1000a346) class LegoPathActor : public LegoActor { public: @@ -12,14 +12,14 @@ class LegoPathActor : public LegoActor { virtual ~LegoPathActor() override; - // OFFSET: LEGO1 0x1000c430 + // FUNCTION: LEGO1 0x1000c430 inline const char* ClassName() const override // vtable+0xc { - // 0x100f0114 + // GLOBAL: LEGO1 0x100f0114 return "LegoPathActor"; } - // OFFSET: LEGO1 0x1000c440 + // FUNCTION: LEGO1 0x1000c440 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoPathActor::ClassName()) || LegoActor::IsA(name); diff --git a/LEGO1/legopathcontroller.cpp b/LEGO1/legopathcontroller.cpp index 23d8ea9f..a636253a 100644 --- a/LEGO1/legopathcontroller.cpp +++ b/LEGO1/legopathcontroller.cpp @@ -1,18 +1,18 @@ #include "legopathcontroller.h" -// OFFSET: LEGO1 0x10044f40 STUB +// STUB: LEGO1 0x10044f40 LegoPathController::LegoPathController() { // TODO } -// OFFSET: LEGO1 0x10045740 STUB +// STUB: LEGO1 0x10045740 LegoPathController::~LegoPathController() { // TODO } -// OFFSET: LEGO1 0x10045c10 STUB +// STUB: LEGO1 0x10045c10 MxResult LegoPathController::Tickle() { // TODO diff --git a/LEGO1/legopathcontroller.h b/LEGO1/legopathcontroller.h index 82ac1fe9..612b6d9f 100644 --- a/LEGO1/legopathcontroller.h +++ b/LEGO1/legopathcontroller.h @@ -3,7 +3,7 @@ #include "mxcore.h" -// VTABLE 0x100d7d60 +// VTABLE: LEGO1 0x100d7d60 // SIZE 0x40 class LegoPathController : public MxCore { public: @@ -12,14 +12,14 @@ class LegoPathController : public MxCore { virtual MxResult Tickle() override; // vtable+08 - // OFFSET: LEGO1 0x10045110 + // FUNCTION: LEGO1 0x10045110 inline const char* ClassName() const override // vtable+0xc { - // 0x100f11b8 + // GLOBAL: LEGO1 0x100f11b8 return "LegoPathController"; } - // OFFSET: LEGO1 0x10045120 + // FUNCTION: LEGO1 0x10045120 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoPathController::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/legopathcontrollerlist.cpp b/LEGO1/legopathcontrollerlist.cpp index 762217c0..457729a4 100644 --- a/LEGO1/legopathcontrollerlist.cpp +++ b/LEGO1/legopathcontrollerlist.cpp @@ -5,38 +5,38 @@ DECOMP_SIZE_ASSERT(LegoPathControllerList, 0x18); -// OFFSET: LEGO1 0x1001d210 +// FUNCTION: LEGO1 0x1001d210 MxS8 LegoPathControllerList::Compare(LegoPathController* p_a, LegoPathController* p_b) { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } -// OFFSET: LEGO1 0x1001d230 TEMPLATE +// TEMPLATE: LEGO1 0x1001d230 // MxCollection::Compare -// OFFSET: LEGO1 0x1001d240 TEMPLATE +// TEMPLATE: LEGO1 0x1001d240 // MxList::MxList -// OFFSET: LEGO1 0x1001d2d0 TEMPLATE +// TEMPLATE: LEGO1 0x1001d2d0 // MxCollection::~MxCollection -// OFFSET: LEGO1 0x1001d320 TEMPLATE +// TEMPLATE: LEGO1 0x1001d320 // MxCollection::Destroy -// OFFSET: LEGO1 0x1001d330 TEMPLATE +// TEMPLATE: LEGO1 0x1001d330 // MxList::~MxList -// OFFSET: LEGO1 0x1001d3c0 +// FUNCTION: LEGO1 0x1001d3c0 void LegoPathControllerList::Destroy(LegoPathController* p_controller) { delete p_controller; } -// OFFSET: LEGO1 0x1001d490 TEMPLATE +// SYNTHETIC: LEGO1 0x1001d490 // MxCollection::`scalar deleting destructor' -// OFFSET: LEGO1 0x1001d500 TEMPLATE +// SYNTHETIC: LEGO1 0x1001d500 // MxList::`scalar deleting destructor' -// OFFSET: LEGO1 0x1001d5b0 TEMPLATE +// SYNTHETIC: LEGO1 0x1001d5b0 // MxPtrList::`scalar deleting destructor' diff --git a/LEGO1/legopathcontrollerlist.h b/LEGO1/legopathcontrollerlist.h index f69472d6..5a7d4c60 100644 --- a/LEGO1/legopathcontrollerlist.h +++ b/LEGO1/legopathcontrollerlist.h @@ -5,10 +5,10 @@ #include "mxlist.h" #include "mxtypes.h" -// VTABLE 0x100d6320 TEMPLATE +// VTABLE: LEGO1 0x100d6320 // class MxPtrList -// VTABLE 0x100d6338 +// VTABLE: LEGO1 0x100d6338 // SIZE 0x18 class LegoPathControllerList : public MxPtrList { public: @@ -17,10 +17,10 @@ class LegoPathControllerList : public MxPtrList { static void Destroy(LegoPathController*); }; -// VTABLE 0x100d6380 TEMPLATE +// VTABLE: LEGO1 0x100d6380 // class MxCollection -// VTABLE 0x100d6398 TEMPLATE +// VTABLE: LEGO1 0x100d6398 // class MxList #endif // LEGOPATHCONTROLLERLIST_H diff --git a/LEGO1/legopathpresenter.cpp b/LEGO1/legopathpresenter.cpp index 1e779f4a..b8ab8faf 100644 --- a/LEGO1/legopathpresenter.cpp +++ b/LEGO1/legopathpresenter.cpp @@ -6,18 +6,18 @@ DECOMP_SIZE_ASSERT(LegoPathPresenter, 0x54); -// OFFSET: LEGO1 0x100448d0 +// FUNCTION: LEGO1 0x100448d0 LegoPathPresenter::LegoPathPresenter() { Init(); } -// OFFSET: LEGO1 0x10044ab0 +// FUNCTION: LEGO1 0x10044ab0 void LegoPathPresenter::Init() { } -// OFFSET: LEGO1 0x10044b40 +// FUNCTION: LEGO1 0x10044b40 MxResult LegoPathPresenter::AddToManager() { MxResult status = FAILURE; @@ -30,7 +30,7 @@ MxResult LegoPathPresenter::AddToManager() return status; } -// OFFSET: LEGO1 0x10044b70 +// FUNCTION: LEGO1 0x10044b70 void LegoPathPresenter::Destroy(MxBool p_fromDestructor) { if (VideoManager()) @@ -45,13 +45,13 @@ void LegoPathPresenter::Destroy(MxBool p_fromDestructor) MxMediaPresenter::Destroy(FALSE); } -// OFFSET: LEGO1 0x10044c10 +// FUNCTION: LEGO1 0x10044c10 void LegoPathPresenter::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x10044d40 +// FUNCTION: LEGO1 0x10044d40 void LegoPathPresenter::RepeatingTickle() { if (this->m_action->GetDuration() == -1) @@ -60,7 +60,7 @@ void LegoPathPresenter::RepeatingTickle() EndAction(); } -// OFFSET: LEGO1 0x10044d60 STUB +// STUB: LEGO1 0x10044d60 void LegoPathPresenter::ParseExtra() { // TODO diff --git a/LEGO1/legopathpresenter.h b/LEGO1/legopathpresenter.h index 8e4881fb..c93caef5 100644 --- a/LEGO1/legopathpresenter.h +++ b/LEGO1/legopathpresenter.h @@ -3,20 +3,20 @@ #include "mxmediapresenter.h" -// VTABLE 0x100d7c10 +// VTABLE: LEGO1 0x100d7c10 // SIZE 0x54 class LegoPathPresenter : public MxMediaPresenter { public: LegoPathPresenter(); - // OFFSET: LEGO1 0x100449a0 + // FUNCTION: LEGO1 0x100449a0 inline const char* ClassName() const override // vtable+0xc { - // 0x100f0690 + // GLOBAL: LEGO1 0x100f0690 return "LegoPathPresenter"; } - // OFFSET: LEGO1 0x100449b0 + // FUNCTION: LEGO1 0x100449b0 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoPathPresenter::ClassName()) || MxMediaPresenter::IsA(name); diff --git a/LEGO1/legophonemepresenter.cpp b/LEGO1/legophonemepresenter.cpp index 445f94f3..f96d3760 100644 --- a/LEGO1/legophonemepresenter.cpp +++ b/LEGO1/legophonemepresenter.cpp @@ -2,18 +2,18 @@ DECOMP_SIZE_ASSERT(LegoPhonemePresenter, 0x88); -// OFFSET: LEGO1 0x1004e180 +// FUNCTION: LEGO1 0x1004e180 LegoPhonemePresenter::LegoPhonemePresenter() { Init(); } -// OFFSET: LEGO1 0x1004e340 +// FUNCTION: LEGO1 0x1004e340 LegoPhonemePresenter::~LegoPhonemePresenter() { } -// OFFSET: LEGO1 0x1004e3b0 +// FUNCTION: LEGO1 0x1004e3b0 void LegoPhonemePresenter::Init() { m_unk68 = 0; diff --git a/LEGO1/legophonemepresenter.h b/LEGO1/legophonemepresenter.h index 2e784ed7..00fa6dde 100644 --- a/LEGO1/legophonemepresenter.h +++ b/LEGO1/legophonemepresenter.h @@ -6,17 +6,17 @@ #include "mxstring.h" #include "mxtypes.h" -// VTABLE 0x100d8040 +// VTABLE: LEGO1 0x100d8040 // SIZE 0x88 class LegoPhonemePresenter : public MxFlcPresenter { public: LegoPhonemePresenter(); virtual ~LegoPhonemePresenter() override; // vtable+0x0 - // OFFSET: LEGO1 0x1004e310 + // FUNCTION: LEGO1 0x1004e310 inline const char* ClassName() const override // vtable+0xc { - // 0x100f064c + // GLOBAL: LEGO1 0x100f064c return "LegoPhonemePresenter"; } diff --git a/LEGO1/legoplantmanager.cpp b/LEGO1/legoplantmanager.cpp index b93a20d8..4b93d8d7 100644 --- a/LEGO1/legoplantmanager.cpp +++ b/LEGO1/legoplantmanager.cpp @@ -1,24 +1,24 @@ #include "legoplantmanager.h" -// OFFSET: LEGO1 0x10026220 +// FUNCTION: LEGO1 0x10026220 LegoPlantManager::LegoPlantManager() { Init(); } -// OFFSET: LEGO1 0x100262c0 STUB +// STUB: LEGO1 0x100262c0 LegoPlantManager::~LegoPlantManager() { // TODO } -// OFFSET: LEGO1 0x10026330 STUB +// STUB: LEGO1 0x10026330 void LegoPlantManager::Init() { // TODO } -// OFFSET: LEGO1 0x10026e00 STUB +// STUB: LEGO1 0x10026e00 MxResult LegoPlantManager::Tickle() { // TODO diff --git a/LEGO1/legoplantmanager.h b/LEGO1/legoplantmanager.h index 087a0f6e..87a6ec79 100644 --- a/LEGO1/legoplantmanager.h +++ b/LEGO1/legoplantmanager.h @@ -3,7 +3,7 @@ #include "mxcore.h" -// VTABLE 0x100d6758 +// VTABLE: LEGO1 0x100d6758 // SIZE 0x2c class LegoPlantManager : public MxCore { public: @@ -12,10 +12,10 @@ class LegoPlantManager : public MxCore { virtual MxResult Tickle() override; // vtable+0x8 - // OFFSET: LEGO1 0x10026290 + // FUNCTION: LEGO1 0x10026290 inline const char* ClassName() const override // vtable+0xc { - // 0x100f318c + // GLOBAL: LEGO1 0x100f318c return "LegoPlantManager"; } diff --git a/LEGO1/legorace.cpp b/LEGO1/legorace.cpp index 75fbf66e..2ff6ca01 100644 --- a/LEGO1/legorace.cpp +++ b/LEGO1/legorace.cpp @@ -4,25 +4,25 @@ DECOMP_SIZE_ASSERT(LegoRace, 0x144) -// OFFSET: LEGO1 0x1000dab0 +// FUNCTION: LEGO1 0x1000dab0 undefined4 LegoRace::VTable0x78(undefined4) { return 0; } -// OFFSET: LEGO1 0x1000dac0 STUB +// STUB: LEGO1 0x1000dac0 void LegoRace::VTable0x7c(undefined4, undefined4) { // TODO } -// OFFSET: LEGO1 0x1000dae0 +// FUNCTION: LEGO1 0x1000dae0 MxBool LegoRace::VTable0x5c() { return TRUE; } -// OFFSET: LEGO1 0x10015aa0 +// FUNCTION: LEGO1 0x10015aa0 LegoRace::LegoRace() { this->m_unkf8 = 0; @@ -43,45 +43,45 @@ LegoRace::LegoRace() NotificationManager()->Register(this); } -// OFFSET: LEGO1 0x10015b70 +// FUNCTION: LEGO1 0x10015b70 undefined4 LegoRace::VTable0x70(undefined4) { return 0; } -// OFFSET: LEGO1 0x10015b80 +// FUNCTION: LEGO1 0x10015b80 undefined4 LegoRace::VTable0x74(undefined4) { return 0; } -// OFFSET: LEGO1 0x10015b90 +// FUNCTION: LEGO1 0x10015b90 MxBool LegoRace::VTable0x64() { return FALSE; } -// OFFSET: LEGO1 0x10015ce0 STUB +// STUB: LEGO1 0x10015ce0 MxResult LegoRace::Create(MxDSObject& p_dsObject) { // TODO return SUCCESS; } -// OFFSET: LEGO1 0x10015d40 STUB +// STUB: LEGO1 0x10015d40 LegoRace::~LegoRace() { // TODO } -// OFFSET: LEGO1 0x10015e00 STUB +// STUB: LEGO1 0x10015e00 MxLong LegoRace::Notify(MxParam& p) { // TODO return 0; } -// OFFSET: LEGO1 0x10015ed0 STUB +// STUB: LEGO1 0x10015ed0 void LegoRace::VTable0x68(MxBool p_add) { // TODO diff --git a/LEGO1/legorace.h b/LEGO1/legorace.h index 935baf09..cdc4171f 100644 --- a/LEGO1/legorace.h +++ b/LEGO1/legorace.h @@ -5,7 +5,7 @@ #include "legoworld.h" #include "mxtypes.h" -// VTABLE 0x100d5db0 +// VTABLE: LEGO1 0x100d5db0 // SIZE 0x144 class LegoRace : public LegoWorld { public: @@ -14,14 +14,14 @@ class LegoRace : public LegoWorld { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 - // OFFSET: LEGO1 0x10015ba0 + // FUNCTION: LEGO1 0x10015ba0 inline const char* ClassName() const override // vtable+0xc { - // 0x100f07c4 + // GLOBAL: LEGO1 0x100f07c4 return "LegoRace"; } - // OFFSET: LEGO1 0x10015bb0 + // FUNCTION: LEGO1 0x10015bb0 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoRace::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/legoraceactor.h b/LEGO1/legoraceactor.h index 9df0e9a1..cedd2b24 100644 --- a/LEGO1/legoraceactor.h +++ b/LEGO1/legoraceactor.h @@ -3,17 +3,17 @@ #include "legoanimactor.h" -// VTABLE 0x100d5b88 +// VTABLE: LEGO1 0x100d5b88 class LegoRaceActor : public LegoAnimActor { public: - // OFFSET: LEGO1 0x10014af0 + // FUNCTION: LEGO1 0x10014af0 inline const char* ClassName() const override // vtable+0xc { - // 0x100f0bf4 + // GLOBAL: LEGO1 0x100f0bf4 return "LegoRaceActor"; } - // OFFSET: LEGO1 0x10014b10 + // FUNCTION: LEGO1 0x10014b10 inline MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoRaceActor::ClassName()) || LegoAnimActor::IsA(name); diff --git a/LEGO1/legoroi.cpp b/LEGO1/legoroi.cpp index a458fa60..70cb1faf 100644 --- a/LEGO1/legoroi.cpp +++ b/LEGO1/legoroi.cpp @@ -11,10 +11,10 @@ typedef struct { MxS32 m_unk10; } ROIColorAlias; -// 0x100dbe28 +// GLOBAL: LEGO1 0x100dbe28 const double g_normalizeByteToFloat = 1.0 / 255; -// 0x101011b0 +// GLOBAL: LEGO1 0x101011b0 ROIColorAlias g_roiColorAliases[22] = { {"lego black", 0x21, 0x21, 0x21, 0}, {"lego black f", 0x21, 0x21, 0x21, 0}, {"lego black flat", 0x21, 0x21, 0x21, 0}, {"lego blue", 0x00, 0x54, 0x8c, 0}, @@ -29,19 +29,19 @@ ROIColorAlias g_roiColorAliases[22] = { {"lego yellow", 0xff, 0xb9, 0x00, 0}, {"lego yellow flat", 0xff, 0xb9, 0x00, 0}, }; -// 0x10101368 +// GLOBAL: LEGO1 0x10101368 MxS32 g_roiConfig = 100; -// 0x101013ac +// GLOBAL: LEGO1 0x101013ac ROIHandler g_someHandlerFunction = NULL; -// OFFSET: LEGO1 0x100a81c0 +// FUNCTION: LEGO1 0x100a81c0 void LegoROI::configureLegoROI(MxS32 p_roi) { g_roiConfig = p_roi; } -// OFFSET: LEGO1 0x100a9bf0 +// FUNCTION: LEGO1 0x100a9bf0 MxBool LegoROI::CallTheHandlerFunction( char* p_param, MxFloat& p_red, @@ -63,7 +63,7 @@ MxBool LegoROI::CallTheHandlerFunction( return ColorAliasLookup(p_param, p_red, p_green, p_blue, p_other); } -// OFFSET: LEGO1 0x100a9c50 +// FUNCTION: LEGO1 0x100a9c50 MxBool LegoROI::ColorAliasLookup(char* p_param, MxFloat& p_red, MxFloat& p_green, MxFloat& p_blue, MxFloat& p_other) { // TODO: this seems awfully hacky for these devs. is there a dynamic way @@ -83,13 +83,13 @@ MxBool LegoROI::ColorAliasLookup(char* p_param, MxFloat& p_red, MxFloat& p_green return FALSE; } -// OFFSET: LEGO1 0x100a9d30 +// FUNCTION: LEGO1 0x100a9d30 void LegoROI::SetSomeHandlerFunction(ROIHandler p_func) { g_someHandlerFunction = p_func; } -// OFFSET: LEGO1 0x100a9e10 +// FUNCTION: LEGO1 0x100a9e10 void LegoROI::SetDisplayBB(MxS32 p_displayBB) { // Intentionally empty function diff --git a/LEGO1/legosoundmanager.cpp b/LEGO1/legosoundmanager.cpp index dcc1012d..028fa092 100644 --- a/LEGO1/legosoundmanager.cpp +++ b/LEGO1/legosoundmanager.cpp @@ -2,43 +2,43 @@ #include "mxautolocker.h" -// OFFSET: LEGO1 0x100298a0 +// FUNCTION: LEGO1 0x100298a0 LegoSoundManager::LegoSoundManager() { Init(); } -// OFFSET: LEGO1 0x10029940 +// FUNCTION: LEGO1 0x10029940 LegoSoundManager::~LegoSoundManager() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100299a0 +// FUNCTION: LEGO1 0x100299a0 void LegoSoundManager::Init() { unk0x40 = 0; unk0x3c = 0; } -// OFFSET: LEGO1 0x100299b0 STUB +// STUB: LEGO1 0x100299b0 void LegoSoundManager::Destroy(MxBool p_fromDestructor) { } -// OFFSET: LEGO1 0x100299f0 STUB +// STUB: LEGO1 0x100299f0 MxResult LegoSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) { return FAILURE; } -// OFFSET: LEGO1 0x1002a390 +// FUNCTION: LEGO1 0x1002a390 void LegoSoundManager::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x1002a3a0 STUB +// STUB: LEGO1 0x1002a3a0 MxResult LegoSoundManager::Tickle() { MxMediaManager::Tickle(); diff --git a/LEGO1/legosoundmanager.h b/LEGO1/legosoundmanager.h index b9bcacbe..e1e24337 100644 --- a/LEGO1/legosoundmanager.h +++ b/LEGO1/legosoundmanager.h @@ -3,7 +3,7 @@ #include "mxsoundmanager.h" -// VTABLE 0x100d6b10 +// VTABLE: LEGO1 0x100d6b10 // SIZE 0x44 class LegoSoundManager : public MxSoundManager { public: diff --git a/LEGO1/legostate.cpp b/LEGO1/legostate.cpp index 2c2c3acc..55ca5705 100644 --- a/LEGO1/legostate.cpp +++ b/LEGO1/legostate.cpp @@ -2,24 +2,24 @@ DECOMP_SIZE_ASSERT(LegoState, 0x08); -// OFFSET: LEGO1 0x10005f40 +// FUNCTION: LEGO1 0x10005f40 LegoState::~LegoState() { } -// OFFSET: LEGO1 0x10005f90 +// FUNCTION: LEGO1 0x10005f90 MxBool LegoState::VTable0x14() { return TRUE; } -// OFFSET: LEGO1 0x10005fa0 +// FUNCTION: LEGO1 0x10005fa0 MxBool LegoState::SetFlag() { return FALSE; } -// OFFSET: LEGO1 0x10005fb0 +// FUNCTION: LEGO1 0x10005fb0 MxResult LegoState::VTable0x1C(LegoFileStream* p_legoFileStream) { if (p_legoFileStream->IsWriteMode()) { @@ -28,7 +28,7 @@ MxResult LegoState::VTable0x1C(LegoFileStream* p_legoFileStream) return SUCCESS; } -// OFFSET: LEGO1 0x10006030 +// FUNCTION: LEGO1 0x10006030 LegoFileStream* LegoFileStream::FUN_10006030(MxString p_str) { const char* data = p_str.GetData(); diff --git a/LEGO1/legostate.h b/LEGO1/legostate.h index b0d726b9..095b67e9 100644 --- a/LEGO1/legostate.h +++ b/LEGO1/legostate.h @@ -6,19 +6,19 @@ #include "mxcore.h" #include "mxstring.h" -// VTABLE 0x100d46c0 +// VTABLE: LEGO1 0x100d46c0 class LegoState : public MxCore { public: virtual ~LegoState() override; // vtable+0x00 - // OFFSET: LEGO1 0x100060d0 + // FUNCTION: LEGO1 0x100060d0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f01b8 + // GLOBAL: LEGO1 0x100f01b8 return "LegoState"; } - // OFFSET: LEGO1 0x100060e0 + // FUNCTION: LEGO1 0x100060e0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoState::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/legostream.cpp b/LEGO1/legostream.cpp index 608e38eb..d9e32b2f 100644 --- a/LEGO1/legostream.cpp +++ b/LEGO1/legostream.cpp @@ -9,7 +9,7 @@ // This is a pointer to the end of the global variable name table, which has // the text "END_OF_VARIABLES" in it. // TODO: make s_endOfVariables reference the actual end of the variable array. -// GLOBAL OFFSET: LEGO1 0x100f3e50 +// GLOBAL: LEGO1 0x100f3e50 const char* s_endOfVariables = "END_OF_VARIABLES"; // Very likely but not certain sizes. @@ -19,7 +19,7 @@ DECOMP_SIZE_ASSERT(LegoStream, 0x8); DECOMP_SIZE_ASSERT(LegoFileStream, 0xC); DECOMP_SIZE_ASSERT(LegoMemoryStream, 0x10); -// OFFSET: LEGO1 0x10039f70 +// FUNCTION: LEGO1 0x10039f70 MxResult LegoStream::WriteVariable(LegoStream* p_stream, MxVariableTable* p_from, const char* p_variableName) { MxResult result = FAILURE; @@ -40,7 +40,7 @@ MxResult LegoStream::WriteVariable(LegoStream* p_stream, MxVariableTable* p_from // 95% match, just some instruction ordering differences on the call to // MxVariableTable::SetVariable at the end. -// OFFSET: LEGO1 0x1003a080 +// FUNCTION: LEGO1 0x1003a080 MxS32 LegoStream::ReadVariable(LegoStream* p_stream, MxVariableTable* p_to) { MxS32 result = 1; @@ -68,26 +68,26 @@ MxS32 LegoStream::ReadVariable(LegoStream* p_stream, MxVariableTable* p_to) return result; } -// OFFSET: LEGO1 0x10045ae0 +// FUNCTION: LEGO1 0x10045ae0 MxBool LegoStream::IsWriteMode() { return m_mode == LEGOSTREAM_MODE_WRITE; } -// OFFSET: LEGO1 0x10045af0 +// FUNCTION: LEGO1 0x10045af0 MxBool LegoStream::IsReadMode() { return m_mode == LEGOSTREAM_MODE_READ; } -// OFFSET: LEGO1 0x10099080 +// FUNCTION: LEGO1 0x10099080 LegoMemoryStream::LegoMemoryStream(char* p_buffer) : LegoStream() { m_buffer = p_buffer; m_offset = 0; } -// OFFSET: LEGO1 0x10099160 +// FUNCTION: LEGO1 0x10099160 MxResult LegoMemoryStream::Read(void* p_buffer, MxU32 p_size) { memcpy(p_buffer, m_buffer + m_offset, p_size); @@ -95,7 +95,7 @@ MxResult LegoMemoryStream::Read(void* p_buffer, MxU32 p_size) return SUCCESS; } -// OFFSET: LEGO1 0x10099190 +// FUNCTION: LEGO1 0x10099190 MxResult LegoMemoryStream::Write(const void* p_buffer, MxU32 p_size) { memcpy(m_buffer + m_offset, p_buffer, p_size); @@ -103,20 +103,20 @@ MxResult LegoMemoryStream::Write(const void* p_buffer, MxU32 p_size) return SUCCESS; } -// OFFSET: LEGO1 0x100991c0 +// FUNCTION: LEGO1 0x100991c0 LegoFileStream::LegoFileStream() : LegoStream() { m_hFile = NULL; } -// OFFSET: LEGO1 0x10099250 +// FUNCTION: LEGO1 0x10099250 LegoFileStream::~LegoFileStream() { if (m_hFile != NULL) fclose(m_hFile); } -// OFFSET: LEGO1 0x100992c0 +// FUNCTION: LEGO1 0x100992c0 MxResult LegoFileStream::Read(void* p_buffer, MxU32 p_size) { if (m_hFile == NULL) @@ -125,7 +125,7 @@ MxResult LegoFileStream::Read(void* p_buffer, MxU32 p_size) return (fread(p_buffer, 1, p_size, m_hFile) == p_size) ? SUCCESS : FAILURE; } -// OFFSET: LEGO1 0x10099300 +// FUNCTION: LEGO1 0x10099300 MxResult LegoFileStream::Write(const void* p_buffer, MxU32 p_size) { if (m_hFile == NULL) @@ -134,7 +134,7 @@ MxResult LegoFileStream::Write(const void* p_buffer, MxU32 p_size) return (fwrite(p_buffer, 1, p_size, m_hFile) == p_size) ? SUCCESS : FAILURE; } -// OFFSET: LEGO1 0x10099340 +// FUNCTION: LEGO1 0x10099340 MxResult LegoFileStream::Tell(MxU32* p_offset) { if (m_hFile == NULL) @@ -148,7 +148,7 @@ MxResult LegoFileStream::Tell(MxU32* p_offset) return SUCCESS; } -// OFFSET: LEGO1 0x10099370 +// FUNCTION: LEGO1 0x10099370 MxResult LegoFileStream::Seek(MxU32 p_offset) { if (m_hFile == NULL) @@ -157,7 +157,7 @@ MxResult LegoFileStream::Seek(MxU32 p_offset) return (fseek(m_hFile, p_offset, 0) == 0) ? SUCCESS : FAILURE; } -// OFFSET: LEGO1 0x100993a0 +// FUNCTION: LEGO1 0x100993a0 MxResult LegoFileStream::Open(const char* p_filename, OpenFlags p_mode) { char modeString[4]; @@ -185,14 +185,14 @@ MxResult LegoFileStream::Open(const char* p_filename, OpenFlags p_mode) return (m_hFile = fopen(p_filename, modeString)) ? SUCCESS : FAILURE; } -// OFFSET: LEGO1 0x100994a0 +// FUNCTION: LEGO1 0x100994a0 MxResult LegoMemoryStream::Tell(MxU32* p_offset) { *p_offset = m_offset; return SUCCESS; } -// OFFSET: LEGO1 0x100994b0 +// FUNCTION: LEGO1 0x100994b0 MxResult LegoMemoryStream::Seek(MxU32 p_offset) { m_offset = p_offset; diff --git a/LEGO1/legostream.h b/LEGO1/legostream.h index 719f3b44..a016be4d 100644 --- a/LEGO1/legostream.h +++ b/LEGO1/legostream.h @@ -13,7 +13,7 @@ class MxVariableTable; -// VTABLE 0x100d7d80 +// VTABLE: LEGO1 0x100d7d80 class LegoStream { public: LegoStream() : m_mode(0) {} @@ -40,7 +40,7 @@ class LegoStream { MxU8 m_mode; }; -// VTABLE 0x100db730 +// VTABLE: LEGO1 0x100db730 class LegoFileStream : public LegoStream { public: LegoFileStream(); @@ -59,7 +59,7 @@ class LegoFileStream : public LegoStream { FILE* m_hFile; }; -// VTABLE 0x100db710 +// VTABLE: LEGO1 0x100db710 class LegoMemoryStream : public LegoStream { public: LegoMemoryStream(char* p_buffer); diff --git a/LEGO1/legotexturepresenter.cpp b/LEGO1/legotexturepresenter.cpp index 2e9dba68..36a7e243 100644 --- a/LEGO1/legotexturepresenter.cpp +++ b/LEGO1/legotexturepresenter.cpp @@ -3,13 +3,13 @@ #include "legoomni.h" #include "legovideomanager.h" -// OFFSET: LEGO1 0x1004eb40 +// FUNCTION: LEGO1 0x1004eb40 LegoTexturePresenter::~LegoTexturePresenter() { VideoManager()->RemovePresenter(*this); } -// OFFSET: LEGO1 0x1004ebb0 +// FUNCTION: LEGO1 0x1004ebb0 MxResult LegoTexturePresenter::AddToManager() { VideoManager()->AddPresenter(*this); diff --git a/LEGO1/legotexturepresenter.h b/LEGO1/legotexturepresenter.h index e39e4758..76e1524d 100644 --- a/LEGO1/legotexturepresenter.h +++ b/LEGO1/legotexturepresenter.h @@ -3,20 +3,20 @@ #include "mxmediapresenter.h" -// VTABLE 0x100d4d90 +// VTABLE: LEGO1 0x100d4d90 // SIZE 0x54 (from inlined construction at 0x10009bb5) class LegoTexturePresenter : public MxMediaPresenter { public: virtual ~LegoTexturePresenter() override; - // OFFSET: LEGO1 0x1000ce50 + // FUNCTION: LEGO1 0x1000ce50 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0664 + // GLOBAL: LEGO1 0x100f0664 return "LegoTexturePresenter"; } - // OFFSET: LEGO1 0x1000ce60 + // FUNCTION: LEGO1 0x1000ce60 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoTexturePresenter::ClassName()) || MxMediaPresenter::IsA(name); diff --git a/LEGO1/legounksavedatawriter.cpp b/LEGO1/legounksavedatawriter.cpp index 591b4457..2e4d1804 100644 --- a/LEGO1/legounksavedatawriter.cpp +++ b/LEGO1/legounksavedatawriter.cpp @@ -6,10 +6,10 @@ DECOMP_SIZE_ASSERT(LegoSaveDataEntry3, 0x108); -// GLOBAL OFFSET: LEGO1 0x10104f20 +// GLOBAL: LEGO1 0x10104f20 LegoSaveDataEntry3 g_saveData3[66]; -// OFFSET: LEGO1 0x10083310 +// FUNCTION: LEGO1 0x10083310 MxResult LegoUnkSaveDataWriter::WriteSaveData3(LegoStream* p_stream) { MxResult result = FAILURE; diff --git a/LEGO1/legoutil.cpp b/LEGO1/legoutil.cpp index 7a336a81..b1ba6add 100644 --- a/LEGO1/legoutil.cpp +++ b/LEGO1/legoutil.cpp @@ -5,7 +5,7 @@ #include -// OFFSET: LEGO1 0x1003e300 +// FUNCTION: LEGO1 0x1003e300 ExtraActionType MatchActionString(const char* p_str) { ExtraActionType result = ExtraActionType_unknown; @@ -34,7 +34,7 @@ ExtraActionType MatchActionString(const char* p_str) return result; } -// OFFSET: LEGO1 0x1003eae0 +// FUNCTION: LEGO1 0x1003eae0 void ConvertHSVToRGB(float h, float s, float v, float* r_out, float* b_out, float* g_out) { double calc; @@ -102,12 +102,12 @@ void ConvertHSVToRGB(float h, float s, float v, float* r_out, float* b_out, floa } } -// OFFSET: LEGO1 0x1003ee00 STUB +// STUB: LEGO1 0x1003ee00 void FUN_1003ee00(MxAtomId& p_atomId, MxS32 p_id) { } -// OFFSET: LEGO1 0x1003ef40 +// FUNCTION: LEGO1 0x1003ef40 void SetAppCursor(WPARAM p_wparam) { PostMessageA(MxOmni::GetInstance()->GetWindowHandle(), 0x5400, p_wparam, 0); diff --git a/LEGO1/legovehiclebuildstate.cpp b/LEGO1/legovehiclebuildstate.cpp index 1829fd8d..f662293a 100644 --- a/LEGO1/legovehiclebuildstate.cpp +++ b/LEGO1/legovehiclebuildstate.cpp @@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(LegoVehicleBuildState, 0x50); // 1000acd7 DECOMP_SIZE_ASSERT(LegoVehicleBuildState::UnkStruct, 0xc); -// OFFSET: LEGO1 0x10017c00 +// FUNCTION: LEGO1 0x10017c00 LegoVehicleBuildState::UnkStruct::UnkStruct() { m_unk04 = 0; @@ -14,7 +14,7 @@ LegoVehicleBuildState::UnkStruct::UnkStruct() m_unk08 = 0; } -// OFFSET: LEGO1 0x10025f30 +// FUNCTION: LEGO1 0x10025f30 LegoVehicleBuildState::LegoVehicleBuildState(char* p_classType) { this->m_className = p_classType; diff --git a/LEGO1/legovehiclebuildstate.h b/LEGO1/legovehiclebuildstate.h index 8fe8e03d..ae59d1f5 100644 --- a/LEGO1/legovehiclebuildstate.h +++ b/LEGO1/legovehiclebuildstate.h @@ -5,19 +5,19 @@ #include "legostate.h" #include "mxstring.h" -// VTABLE 0x100d66e0 +// VTABLE: LEGO1 0x100d66e0 // SIZE 0x50 (from 1000acd7) class LegoVehicleBuildState : public LegoState { public: LegoVehicleBuildState(char* p_classType); - // OFFSET: LEGO1 0x10025ff0 + // FUNCTION: LEGO1 0x10025ff0 inline virtual const char* ClassName() const override // vtable+0x0c { return this->m_className.GetData(); } - // OFFSET: LEGO1 0x10026000 + // FUNCTION: LEGO1 0x10026000 inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, this->m_className.GetData()) || LegoState::IsA(p_name); diff --git a/LEGO1/legovideomanager.cpp b/LEGO1/legovideomanager.cpp index 8bd46b8f..0ec7ec07 100644 --- a/LEGO1/legovideomanager.cpp +++ b/LEGO1/legovideomanager.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(LegoVideoManager, 0x590); -// OFFSET: LEGO1 0x1007aa20 +// FUNCTION: LEGO1 0x1007aa20 LegoVideoManager::LegoVideoManager() { m_unk64 = 0; @@ -30,14 +30,14 @@ LegoVideoManager::LegoVideoManager() m_initialized = FALSE; } -// OFFSET: LEGO1 0x1007ab40 +// FUNCTION: LEGO1 0x1007ab40 LegoVideoManager::~LegoVideoManager() { Destroy(); delete m_palette; } -// OFFSET: LEGO1 0x1007b5e0 +// FUNCTION: LEGO1 0x1007b5e0 void LegoVideoManager::Destroy() { // todo: delete m_unk0x512 @@ -55,7 +55,7 @@ void LegoVideoManager::Destroy() delete[] m_prefCounter; } -// OFFSET: LEGO1 0x1007b6a0 +// FUNCTION: LEGO1 0x1007b6a0 void LegoVideoManager::MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY) { m_cursorX = p_cursorX; @@ -69,19 +69,19 @@ void LegoVideoManager::MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY) m_cursorY = 463; } -// OFFSET: LEGO1 0x1007c300 +// FUNCTION: LEGO1 0x1007c300 void LegoVideoManager::EnableFullScreenMovie(MxBool p_enable) { EnableFullScreenMovie(p_enable, TRUE); } -// OFFSET: LEGO1 0x1007c310 STUB +// STUB: LEGO1 0x1007c310 void LegoVideoManager::EnableFullScreenMovie(MxBool p_enable, MxBool p_scale) { // TODO } -// OFFSET: LEGO1 0x1007c440 +// FUNCTION: LEGO1 0x1007c440 void LegoVideoManager::SetSkyColor(float p_red, float p_green, float p_blue) { PALETTEENTRY colorStrucure; @@ -97,14 +97,14 @@ void LegoVideoManager::SetSkyColor(float p_red, float p_green, float p_blue) // m_3dManager->m_pViewport->vtable1c(red, green, blue) } -// OFFSET: LEGO1 0x1007c560 STUB +// STUB: LEGO1 0x1007c560 int LegoVideoManager::EnableRMDevice() { // TODO return 0; } -// OFFSET: LEGO1 0x1007c740 STUB +// STUB: LEGO1 0x1007c740 int LegoVideoManager::DisableRMDevice() { // TODO diff --git a/LEGO1/legovideomanager.h b/LEGO1/legovideomanager.h index a6d2f89f..060e9f10 100644 --- a/LEGO1/legovideomanager.h +++ b/LEGO1/legovideomanager.h @@ -8,7 +8,7 @@ #include -// VTABLE 0x100d9c88 +// VTABLE: LEGO1 0x100d9c88 // SIZE 0x590 class LegoVideoManager : public MxVideoManager { public: @@ -27,7 +27,7 @@ class LegoVideoManager : public MxVideoManager { void SetSkyColor(float r, float g, float b); inline void SetUnkE4(MxBool p_unk0xe4) { this->m_unk0xe4 = p_unk0xe4; } - // OFFSET: LEGO1 0x1007c4c0 + // FUNCTION: LEGO1 0x1007c4c0 void OverrideSkyColor(MxBool p_shouldOverride) { this->m_videoParam.GetPalette()->SetOverrideSkyColor(p_shouldOverride); diff --git a/LEGO1/legoworld.cpp b/LEGO1/legoworld.cpp index 5ad73fef..938abe3a 100644 --- a/LEGO1/legoworld.cpp +++ b/LEGO1/legoworld.cpp @@ -11,24 +11,24 @@ DECOMP_SIZE_ASSERT(LegoWorld, 0xf8); MxBool g_isWorldActive; -// OFFSET: LEGO1 0x100010a0 +// FUNCTION: LEGO1 0x100010a0 void LegoWorld::VTable0x60() { } -// OFFSET: LEGO1 0x10015820 STUB +// STUB: LEGO1 0x10015820 void FUN_10015820(MxU32 p_unk1, MxU32 p_unk2) { // TODO } -// OFFSET: LEGO1 0x10015910 STUB +// STUB: LEGO1 0x10015910 void FUN_10015910(MxU32 p_unk1) { // TODO } -// OFFSET: LEGO1 0x100159c0 +// FUNCTION: LEGO1 0x100159c0 void SetIsWorldActive(MxBool p_isWorldActive) { if (!p_isWorldActive) @@ -36,38 +36,38 @@ void SetIsWorldActive(MxBool p_isWorldActive) g_isWorldActive = p_isWorldActive; } -// OFFSET: LEGO1 0x1001ca40 STUB +// STUB: LEGO1 0x1001ca40 LegoWorld::LegoWorld() { // TODO } -// OFFSET: LEGO1 0x1001d670 +// FUNCTION: LEGO1 0x1001d670 MxBool LegoWorld::VTable0x5c() { return FALSE; } -// OFFSET: LEGO1 0x1001d680 +// FUNCTION: LEGO1 0x1001d680 MxBool LegoWorld::VTable0x64() { return FALSE; } -// OFFSET: LEGO1 0x1001dfa0 STUB +// STUB: LEGO1 0x1001dfa0 LegoWorld::~LegoWorld() { // TODO } -// OFFSET: LEGO1 0x1001e0b0 STUB +// STUB: LEGO1 0x1001e0b0 MxResult LegoWorld::SetAsCurrentWorld(MxDSObject& p_dsObject) { // TODO return SUCCESS; } -// OFFSET: LEGO1 0x1001f5e0 +// FUNCTION: LEGO1 0x1001f5e0 MxLong LegoWorld::Notify(MxParam& p_param) { MxLong ret = 0; @@ -85,30 +85,30 @@ MxLong LegoWorld::Notify(MxParam& p_param) return ret; } -// OFFSET: LEGO1 0x1001f630 STUB +// STUB: LEGO1 0x1001f630 void LegoWorld::VTable0x54() { // TODO } -// OFFSET: LEGO1 0x10020220 STUB +// STUB: LEGO1 0x10020220 void LegoWorld::VTable0x58(MxCore* p_object) { // TODO } -// OFFSET: LEGO1 0x10020f10 STUB +// STUB: LEGO1 0x10020f10 void LegoWorld::EndAction(MxPresenter* p_presenter) { } -// OFFSET: LEGO1 0x10021a70 STUB +// STUB: LEGO1 0x10021a70 void LegoWorld::VTable0x68(MxBool p_add) { // TODO } -// OFFSET: LEGO1 0x10022340 +// FUNCTION: LEGO1 0x10022340 void LegoWorld::Stop() { TickleManager()->UnregisterClient(this); diff --git a/LEGO1/legoworld.h b/LEGO1/legoworld.h index 7f46ff58..6bade062 100644 --- a/LEGO1/legoworld.h +++ b/LEGO1/legoworld.h @@ -7,7 +7,7 @@ #include "mxpresenter.h" #include "mxpresenterlist.h" -// VTABLE 0x100d6280 +// VTABLE: LEGO1 0x100d6280 // SIZE 0xf8 class LegoWorld : public LegoEntity { public: @@ -16,14 +16,14 @@ class LegoWorld : public LegoEntity { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 - // OFFSET: LEGO1 0x1001d690 + // FUNCTION: LEGO1 0x1001d690 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0058 + // GLOBAL: LEGO1 0x100f0058 return "LegoWorld"; } - // OFFSET: LEGO1 0x1001d6a0 + // FUNCTION: LEGO1 0x1001d6a0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoWorld::ClassName()) || LegoEntity::IsA(name); diff --git a/LEGO1/legoworldpresenter.cpp b/LEGO1/legoworldpresenter.cpp index cb135cda..0a6f0c21 100644 --- a/LEGO1/legoworldpresenter.cpp +++ b/LEGO1/legoworldpresenter.cpp @@ -1,21 +1,21 @@ #include "legoworldpresenter.h" -// 0x100f75d4 +// GLOBAL: LEGO1 0x100f75d4 undefined4 g_LegoWorldPresenterQuality = 1; -// OFFSET: LEGO1 0x100665b0 +// FUNCTION: LEGO1 0x100665b0 void LegoWorldPresenter::configureLegoWorldPresenter(int p_quality) { g_LegoWorldPresenterQuality = p_quality; } -// OFFSET: LEGO1 0x100665c0 +// FUNCTION: LEGO1 0x100665c0 LegoWorldPresenter::LegoWorldPresenter() { m_unk50 = 50000; } -// OFFSET: LEGO1 0x10066770 STUB +// STUB: LEGO1 0x10066770 LegoWorldPresenter::~LegoWorldPresenter() { // TODO diff --git a/LEGO1/legoworldpresenter.h b/LEGO1/legoworldpresenter.h index da9b0e2d..3c34097d 100644 --- a/LEGO1/legoworldpresenter.h +++ b/LEGO1/legoworldpresenter.h @@ -3,7 +3,7 @@ #include "legoentitypresenter.h" -// VTABLE 0x100d8ee0 +// VTABLE: LEGO1 0x100d8ee0 // SIZE 0x54 class LegoWorldPresenter : public LegoEntityPresenter { public: @@ -12,14 +12,14 @@ class LegoWorldPresenter : public LegoEntityPresenter { __declspec(dllexport) static void configureLegoWorldPresenter(int param_1); - // OFFSET: LEGO1 0x10066630 + // FUNCTION: LEGO1 0x10066630 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0608 + // GLOBAL: LEGO1 0x100f0608 return "LegoWorldPresenter"; } - // OFFSET: LEGO1 0x10066640 + // FUNCTION: LEGO1 0x10066640 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, LegoWorldPresenter::ClassName()) || LegoEntityPresenter::IsA(name); diff --git a/LEGO1/motorcycle.cpp b/LEGO1/motorcycle.cpp index 289cdbaa..34a05a46 100644 --- a/LEGO1/motorcycle.cpp +++ b/LEGO1/motorcycle.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(Motorcycle, 0x16c); -// OFFSET: LEGO1 0x100357b0 +// FUNCTION: LEGO1 0x100357b0 Motorcycle::Motorcycle() { this->m_unk13c = 40.0; diff --git a/LEGO1/motorcycle.h b/LEGO1/motorcycle.h index b53fc48e..52f692e8 100644 --- a/LEGO1/motorcycle.h +++ b/LEGO1/motorcycle.h @@ -4,20 +4,20 @@ #include "decomp.h" #include "islepathactor.h" -// VTABLE 0x100d7090 +// VTABLE: LEGO1 0x100d7090 // SIZE 0x16c class Motorcycle : public IslePathActor { public: Motorcycle(); - // OFFSET: LEGO1 0x10035840 + // FUNCTION: LEGO1 0x10035840 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x10035840 + // GLOBAL: LEGO1 0x10035840 return "Motorcycle"; } - // OFFSET: LEGO1 0x10035850 + // FUNCTION: LEGO1 0x10035850 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Motorcycle::ClassName()) || IslePathActor::IsA(name); diff --git a/LEGO1/mxactionnotificationparam.cpp b/LEGO1/mxactionnotificationparam.cpp index 58ff8506..291156f4 100644 --- a/LEGO1/mxactionnotificationparam.cpp +++ b/LEGO1/mxactionnotificationparam.cpp @@ -3,14 +3,17 @@ DECOMP_SIZE_ASSERT(MxActionNotificationParam, 0x14) DECOMP_SIZE_ASSERT(MxEndActionNotificationParam, 0x14) -// OFFSET: LEGO1 0x100510c0 +// FUNCTION: LEGO1 0x100510c0 MxNotificationParam* MxActionNotificationParam::Clone() { return new MxActionNotificationParam(this->m_type, this->m_sender, this->m_action, this->m_realloc); } -// OFFSET: LEGO1 0x10051270 +// FUNCTION: LEGO1 0x10051270 MxNotificationParam* MxEndActionNotificationParam::Clone() { return new MxEndActionNotificationParam(c_notificationEndAction, this->m_sender, this->m_action, this->m_realloc); } + +// SYNTHETIC: LEGO1 0x100513a0 +// MxEndActionNotificationParam::`scalar deleting destructor' diff --git a/LEGO1/mxactionnotificationparam.h b/LEGO1/mxactionnotificationparam.h index 7f825a21..c5d4316f 100644 --- a/LEGO1/mxactionnotificationparam.h +++ b/LEGO1/mxactionnotificationparam.h @@ -4,7 +4,7 @@ #include "mxdsaction.h" #include "mxnotificationparam.h" -// VTABLE 0x100d8350 +// VTABLE: LEGO1 0x100d8350 // SIZE 0x14 class MxActionNotificationParam : public MxNotificationParam { public: @@ -31,7 +31,7 @@ class MxActionNotificationParam : public MxNotificationParam { this->m_action->SetUnknown24(oldAction->GetUnknown24()); } - // OFFSET: LEGO1 0x10051050 + // FUNCTION: LEGO1 0x10051050 inline virtual ~MxActionNotificationParam() override { if (!this->m_realloc) @@ -50,7 +50,7 @@ class MxActionNotificationParam : public MxNotificationParam { MxBool m_realloc; // 0x10 }; -// VTABLE 0x100d8358 +// VTABLE: LEGO1 0x100d8358 // SIZE 0x14 class MxEndActionNotificationParam : public MxActionNotificationParam { public: @@ -64,8 +64,6 @@ class MxEndActionNotificationParam : public MxActionNotificationParam { { } - inline virtual ~MxEndActionNotificationParam() override{}; // 0x100513a0 - virtual MxNotificationParam* Clone() override; // vtable+0x4 }; diff --git a/LEGO1/mxatomid.cpp b/LEGO1/mxatomid.cpp index 1f6e760c..d3a6033b 100644 --- a/LEGO1/mxatomid.cpp +++ b/LEGO1/mxatomid.cpp @@ -2,7 +2,7 @@ #include "mxomni.h" -// OFFSET: LEGO1 0x100acf90 +// FUNCTION: LEGO1 0x100acf90 MxAtomId::MxAtomId(const char* p_str, LookupMode p_mode) { if (!MxOmni::GetInstance()) @@ -16,13 +16,13 @@ MxAtomId::MxAtomId(const char* p_str, LookupMode p_mode) counter->Inc(); } -// OFFSET: LEGO1 0x100acfd0 +// FUNCTION: LEGO1 0x100acfd0 MxAtomId::~MxAtomId() { Destroy(); } -// OFFSET: LEGO1 0x100acfe0 +// FUNCTION: LEGO1 0x100acfe0 void MxAtomId::Destroy() { if (!m_internal) @@ -42,7 +42,7 @@ void MxAtomId::Destroy() counter->Dec(); } -// OFFSET: LEGO1 0x100ad1c0 +// FUNCTION: LEGO1 0x100ad1c0 MxAtomId& MxAtomId::operator=(const MxAtomId& p_atomId) { if (m_internal) @@ -58,7 +58,7 @@ MxAtomId& MxAtomId::operator=(const MxAtomId& p_atomId) return *this; } -// OFFSET: LEGO1 0x100ad210 +// FUNCTION: LEGO1 0x100ad210 MxAtomIdCounter* MxAtomId::GetCounter(const char* p_str, LookupMode p_mode) { MxAtomId _unused; @@ -88,7 +88,7 @@ MxAtomIdCounter* MxAtomId::GetCounter(const char* p_str, LookupMode p_mode) return counter; } -// OFFSET: LEGO1 0x100ad7e0 +// FUNCTION: LEGO1 0x100ad7e0 void MxAtomId::Clear() { // Reset but do not delete MxAtomId object. diff --git a/LEGO1/mxatomidcounter.cpp b/LEGO1/mxatomidcounter.cpp index 5fddeeda..f3be8764 100644 --- a/LEGO1/mxatomidcounter.cpp +++ b/LEGO1/mxatomidcounter.cpp @@ -5,13 +5,13 @@ DECOMP_SIZE_ASSERT(MxAtomIdCounter, 0x14); DECOMP_SIZE_ASSERT(MxAtomIdCounterSet, 0x10); -// OFFSET: LEGO1 0x100ad7f0 +// FUNCTION: LEGO1 0x100ad7f0 void MxAtomIdCounter::Inc() { m_value++; } -// OFFSET: LEGO1 0x100ad800 +// FUNCTION: LEGO1 0x100ad800 void MxAtomIdCounter::Dec() { if (m_value) diff --git a/LEGO1/mxatomidcounter.h b/LEGO1/mxatomidcounter.h index 3cfd7cb7..c75c2b5c 100644 --- a/LEGO1/mxatomidcounter.h +++ b/LEGO1/mxatomidcounter.h @@ -34,7 +34,7 @@ class MxAtomIdCounter { }; struct MxAtomIdCounterCompare { - // OFFSET: LEGO1 0x100ad120 + // FUNCTION: LEGO1 0x100ad120 int operator()(MxAtomIdCounter* const& p_val0, MxAtomIdCounter* const& p_val1) const { return strcmp(p_val0->GetKey()->GetData(), p_val1->GetKey()->GetData()) > 0; diff --git a/LEGO1/mxaudiomanager.cpp b/LEGO1/mxaudiomanager.cpp index 5ec3e046..6d8e6b66 100644 --- a/LEGO1/mxaudiomanager.cpp +++ b/LEGO1/mxaudiomanager.cpp @@ -5,31 +5,31 @@ DECOMP_SIZE_ASSERT(MxAudioManager, 0x30); // GLOBAL: LEGO1 0x10102108 MxS32 MxAudioManager::g_unkCount = 0; -// OFFSET: LEGO1 0x10029910 +// FUNCTION: LEGO1 0x10029910 MxS32 MxAudioManager::GetVolume() { return this->m_volume; } -// OFFSET: LEGO1 0x100b8d00 +// FUNCTION: LEGO1 0x100b8d00 MxAudioManager::MxAudioManager() { Init(); } -// OFFSET: LEGO1 0x100b8d90 +// FUNCTION: LEGO1 0x100b8d90 MxAudioManager::~MxAudioManager() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100b8df0 +// FUNCTION: LEGO1 0x100b8df0 void MxAudioManager::Init() { this->m_volume = 100; } -// OFFSET: LEGO1 0x100b8e00 +// FUNCTION: LEGO1 0x100b8e00 void MxAudioManager::Destroy(MxBool p_fromDestructor) { this->m_criticalSection.Enter(); @@ -41,7 +41,7 @@ void MxAudioManager::Destroy(MxBool p_fromDestructor) MxMediaManager::Destroy(); } -// OFFSET: LEGO1 0x100b8e40 +// FUNCTION: LEGO1 0x100b8e40 MxResult MxAudioManager::InitPresenters() { MxResult result = FAILURE; @@ -63,13 +63,13 @@ MxResult MxAudioManager::InitPresenters() return result; } -// OFFSET: LEGO1 0x100b8e90 +// FUNCTION: LEGO1 0x100b8e90 void MxAudioManager::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x100b8ea0 +// FUNCTION: LEGO1 0x100b8ea0 void MxAudioManager::SetVolume(MxS32 p_volume) { this->m_criticalSection.Enter(); diff --git a/LEGO1/mxaudiomanager.h b/LEGO1/mxaudiomanager.h index 4412d9e7..cae9b318 100644 --- a/LEGO1/mxaudiomanager.h +++ b/LEGO1/mxaudiomanager.h @@ -4,7 +4,7 @@ #include "decomp.h" #include "mxmediamanager.h" -// VTABLE 0x100dc6e0 +// VTABLE: LEGO1 0x100dc6e0 class MxAudioManager : public MxMediaManager { public: MxAudioManager(); diff --git a/LEGO1/mxaudiopresenter.cpp b/LEGO1/mxaudiopresenter.cpp index e896f857..1ef74dea 100644 --- a/LEGO1/mxaudiopresenter.cpp +++ b/LEGO1/mxaudiopresenter.cpp @@ -4,13 +4,13 @@ DECOMP_SIZE_ASSERT(MxAudioPresenter, 0x54); -// OFFSET: LEGO1 0x1000d260 +// FUNCTION: LEGO1 0x1000d260 MxS32 MxAudioPresenter::GetVolume() { return m_volume; } -// OFFSET: LEGO1 0x1000d270 +// FUNCTION: LEGO1 0x1000d270 void MxAudioPresenter::SetVolume(MxS32 p_volume) { m_volume = p_volume; diff --git a/LEGO1/mxaudiopresenter.h b/LEGO1/mxaudiopresenter.h index 860d6efd..583d0c7f 100644 --- a/LEGO1/mxaudiopresenter.h +++ b/LEGO1/mxaudiopresenter.h @@ -4,20 +4,20 @@ #include "decomp.h" #include "mxmediapresenter.h" -// VTABLE 0x100d4c70 +// VTABLE: LEGO1 0x100d4c70 // SIZE 0x54 class MxAudioPresenter : public MxMediaPresenter { public: MxAudioPresenter() { m_volume = 100; } - // OFFSET: LEGO1 0x1000d280 + // FUNCTION: LEGO1 0x1000d280 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f078c + // GLOBAL: LEGO1 0x100f078c return "MxAudioPresenter"; } - // OFFSET: LEGO1 0x1000d290 + // FUNCTION: LEGO1 0x1000d290 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxAudioPresenter::ClassName()) || MxMediaPresenter::IsA(name); diff --git a/LEGO1/mxautolocker.cpp b/LEGO1/mxautolocker.cpp index 50786e65..56e83967 100644 --- a/LEGO1/mxautolocker.cpp +++ b/LEGO1/mxautolocker.cpp @@ -1,6 +1,6 @@ #include "mxautolocker.h" -// OFFSET: LEGO1 0x100b8ed0 +// FUNCTION: LEGO1 0x100b8ed0 MxAutoLocker::MxAutoLocker(MxCriticalSection* critsect) { this->m_criticalSection = critsect; @@ -8,7 +8,7 @@ MxAutoLocker::MxAutoLocker(MxCriticalSection* critsect) this->m_criticalSection->Enter(); } -// OFFSET: LEGO1 0x100b8ef0 +// FUNCTION: LEGO1 0x100b8ef0 MxAutoLocker::~MxAutoLocker() { if (this->m_criticalSection != 0) diff --git a/LEGO1/mxbackgroundaudiomanager.cpp b/LEGO1/mxbackgroundaudiomanager.cpp index 15ba09c4..36f9faa8 100644 --- a/LEGO1/mxbackgroundaudiomanager.cpp +++ b/LEGO1/mxbackgroundaudiomanager.cpp @@ -10,7 +10,7 @@ DECOMP_SIZE_ASSERT(MxBackgroundAudioManager, 0x150) -// OFFSET: LEGO1 0x1007ea90 +// FUNCTION: LEGO1 0x1007ea90 MxBackgroundAudioManager::MxBackgroundAudioManager() { NotificationManager()->Register(this); @@ -23,7 +23,7 @@ MxBackgroundAudioManager::MxBackgroundAudioManager() m_musicEnabled = FALSE; } -// OFFSET: LEGO1 0x1007ec20 +// FUNCTION: LEGO1 0x1007ec20 MxBackgroundAudioManager::~MxBackgroundAudioManager() { TickleManager()->UnregisterClient(this); @@ -31,7 +31,7 @@ MxBackgroundAudioManager::~MxBackgroundAudioManager() DestroyMusic(); } -// OFFSET: LEGO1 0x1007ece0 +// FUNCTION: LEGO1 0x1007ece0 MxResult MxBackgroundAudioManager::Create(MxAtomId& p_script, MxU32 p_frequencyMS) { MxResult result = OpenMusic(p_script); @@ -44,7 +44,7 @@ MxResult MxBackgroundAudioManager::Create(MxAtomId& p_script, MxU32 p_frequencyM return result; } -// OFFSET: LEGO1 0x1007ed20 +// FUNCTION: LEGO1 0x1007ed20 MxResult MxBackgroundAudioManager::OpenMusic(MxAtomId& p_script) { if (m_script.GetInternal()) @@ -60,7 +60,7 @@ MxResult MxBackgroundAudioManager::OpenMusic(MxAtomId& p_script) return result; } -// OFFSET: LEGO1 0x1007ed70 +// FUNCTION: LEGO1 0x1007ed70 void MxBackgroundAudioManager::DestroyMusic() { if (m_script.GetInternal()) { @@ -73,7 +73,7 @@ void MxBackgroundAudioManager::DestroyMusic() } } -// OFFSET: LEGO1 0x1007ee40 +// FUNCTION: LEGO1 0x1007ee40 MxResult MxBackgroundAudioManager::Tickle() { switch (m_unk13c) { @@ -91,7 +91,7 @@ MxResult MxBackgroundAudioManager::Tickle() } } -// OFFSET: LEGO1 0x1007ee70 +// FUNCTION: LEGO1 0x1007ee70 void MxBackgroundAudioManager::FUN_1007ee70() { if (m_unka0 && m_unka0->GetAction()) { @@ -108,7 +108,7 @@ void MxBackgroundAudioManager::FUN_1007ee70() } } -// OFFSET: LEGO1 0x1007ef40 +// FUNCTION: LEGO1 0x1007ef40 void MxBackgroundAudioManager::FUN_1007ef40() { MxU32 compare; @@ -152,7 +152,7 @@ void MxBackgroundAudioManager::FUN_1007ef40() } } -// OFFSET: LEGO1 0x1007f0e0 +// FUNCTION: LEGO1 0x1007f0e0 void MxBackgroundAudioManager::FadeInOrFadeOut() { // This function probably is the fade in/out routine @@ -187,7 +187,7 @@ void MxBackgroundAudioManager::FadeInOrFadeOut() } } -// OFFSET: LEGO1 0x1007f170 +// FUNCTION: LEGO1 0x1007f170 MxLong MxBackgroundAudioManager::Notify(MxParam& p) { switch (((MxNotificationParam&) p).GetNotification()) { @@ -201,7 +201,7 @@ MxLong MxBackgroundAudioManager::Notify(MxParam& p) return 0; } -// OFFSET: LEGO1 0x1007f1b0 +// FUNCTION: LEGO1 0x1007f1b0 void MxBackgroundAudioManager::StartAction(MxParam& p) { // TODO: the sender is most likely a MxAudioPresenter? @@ -212,7 +212,7 @@ void MxBackgroundAudioManager::StartAction(MxParam& p) m_unk138->SetVolume(0); } -// OFFSET: LEGO1 0x1007f200 +// FUNCTION: LEGO1 0x1007f200 void MxBackgroundAudioManager::StopAction(MxParam& p) { if (((MxNotificationParam&) p).GetSender() == m_unka0) { @@ -229,7 +229,7 @@ void MxBackgroundAudioManager::StopAction(MxParam& p) Lego()->HandleNotificationType2(p); } -// OFFSET: LEGO1 0x1007f2f0 +// FUNCTION: LEGO1 0x1007f2f0 MxResult MxBackgroundAudioManager::PlayMusic(MxDSAction& p_action, undefined4 p_unknown, undefined4 p_unknown2) { if (!m_musicEnabled) { @@ -261,7 +261,7 @@ MxResult MxBackgroundAudioManager::PlayMusic(MxDSAction& p_action, undefined4 p_ return FAILURE; } -// OFFSET: LEGO1 0x1007f470 +// FUNCTION: LEGO1 0x1007f470 void MxBackgroundAudioManager::Stop() { if (m_action2.GetObjectId() != -1) @@ -281,7 +281,7 @@ void MxBackgroundAudioManager::Stop() m_unk13c = 0; } -// OFFSET: LEGO1 0x1007f570 +// FUNCTION: LEGO1 0x1007f570 void MxBackgroundAudioManager::LowerVolume() { if (m_unk148 == 0) { @@ -293,7 +293,7 @@ void MxBackgroundAudioManager::LowerVolume() m_unk148++; } -// OFFSET: LEGO1 0x1007f5b0 +// FUNCTION: LEGO1 0x1007f5b0 void MxBackgroundAudioManager::RaiseVolume() { if (m_unk148 != 0) { @@ -307,7 +307,7 @@ void MxBackgroundAudioManager::RaiseVolume() } } -// OFFSET: LEGO1 0x1007f5f0 +// FUNCTION: LEGO1 0x1007f5f0 void MxBackgroundAudioManager::Enable(MxBool p) { if (this->m_musicEnabled != p) { @@ -318,7 +318,7 @@ void MxBackgroundAudioManager::Enable(MxBool p) } } -// OFFSET: LEGO1 0x1007f650 +// FUNCTION: LEGO1 0x1007f650 void MxBackgroundAudioManager::Init() { this->m_unka0 = 0; diff --git a/LEGO1/mxbackgroundaudiomanager.h b/LEGO1/mxbackgroundaudiomanager.h index 6ff05bb3..17fcab81 100644 --- a/LEGO1/mxbackgroundaudiomanager.h +++ b/LEGO1/mxbackgroundaudiomanager.h @@ -8,7 +8,7 @@ #include "mxpresenter.h" #include "mxtypes.h" -// VTABLE 0x100d9fe8 +// VTABLE: LEGO1 0x100d9fe8 // SIZE 0x150 class MxBackgroundAudioManager : public MxCore { public: @@ -18,14 +18,14 @@ class MxBackgroundAudioManager : public MxCore { virtual MxLong Notify(MxParam& p) override; // vtable+0x04 virtual MxResult Tickle() override; // vtable+0x08 - // OFFSET: LEGO1 0x1007eb70 + // FUNCTION: LEGO1 0x1007eb70 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f7ac4 + // GLOBAL: LEGO1 0x100f7ac4 return "MxBackgroundAudioManager"; } - // OFFSET: LEGO1 0x1007eb80 + // FUNCTION: LEGO1 0x1007eb80 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxBackgroundAudioManager::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxbitmap.cpp b/LEGO1/mxbitmap.cpp index a036a05d..4e7e07de 100644 --- a/LEGO1/mxbitmap.cpp +++ b/LEGO1/mxbitmap.cpp @@ -26,13 +26,13 @@ inline MxLong _Abs(MxLong p_value) return p_value > 0 ? p_value : -p_value; } -// OFFSET: LEGO1 0x1004e0d0 +// FUNCTION: LEGO1 0x1004e0d0 int MxBitmap::vtable28(int) { return -1; } -// OFFSET: LEGO1 0x100bc980 +// FUNCTION: LEGO1 0x100bc980 MxBitmap::MxBitmap() { this->m_info = NULL; @@ -43,7 +43,7 @@ MxBitmap::MxBitmap() this->m_palette = NULL; } -// OFFSET: LEGO1 0x100bca10 +// FUNCTION: LEGO1 0x100bca10 MxBitmap::~MxBitmap() { if (this->m_info) @@ -54,7 +54,7 @@ MxBitmap::~MxBitmap() delete m_palette; } -// OFFSET: LEGO1 0x100bcaa0 +// FUNCTION: LEGO1 0x100bcaa0 MxResult MxBitmap::SetSize(MxS32 p_width, MxS32 p_height, MxPalette* p_palette, MxBool p_isHighColor) { MxResult ret = FAILURE; @@ -99,7 +99,7 @@ MxResult MxBitmap::SetSize(MxS32 p_width, MxS32 p_height, MxPalette* p_palette, return ret; } -// OFFSET: LEGO1 0x100bcba0 +// FUNCTION: LEGO1 0x100bcba0 MxResult MxBitmap::ImportBitmapInfo(MxBITMAPINFO* p_info) { MxResult result = FAILURE; @@ -133,7 +133,7 @@ MxResult MxBitmap::ImportBitmapInfo(MxBITMAPINFO* p_info) return result; } -// OFFSET: LEGO1 0x100bcc40 +// FUNCTION: LEGO1 0x100bcc40 MxResult MxBitmap::ImportBitmap(MxBitmap* p_bitmap) { MxResult result = FAILURE; @@ -168,7 +168,7 @@ MxResult MxBitmap::ImportBitmap(MxBitmap* p_bitmap) return result; } -// OFFSET: LEGO1 0x100bcd10 +// FUNCTION: LEGO1 0x100bcd10 MxLong MxBitmap::Read(const char* p_filename) { MxResult result = FAILURE; @@ -184,7 +184,7 @@ MxLong MxBitmap::Read(const char* p_filename) return result; } -// OFFSET: LEGO1 0x100bcd60 +// FUNCTION: LEGO1 0x100bcd60 MxResult MxBitmap::LoadFile(HANDLE p_handle) { MxResult result = FAILURE; @@ -231,17 +231,17 @@ MxResult MxBitmap::LoadFile(HANDLE p_handle) return result; } -// OFFSET: LEGO1 0x100bce70 STUB +// STUB: LEGO1 0x100bce70 void MxBitmap::vtable2c(int, int, int, int, int, int, int) { } -// OFFSET: LEGO1 0x100bd020 STUB +// STUB: LEGO1 0x100bd020 void MxBitmap::vtable30(int, int, int, int, int, int, int) { } -// OFFSET: LEGO1 0x100bd1c0 +// FUNCTION: LEGO1 0x100bd1c0 MxPalette* MxBitmap::CreatePalette() { MxBool success = FALSE; @@ -269,7 +269,7 @@ MxPalette* MxBitmap::CreatePalette() return palette; } -// OFFSET: LEGO1 0x100bd280 +// FUNCTION: LEGO1 0x100bd280 void MxBitmap::ImportPalette(MxPalette* p_palette) { // Odd to use a switch on a boolean, but it matches. @@ -287,7 +287,7 @@ void MxBitmap::ImportPalette(MxPalette* p_palette) } } -// OFFSET: LEGO1 0x100bd2d0 +// FUNCTION: LEGO1 0x100bd2d0 MxResult MxBitmap::SetBitDepth(MxBool p_isHighColor) { MxResult ret = FAILURE; @@ -334,7 +334,7 @@ MxResult MxBitmap::SetBitDepth(MxBool p_isHighColor) return ret; } -// OFFSET: LEGO1 0x100bd3e0 +// FUNCTION: LEGO1 0x100bd3e0 MxResult MxBitmap::StretchBits( HDC p_hdc, MxS32 p_xSrc, @@ -367,7 +367,7 @@ MxResult MxBitmap::StretchBits( ); } -// OFFSET: LEGO1 0x100bd450 +// FUNCTION: LEGO1 0x100bd450 MxResult MxBitmap::ImportColorsToPalette(RGBQUAD* p_rgbquad, MxPalette* p_palette) { MxResult ret = FAILURE; diff --git a/LEGO1/mxbitmap.h b/LEGO1/mxbitmap.h index e0a8dffc..63bb4aaf 100644 --- a/LEGO1/mxbitmap.h +++ b/LEGO1/mxbitmap.h @@ -29,7 +29,7 @@ struct MxBITMAPINFO { #define BI_RGB_TOPDOWN 0x10 // SIZE 0x20 -// VTABLE 0x100dc7b0 +// VTABLE: LEGO1 0x100dc7b0 class MxBitmap : public MxCore { public: __declspec(dllexport) MxBitmap(); diff --git a/LEGO1/mxcompositemediapresenter.cpp b/LEGO1/mxcompositemediapresenter.cpp index ff46bb37..7bbaf6bf 100644 --- a/LEGO1/mxcompositemediapresenter.cpp +++ b/LEGO1/mxcompositemediapresenter.cpp @@ -1,6 +1,6 @@ #include "mxcompositemediapresenter.h" -// OFFSET: LEGO1 0x10073ea0 STUB +// STUB: LEGO1 0x10073ea0 MxCompositeMediaPresenter::MxCompositeMediaPresenter() { // TODO diff --git a/LEGO1/mxcompositemediapresenter.h b/LEGO1/mxcompositemediapresenter.h index f651fe5b..fd20db16 100644 --- a/LEGO1/mxcompositemediapresenter.h +++ b/LEGO1/mxcompositemediapresenter.h @@ -3,20 +3,20 @@ #include "mxcompositepresenter.h" -// VTABLE 0x100dc618 +// VTABLE: LEGO1 0x100dc618 // SIZE 0x50 class MxCompositeMediaPresenter : public MxCompositePresenter { public: MxCompositeMediaPresenter(); - // OFFSET: LEGO1 0x10073f10 + // FUNCTION: LEGO1 0x10073f10 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f02d4 + // GLOBAL: LEGO1 0x100f02d4 return "MxCompositeMediaPresenter"; } - // OFFSET: LEGO1 0x10073f20 + // FUNCTION: LEGO1 0x10073f20 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxCompositeMediaPresenter::ClassName()) || MxCompositePresenter::IsA(name); diff --git a/LEGO1/mxcompositepresenter.cpp b/LEGO1/mxcompositepresenter.cpp index 1275f317..acc4002e 100644 --- a/LEGO1/mxcompositepresenter.cpp +++ b/LEGO1/mxcompositepresenter.cpp @@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(MxCompositePresenter, 0x4c); -// OFFSET: LEGO1 0x1000caf0 +// FUNCTION: LEGO1 0x1000caf0 MxBool MxCompositePresenter::VTable0x64(undefined4 p_unknown) { if (m_compositePresenter) @@ -13,31 +13,31 @@ MxBool MxCompositePresenter::VTable0x64(undefined4 p_unknown) return TRUE; } -// OFFSET: LEGO1 0x100b60b0 +// FUNCTION: LEGO1 0x100b60b0 MxCompositePresenter::MxCompositePresenter() { NotificationManager()->Register(this); } -// OFFSET: LEGO1 0x100b6390 +// FUNCTION: LEGO1 0x100b6390 MxCompositePresenter::~MxCompositePresenter() { NotificationManager()->Unregister(this); } -// OFFSET: LEGO1 0x100b67f0 STUB +// STUB: LEGO1 0x100b67f0 void MxCompositePresenter::VTable0x58() { // TODO } -// OFFSET: LEGO1 0x100b69b0 STUB +// STUB: LEGO1 0x100b69b0 void MxCompositePresenter::VTable0x5c() { // TODO } -// OFFSET: LEGO1 0x100b6b40 STUB +// STUB: LEGO1 0x100b6b40 void MxCompositePresenter::VTable0x60(undefined4 p_unknown) { // TODO diff --git a/LEGO1/mxcompositepresenter.h b/LEGO1/mxcompositepresenter.h index c8eedfaf..2aee103f 100644 --- a/LEGO1/mxcompositepresenter.h +++ b/LEGO1/mxcompositepresenter.h @@ -4,21 +4,21 @@ #include "mxpresenter.h" #include "mxunklist.h" -// VTABLE 0x100dc618 +// VTABLE: LEGO1 0x100dc618 // SIZE 0x4c class MxCompositePresenter : public MxPresenter { public: MxCompositePresenter(); virtual ~MxCompositePresenter() override; // vtable+0x0 - // OFFSET: LEGO1 0x100b6210 + // FUNCTION: LEGO1 0x100b6210 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0774 + // GLOBAL: LEGO1 0x100f0774 return "MxCompositePresenter"; } - // OFFSET: LEGO1 0x100b6220 + // FUNCTION: LEGO1 0x100b6220 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxCompositePresenter::ClassName()) || MxPresenter::IsA(name); diff --git a/LEGO1/mxcontrolpresenter.cpp b/LEGO1/mxcontrolpresenter.cpp index 443fe0dc..a3ffc3d6 100644 --- a/LEGO1/mxcontrolpresenter.cpp +++ b/LEGO1/mxcontrolpresenter.cpp @@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(MxControlPresenter, 0x5c) -// OFFSET: LEGO1 0x10043f50 +// FUNCTION: LEGO1 0x10043f50 MxControlPresenter::MxControlPresenter() { this->m_unk4c = 0; @@ -16,7 +16,7 @@ MxControlPresenter::MxControlPresenter() this->m_unk54 = 0; } -// OFFSET: LEGO1 0x10044110 +// FUNCTION: LEGO1 0x10044110 MxControlPresenter::~MxControlPresenter() { if (this->m_unk58) { @@ -24,7 +24,7 @@ MxControlPresenter::~MxControlPresenter() } } -// OFFSET: LEGO1 0x10044610 +// FUNCTION: LEGO1 0x10044610 void MxControlPresenter::ReadyTickle() { MxPresenter::ParseExtra(); diff --git a/LEGO1/mxcontrolpresenter.h b/LEGO1/mxcontrolpresenter.h index 489451be..716a7cc0 100644 --- a/LEGO1/mxcontrolpresenter.h +++ b/LEGO1/mxcontrolpresenter.h @@ -4,21 +4,21 @@ #include "decomp.h" #include "mxcompositepresenter.h" -// VTABLE 0x100d7b88 +// VTABLE: LEGO1 0x100d7b88 // SIZE 0x5c class MxControlPresenter : public MxCompositePresenter { public: MxControlPresenter(); virtual ~MxControlPresenter() override; - // OFFSET: LEGO1 0x10044000 + // FUNCTION: LEGO1 0x10044000 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0514 + // GLOBAL: LEGO1 0x100f0514 return "MxControlPresenter"; } - // OFFSET: LEGO1 0x10044010 + // FUNCTION: LEGO1 0x10044010 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxControlPresenter::ClassName()) || MxCompositePresenter::IsA(name); diff --git a/LEGO1/mxcore.cpp b/LEGO1/mxcore.cpp index 519c3cfa..3a8270df 100644 --- a/LEGO1/mxcore.cpp +++ b/LEGO1/mxcore.cpp @@ -2,25 +2,25 @@ #include "define.h" -// OFFSET: LEGO1 0x10001f70 +// FUNCTION: LEGO1 0x10001f70 MxResult MxCore::Tickle() { return SUCCESS; } -// OFFSET: LEGO1 0x100ae1a0 +// FUNCTION: LEGO1 0x100ae1a0 MxCore::MxCore() { m_id = g_mxcoreCount[0]; g_mxcoreCount[0]++; } -// OFFSET: LEGO1 0x100ae1e0 +// FUNCTION: LEGO1 0x100ae1e0 MxCore::~MxCore() { } -// OFFSET: LEGO1 0x100ae1f0 +// FUNCTION: LEGO1 0x100ae1f0 MxLong MxCore::Notify(MxParam& p) { return 0; diff --git a/LEGO1/mxcore.h b/LEGO1/mxcore.h index 5ea45f93..4de691cc 100644 --- a/LEGO1/mxcore.h +++ b/LEGO1/mxcore.h @@ -9,13 +9,13 @@ class MxParam; // TODO: Find proper compilation unit to put these -// OFFSET: LEGO1 0x100140d0 TEMPLATE +// FUNCTION: LEGO1 0x100140d0 // MxCore::IsA -// OFFSET: LEGO1 0x100144c0 TEMPLATE +// FUNCTION: LEGO1 0x100144c0 // MxCore::ClassName -// VTABLE 0x100dc0f8 +// VTABLE: LEGO1 0x100dc0f8 // SIZE 0x8 class MxCore { public: @@ -26,7 +26,7 @@ class MxCore { inline virtual const char* ClassName() const // vtable+0c { - // 0x100f007c + // GLOBAL: LEGO1 0x100f007c return "MxCore"; } diff --git a/LEGO1/mxcriticalsection.cpp b/LEGO1/mxcriticalsection.cpp index 4953180c..1038f7ad 100644 --- a/LEGO1/mxcriticalsection.cpp +++ b/LEGO1/mxcriticalsection.cpp @@ -6,10 +6,10 @@ DECOMP_SIZE_ASSERT(MxCriticalSection, 0x1c); -// 0x10101e78 +// GLOBAL: LEGO1 0x10101e78 int g_useMutex = 0; -// OFFSET: LEGO1 0x100b6d20 +// FUNCTION: LEGO1 0x100b6d20 MxCriticalSection::MxCriticalSection() { HANDLE mutex; @@ -24,7 +24,7 @@ MxCriticalSection::MxCriticalSection() this->m_mutex = NULL; } -// OFFSET: LEGO1 0x100b6d60 +// FUNCTION: LEGO1 0x100b6d60 MxCriticalSection::~MxCriticalSection() { if (this->m_mutex != NULL) { @@ -35,7 +35,7 @@ MxCriticalSection::~MxCriticalSection() DeleteCriticalSection(&this->m_criticalSection); } -// OFFSET: LEGO1 0x100b6d80 +// FUNCTION: LEGO1 0x100b6d80 void MxCriticalSection::Enter() { DWORD result; @@ -58,7 +58,7 @@ void MxCriticalSection::Enter() } } -// OFFSET: LEGO1 0x100b6de0 +// FUNCTION: LEGO1 0x100b6de0 void MxCriticalSection::Leave() { if (this->m_mutex != NULL) { @@ -69,7 +69,7 @@ void MxCriticalSection::Leave() LeaveCriticalSection(&this->m_criticalSection); } -// OFFSET: LEGO1 0x100b6e00 +// FUNCTION: LEGO1 0x100b6e00 void MxCriticalSection::SetDoMutex() { g_useMutex = 1; diff --git a/LEGO1/mxdirect3d.cpp b/LEGO1/mxdirect3d.cpp index 2b8f66b7..64c39984 100644 --- a/LEGO1/mxdirect3d.cpp +++ b/LEGO1/mxdirect3d.cpp @@ -6,7 +6,7 @@ DECOMP_SIZE_ASSERT(MxDirect3D, 0x894); DECOMP_SIZE_ASSERT(MxDeviceModeFinder, 0xe4); DECOMP_SIZE_ASSERT(MxDeviceEnumerate, 0x198); -// OFFSET: LEGO1 0x1009b0a0 +// FUNCTION: LEGO1 0x1009b0a0 MxDirect3D::MxDirect3D() { this->m_pDirect3d = NULL; @@ -15,13 +15,13 @@ MxDirect3D::MxDirect3D() this->m_pDeviceModeFinder = NULL; } -// OFFSET: LEGO1 0x1009b140 +// FUNCTION: LEGO1 0x1009b140 MxDirect3D::~MxDirect3D() { Destroy(); } -// OFFSET: LEGO1 0x1009b1a0 +// FUNCTION: LEGO1 0x1009b1a0 BOOL MxDirect3D::Create( HWND hWnd, BOOL fullscreen_1, @@ -57,7 +57,7 @@ BOOL MxDirect3D::Create( return success; } -// OFFSET: LEGO1 0x1009b210 +// FUNCTION: LEGO1 0x1009b210 void MxDirect3D::Destroy() { if (this->m_pDirect3dDevice) { @@ -84,7 +84,7 @@ void MxDirect3D::Destroy() MxDirectDraw::Destroy(); } -// OFFSET: LEGO1 0x1009b290 +// FUNCTION: LEGO1 0x1009b290 void MxDirect3D::Clear() { if (this->m_pDirect3dDevice) { @@ -98,7 +98,7 @@ void MxDirect3D::Clear() MxDirectDraw::DestroyButNotDirectDraw(); } -// OFFSET: LEGO1 0x1009b2d0 +// FUNCTION: LEGO1 0x1009b2d0 BOOL MxDirect3D::CreateIDirect3D() { MxResult ret = IDirect3D_QueryInterface(m_pDirectDraw, IID_IDirect3D2, (LPVOID*) &m_pDirect3d); @@ -111,7 +111,7 @@ BOOL MxDirect3D::CreateIDirect3D() return TRUE; } -// OFFSET: LEGO1 0x1009b310 STUB +// STUB: LEGO1 0x1009b310 BOOL MxDirect3D::D3DSetMode() { // TODO @@ -122,13 +122,13 @@ BOOL MxDirect3D::D3DSetMode() return TRUE; } -// OFFSET: LEGO1 0x1009b8b0 +// FUNCTION: LEGO1 0x1009b8b0 MxDeviceModeFinder::MxDeviceModeFinder() { memset(this, 0, sizeof(*this)); } -// OFFSET: LEGO1 0x1009b8d0 +// FUNCTION: LEGO1 0x1009b8d0 MxDeviceModeFinder::~MxDeviceModeFinder() { if (m_deviceInfo) { @@ -137,7 +137,7 @@ MxDeviceModeFinder::~MxDeviceModeFinder() } } -// OFFSET: LEGO1 0x1009c070 STUB +// STUB: LEGO1 0x1009c070 BOOL MxDeviceEnumerate::FUN_1009c070() { // TODO @@ -150,7 +150,7 @@ BOOL MxDeviceEnumerate::FUN_1009c070() return TRUE; } -// OFFSET: LEGO1 0x1009c4c0 +// FUNCTION: LEGO1 0x1009c4c0 void MxDirect3D::BuildErrorString(const char* p_format, ...) { va_list args; @@ -163,7 +163,7 @@ void MxDirect3D::BuildErrorString(const char* p_format, ...) OutputDebugString(buf); } -// OFFSET: LEGO1 0x1009c6c0 +// FUNCTION: LEGO1 0x1009c6c0 MxResult MxDeviceEnumerate::_DoEnumerate() { // TODO: what does ECX refer to in this context? @@ -180,14 +180,14 @@ MxResult MxDeviceEnumerate::_DoEnumerate() return SUCCESS; } -// OFFSET: LEGO1 0x1009c710 STUB +// STUB: LEGO1 0x1009c710 BOOL FAR PASCAL EnumerateCallback(GUID FAR*, LPSTR, LPSTR, LPVOID) { // TODO return FALSE; } -// OFFSET: LEGO1 0x1009c730 STUB +// STUB: LEGO1 0x1009c730 const char* MxDeviceEnumerate::EnumerateErrorToString(HRESULT p_error) { // TODO: This is a list of error messages, similar to the function in diff --git a/LEGO1/mxdirect3d.h b/LEGO1/mxdirect3d.h index 97821ab0..f038ee7f 100644 --- a/LEGO1/mxdirect3d.h +++ b/LEGO1/mxdirect3d.h @@ -17,7 +17,8 @@ class MxDeviceModeFinder { MxDirectDraw::DeviceModesInfo* m_deviceInfo; // +0xe0 }; -// VTABLE 0x100db814 (or 0x100d9cc8?) +// VTABLE: LEGO1 0x100db814 +// or is it 0x100d9cc8? // SIZE 0x198 class MxDeviceEnumerate { public: @@ -35,7 +36,7 @@ class MxDeviceEnumerate { undefined4 m_unknown[97]; }; -// VTABLE 0x100db800 +// VTABLE: LEGO1 0x100db800 // SIZE 0x894 class MxDirect3D : public MxDirectDraw { public: diff --git a/LEGO1/mxdirectdraw.cpp b/LEGO1/mxdirectdraw.cpp index b9181737..adba7ac1 100644 --- a/LEGO1/mxdirectdraw.cpp +++ b/LEGO1/mxdirectdraw.cpp @@ -9,10 +9,10 @@ DECOMP_SIZE_ASSERT(MxDirectDraw::DeviceModesInfo, 0x17c); #define DDSCAPS_3DDEVICE 0x00002000l #endif -// GLOBAL OFFSET: LEGO1 0x10100c68 +// GLOBAL: LEGO1 0x10100c68 BOOL g_is_PALETTEINDEXED8 = 0; -// OFFSET: LEGO1 0x1009d490 +// FUNCTION: LEGO1 0x1009d490 MxDirectDraw::MxDirectDraw() { m_pFrontBuffer = NULL; @@ -39,7 +39,7 @@ MxDirectDraw::MxDirectDraw() m_hFont = NULL; } -// OFFSET: LEGO1 0x1009d530 +// FUNCTION: LEGO1 0x1009d530 MxDirectDraw::~MxDirectDraw() { Destroy(); @@ -50,7 +50,7 @@ MxDirectDraw::~MxDirectDraw() } } -// OFFSET: LEGO1 0x1009d570 +// FUNCTION: LEGO1 0x1009d570 int MxDirectDraw::GetPrimaryBitDepth() { DWORD dwRGBBitCount; @@ -72,7 +72,7 @@ int MxDirectDraw::GetPrimaryBitDepth() return dwRGBBitCount; } -// OFFSET: LEGO1 0x1009d5e0 +// FUNCTION: LEGO1 0x1009d5e0 BOOL MxDirectDraw::Create( HWND hWnd, BOOL fullscreen_1, @@ -117,7 +117,7 @@ BOOL MxDirectDraw::Create( return TRUE; } -// OFFSET: LEGO1 0x1009d690 +// FUNCTION: LEGO1 0x1009d690 BOOL MxDirectDraw::RecreateDirectDraw(GUID** ppGUID) { if (m_pDirectDraw) { @@ -128,7 +128,7 @@ BOOL MxDirectDraw::RecreateDirectDraw(GUID** ppGUID) return (DirectDrawCreate(*ppGUID, &m_pDirectDraw, 0) == DD_OK); } -// OFFSET: LEGO1 0x1009d6c0 +// FUNCTION: LEGO1 0x1009d6c0 BOOL MxDirectDraw::CacheOriginalPaletteEntries() { HDC DC; @@ -141,7 +141,7 @@ BOOL MxDirectDraw::CacheOriginalPaletteEntries() return TRUE; } -// OFFSET: LEGO1 0x1009d700 +// FUNCTION: LEGO1 0x1009d700 BOOL MxDirectDraw::SetPaletteEntries(const PALETTEENTRY* pPaletteEntries, int paletteEntryCount, BOOL fullscreen) { int reservedLowEntryCount = 10; @@ -192,7 +192,7 @@ BOOL MxDirectDraw::SetPaletteEntries(const PALETTEENTRY* pPaletteEntries, int pa return TRUE; } -// OFFSET: LEGO1 0x1009d800 +// FUNCTION: LEGO1 0x1009d800 void MxDirectDraw::Destroy() { DestroyButNotDirectDraw(); @@ -212,7 +212,7 @@ void MxDirectDraw::Destroy() } } -// OFFSET: LEGO1 0x1009d860 +// FUNCTION: LEGO1 0x1009d860 void MxDirectDraw::DestroyButNotDirectDraw() { RestoreOriginalPaletteEntries(); @@ -260,7 +260,7 @@ void MxDirectDraw::DestroyButNotDirectDraw() } } -// OFFSET: LEGO1 0x1009d920 +// FUNCTION: LEGO1 0x1009d920 void MxDirectDraw::FUN_1009D920() { RestoreOriginalPaletteEntries(); @@ -272,7 +272,7 @@ void MxDirectDraw::FUN_1009D920() } } -// OFFSET: LEGO1 0x1009d960 +// FUNCTION: LEGO1 0x1009d960 BOOL MxDirectDraw::DDInit(BOOL fullscreen) { HRESULT result; @@ -296,7 +296,7 @@ BOOL MxDirectDraw::DDInit(BOOL fullscreen) return TRUE; } -// OFFSET: LEGO1 0x1009d9d0 +// FUNCTION: LEGO1 0x1009d9d0 BOOL MxDirectDraw::IsSupportedMode(int width, int height, int bpp) { Mode mode = {width, height, bpp}; @@ -310,7 +310,7 @@ BOOL MxDirectDraw::IsSupportedMode(int width, int height, int bpp) return FALSE; } -// OFFSET: LEGO1 0x1009da20 +// FUNCTION: LEGO1 0x1009da20 void EnableResizing(HWND hwnd, BOOL flag) { static DWORD dwStyle; @@ -326,7 +326,7 @@ void EnableResizing(HWND hwnd, BOOL flag) } } -// OFFSET: LEGO1 0x1009da80 +// FUNCTION: LEGO1 0x1009da80 BOOL MxDirectDraw::DDSetMode(int width, int height, int bpp) { HRESULT result; @@ -442,13 +442,13 @@ BOOL MxDirectDraw::DDSetMode(int width, int height, int bpp) return m_bFullScreen || CreateTextSurfaces(); } -// OFFSET: LEGO1 0x1009dd80 +// FUNCTION: LEGO1 0x1009dd80 HRESULT MxDirectDraw::CreateDDSurface(LPDDSURFACEDESC a2, LPDIRECTDRAWSURFACE* a3, IUnknown* a4) { return m_pDirectDraw->CreateSurface(a2, a3, a4); } -// OFFSET: LEGO1 0x1009dda0 +// FUNCTION: LEGO1 0x1009dda0 BOOL MxDirectDraw::GetDDSurfaceDesc(LPDDSURFACEDESC lpDDSurfDesc, LPDIRECTDRAWSURFACE lpDDSurf) { HRESULT result; @@ -463,7 +463,7 @@ BOOL MxDirectDraw::GetDDSurfaceDesc(LPDDSURFACEDESC lpDDSurfDesc, LPDIRECTDRAWSU return (result == DD_OK); } -// OFFSET: LEGO1 0x1009ddf0 +// FUNCTION: LEGO1 0x1009ddf0 BOOL MxDirectDraw::DDCreateSurfaces() { HRESULT result; @@ -542,7 +542,7 @@ BOOL MxDirectDraw::DDCreateSurfaces() return TRUE; } -// OFFSET: LEGO1 0x1009e020 +// FUNCTION: LEGO1 0x1009e020 void MxDirectDraw::FUN_1009E020() { HRESULT result; @@ -581,7 +581,7 @@ void MxDirectDraw::FUN_1009E020() } } -// OFFSET: LEGO1 0x1009e110 +// FUNCTION: LEGO1 0x1009e110 BOOL MxDirectDraw::TextToTextSurface(const char* text, IDirectDrawSurface* pSurface, SIZE& textSizeOnSurface) { HRESULT result; @@ -613,19 +613,19 @@ BOOL MxDirectDraw::TextToTextSurface(const char* text, IDirectDrawSurface* pSurf return TRUE; } -// OFFSET: LEGO1 0x1009e210 +// FUNCTION: LEGO1 0x1009e210 BOOL MxDirectDraw::TextToTextSurface1(const char* text) { return TextToTextSurface(text, m_pText1Surface, m_text1SizeOnSurface); } -// OFFSET: LEGO1 0x1009e230 +// FUNCTION: LEGO1 0x1009e230 BOOL MxDirectDraw::TextToTextSurface2(const char* text) { return TextToTextSurface(text, m_pText2Surface, m_text2SizeOnSurface); } -// OFFSET: LEGO1 0x1009e250 +// FUNCTION: LEGO1 0x1009e250 BOOL MxDirectDraw::CreateTextSurfaces() { HRESULT result; @@ -707,7 +707,7 @@ BOOL MxDirectDraw::CreateTextSurfaces() return TRUE; } -// OFFSET: LEGO1 0x1009e4d0 +// FUNCTION: LEGO1 0x1009e4d0 BOOL MxDirectDraw::RestoreSurfaces() { HRESULT result; @@ -765,7 +765,7 @@ BOOL MxDirectDraw::RestoreSurfaces() return TRUE; } -// OFFSET: LEGO1 0x1009e5e0 +// FUNCTION: LEGO1 0x1009e5e0 BOOL MxDirectDraw::CreateZBuffer(DWORD memorytype, DWORD depth) { HRESULT result; // eax @@ -796,7 +796,7 @@ BOOL MxDirectDraw::CreateZBuffer(DWORD memorytype, DWORD depth) return TRUE; } -// OFFSET: LEGO1 0x1009e6a0 +// FUNCTION: LEGO1 0x1009e6a0 int MxDirectDraw::Pause(int p_increment) { if (p_increment) { @@ -836,7 +836,7 @@ int MxDirectDraw::Pause(int p_increment) return TRUE; } -// OFFSET: LEGO1 0x1009e750 +// FUNCTION: LEGO1 0x1009e750 BOOL MxDirectDraw::RestorePaletteEntries() { HRESULT result; @@ -854,7 +854,7 @@ BOOL MxDirectDraw::RestorePaletteEntries() return TRUE; } -// OFFSET: LEGO1 0x1009e7a0 +// FUNCTION: LEGO1 0x1009e7a0 BOOL MxDirectDraw::RestoreOriginalPaletteEntries() { HRESULT result; @@ -872,7 +872,7 @@ BOOL MxDirectDraw::RestoreOriginalPaletteEntries() return TRUE; } -// OFFSET: LEGO1 0x1009e7f0 +// FUNCTION: LEGO1 0x1009e7f0 int MxDirectDraw::FlipToGDISurface() { HRESULT ret; @@ -888,10 +888,10 @@ int MxDirectDraw::FlipToGDISurface() return 1; } -// OFFSET: LEGO1 0x1009e830 +// FUNCTION: LEGO1 0x1009e830 void MxDirectDraw::Error(const char* message, int error) { - // 0x10100c70 + // GLOBAL: LEGO1 0x10100c70 static BOOL isInsideError = FALSE; if (!isInsideError) { isInsideError = TRUE; @@ -903,7 +903,7 @@ void MxDirectDraw::Error(const char* message, int error) } } -// OFFSET: LEGO1 0x1009e880 +// FUNCTION: LEGO1 0x1009e880 const char* MxDirectDraw::ErrorToString(HRESULT error) { switch (error) { @@ -1113,13 +1113,13 @@ const char* MxDirectDraw::ErrorToString(HRESULT error) } } -// OFFSET: LEGO1 0x1009efb0 +// FUNCTION: LEGO1 0x1009efb0 MxDirectDraw::DeviceModesInfo::DeviceModesInfo() { memset(this, 0, sizeof(*this)); } -// OFFSET: LEGO1 0x1009efd0 +// FUNCTION: LEGO1 0x1009efd0 MxDirectDraw::DeviceModesInfo::~DeviceModesInfo() { if (p_guid != NULL) { diff --git a/LEGO1/mxdirectdraw.h b/LEGO1/mxdirectdraw.h index 8a879a70..3e6087cf 100644 --- a/LEGO1/mxdirectdraw.h +++ b/LEGO1/mxdirectdraw.h @@ -6,7 +6,7 @@ extern BOOL g_is_PALETTEINDEXED8; -// VTABLE 0x100db818 +// VTABLE: LEGO1 0x100db818 // SIZE 0x880 class MxDirectDraw { public: diff --git a/LEGO1/mxdiskstreamcontroller.cpp b/LEGO1/mxdiskstreamcontroller.cpp index b3b526b6..70fdecaa 100644 --- a/LEGO1/mxdiskstreamcontroller.cpp +++ b/LEGO1/mxdiskstreamcontroller.cpp @@ -7,31 +7,31 @@ DECOMP_SIZE_ASSERT(MxDiskStreamController, 0xc8); -// OFFSET: LEGO1 0x100c7120 +// FUNCTION: LEGO1 0x100c7120 MxDiskStreamController::MxDiskStreamController() { m_unk8c = 0; } -// OFFSET: LEGO1 0x100c7330 TEMPLATE +// TEMPLATE: LEGO1 0x100c7330 // list >::_Buynode -// OFFSET: LEGO1 0x100c7420 TEMPLATE +// TEMPLATE: LEGO1 0x100c7420 // list >::~list > -// OFFSET: LEGO1 0x100c7490 TEMPLATE +// TEMPLATE: LEGO1 0x100c7490 // list >::_Buynode -// OFFSET: LEGO1 0x100c74e0 TEMPLATE +// TEMPLATE: LEGO1 0x100c74e0 // List::~List -// OFFSET: LEGO1 0x100c7530 STUB +// STUB: LEGO1 0x100c7530 MxDiskStreamController::~MxDiskStreamController() { // TODO } -// OFFSET: LEGO1 0x100c7790 +// FUNCTION: LEGO1 0x100c7790 MxResult MxDiskStreamController::Open(const char* p_filename) { MxAutoLocker lock(&this->m_criticalSection); @@ -57,47 +57,47 @@ MxResult MxDiskStreamController::Open(const char* p_filename) return result; } -// OFFSET: LEGO1 0x100c7880 +// FUNCTION: LEGO1 0x100c7880 MxResult MxDiskStreamController::vtable0x18(undefined4 p_unknown, undefined4 p_unknown2) { return SUCCESS; } -// OFFSET: LEGO1 0x100c7960 +// FUNCTION: LEGO1 0x100c7960 MxResult MxDiskStreamController::vtable0x34(undefined4 p_unknown) { return FAILURE; } -// OFFSET: LEGO1 0x100c7ac0 STUB +// STUB: LEGO1 0x100c7ac0 MxResult MxDiskStreamController::vtable0x28() { // TODO return FAILURE; } -// OFFSET: LEGO1 0x100c7c00 STUB +// STUB: LEGO1 0x100c7c00 MxResult MxDiskStreamController::vtable0x30(undefined4 p_unknown) { // TODO return FAILURE; } -// OFFSET: LEGO1 0x100c7ff0 STUB +// STUB: LEGO1 0x100c7ff0 MxResult MxDiskStreamController::vtable0x20(MxDSAction* p_action) { // TODO return FAILURE; } -// OFFSET: LEGO1 0x100c8160 STUB +// STUB: LEGO1 0x100c8160 MxResult MxDiskStreamController::vtable0x24(undefined4 p_unknown) { // TODO return FAILURE; } -// OFFSET: LEGO1 0x100c8640 STUB +// STUB: LEGO1 0x100c8640 MxResult MxDiskStreamController::Tickle() { // TODO diff --git a/LEGO1/mxdiskstreamcontroller.h b/LEGO1/mxdiskstreamcontroller.h index 9b9eb694..bed571f4 100644 --- a/LEGO1/mxdiskstreamcontroller.h +++ b/LEGO1/mxdiskstreamcontroller.h @@ -9,7 +9,7 @@ #include -// VTABLE 0x100dccb8 +// VTABLE: LEGO1 0x100dccb8 // SIZE 0xc8 class MxDiskStreamController : public MxStreamController { public: @@ -25,14 +25,14 @@ class MxDiskStreamController : public MxStreamController { virtual MxResult vtable0x30(undefined4 p_unknown) override; // vtable+0x30 virtual MxResult vtable0x34(undefined4 p_unknown); // vtable+0x34 - // OFFSET: LEGO1 0x100c7360 + // FUNCTION: LEGO1 0x100c7360 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x10102144 + // GLOBAL: LEGO1 0x10102144 return "MxDiskStreamController"; } - // OFFSET: LEGO1 0x100c7370 + // FUNCTION: LEGO1 0x100c7370 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDiskStreamController::ClassName()) || MxStreamController::IsA(name); diff --git a/LEGO1/mxdiskstreamprovider.cpp b/LEGO1/mxdiskstreamprovider.cpp index f8a442c4..614aab48 100644 --- a/LEGO1/mxdiskstreamprovider.cpp +++ b/LEGO1/mxdiskstreamprovider.cpp @@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(MxDiskStreamProvider, 0x60); -// OFFSET: LEGO1 0x100d0f30 +// FUNCTION: LEGO1 0x100d0f30 MxResult MxDiskStreamProviderThread::Run() { if (m_target) @@ -17,14 +17,14 @@ MxResult MxDiskStreamProviderThread::Run() return SUCCESS; } -// OFFSET: LEGO1 0x100d0f50 +// FUNCTION: LEGO1 0x100d0f50 MxResult MxDiskStreamProviderThread::StartWithTarget(MxDiskStreamProvider* p_target) { m_target = p_target; return Start(0x1000, 0); } -// OFFSET: LEGO1 0x100d0f70 +// FUNCTION: LEGO1 0x100d0f70 MxDiskStreamProvider::MxDiskStreamProvider() { this->m_pFile = NULL; @@ -32,13 +32,13 @@ MxDiskStreamProvider::MxDiskStreamProvider() this->m_unk35 = 0; } -// OFFSET: LEGO1 0x100d1240 STUB +// STUB: LEGO1 0x100d1240 MxDiskStreamProvider::~MxDiskStreamProvider() { // TODO } -// OFFSET: LEGO1 0x100d13d0 +// FUNCTION: LEGO1 0x100d13d0 MxResult MxDiskStreamProvider::SetResourceToGet(MxStreamController* p_resource) { MxResult result = FAILURE; @@ -70,13 +70,13 @@ MxResult MxDiskStreamProvider::SetResourceToGet(MxStreamController* p_resource) return result; } -// OFFSET: LEGO1 0x100d15e0 STUB +// STUB: LEGO1 0x100d15e0 void MxDiskStreamProvider::vtable0x20(undefined4 p_unknown1) { // TODO } -// OFFSET: LEGO1 0x100d1750 +// FUNCTION: LEGO1 0x100d1750 MxResult MxDiskStreamProvider::WaitForWorkToComplete() { while (m_remainingWork != 0) { @@ -87,31 +87,31 @@ MxResult MxDiskStreamProvider::WaitForWorkToComplete() return SUCCESS; } -// OFFSET: LEGO1 0x100d18f0 STUB +// STUB: LEGO1 0x100d18f0 void MxDiskStreamProvider::PerformWork() { // TODO } -// OFFSET: LEGO1 0x100d1e90 +// FUNCTION: LEGO1 0x100d1e90 MxU32 MxDiskStreamProvider::GetFileSize() { return m_pFile->GetBufferSize(); } -// OFFSET: LEGO1 0x100d1ea0 +// FUNCTION: LEGO1 0x100d1ea0 MxU32 MxDiskStreamProvider::GetStreamBuffersNum() { return m_pFile->GetStreamBuffersNum(); } -// OFFSET: LEGO1 0x100d1eb0 +// FUNCTION: LEGO1 0x100d1eb0 MxU32 MxDiskStreamProvider::GetLengthInDWords() { return m_pFile->GetLengthInDWords(); } -// OFFSET: LEGO1 0x100d1ec0 +// FUNCTION: LEGO1 0x100d1ec0 MxU32* MxDiskStreamProvider::GetBufferForDWords() { return m_pFile->GetBuffer(); diff --git a/LEGO1/mxdiskstreamprovider.h b/LEGO1/mxdiskstreamprovider.h index dbaa75fc..d6bc68a1 100644 --- a/LEGO1/mxdiskstreamprovider.h +++ b/LEGO1/mxdiskstreamprovider.h @@ -11,7 +11,7 @@ class MxDiskStreamProvider; -// VTABLE 0x100dd130 +// VTABLE: LEGO1 0x100dd130 class MxDiskStreamProviderThread : public MxThread { public: // Only inlined, no offset @@ -22,21 +22,21 @@ class MxDiskStreamProviderThread : public MxThread { MxResult StartWithTarget(MxDiskStreamProvider* p_target); }; -// VTABLE 0x100dd138 +// VTABLE: LEGO1 0x100dd138 class MxDiskStreamProvider : public MxStreamProvider { public: MxDiskStreamProvider(); virtual ~MxDiskStreamProvider() override; - // OFFSET: LEGO1 0x100d1160 + // FUNCTION: LEGO1 0x100d1160 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x1010287c + // GLOBAL: LEGO1 0x1010287c return "MxDiskStreamProvider"; } - // OFFSET: LEGO1 0x100d1170 + // FUNCTION: LEGO1 0x100d1170 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDiskStreamProvider::ClassName()) || MxStreamProvider::IsA(name); diff --git a/LEGO1/mxdisplaysurface.cpp b/LEGO1/mxdisplaysurface.cpp index 6f5928b7..fe849489 100644 --- a/LEGO1/mxdisplaysurface.cpp +++ b/LEGO1/mxdisplaysurface.cpp @@ -5,19 +5,19 @@ DECOMP_SIZE_ASSERT(MxDisplaySurface, 0xac); -// OFFSET: LEGO1 0x100ba500 +// FUNCTION: LEGO1 0x100ba500 MxDisplaySurface::MxDisplaySurface() { this->Reset(); } -// OFFSET: LEGO1 0x100ba5a0 +// FUNCTION: LEGO1 0x100ba5a0 MxDisplaySurface::~MxDisplaySurface() { this->Clear(); } -// OFFSET: LEGO1 0x100ba610 +// FUNCTION: LEGO1 0x100ba610 void MxDisplaySurface::Reset() { this->m_ddSurface1 = NULL; @@ -28,13 +28,13 @@ void MxDisplaySurface::Reset() memset(&this->m_surfaceDesc, 0, sizeof(this->m_surfaceDesc)); } -// OFFSET: LEGO1 0x100ba640 STUB +// STUB: LEGO1 0x100ba640 void MxDisplaySurface::FUN_100ba640() { // TODO } -// OFFSET: LEGO1 0x100ba790 +// FUNCTION: LEGO1 0x100ba790 MxResult MxDisplaySurface::Init( MxVideoParam& p_videoParam, LPDIRECTDRAWSURFACE p_ddSurface1, @@ -59,7 +59,7 @@ MxResult MxDisplaySurface::Init( return result; } -// OFFSET: LEGO1 0x100ba7f0 +// FUNCTION: LEGO1 0x100ba7f0 MxResult MxDisplaySurface::Create(MxVideoParam& p_videoParam) { DDSURFACEDESC ddsd; @@ -159,7 +159,7 @@ MxResult MxDisplaySurface::Create(MxVideoParam& p_videoParam) return result; } -// OFFSET: LEGO1 0x100baa90 +// FUNCTION: LEGO1 0x100baa90 void MxDisplaySurface::Clear() { if (this->m_initialized) { @@ -179,18 +179,18 @@ void MxDisplaySurface::Clear() this->Reset(); } -// OFFSET: LEGO1 0x100baae0 STUB +// STUB: LEGO1 0x100baae0 void MxDisplaySurface::SetPalette(MxPalette* p_palette) { } -// OFFSET: LEGO1 0x100bacc0 STUB +// STUB: LEGO1 0x100bacc0 MxBool MxDisplaySurface::vtable28(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4) { return 0; } -// OFFSET: LEGO1 0x100bb1d0 STUB +// STUB: LEGO1 0x100bb1d0 MxBool MxDisplaySurface::vtable30( undefined4, undefined4, @@ -205,18 +205,18 @@ MxBool MxDisplaySurface::vtable30( return 0; } -// OFFSET: LEGO1 0x100bb850 STUB +// STUB: LEGO1 0x100bb850 undefined4 MxDisplaySurface::vtable34(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4) { return 0; } -// OFFSET: LEGO1 0x100bba50 STUB +// STUB: LEGO1 0x100bba50 void MxDisplaySurface::Display(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4) { } -// OFFSET: LEGO1 0x100bbc10 +// FUNCTION: LEGO1 0x100bbc10 void MxDisplaySurface::GetDC(HDC* p_hdc) { if (this->m_ddSurface2 && !this->m_ddSurface2->GetDC(p_hdc)) @@ -225,20 +225,20 @@ void MxDisplaySurface::GetDC(HDC* p_hdc) *p_hdc = NULL; } -// OFFSET: LEGO1 0x100bbc40 +// FUNCTION: LEGO1 0x100bbc40 void MxDisplaySurface::ReleaseDC(HDC p_hdc) { if (this->m_ddSurface2 && p_hdc) this->m_ddSurface2->ReleaseDC(p_hdc); } -// OFFSET: LEGO1 0x100bbc60 STUB +// STUB: LEGO1 0x100bbc60 LPDIRECTDRAWSURFACE MxDisplaySurface::vtable44(MxBitmap*, undefined4*, undefined4, undefined4) { return NULL; } -// OFFSET: LEGO1 0x100bc200 STUB +// STUB: LEGO1 0x100bc200 void MxDisplaySurface::vtable24( LPDDSURFACEDESC, MxBitmap*, @@ -252,7 +252,7 @@ void MxDisplaySurface::vtable24( { } -// OFFSET: LEGO1 0x100bc630 STUB +// STUB: LEGO1 0x100bc630 MxBool MxDisplaySurface:: vtable2c(LPDDSURFACEDESC, MxBitmap*, undefined4, undefined4, undefined4, undefined4, undefined4, undefined4, MxBool) { diff --git a/LEGO1/mxdisplaysurface.h b/LEGO1/mxdisplaysurface.h index 29e54c28..6bc2b14e 100644 --- a/LEGO1/mxdisplaysurface.h +++ b/LEGO1/mxdisplaysurface.h @@ -9,7 +9,7 @@ #include -// VTABLE 0x100dc768 +// VTABLE: LEGO1 0x100dc768 // SIZE 0xac class MxDisplaySurface : public MxCore { public: diff --git a/LEGO1/mxdsaction.cpp b/LEGO1/mxdsaction.cpp index 69f3a838..7d2f6645 100644 --- a/LEGO1/mxdsaction.cpp +++ b/LEGO1/mxdsaction.cpp @@ -9,10 +9,10 @@ DECOMP_SIZE_ASSERT(MxDSAction, 0x94) -// GLOBAL OFFSET: LEGO1 0x10101410 +// GLOBAL: LEGO1 0x10101410 MxU16 g_unkSep = TWOCC(',', ' '); -// OFFSET: LEGO1 0x100ad810 +// FUNCTION: LEGO1 0x100ad810 MxDSAction::MxDSAction() { this->m_flags = MxDSAction::Flag_Enabled; @@ -32,43 +32,43 @@ MxDSAction::MxDSAction() this->m_unkTimingField = INT_MIN; } -// OFFSET: LEGO1 0x100ad940 +// FUNCTION: LEGO1 0x100ad940 MxLong MxDSAction::GetDuration() { return this->m_duration; } -// OFFSET: LEGO1 0x100ad950 +// FUNCTION: LEGO1 0x100ad950 void MxDSAction::SetDuration(MxLong p_duration) { this->m_duration = p_duration; } -// OFFSET: LEGO1 0x100ad960 +// FUNCTION: LEGO1 0x100ad960 MxBool MxDSAction::HasId(MxU32 p_objectId) { return this->GetObjectId() == p_objectId; } -// OFFSET: LEGO1 0x100ada40 +// FUNCTION: LEGO1 0x100ada40 void MxDSAction::SetUnkTimingField(MxLong p_unkTimingField) { this->m_unkTimingField = p_unkTimingField; } -// OFFSET: LEGO1 0x100ada50 +// FUNCTION: LEGO1 0x100ada50 MxLong MxDSAction::GetUnkTimingField() { return this->m_unkTimingField; } -// OFFSET: LEGO1 0x100ada80 +// FUNCTION: LEGO1 0x100ada80 MxDSAction::~MxDSAction() { delete[] this->m_extraData; } -// OFFSET: LEGO1 0x100adaf0 +// FUNCTION: LEGO1 0x100adaf0 void MxDSAction::CopyFrom(MxDSAction& p_dsAction) { this->SetObjectId(p_dsAction.GetObjectId()); @@ -88,7 +88,7 @@ void MxDSAction::CopyFrom(MxDSAction& p_dsAction) this->m_unkTimingField = p_dsAction.m_unkTimingField; } -// OFFSET: LEGO1 0x100adbe0 +// FUNCTION: LEGO1 0x100adbe0 MxU32 MxDSAction::GetSizeOnDisk() { MxU32 totalSizeOnDisk; @@ -99,7 +99,7 @@ MxU32 MxDSAction::GetSizeOnDisk() return totalSizeOnDisk; } -// OFFSET: LEGO1 0x100adc10 +// FUNCTION: LEGO1 0x100adc10 MxDSAction& MxDSAction::operator=(MxDSAction& p_dsAction) { if (this == &p_dsAction) @@ -110,7 +110,7 @@ MxDSAction& MxDSAction::operator=(MxDSAction& p_dsAction) return *this; } -// OFFSET: LEGO1 0x100adc40 +// FUNCTION: LEGO1 0x100adc40 MxDSAction* MxDSAction::Clone() { MxDSAction* clone = new MxDSAction(); @@ -121,13 +121,13 @@ MxDSAction* MxDSAction::Clone() return clone; } -// OFFSET: LEGO1 0x100adcd0 +// FUNCTION: LEGO1 0x100adcd0 MxLong MxDSAction::GetElapsedTime() { return Timer()->GetTime() - this->m_unkTimingField; } -// OFFSET: LEGO1 0x100add00 +// FUNCTION: LEGO1 0x100add00 void MxDSAction::MergeFrom(MxDSAction& p_dsAction) { if (p_dsAction.m_startTime != INT_MIN) @@ -176,7 +176,7 @@ void MxDSAction::MergeFrom(MxDSAction& p_dsAction) } } -// OFFSET: LEGO1 0x100ade60 +// FUNCTION: LEGO1 0x100ade60 void MxDSAction::AppendData(MxU16 p_extraLength, const char* p_extraData) { if (this->m_extraData == p_extraData || !p_extraData) @@ -204,7 +204,7 @@ void MxDSAction::AppendData(MxU16 p_extraLength, const char* p_extraData) } } -// OFFSET: LEGO1 0x100adf70 +// FUNCTION: LEGO1 0x100adf70 void MxDSAction::Deserialize(char** p_source, MxS16 p_unk24) { MxDSObject::Deserialize(p_source, p_unk24); diff --git a/LEGO1/mxdsaction.h b/LEGO1/mxdsaction.h index 86f74f14..e3c6f171 100644 --- a/LEGO1/mxdsaction.h +++ b/LEGO1/mxdsaction.h @@ -7,7 +7,7 @@ class MxOmni; -// VTABLE 0x100dc098 +// VTABLE: LEGO1 0x100dc098 // SIZE 0x94 class MxDSAction : public MxDSObject { public: @@ -29,14 +29,14 @@ class MxDSAction : public MxDSObject { void CopyFrom(MxDSAction& p_dsAction); MxDSAction& operator=(MxDSAction& p_dsAction); - // OFFSET: LEGO1 0x100ad980 + // FUNCTION: LEGO1 0x100ad980 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x101013f4 + // GLOBAL: LEGO1 0x101013f4 return "MxDSAction"; } - // OFFSET: LEGO1 0x100ad990 + // FUNCTION: LEGO1 0x100ad990 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSAction::ClassName()) || MxDSObject::IsA(name); diff --git a/LEGO1/mxdsactionlist.cpp b/LEGO1/mxdsactionlist.cpp index 123a38eb..a664f53e 100644 --- a/LEGO1/mxdsactionlist.cpp +++ b/LEGO1/mxdsactionlist.cpp @@ -5,30 +5,30 @@ DECOMP_SIZE_ASSERT(MxDSActionList, 0x1c); DECOMP_SIZE_ASSERT(MxDSActionListCursor, 0x10); -// OFFSET: LEGO1 0x100c9c90 +// FUNCTION: LEGO1 0x100c9c90 MxS8 MxDSActionList::Compare(MxDSAction* p_a, MxDSAction* p_b) { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } -// OFFSET: LEGO1 0x100c9cb0 +// FUNCTION: LEGO1 0x100c9cb0 void MxDSActionList::Destroy(MxDSAction* p_action) { if (p_action) delete p_action; } -// OFFSET: LEGO1 0x100c9cc0 TEMPLATE +// TEMPLATE: LEGO1 0x100c9cc0 // MxCollection::Compare -// OFFSET: LEGO1 0x100c9d20 TEMPLATE +// TEMPLATE: LEGO1 0x100c9d20 // MxCollection::Destroy -// OFFSET: LEGO1 0x100c9d30 TEMPLATE +// TEMPLATE: LEGO1 0x100c9d30 // MxList::~MxList -// OFFSET: LEGO1 0x100c9e30 TEMPLATE +// SYNTHETIC: LEGO1 0x100c9e30 // MxCollection::`scalar deleting destructor' -// OFFSET: LEGO1 0x100c9ea0 TEMPLATE +// SYNTHETIC: LEGO1 0x100c9ea0 // MxList::`scalar deleting destructor' diff --git a/LEGO1/mxdsactionlist.h b/LEGO1/mxdsactionlist.h index b6ca0c11..19929d20 100644 --- a/LEGO1/mxdsactionlist.h +++ b/LEGO1/mxdsactionlist.h @@ -6,13 +6,13 @@ class MxDSAction; -// VTABLE 0x100dcea8 TEMPLATE +// VTABLE: LEGO1 0x100dcea8 // class MxCollection -// VTABLE 0x100dcec0 TEMPLATE +// VTABLE: LEGO1 0x100dcec0 // class MxList -// VTABLE 0x100dced8 +// VTABLE: LEGO1 0x100dced8 // SIZE 0x1c class MxDSActionList : public MxList { public: diff --git a/LEGO1/mxdsanim.cpp b/LEGO1/mxdsanim.cpp index 8251fd70..c62be34c 100644 --- a/LEGO1/mxdsanim.cpp +++ b/LEGO1/mxdsanim.cpp @@ -2,23 +2,23 @@ DECOMP_SIZE_ASSERT(MxDSAnim, 0xb8) -// OFFSET: LEGO1 0x100c8ff0 +// FUNCTION: LEGO1 0x100c8ff0 MxDSAnim::MxDSAnim() { this->SetType(MxDSType_Anim); } -// OFFSET: LEGO1 0x100c91a0 +// FUNCTION: LEGO1 0x100c91a0 MxDSAnim::~MxDSAnim() { } -// OFFSET: LEGO1 0x100c91f0 +// FUNCTION: LEGO1 0x100c91f0 void MxDSAnim::CopyFrom(MxDSAnim& p_dsAnim) { } -// OFFSET: LEGO1 0x100c9200 +// FUNCTION: LEGO1 0x100c9200 MxDSAnim& MxDSAnim::operator=(MxDSAnim& p_dsAnim) { if (this == &p_dsAnim) @@ -29,7 +29,7 @@ MxDSAnim& MxDSAnim::operator=(MxDSAnim& p_dsAnim) return *this; } -// OFFSET: LEGO1 0x100c9230 +// FUNCTION: LEGO1 0x100c9230 MxDSAction* MxDSAnim::Clone() { MxDSAnim* clone = new MxDSAnim(); diff --git a/LEGO1/mxdsanim.h b/LEGO1/mxdsanim.h index a78b9874..41b8cfa5 100644 --- a/LEGO1/mxdsanim.h +++ b/LEGO1/mxdsanim.h @@ -3,7 +3,7 @@ #include "mxdsmediaaction.h" -// VTABLE 0x100dcd88 +// VTABLE: LEGO1 0x100dcd88 // SIZE 0xb8 class MxDSAnim : public MxDSMediaAction { public: @@ -13,14 +13,14 @@ class MxDSAnim : public MxDSMediaAction { void CopyFrom(MxDSAnim& p_dsAnim); MxDSAnim& operator=(MxDSAnim& p_dsAnim); - // OFFSET: LEGO1 0x100c9060 + // FUNCTION: LEGO1 0x100c9060 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x101025d8 + // GLOBAL: LEGO1 0x101025d8 return "MxDSAnim"; } - // OFFSET: LEGO1 0x100c9070 + // FUNCTION: LEGO1 0x100c9070 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSAnim::ClassName()) || MxDSMediaAction::IsA(name); diff --git a/LEGO1/mxdsbuffer.cpp b/LEGO1/mxdsbuffer.cpp index a09bb101..ed280db8 100644 --- a/LEGO1/mxdsbuffer.cpp +++ b/LEGO1/mxdsbuffer.cpp @@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(MxDSBuffer, 0x34); -// OFFSET: LEGO1 0x100c6470 +// FUNCTION: LEGO1 0x100c6470 MxDSBuffer::MxDSBuffer() { m_unk20 = 0; @@ -21,7 +21,7 @@ MxDSBuffer::MxDSBuffer() m_unk30 = 0; } -// OFFSET: LEGO1 0x100c6530 +// FUNCTION: LEGO1 0x100c6530 MxDSBuffer::~MxDSBuffer() { if (m_pBuffer != NULL) { @@ -37,7 +37,7 @@ MxDSBuffer::~MxDSBuffer() m_unk1c = 0; } -// OFFSET: LEGO1 0x100c6640 +// FUNCTION: LEGO1 0x100c6640 MxResult MxDSBuffer::AllocateBuffer(MxU32 p_bufferSize, MxDSBufferType p_mode) { MxResult result = FAILURE; @@ -106,7 +106,7 @@ MxResult MxDSBuffer::AllocateBuffer(MxU32 p_bufferSize, MxDSBufferType p_mode) return result; } -// OFFSET: LEGO1 0x100c6780 +// FUNCTION: LEGO1 0x100c6780 MxResult MxDSBuffer::SetBufferPointer(MxU32* p_buffer, MxU32 p_size) { m_pBuffer = (MxU8*) p_buffer; @@ -118,7 +118,7 @@ MxResult MxDSBuffer::SetBufferPointer(MxU32* p_buffer, MxU32 p_size) return SUCCESS; } -// OFFSET: LEGO1 0x100c6f80 +// FUNCTION: LEGO1 0x100c6f80 void MxDSBuffer::FUN_100c6f80(MxU32 p_unk) { if (p_unk < m_writeOffset) { diff --git a/LEGO1/mxdsbuffer.h b/LEGO1/mxdsbuffer.h index 33706899..e253b2a5 100644 --- a/LEGO1/mxdsbuffer.h +++ b/LEGO1/mxdsbuffer.h @@ -11,17 +11,17 @@ enum MxDSBufferType { MxDSBufferType_Unknown = 3, }; -// VTABLE 0x100dcca0 +// VTABLE: LEGO1 0x100dcca0 // SIZE 0x34 class MxDSBuffer : public MxCore { public: MxDSBuffer(); virtual ~MxDSBuffer() override; - // OFFSET: LEGO1 0x100c6500 + // FUNCTION: LEGO1 0x100c6500 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0568 + // GLOBAL: LEGO1 0x100f0568 return "MxDSBuffer"; } diff --git a/LEGO1/mxdschunk.cpp b/LEGO1/mxdschunk.cpp index 489a1611..1898d6a8 100644 --- a/LEGO1/mxdschunk.cpp +++ b/LEGO1/mxdschunk.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(MxDSChunk, 0x1c); -// OFFSET: LEGO1 0x100be050 +// FUNCTION: LEGO1 0x100be050 MxDSChunk::MxDSChunk() { m_flags = 0; @@ -12,7 +12,7 @@ MxDSChunk::MxDSChunk() m_length = 0; } -// OFFSET: LEGO1 0x100be170 +// FUNCTION: LEGO1 0x100be170 MxDSChunk::~MxDSChunk() { if (m_flags & Flag_Bit1) { diff --git a/LEGO1/mxdschunk.h b/LEGO1/mxdschunk.h index 2b1ed51c..33836860 100644 --- a/LEGO1/mxdschunk.h +++ b/LEGO1/mxdschunk.h @@ -5,7 +5,7 @@ #include "mxcore.h" #include "mxtypes.h" -// VTABLE 0x100dc7f8 +// VTABLE: LEGO1 0x100dc7f8 // SIZE 0x1c class MxDSChunk : public MxCore { public: @@ -20,14 +20,14 @@ class MxDSChunk : public MxCore { MxDSChunk(); virtual ~MxDSChunk() override; - // OFFSET: LEGO1 0x100be0c0 + // FUNCTION: LEGO1 0x100be0c0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x10101e6c + // GLOBAL: LEGO1 0x10101e6c return "MxDSChunk"; } - // OFFSET: LEGO1 0x100be0d0 + // FUNCTION: LEGO1 0x100be0d0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSChunk::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxdsevent.cpp b/LEGO1/mxdsevent.cpp index 152e6d77..198c9ca0 100644 --- a/LEGO1/mxdsevent.cpp +++ b/LEGO1/mxdsevent.cpp @@ -2,23 +2,23 @@ DECOMP_SIZE_ASSERT(MxDSEvent, 0xb8) -// OFFSET: LEGO1 0x100c95f0 +// FUNCTION: LEGO1 0x100c95f0 MxDSEvent::MxDSEvent() { this->SetType(MxDSType_Event); } -// OFFSET: LEGO1 0x100c97a0 +// FUNCTION: LEGO1 0x100c97a0 MxDSEvent::~MxDSEvent() { } -// OFFSET: LEGO1 0x100c97f0 +// FUNCTION: LEGO1 0x100c97f0 void MxDSEvent::CopyFrom(MxDSEvent& p_dsEvent) { } -// OFFSET: LEGO1 0x100c9800 +// FUNCTION: LEGO1 0x100c9800 MxDSEvent& MxDSEvent::operator=(MxDSEvent& p_dsEvent) { if (this == &p_dsEvent) @@ -29,7 +29,7 @@ MxDSEvent& MxDSEvent::operator=(MxDSEvent& p_dsEvent) return *this; } -// OFFSET: LEGO1 0x100c9830 +// FUNCTION: LEGO1 0x100c9830 MxDSAction* MxDSEvent::Clone() { MxDSEvent* clone = new MxDSEvent(); diff --git a/LEGO1/mxdsevent.h b/LEGO1/mxdsevent.h index 996e69a6..4a4e5202 100644 --- a/LEGO1/mxdsevent.h +++ b/LEGO1/mxdsevent.h @@ -11,14 +11,14 @@ class MxDSEvent : public MxDSMediaAction { void CopyFrom(MxDSEvent& p_dsEvent); MxDSEvent& operator=(MxDSEvent& p_dsEvent); - // OFFSET: LEGO1 0x100c9660 + // FUNCTION: LEGO1 0x100c9660 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x101025f0 + // GLOBAL: LEGO1 0x101025f0 return "MxDSEvent"; } - // OFFSET: LEGO1 0x100c9670 + // FUNCTION: LEGO1 0x100c9670 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSEvent::ClassName()) || MxDSMediaAction::IsA(name); diff --git a/LEGO1/mxdsfile.cpp b/LEGO1/mxdsfile.cpp index 045cf370..497b3d82 100644 --- a/LEGO1/mxdsfile.cpp +++ b/LEGO1/mxdsfile.cpp @@ -5,20 +5,20 @@ #define SI_MAJOR_VERSION 2 #define SI_MINOR_VERSION 2 -// OFFSET: LEGO1 0x100bfed0 +// FUNCTION: LEGO1 0x100bfed0 MxDSFile::~MxDSFile() { Close(); } -// OFFSET: LEGO1 0x100cc4b0 +// FUNCTION: LEGO1 0x100cc4b0 MxDSFile::MxDSFile(const char* filename, MxULong skipReadingChunks) { m_filename = filename; m_skipReadingChunks = skipReadingChunks; } -// OFFSET: LEGO1 0x100cc590 +// FUNCTION: LEGO1 0x100cc590 MxLong MxDSFile::Open(MxULong uStyle) { MXIOINFO& io = m_io; @@ -46,7 +46,7 @@ MxLong MxDSFile::Open(MxULong uStyle) return longResult; } -// OFFSET: LEGO1 0x100cc620 +// FUNCTION: LEGO1 0x100cc620 MxLong MxDSFile::ReadChunks() { _MMCKINFO topChunk; @@ -81,7 +81,7 @@ MxLong MxDSFile::ReadChunks() } } -// OFFSET: LEGO1 0x100cc740 +// FUNCTION: LEGO1 0x100cc740 MxLong MxDSFile::Close() { m_io.Close(0); @@ -95,7 +95,7 @@ MxLong MxDSFile::Close() return 0; } -// OFFSET: LEGO1 0x100cc780 +// FUNCTION: LEGO1 0x100cc780 MxResult MxDSFile::Read(unsigned char* p_buf, MxULong p_nbytes) { if (m_io.Read(p_buf, p_nbytes) != p_nbytes) @@ -105,19 +105,19 @@ MxResult MxDSFile::Read(unsigned char* p_buf, MxULong p_nbytes) return SUCCESS; } -// OFFSET: LEGO1 0x100cc7b0 +// FUNCTION: LEGO1 0x100cc7b0 MxLong MxDSFile::Seek(MxLong lOffset, int iOrigin) { return (m_position = m_io.Seek(lOffset, iOrigin)) == -1 ? -1 : 0; } -// OFFSET: LEGO1 0x100cc7e0 +// FUNCTION: LEGO1 0x100cc7e0 MxULong MxDSFile::GetBufferSize() { return m_header.bufferSize; } -// OFFSET: LEGO1 0x100cc7f0 +// FUNCTION: LEGO1 0x100cc7f0 MxULong MxDSFile::GetStreamBuffersNum() { return m_header.streamBuffersNum; diff --git a/LEGO1/mxdsfile.h b/LEGO1/mxdsfile.h index 477bcf74..eb38975a 100644 --- a/LEGO1/mxdsfile.h +++ b/LEGO1/mxdsfile.h @@ -6,20 +6,20 @@ #include "mxstring.h" #include "mxtypes.h" -// VTABLE 0x100dc890 +// VTABLE: LEGO1 0x100dc890 class MxDSFile : public MxDSSource { public: __declspec(dllexport) MxDSFile(const char* filename, MxULong skipReadingChunks); __declspec(dllexport) virtual ~MxDSFile(); // vtable+0x0 - // OFFSET: LEGO1 0x100c0120 + // FUNCTION: LEGO1 0x100c0120 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x10102594 + // GLOBAL: LEGO1 0x10102594 return "MxDSFile"; } - // OFFSET: LEGO1 0x100c0130 + // FUNCTION: LEGO1 0x100c0130 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSFile::ClassName()) || MxDSSource::IsA(name); diff --git a/LEGO1/mxdsmediaaction.cpp b/LEGO1/mxdsmediaaction.cpp index fabdc569..ccb12a07 100644 --- a/LEGO1/mxdsmediaaction.cpp +++ b/LEGO1/mxdsmediaaction.cpp @@ -4,7 +4,7 @@ DECOMP_SIZE_ASSERT(MxDSMediaAction, 0xb8) -// OFFSET: LEGO1 0x100c8b40 +// FUNCTION: LEGO1 0x100c8b40 MxDSMediaAction::MxDSMediaAction() { this->m_mediaSrcPath = NULL; @@ -18,13 +18,13 @@ MxDSMediaAction::MxDSMediaAction() this->SetType(MxDSType_MediaAction); } -// OFFSET: LEGO1 0x100c8cf0 +// FUNCTION: LEGO1 0x100c8cf0 MxDSMediaAction::~MxDSMediaAction() { delete[] this->m_mediaSrcPath; } -// OFFSET: LEGO1 0x100c8d60 +// FUNCTION: LEGO1 0x100c8d60 void MxDSMediaAction::CopyFrom(MxDSMediaAction& p_dsMediaAction) { CopyMediaSrcPath(p_dsMediaAction.m_mediaSrcPath); @@ -36,7 +36,7 @@ void MxDSMediaAction::CopyFrom(MxDSMediaAction& p_dsMediaAction) this->m_sustainTime = p_dsMediaAction.m_sustainTime; } -// OFFSET: LEGO1 0x100c8dc0 +// FUNCTION: LEGO1 0x100c8dc0 MxDSMediaAction& MxDSMediaAction::operator=(MxDSMediaAction& p_dsMediaAction) { if (this == &p_dsMediaAction) @@ -47,7 +47,7 @@ MxDSMediaAction& MxDSMediaAction::operator=(MxDSMediaAction& p_dsMediaAction) return *this; } -// OFFSET: LEGO1 0x100c8e80 +// FUNCTION: LEGO1 0x100c8e80 void MxDSMediaAction::CopyMediaSrcPath(const char* p_mediaSrcPath) { if (this->m_mediaSrcPath == p_mediaSrcPath) @@ -64,7 +64,7 @@ void MxDSMediaAction::CopyMediaSrcPath(const char* p_mediaSrcPath) this->m_mediaSrcPath = NULL; } -// OFFSET: LEGO1 0x100c8f10 +// FUNCTION: LEGO1 0x100c8f10 MxU32 MxDSMediaAction::GetSizeOnDisk() { MxU32 totalSizeOnDisk = MxDSAction::GetSizeOnDisk(); @@ -79,7 +79,7 @@ MxU32 MxDSMediaAction::GetSizeOnDisk() return totalSizeOnDisk; } -// OFFSET: LEGO1 0x100c8f60 +// FUNCTION: LEGO1 0x100c8f60 void MxDSMediaAction::Deserialize(char** p_source, MxS16 p_unk24) { MxDSAction::Deserialize(p_source, p_unk24); diff --git a/LEGO1/mxdsmediaaction.h b/LEGO1/mxdsmediaaction.h index adeb049e..c361c835 100644 --- a/LEGO1/mxdsmediaaction.h +++ b/LEGO1/mxdsmediaaction.h @@ -5,7 +5,7 @@ #include "mxdsaction.h" #include "mxpoint32.h" -// VTABLE 0x100dcd40 +// VTABLE: LEGO1 0x100dcd40 // SIZE 0xb8 class MxDSMediaAction : public MxDSAction { public: @@ -15,14 +15,14 @@ class MxDSMediaAction : public MxDSAction { void CopyFrom(MxDSMediaAction& p_dsMediaAction); MxDSMediaAction& operator=(MxDSMediaAction& p_dsMediaAction); - // OFFSET: LEGO1 0x100c8be0 + // FUNCTION: LEGO1 0x100c8be0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f7624 + // GLOBAL: LEGO1 0x100f7624 return "MxDSMediaAction"; } - // OFFSET: LEGO1 0x100c8bf0 + // FUNCTION: LEGO1 0x100c8bf0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSMediaAction::ClassName()) || MxDSAction::IsA(name); diff --git a/LEGO1/mxdsmultiaction.cpp b/LEGO1/mxdsmultiaction.cpp index d990a595..27cd806e 100644 --- a/LEGO1/mxdsmultiaction.cpp +++ b/LEGO1/mxdsmultiaction.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(MxDSMultiAction, 0x9c) -// OFFSET: LEGO1 0x100c9b90 +// FUNCTION: LEGO1 0x100c9b90 MxDSMultiAction::MxDSMultiAction() { this->SetType(MxDSType_MultiAction); @@ -10,14 +10,14 @@ MxDSMultiAction::MxDSMultiAction() this->m_actions->SetDestroy(MxDSActionList::Destroy); } -// OFFSET: LEGO1 0x100ca060 +// FUNCTION: LEGO1 0x100ca060 MxDSMultiAction::~MxDSMultiAction() { if (this->m_actions) delete this->m_actions; } -// OFFSET: LEGO1 0x100ca0d0 +// FUNCTION: LEGO1 0x100ca0d0 void MxDSMultiAction::CopyFrom(MxDSMultiAction& p_dsMultiAction) { this->m_actions->DeleteAll(); @@ -28,7 +28,7 @@ void MxDSMultiAction::CopyFrom(MxDSMultiAction& p_dsMultiAction) this->m_actions->Append(action->Clone()); } -// OFFSET: LEGO1 0x100ca260 +// FUNCTION: LEGO1 0x100ca260 MxDSMultiAction& MxDSMultiAction::operator=(MxDSMultiAction& p_dsMultiAction) { if (this == &p_dsMultiAction) @@ -39,7 +39,7 @@ MxDSMultiAction& MxDSMultiAction::operator=(MxDSMultiAction& p_dsMultiAction) return *this; } -// OFFSET: LEGO1 0x100ca290 +// FUNCTION: LEGO1 0x100ca290 void MxDSMultiAction::SetUnkTimingField(MxLong p_unkTimingField) { this->m_unkTimingField = p_unkTimingField; @@ -50,7 +50,7 @@ void MxDSMultiAction::SetUnkTimingField(MxLong p_unkTimingField) action->SetUnkTimingField(p_unkTimingField); } -// OFFSET: LEGO1 0x100ca370 +// FUNCTION: LEGO1 0x100ca370 void MxDSMultiAction::MergeFrom(MxDSAction& p_dsMultiAction) { MxDSAction::MergeFrom(p_dsMultiAction); @@ -61,7 +61,7 @@ void MxDSMultiAction::MergeFrom(MxDSAction& p_dsMultiAction) action->MergeFrom(p_dsMultiAction); } -// OFFSET: LEGO1 0x100ca450 +// FUNCTION: LEGO1 0x100ca450 MxBool MxDSMultiAction::HasId(MxU32 p_objectId) { if (this->GetObjectId() == p_objectId) @@ -77,7 +77,7 @@ MxBool MxDSMultiAction::HasId(MxU32 p_objectId) return FALSE; } -// OFFSET: LEGO1 0x100ca550 +// FUNCTION: LEGO1 0x100ca550 MxDSAction* MxDSMultiAction::Clone() { MxDSMultiAction* clone = new MxDSMultiAction(); @@ -88,7 +88,7 @@ MxDSAction* MxDSMultiAction::Clone() return clone; } -// OFFSET: LEGO1 0x100ca5e0 +// FUNCTION: LEGO1 0x100ca5e0 undefined4 MxDSMultiAction::unk14() { undefined4 result = MxDSAction::unk14(); @@ -101,7 +101,7 @@ undefined4 MxDSMultiAction::unk14() return result; } -// OFFSET: LEGO1 0x100ca6c0 +// FUNCTION: LEGO1 0x100ca6c0 MxU32 MxDSMultiAction::GetSizeOnDisk() { MxU32 totalSizeOnDisk = MxDSAction::GetSizeOnDisk() + 16; @@ -116,7 +116,7 @@ MxU32 MxDSMultiAction::GetSizeOnDisk() return totalSizeOnDisk; } -// OFFSET: LEGO1 0x100ca7b0 +// FUNCTION: LEGO1 0x100ca7b0 void MxDSMultiAction::Deserialize(char** p_source, MxS16 p_unk24) { MxDSAction::Deserialize(p_source, p_unk24); @@ -142,7 +142,7 @@ void MxDSMultiAction::Deserialize(char** p_source, MxS16 p_unk24) *p_source += extraFlag; } -// OFFSET: LEGO1 0x100ca8c0 +// FUNCTION: LEGO1 0x100ca8c0 void MxDSMultiAction::SetAtomId(MxAtomId p_atomId) { MxDSAction::SetAtomId(p_atomId); diff --git a/LEGO1/mxdsmultiaction.h b/LEGO1/mxdsmultiaction.h index d36bef82..267b7a9e 100644 --- a/LEGO1/mxdsmultiaction.h +++ b/LEGO1/mxdsmultiaction.h @@ -4,7 +4,7 @@ #include "mxdsaction.h" #include "mxdsactionlist.h" -// VTABLE 0x100dcef0 +// VTABLE: LEGO1 0x100dcef0 // SIZE 0x9c class MxDSMultiAction : public MxDSAction { public: @@ -14,14 +14,14 @@ class MxDSMultiAction : public MxDSAction { void CopyFrom(MxDSMultiAction& p_dsMultiAction); MxDSMultiAction& operator=(MxDSMultiAction& p_dsMultiAction); - // OFFSET: LEGO1 0x100c9f50 + // FUNCTION: LEGO1 0x100c9f50 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x10101dbc + // GLOBAL: LEGO1 0x10101dbc return "MxDSMultiAction"; } - // OFFSET: LEGO1 0x100c9f60 + // FUNCTION: LEGO1 0x100c9f60 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSMultiAction::ClassName()) || MxDSAction::IsA(name); diff --git a/LEGO1/mxdsobject.cpp b/LEGO1/mxdsobject.cpp index c2fd7a88..4a90fc23 100644 --- a/LEGO1/mxdsobject.cpp +++ b/LEGO1/mxdsobject.cpp @@ -19,7 +19,7 @@ DECOMP_SIZE_ASSERT(MxDSObject, 0x2c); -// OFFSET: LEGO1 0x100bf6a0 +// FUNCTION: LEGO1 0x100bf6a0 MxDSObject::MxDSObject() { this->SetType(MxDSType_Object); @@ -31,14 +31,14 @@ MxDSObject::MxDSObject() this->m_unk28 = 0; } -// OFFSET: LEGO1 0x100bf7e0 +// FUNCTION: LEGO1 0x100bf7e0 MxDSObject::~MxDSObject() { delete[] m_objectName; delete[] m_sourceName; } -// OFFSET: LEGO1 0x100bf870 +// FUNCTION: LEGO1 0x100bf870 void MxDSObject::CopyFrom(MxDSObject& p_dsObject) { this->SetSourceName(p_dsObject.m_sourceName); @@ -50,7 +50,7 @@ void MxDSObject::CopyFrom(MxDSObject& p_dsObject) this->m_unk28 = p_dsObject.m_unk28; } -// OFFSET: LEGO1 0x100bf8c0 +// FUNCTION: LEGO1 0x100bf8c0 MxDSObject& MxDSObject::operator=(MxDSObject& p_dsObject) { if (this == &p_dsObject) @@ -60,7 +60,7 @@ MxDSObject& MxDSObject::operator=(MxDSObject& p_dsObject) return *this; } -// OFFSET: LEGO1 0x100bf8e0 +// FUNCTION: LEGO1 0x100bf8e0 void MxDSObject::SetObjectName(const char* p_objectName) { if (p_objectName != this->m_objectName) { @@ -79,7 +79,7 @@ void MxDSObject::SetObjectName(const char* p_objectName) } } -// OFFSET: LEGO1 0x100bf950 +// FUNCTION: LEGO1 0x100bf950 void MxDSObject::SetSourceName(const char* p_sourceName) { if (p_sourceName != this->m_sourceName) { @@ -98,13 +98,13 @@ void MxDSObject::SetSourceName(const char* p_sourceName) } } -// OFFSET: LEGO1 0x100bf9c0 +// FUNCTION: LEGO1 0x100bf9c0 undefined4 MxDSObject::unk14() { return 10; } -// OFFSET: LEGO1 0x100bf9d0 +// FUNCTION: LEGO1 0x100bf9d0 MxU32 MxDSObject::GetSizeOnDisk() { MxU32 sizeOnDisk; @@ -126,7 +126,7 @@ MxU32 MxDSObject::GetSizeOnDisk() return sizeOnDisk; } -// OFFSET: LEGO1 0x100bfa20 +// FUNCTION: LEGO1 0x100bfa20 void MxDSObject::Deserialize(char** p_source, MxS16 p_unk24) { GetString(p_source, this->m_sourceName, this, &MxDSObject::SetSourceName); @@ -137,7 +137,7 @@ void MxDSObject::Deserialize(char** p_source, MxS16 p_unk24) this->m_unk24 = p_unk24; } -// OFFSET: LEGO1 0x100bfb30 +// FUNCTION: LEGO1 0x100bfb30 MxDSObject* DeserializeDSObjectDispatch(char** p_source, MxS16 p_flags) { MxU16 type = *(MxU16*) *p_source; diff --git a/LEGO1/mxdsobject.h b/LEGO1/mxdsobject.h index 28e8a636..d4563d9a 100644 --- a/LEGO1/mxdsobject.h +++ b/LEGO1/mxdsobject.h @@ -7,10 +7,10 @@ #include "mxdstypes.h" // TODO: Find proper compilation unit to put this -// OFFSET: LEGO1 0x10005530 TEMPLATE +// FUNCTION: LEGO1 0x10005530 // MxDSObject::SetAtomId -// VTABLE 0x100dc868 +// VTABLE: LEGO1 0x100dc868 // SIZE 0x2c class MxDSObject : public MxCore { public: @@ -23,10 +23,10 @@ class MxDSObject : public MxCore { __declspec(dllexport) void SetObjectName(const char* p_objectName); void SetSourceName(const char* p_sourceName); - // OFFSET: LEGO1 0x100bf730 + // FUNCTION: LEGO1 0x100bf730 inline virtual const char* ClassName() const override { return "MxDSObject"; }; // vtable+0c - // OFFSET: LEGO1 0x100bf740 + // FUNCTION: LEGO1 0x100bf740 inline virtual MxBool IsA(const char* name) const override { return !strcmp(name, MxDSObject::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxdsobjectaction.cpp b/LEGO1/mxdsobjectaction.cpp index 6c012c52..1155d3a5 100644 --- a/LEGO1/mxdsobjectaction.cpp +++ b/LEGO1/mxdsobjectaction.cpp @@ -2,23 +2,23 @@ DECOMP_SIZE_ASSERT(MxDSObjectAction, 0xb8) -// OFFSET: LEGO1 0x100c8870 +// FUNCTION: LEGO1 0x100c8870 MxDSObjectAction::MxDSObjectAction() { this->SetType(MxDSType_ObjectAction); } -// OFFSET: LEGO1 0x100c8a20 +// FUNCTION: LEGO1 0x100c8a20 MxDSObjectAction::~MxDSObjectAction() { } -// OFFSET: LEGO1 0x100c8a70 +// FUNCTION: LEGO1 0x100c8a70 void MxDSObjectAction::CopyFrom(MxDSObjectAction& p_dsObjectAction) { } -// OFFSET: LEGO1 0x100c8a80 +// FUNCTION: LEGO1 0x100c8a80 MxDSObjectAction& MxDSObjectAction::operator=(MxDSObjectAction& p_dsObjectAction) { if (this == &p_dsObjectAction) @@ -29,7 +29,7 @@ MxDSObjectAction& MxDSObjectAction::operator=(MxDSObjectAction& p_dsObjectAction return *this; } -// OFFSET: LEGO1 0x100c8ab0 +// FUNCTION: LEGO1 0x100c8ab0 MxDSAction* MxDSObjectAction::Clone() { MxDSObjectAction* clone = new MxDSObjectAction(); diff --git a/LEGO1/mxdsobjectaction.h b/LEGO1/mxdsobjectaction.h index 50b167b5..433dfa06 100644 --- a/LEGO1/mxdsobjectaction.h +++ b/LEGO1/mxdsobjectaction.h @@ -3,7 +3,7 @@ #include "mxdsmediaaction.h" -// VTABLE 0x100dccf8 +// VTABLE: LEGO1 0x100dccf8 // SIZE 0xb8 class MxDSObjectAction : public MxDSMediaAction { public: @@ -12,14 +12,14 @@ class MxDSObjectAction : public MxDSMediaAction { MxDSObjectAction& operator=(MxDSObjectAction& p_dsObjectAction); - // OFFSET: LEGO1 0x100c88e0 + // FUNCTION: LEGO1 0x100c88e0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x101025c4 + // GLOBAL: LEGO1 0x101025c4 return "MxDSObjectAction"; } - // OFFSET: LEGO1 0x100c88f0 + // FUNCTION: LEGO1 0x100c88f0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSObjectAction::ClassName()) || MxDSMediaAction::IsA(name); diff --git a/LEGO1/mxdsparallelaction.cpp b/LEGO1/mxdsparallelaction.cpp index ada89bd7..07b0fef2 100644 --- a/LEGO1/mxdsparallelaction.cpp +++ b/LEGO1/mxdsparallelaction.cpp @@ -4,23 +4,23 @@ DECOMP_SIZE_ASSERT(MxDSParallelAction, 0x9c) -// OFFSET: LEGO1 0x100cae80 +// FUNCTION: LEGO1 0x100cae80 MxDSParallelAction::MxDSParallelAction() { this->SetType(MxDSType_ParallelAction); } -// OFFSET: LEGO1 0x100cb040 +// FUNCTION: LEGO1 0x100cb040 MxDSParallelAction::~MxDSParallelAction() { } -// OFFSET: LEGO1 0x100cb090 +// FUNCTION: LEGO1 0x100cb090 void MxDSParallelAction::CopyFrom(MxDSParallelAction& p_dsParallelAction) { } -// OFFSET: LEGO1 0x100cb0a0 +// FUNCTION: LEGO1 0x100cb0a0 MxDSParallelAction& MxDSParallelAction::operator=(MxDSParallelAction& p_dsParallelAction) { if (this == &p_dsParallelAction) @@ -31,7 +31,7 @@ MxDSParallelAction& MxDSParallelAction::operator=(MxDSParallelAction& p_dsParall return *this; } -// OFFSET: LEGO1 0x100cb0d0 +// FUNCTION: LEGO1 0x100cb0d0 MxDSAction* MxDSParallelAction::Clone() { MxDSParallelAction* clone = new MxDSParallelAction(); @@ -42,7 +42,7 @@ MxDSAction* MxDSParallelAction::Clone() return clone; } -// OFFSET: LEGO1 0x100cb160 +// FUNCTION: LEGO1 0x100cb160 MxLong MxDSParallelAction::GetDuration() { if (this->m_duration) diff --git a/LEGO1/mxdsparallelaction.h b/LEGO1/mxdsparallelaction.h index bafb688d..c5e8ae4a 100644 --- a/LEGO1/mxdsparallelaction.h +++ b/LEGO1/mxdsparallelaction.h @@ -3,7 +3,7 @@ #include "mxdsmultiaction.h" -// VTABLE 0x100dcf80 +// VTABLE: LEGO1 0x100dcf80 // SIZE 0x9c class MxDSParallelAction : public MxDSMultiAction { public: @@ -13,14 +13,14 @@ class MxDSParallelAction : public MxDSMultiAction { void CopyFrom(MxDSParallelAction& p_dsParallelAction); MxDSParallelAction& operator=(MxDSParallelAction& p_dsParallelAction); - // OFFSET: LEGO1 0x100caf00 + // FUNCTION: LEGO1 0x100caf00 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x10102608 + // GLOBAL: LEGO1 0x10102608 return "MxDSParallelAction"; } - // OFFSET: LEGO1 0x100caf10 + // FUNCTION: LEGO1 0x100caf10 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSParallelAction::ClassName()) || MxDSMultiAction::IsA(name); diff --git a/LEGO1/mxdsselectaction.cpp b/LEGO1/mxdsselectaction.cpp index e6ff1895..4bdfbd60 100644 --- a/LEGO1/mxdsselectaction.cpp +++ b/LEGO1/mxdsselectaction.cpp @@ -6,21 +6,21 @@ DECOMP_SIZE_ASSERT(MxDSSelectAction, 0xb0) -// OFFSET: LEGO1 0x100cb2b0 +// FUNCTION: LEGO1 0x100cb2b0 MxDSSelectAction::MxDSSelectAction() { this->SetType(MxDSType_SelectAction); this->m_unk0xac = new MxStringList; } -// OFFSET: LEGO1 0x100cb8d0 +// FUNCTION: LEGO1 0x100cb8d0 MxDSSelectAction::~MxDSSelectAction() { if (this->m_unk0xac) delete this->m_unk0xac; } -// OFFSET: LEGO1 0x100cb950 +// FUNCTION: LEGO1 0x100cb950 void MxDSSelectAction::CopyFrom(MxDSSelectAction& p_dsSelectAction) { this->m_unk0x9c = p_dsSelectAction.m_unk0x9c; @@ -33,7 +33,7 @@ void MxDSSelectAction::CopyFrom(MxDSSelectAction& p_dsSelectAction) this->m_unk0xac->Append(string); } -// OFFSET: LEGO1 0x100cbd50 +// FUNCTION: LEGO1 0x100cbd50 MxDSSelectAction& MxDSSelectAction::operator=(MxDSSelectAction& p_dsSelectAction) { if (this != &p_dsSelectAction) { @@ -43,7 +43,7 @@ MxDSSelectAction& MxDSSelectAction::operator=(MxDSSelectAction& p_dsSelectAction return *this; } -// OFFSET: LEGO1 0x100cbd80 +// FUNCTION: LEGO1 0x100cbd80 MxDSAction* MxDSSelectAction::Clone() { MxDSSelectAction* clone = new MxDSSelectAction(); @@ -54,7 +54,7 @@ MxDSAction* MxDSSelectAction::Clone() return clone; } -// OFFSET: LEGO1 0x100cbe10 +// FUNCTION: LEGO1 0x100cbe10 MxU32 MxDSSelectAction::GetSizeOnDisk() { MxU32 totalSizeOnDisk = MxDSParallelAction::GetSizeOnDisk(); @@ -73,7 +73,7 @@ MxU32 MxDSSelectAction::GetSizeOnDisk() return totalSizeOnDisk; } -// OFFSET: LEGO1 0x100cbf60 +// FUNCTION: LEGO1 0x100cbf60 void MxDSSelectAction::Deserialize(char** p_source, MxS16 p_unk24) { MxString string; diff --git a/LEGO1/mxdsselectaction.h b/LEGO1/mxdsselectaction.h index 8c61b867..7f57896b 100644 --- a/LEGO1/mxdsselectaction.h +++ b/LEGO1/mxdsselectaction.h @@ -5,7 +5,7 @@ #include "mxdsparallelaction.h" #include "mxstringlist.h" -// VTABLE 0x100dcfc8 +// VTABLE: LEGO1 0x100dcfc8 // SIZE 0xb0 class MxDSSelectAction : public MxDSParallelAction { public: @@ -15,14 +15,14 @@ class MxDSSelectAction : public MxDSParallelAction { void CopyFrom(MxDSSelectAction& p_dsSelectAction); MxDSSelectAction& operator=(MxDSSelectAction& p_dsSelectAction); - // OFFSET: LEGO1 0x100cb6f0 + // FUNCTION: LEGO1 0x100cb6f0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x1010261c + // GLOBAL: LEGO1 0x1010261c return "MxDSSelectAction"; } - // OFFSET: LEGO1 0x100cb700 + // FUNCTION: LEGO1 0x100cb700 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSSelectAction::ClassName()) || MxDSParallelAction::IsA(name); diff --git a/LEGO1/mxdsserialaction.cpp b/LEGO1/mxdsserialaction.cpp index 754e1cb6..59cda938 100644 --- a/LEGO1/mxdsserialaction.cpp +++ b/LEGO1/mxdsserialaction.cpp @@ -4,7 +4,7 @@ DECOMP_SIZE_ASSERT(MxDSSerialAction, 0xa8) -// OFFSET: LEGO1 0x100ca9d0 +// FUNCTION: LEGO1 0x100ca9d0 MxDSSerialAction::MxDSSerialAction() { this->SetType(MxDSType_SerialAction); @@ -12,13 +12,13 @@ MxDSSerialAction::MxDSSerialAction() this->m_unk0xa0 = 0; } -// OFFSET: LEGO1 0x100caac0 +// FUNCTION: LEGO1 0x100caac0 void MxDSSerialAction::SetDuration(MxLong p_duration) { this->m_duration = p_duration; } -// OFFSET: LEGO1 0x100cac10 +// FUNCTION: LEGO1 0x100cac10 MxDSSerialAction::~MxDSSerialAction() { if (this->m_cursor) @@ -27,12 +27,12 @@ MxDSSerialAction::~MxDSSerialAction() this->m_cursor = NULL; } -// OFFSET: LEGO1 0x100cac90 +// FUNCTION: LEGO1 0x100cac90 void MxDSSerialAction::CopyFrom(MxDSSerialAction& p_dsSerialAction) { } -// OFFSET: LEGO1 0x100caca0 +// FUNCTION: LEGO1 0x100caca0 MxDSSerialAction& MxDSSerialAction::operator=(MxDSSerialAction& p_dsSerialAction) { if (this == &p_dsSerialAction) @@ -43,7 +43,7 @@ MxDSSerialAction& MxDSSerialAction::operator=(MxDSSerialAction& p_dsSerialAction return *this; } -// OFFSET: LEGO1 0x100cacd0 +// FUNCTION: LEGO1 0x100cacd0 MxDSAction* MxDSSerialAction::Clone() { MxDSSerialAction* clone = new MxDSSerialAction(); @@ -54,7 +54,7 @@ MxDSAction* MxDSSerialAction::Clone() return clone; } -// OFFSET: LEGO1 0x100cad60 +// FUNCTION: LEGO1 0x100cad60 MxLong MxDSSerialAction::GetDuration() { if (this->m_duration) diff --git a/LEGO1/mxdsserialaction.h b/LEGO1/mxdsserialaction.h index 39cb2e6d..e6f6277f 100644 --- a/LEGO1/mxdsserialaction.h +++ b/LEGO1/mxdsserialaction.h @@ -4,7 +4,7 @@ #include "decomp.h" #include "mxdsmultiaction.h" -// VTABLE 0x100dcf38 +// VTABLE: LEGO1 0x100dcf38 // SIZE 0xa8 class MxDSSerialAction : public MxDSMultiAction { public: @@ -14,14 +14,14 @@ class MxDSSerialAction : public MxDSMultiAction { void CopyFrom(MxDSSerialAction& p_dsSerialAction); MxDSSerialAction& operator=(MxDSSerialAction& p_dsSerialAction); - // OFFSET: LEGO1 0x100caad0 + // FUNCTION: LEGO1 0x100caad0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f75dc + // GLOBAL: LEGO1 0x100f75dc return "MxDSSerialAction"; } - // OFFSET: LEGO1 0x100caae0 + // FUNCTION: LEGO1 0x100caae0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSSerialAction::ClassName()) || MxDSMultiAction::IsA(name); diff --git a/LEGO1/mxdssound.cpp b/LEGO1/mxdssound.cpp index d0214f52..09f5d6d4 100644 --- a/LEGO1/mxdssound.cpp +++ b/LEGO1/mxdssound.cpp @@ -4,26 +4,26 @@ DECOMP_SIZE_ASSERT(MxDSSound, 0xc0) -// OFFSET: LEGO1 0x100c92c0 +// FUNCTION: LEGO1 0x100c92c0 MxDSSound::MxDSSound() { this->m_volume = 0x4f; this->SetType(MxDSType_Sound); } -// OFFSET: LEGO1 0x100c9470 +// FUNCTION: LEGO1 0x100c9470 MxDSSound::~MxDSSound() { } -// OFFSET: LEGO1 0x100c94c0 +// FUNCTION: LEGO1 0x100c94c0 void MxDSSound::CopyFrom(MxDSSound& p_dsSound) { this->SetType(p_dsSound.GetType()); this->m_volume = p_dsSound.m_volume; } -// OFFSET: LEGO1 0x100c94e0 +// FUNCTION: LEGO1 0x100c94e0 MxDSSound& MxDSSound::operator=(MxDSSound& p_dsSound) { if (this == &p_dsSound) @@ -34,7 +34,7 @@ MxDSSound& MxDSSound::operator=(MxDSSound& p_dsSound) return *this; } -// OFFSET: LEGO1 0x100c9510 +// FUNCTION: LEGO1 0x100c9510 MxDSAction* MxDSSound::Clone() { MxDSSound* clone = new MxDSSound(); @@ -45,7 +45,7 @@ MxDSAction* MxDSSound::Clone() return clone; } -// OFFSET: LEGO1 0x100c95a0 +// FUNCTION: LEGO1 0x100c95a0 void MxDSSound::Deserialize(char** p_source, MxS16 p_unk24) { MxDSMediaAction::Deserialize(p_source, p_unk24); @@ -53,7 +53,7 @@ void MxDSSound::Deserialize(char** p_source, MxS16 p_unk24) GetScalar(p_source, this->m_volume); } -// OFFSET: LEGO1 0x100c95d0 +// FUNCTION: LEGO1 0x100c95d0 MxU32 MxDSSound::GetSizeOnDisk() { MxU32 totalSizeOnDisk = MxDSMediaAction::GetSizeOnDisk(); diff --git a/LEGO1/mxdssound.h b/LEGO1/mxdssound.h index 63a1d5ab..cb1d21d5 100644 --- a/LEGO1/mxdssound.h +++ b/LEGO1/mxdssound.h @@ -3,7 +3,7 @@ #include "mxdsmediaaction.h" -// VTABLE 0x100dcdd0 +// VTABLE: LEGO1 0x100dcdd0 // SIZE 0xc0 class MxDSSound : public MxDSMediaAction { public: @@ -13,14 +13,14 @@ class MxDSSound : public MxDSMediaAction { void CopyFrom(MxDSSound& p_dsSound); MxDSSound& operator=(MxDSSound& p_dsSound); - // OFFSET: LEGO1 0x100c9330 + // FUNCTION: LEGO1 0x100c9330 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x101025e4 + // GLOBAL: LEGO1 0x101025e4 return "MxDSSound"; } - // OFFSET: LEGO1 0x100c9340 + // FUNCTION: LEGO1 0x100c9340 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSSound::ClassName()) || MxDSMediaAction::IsA(name); diff --git a/LEGO1/mxdssource.cpp b/LEGO1/mxdssource.cpp index 7110c9ee..c38799d3 100644 --- a/LEGO1/mxdssource.cpp +++ b/LEGO1/mxdssource.cpp @@ -2,19 +2,19 @@ #include "mxdsbuffer.h" -// OFFSET: LEGO1 0x100bffd0 +// FUNCTION: LEGO1 0x100bffd0 void MxDSSource::ReadToBuffer(MxDSBuffer* p_buffer) { Read(p_buffer->GetBuffer(), p_buffer->GetWriteOffset()); } -// OFFSET: LEGO1 0x100bfff0 +// FUNCTION: LEGO1 0x100bfff0 MxLong MxDSSource::GetLengthInDWords() { return m_lengthInDWords; } -// OFFSET: LEGO1 0x100c0000 +// FUNCTION: LEGO1 0x100c0000 MxU32* MxDSSource::GetBuffer() { return m_pBuffer; diff --git a/LEGO1/mxdssource.h b/LEGO1/mxdssource.h index ff485952..2a0847e9 100644 --- a/LEGO1/mxdssource.h +++ b/LEGO1/mxdssource.h @@ -5,19 +5,19 @@ class MxDSBuffer; -// VTABLE 0x100dc8c8 +// VTABLE: LEGO1 0x100dc8c8 class MxDSSource : public MxCore { public: MxDSSource() : m_lengthInDWords(0), m_pBuffer(NULL), m_position(-1) {} - // OFFSET: LEGO1 0x100c0010 + // FUNCTION: LEGO1 0x100c0010 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x10102588 + // GLOBAL: LEGO1 0x10102588 return "MxDSSource"; } - // OFFSET: LEGO1 0x100c0020 + // FUNCTION: LEGO1 0x100c0020 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSSource::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxdsstill.cpp b/LEGO1/mxdsstill.cpp index c99c033f..6ee1ede3 100644 --- a/LEGO1/mxdsstill.cpp +++ b/LEGO1/mxdsstill.cpp @@ -2,23 +2,23 @@ DECOMP_SIZE_ASSERT(MxDSStill, 0xb8) -// OFFSET: LEGO1 0x100c98c0 +// FUNCTION: LEGO1 0x100c98c0 MxDSStill::MxDSStill() { this->SetType(MxDSType_Still); } -// OFFSET: LEGO1 0x100c9a70 +// FUNCTION: LEGO1 0x100c9a70 MxDSStill::~MxDSStill() { } -// OFFSET: LEGO1 0x100c9ac0 +// FUNCTION: LEGO1 0x100c9ac0 void MxDSStill::CopyFrom(MxDSStill& p_dsStill) { } -// OFFSET: LEGO1 0x100c9ad0 +// FUNCTION: LEGO1 0x100c9ad0 MxDSStill& MxDSStill::operator=(MxDSStill& p_dsStill) { if (this == &p_dsStill) @@ -29,7 +29,7 @@ MxDSStill& MxDSStill::operator=(MxDSStill& p_dsStill) return *this; } -// OFFSET: LEGO1 0x100c9b00 +// FUNCTION: LEGO1 0x100c9b00 MxDSAction* MxDSStill::Clone() { MxDSStill* clone = new MxDSStill(); diff --git a/LEGO1/mxdsstill.h b/LEGO1/mxdsstill.h index 92921462..2da2602e 100644 --- a/LEGO1/mxdsstill.h +++ b/LEGO1/mxdsstill.h @@ -3,7 +3,7 @@ #include "mxdsmediaaction.h" -// VTABLE 0x100dce60 +// VTABLE: LEGO1 0x100dce60 // SIZE 0xb8 class MxDSStill : public MxDSMediaAction { public: @@ -13,14 +13,14 @@ class MxDSStill : public MxDSMediaAction { void CopyFrom(MxDSStill& p_dsStill); MxDSStill& operator=(MxDSStill& p_dsStill); - // OFFSET: LEGO1 0x100c9930 + // FUNCTION: LEGO1 0x100c9930 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x101025fc + // GLOBAL: LEGO1 0x101025fc return "MxDSStill"; } - // OFFSET: LEGO1 0x100c9940 + // FUNCTION: LEGO1 0x100c9940 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSStill::ClassName()) || MxDSMediaAction::IsA(name); diff --git a/LEGO1/mxdsstreamingaction.cpp b/LEGO1/mxdsstreamingaction.cpp index ffcc55fa..1117cdf4 100644 --- a/LEGO1/mxdsstreamingaction.cpp +++ b/LEGO1/mxdsstreamingaction.cpp @@ -4,7 +4,7 @@ DECOMP_SIZE_ASSERT(MxDSStreamingAction, 0xb4) -// OFFSET: LEGO1 0x100cd010 +// FUNCTION: LEGO1 0x100cd010 MxDSStreamingAction::MxDSStreamingAction(MxDSAction& p_dsAction, MxU32 p_offset) { Init(); @@ -14,7 +14,7 @@ MxDSStreamingAction::MxDSStreamingAction(MxDSAction& p_dsAction, MxU32 p_offset) this->m_bufferOffset = p_offset; } -// OFFSET: LEGO1 0x100cd090 +// FUNCTION: LEGO1 0x100cd090 MxBool MxDSStreamingAction::HasId(MxU32 p_objectId) { if (this->m_internalAction) @@ -22,14 +22,14 @@ MxBool MxDSStreamingAction::HasId(MxU32 p_objectId) return FALSE; } -// OFFSET: LEGO1 0x100cd0d0 +// FUNCTION: LEGO1 0x100cd0d0 MxDSStreamingAction::MxDSStreamingAction(MxDSStreamingAction& p_dsStreamingAction) { Init(); CopyFrom(p_dsStreamingAction); } -// OFFSET: LEGO1 0x100cd150 +// FUNCTION: LEGO1 0x100cd150 MxDSStreamingAction::~MxDSStreamingAction() { if (this->m_unka0) @@ -40,7 +40,7 @@ MxDSStreamingAction::~MxDSStreamingAction() delete this->m_internalAction; } -// OFFSET: LEGO1 0x100cd1e0 +// FUNCTION: LEGO1 0x100cd1e0 MxResult MxDSStreamingAction::Init() { this->m_unk94 = 0; @@ -54,7 +54,7 @@ MxResult MxDSStreamingAction::Init() return SUCCESS; } -// OFFSET: LEGO1 0x100cd220 +// FUNCTION: LEGO1 0x100cd220 MxDSStreamingAction* MxDSStreamingAction::CopyFrom(MxDSStreamingAction& p_dsStreamingAction) { *this = p_dsStreamingAction; @@ -70,7 +70,7 @@ MxDSStreamingAction* MxDSStreamingAction::CopyFrom(MxDSStreamingAction& p_dsStre return this; } -// OFFSET: LEGO1 0x100cd2a0 +// FUNCTION: LEGO1 0x100cd2a0 void MxDSStreamingAction::SetInternalAction(MxDSAction* p_dsAction) { if (this->m_internalAction) @@ -78,7 +78,7 @@ void MxDSStreamingAction::SetInternalAction(MxDSAction* p_dsAction) this->m_internalAction = p_dsAction; } -// OFFSET: LEGO1 0x100cd2d0 +// FUNCTION: LEGO1 0x100cd2d0 void MxDSStreamingAction::FUN_100CD2D0() { if (this->m_duration == -1) diff --git a/LEGO1/mxdsstreamingaction.h b/LEGO1/mxdsstreamingaction.h index 609aac73..b5a1e6c1 100644 --- a/LEGO1/mxdsstreamingaction.h +++ b/LEGO1/mxdsstreamingaction.h @@ -5,7 +5,7 @@ class MxDSBuffer; -// VTABLE 0x100dd088 +// VTABLE: LEGO1 0x100dd088 // SIZE 0xb4 class MxDSStreamingAction : public MxDSAction { public: diff --git a/LEGO1/mxdssubscriber.cpp b/LEGO1/mxdssubscriber.cpp index 151572eb..b7a6d50b 100644 --- a/LEGO1/mxdssubscriber.cpp +++ b/LEGO1/mxdssubscriber.cpp @@ -2,40 +2,40 @@ DECOMP_SIZE_ASSERT(MxDSSubscriber, 0x4c); -// OFFSET: LEGO1 0x100b7bb0 STUB +// STUB: LEGO1 0x100b7bb0 MxDSSubscriber::MxDSSubscriber() { // TODO } -// OFFSET: LEGO1 0x100b7e00 STUB +// STUB: LEGO1 0x100b7e00 MxDSSubscriber::~MxDSSubscriber() { // TODO } -// OFFSET: LEGO1 0x100b7ed0 STUB +// STUB: LEGO1 0x100b7ed0 MxResult MxDSSubscriber::FUN_100b7ed0(MxStreamController*, MxU32, MxS16) { // TODO return SUCCESS; } -// OFFSET: LEGO1 0x100b8250 STUB +// STUB: LEGO1 0x100b8250 MxStreamChunk* MxDSSubscriber::FUN_100b8250() { // TODO return NULL; } -// OFFSET: LEGO1 0x100b8360 STUB +// STUB: LEGO1 0x100b8360 MxStreamChunk* MxDSSubscriber::FUN_100b8360() { // TODO return NULL; } -// OFFSET: LEGO1 0x100b8390 STUB +// STUB: LEGO1 0x100b8390 void MxDSSubscriber::FUN_100b8390(MxStreamChunk*) { // TODO diff --git a/LEGO1/mxdssubscriber.h b/LEGO1/mxdssubscriber.h index 9d587216..112a38e1 100644 --- a/LEGO1/mxdssubscriber.h +++ b/LEGO1/mxdssubscriber.h @@ -8,21 +8,21 @@ class MxStreamController; -// VTABLE 0x100dc698 +// VTABLE: LEGO1 0x100dc698 // SIZE 0x4c class MxDSSubscriber : public MxCore { public: MxDSSubscriber(); virtual ~MxDSSubscriber() override; - // OFFSET: LEGO1 0x100b7d50 + // FUNCTION: LEGO1 0x100b7d50 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x101020f8 + // GLOBAL: LEGO1 0x101020f8 return "MxDSSubscriber"; } - // OFFSET: LEGO1 0x100b7d60 + // FUNCTION: LEGO1 0x100b7d60 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxDSSubscriber::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxentity.cpp b/LEGO1/mxentity.cpp index bcf66a1b..1f507257 100644 --- a/LEGO1/mxentity.cpp +++ b/LEGO1/mxentity.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(MxEntity, 0x10) -// OFFSET: LEGO1 0x10001070 +// FUNCTION: LEGO1 0x10001070 MxResult MxEntity::Create(MxS32 p_id, const MxAtomId& p_atom) { this->m_mxEntityId = p_id; @@ -10,12 +10,12 @@ MxResult MxEntity::Create(MxS32 p_id, const MxAtomId& p_atom) return SUCCESS; } -// OFFSET: LEGO1 0x1000c110 +// FUNCTION: LEGO1 0x1000c110 MxEntity::~MxEntity() { } -// OFFSET: LEGO1 0x1001d190 +// FUNCTION: LEGO1 0x1001d190 MxEntity::MxEntity() { this->m_mxEntityId = -1; diff --git a/LEGO1/mxentity.h b/LEGO1/mxentity.h index aa8df045..7950bca5 100644 --- a/LEGO1/mxentity.h +++ b/LEGO1/mxentity.h @@ -7,21 +7,21 @@ #include "mxdsobject.h" #include "mxtypes.h" -// VTABLE 0x100d5390 +// VTABLE: LEGO1 0x100d5390 // SIZE 0x10 class MxEntity : public MxCore { public: MxEntity(); virtual ~MxEntity() override; - // OFFSET: LEGO1 0x1000c180 + // FUNCTION: LEGO1 0x1000c180 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x100f0070 + // GLOBAL: LEGO1 0x100f0070 return "MxEntity"; } - // OFFSET: LEGO1 0x1000c190 + // FUNCTION: LEGO1 0x1000c190 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxEntity::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxeventmanager.cpp b/LEGO1/mxeventmanager.cpp index a6c4f1b5..7819c38f 100644 --- a/LEGO1/mxeventmanager.cpp +++ b/LEGO1/mxeventmanager.cpp @@ -5,25 +5,25 @@ #include "mxthread.h" #include "mxticklemanager.h" -// OFFSET: LEGO1 0x100c0360 +// FUNCTION: LEGO1 0x100c0360 MxEventManager::MxEventManager() { Init(); } -// OFFSET: LEGO1 0x100c03f0 +// FUNCTION: LEGO1 0x100c03f0 MxEventManager::~MxEventManager() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100c0450 +// FUNCTION: LEGO1 0x100c0450 void MxEventManager::Init() { // This is intentionally left blank } -// OFFSET: LEGO1 0x100c0460 +// FUNCTION: LEGO1 0x100c0460 void MxEventManager::Destroy(MxBool p_fromDestructor) { if (m_thread != NULL) { @@ -37,7 +37,7 @@ void MxEventManager::Destroy(MxBool p_fromDestructor) MxMediaManager::Destroy(); } -// OFFSET: LEGO1 0x100c04a0 +// FUNCTION: LEGO1 0x100c04a0 MxResult MxEventManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) { MxResult status = FAILURE; @@ -69,7 +69,7 @@ MxResult MxEventManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) return status; } -// OFFSET: LEGO1 0x100c0590 +// FUNCTION: LEGO1 0x100c0590 void MxEventManager::Destroy() { Destroy(FALSE); diff --git a/LEGO1/mxeventmanager.h b/LEGO1/mxeventmanager.h index 33384187..e7f41a6d 100644 --- a/LEGO1/mxeventmanager.h +++ b/LEGO1/mxeventmanager.h @@ -4,7 +4,7 @@ #include "decomp.h" #include "mxmediamanager.h" -// VTABLE 0x100dc900 +// VTABLE: LEGO1 0x100dc900 // SIZE 0x2c class MxEventManager : public MxMediaManager { public: diff --git a/LEGO1/mxeventpresenter.cpp b/LEGO1/mxeventpresenter.cpp index 14df9c29..ce3fdbdf 100644 --- a/LEGO1/mxeventpresenter.cpp +++ b/LEGO1/mxeventpresenter.cpp @@ -8,25 +8,25 @@ DECOMP_SIZE_ASSERT(MxEventPresenter, 0x54); -// OFFSET: LEGO1 0x100c2b70 +// FUNCTION: LEGO1 0x100c2b70 MxEventPresenter::MxEventPresenter() { Init(); } -// OFFSET: LEGO1 0x100c2d40 +// FUNCTION: LEGO1 0x100c2d40 MxEventPresenter::~MxEventPresenter() { Destroy(); } -// OFFSET: LEGO1 0x100c2da0 +// FUNCTION: LEGO1 0x100c2da0 void MxEventPresenter::Init() { m_data = NULL; } -// OFFSET: LEGO1 0x100c2db0 +// FUNCTION: LEGO1 0x100c2db0 MxResult MxEventPresenter::AddToManager() { MxResult ret = FAILURE; @@ -39,7 +39,7 @@ MxResult MxEventPresenter::AddToManager() return ret; } -// OFFSET: LEGO1 0x100c2de0 +// FUNCTION: LEGO1 0x100c2de0 void MxEventPresenter::Destroy() { if (EventManager()) @@ -55,14 +55,14 @@ void MxEventPresenter::Destroy() m_criticalSection.Leave(); } -// OFFSET: LEGO1 0x100c2e30 +// FUNCTION: LEGO1 0x100c2e30 void MxEventPresenter::CopyData(MxStreamChunk* p_chunk) { m_data = new MxU8[p_chunk->GetLength()]; memcpy(m_data, p_chunk->GetData(), p_chunk->GetLength()); } -// OFFSET: LEGO1 0x100c2e70 +// FUNCTION: LEGO1 0x100c2e70 void MxEventPresenter::ReadyTickle() { MxStreamChunk* chunk = NextChunk(); @@ -76,7 +76,7 @@ void MxEventPresenter::ReadyTickle() } } -// OFFSET: LEGO1 0x100c2eb0 +// FUNCTION: LEGO1 0x100c2eb0 void MxEventPresenter::StartingTickle() { MxStreamChunk* chunk = NextChunk(); @@ -87,7 +87,7 @@ void MxEventPresenter::StartingTickle() } } -// OFFSET: LEGO1 0x100c2ef0 +// FUNCTION: LEGO1 0x100c2ef0 MxResult MxEventPresenter::PutData() { MxAutoLocker lock(&m_criticalSection); diff --git a/LEGO1/mxeventpresenter.h b/LEGO1/mxeventpresenter.h index 5abb5480..6010c894 100644 --- a/LEGO1/mxeventpresenter.h +++ b/LEGO1/mxeventpresenter.h @@ -4,21 +4,21 @@ #include "decomp.h" #include "mxmediapresenter.h" -// VTABLE 0x100dca88 +// VTABLE: LEGO1 0x100dca88 // SIZE 0x54 class MxEventPresenter : public MxMediaPresenter { public: MxEventPresenter(); virtual ~MxEventPresenter() override; - // OFFSET: LEGO1 0x100c2c30 + // FUNCTION: LEGO1 0x100c2c30 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x10101dcc + // GLOBAL: LEGO1 0x10101dcc return "MxEventPresenter"; } - // OFFSET: LEGO1 0x100c2c40 + // FUNCTION: LEGO1 0x100c2c40 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxEventPresenter::ClassName()) || MxMediaPresenter::IsA(name); diff --git a/LEGO1/mxflcpresenter.cpp b/LEGO1/mxflcpresenter.cpp index 08bd9e0f..8ec40052 100644 --- a/LEGO1/mxflcpresenter.cpp +++ b/LEGO1/mxflcpresenter.cpp @@ -8,7 +8,7 @@ DECOMP_SIZE_ASSERT(MxFlcPresenter, 0x68); -// OFFSET: LEGO1 0x100b3310 +// FUNCTION: LEGO1 0x100b3310 MxFlcPresenter::MxFlcPresenter() { this->m_flicHeader = NULL; @@ -16,7 +16,7 @@ MxFlcPresenter::MxFlcPresenter() this->m_flags &= 0xfb; } -// OFFSET: LEGO1 0x100b3420 +// FUNCTION: LEGO1 0x100b3420 MxFlcPresenter::~MxFlcPresenter() { if (this->m_flicHeader) { @@ -24,14 +24,14 @@ MxFlcPresenter::~MxFlcPresenter() } } -// OFFSET: LEGO1 0x100b3490 +// FUNCTION: LEGO1 0x100b3490 void MxFlcPresenter::LoadHeader(MxStreamChunk* p_chunk) { m_flicHeader = (FLIC_HEADER*) new MxU8[p_chunk->GetLength()]; memcpy(m_flicHeader, p_chunk->GetData(), p_chunk->GetLength()); } -// OFFSET: LEGO1 0x100b34d0 +// FUNCTION: LEGO1 0x100b34d0 void MxFlcPresenter::CreateBitmap() { if (m_bitmap) @@ -41,7 +41,7 @@ void MxFlcPresenter::CreateBitmap() m_bitmap->SetSize(m_flicHeader->width, m_flicHeader->height, NULL, FALSE); } -// OFFSET: LEGO1 0x100b3620 +// FUNCTION: LEGO1 0x100b3620 void MxFlcPresenter::VTable0x70() { MxPalette* pal = m_bitmap->CreatePalette(); diff --git a/LEGO1/mxflcpresenter.h b/LEGO1/mxflcpresenter.h index 9ed72140..94720718 100644 --- a/LEGO1/mxflcpresenter.h +++ b/LEGO1/mxflcpresenter.h @@ -6,23 +6,23 @@ #include -// VTABLE 0x100dc2c0 +// VTABLE: LEGO1 0x100dc2c0 // SIZE 0x68 class MxFlcPresenter : public MxVideoPresenter { public: MxFlcPresenter(); virtual ~MxFlcPresenter() override; - // OFFSET: LEGO1 0x1004e200 + // FUNCTION: LEGO1 0x1004e200 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxFlcPresenter::ClassName()) || MxVideoPresenter::IsA(name); } - // OFFSET: LEGO1 0x100b33f0 + // FUNCTION: LEGO1 0x100b33f0 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x100f43c8 + // GLOBAL: LEGO1 0x100f43c8 return "MxFlcPresenter"; } diff --git a/LEGO1/mxioinfo.cpp b/LEGO1/mxioinfo.cpp index 9beb0aec..3468fb63 100644 --- a/LEGO1/mxioinfo.cpp +++ b/LEGO1/mxioinfo.cpp @@ -7,19 +7,19 @@ // but this assert will enforce the size if we decide to change that. DECOMP_SIZE_ASSERT(MXIOINFO, sizeof(MMIOINFO)); -// OFFSET: LEGO1 0x100cc800 +// FUNCTION: LEGO1 0x100cc800 MXIOINFO::MXIOINFO() { memset(&m_info, 0, sizeof(m_info)); } -// OFFSET: LEGO1 0x100cc820 +// FUNCTION: LEGO1 0x100cc820 MXIOINFO::~MXIOINFO() { Close(0); } -// OFFSET: LEGO1 0x100cc830 +// FUNCTION: LEGO1 0x100cc830 MxU16 MXIOINFO::Open(const char* p_filename, MxULong p_flags) { OFSTRUCT _unused; @@ -62,7 +62,7 @@ MxU16 MXIOINFO::Open(const char* p_filename, MxULong p_flags) return result; } -// OFFSET: LEGO1 0x100cc8e0 +// FUNCTION: LEGO1 0x100cc8e0 MxU16 MXIOINFO::Close(MxLong p_unused) { MxU16 result = 0; @@ -84,7 +84,7 @@ MxU16 MXIOINFO::Close(MxLong p_unused) return result; } -// OFFSET: LEGO1 0x100cc930 +// FUNCTION: LEGO1 0x100cc930 MxLong MXIOINFO::Read(void* p_buf, MxLong p_len) { MxLong bytes_read = 0; @@ -128,7 +128,7 @@ MxLong MXIOINFO::Read(void* p_buf, MxLong p_len) return bytes_read; } -// OFFSET: LEGO1 0x100cca00 +// FUNCTION: LEGO1 0x100cca00 MxLong MXIOINFO::Seek(MxLong p_offset, MxLong p_origin) { MxLong result = -1; @@ -236,7 +236,7 @@ MxLong MXIOINFO::Seek(MxLong p_offset, MxLong p_origin) return result; } -// OFFSET: LEGO1 0x100ccbc0 +// FUNCTION: LEGO1 0x100ccbc0 MxU16 MXIOINFO::SetBuffer(char* p_buf, MxLong p_len, MxLong p_unused) { MxU16 result = Flush(0); @@ -254,7 +254,7 @@ MxU16 MXIOINFO::SetBuffer(char* p_buf, MxLong p_len, MxLong p_unused) return result; } -// OFFSET: LEGO1 0x100ccc10 +// FUNCTION: LEGO1 0x100ccc10 MxU16 MXIOINFO::Flush(MxU16 p_unused) { MxU16 result = 0; @@ -304,7 +304,7 @@ MxU16 MXIOINFO::Flush(MxU16 p_unused) return result; } -// OFFSET: LEGO1 0x100ccd00 +// FUNCTION: LEGO1 0x100ccd00 MxU16 MXIOINFO::Advance(MxU16 p_option) { MxU16 result = 0; @@ -376,7 +376,7 @@ MxU16 MXIOINFO::Advance(MxU16 p_option) return result; } -// OFFSET: LEGO1 0x100cce60 +// FUNCTION: LEGO1 0x100cce60 MxU16 MXIOINFO::Descend(MMCKINFO* p_chunkInfo, const MMCKINFO* p_parentInfo, MxU16 p_descend) { MxU16 result = 0; diff --git a/LEGO1/mxloopingflcpresenter.cpp b/LEGO1/mxloopingflcpresenter.cpp index f54cb1e5..c06c8f42 100644 --- a/LEGO1/mxloopingflcpresenter.cpp +++ b/LEGO1/mxloopingflcpresenter.cpp @@ -4,19 +4,19 @@ DECOMP_SIZE_ASSERT(MxLoopingFlcPresenter, 0x6c); -// OFFSET: LEGO1 0x100b4310 +// FUNCTION: LEGO1 0x100b4310 MxLoopingFlcPresenter::MxLoopingFlcPresenter() { Init(); } -// OFFSET: LEGO1 0x100b43b0 +// FUNCTION: LEGO1 0x100b43b0 MxLoopingFlcPresenter::~MxLoopingFlcPresenter() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100b4410 +// FUNCTION: LEGO1 0x100b4410 void MxLoopingFlcPresenter::Init() { this->m_unk68 = 0; @@ -24,13 +24,13 @@ void MxLoopingFlcPresenter::Init() this->m_flags &= 0xfb; } -// OFFSET: LEGO1 0x100b4432 STUB +// STUB: LEGO1 0x100b4432 void MxLoopingFlcPresenter::Destroy(MxBool p_fromDestructor) { // TODO } -// OFFSET: LEGO1 0x100b4470 +// FUNCTION: LEGO1 0x100b4470 void MxLoopingFlcPresenter::NextFrame() { MxStreamChunk* chunk = NextChunk(); diff --git a/LEGO1/mxloopingflcpresenter.h b/LEGO1/mxloopingflcpresenter.h index fa3f31de..d7c18546 100644 --- a/LEGO1/mxloopingflcpresenter.h +++ b/LEGO1/mxloopingflcpresenter.h @@ -4,17 +4,17 @@ #include "decomp.h" #include "mxflcpresenter.h" -// VTABLE 0x100dc480 +// VTABLE: LEGO1 0x100dc480 // SIZE 0x6c class MxLoopingFlcPresenter : public MxFlcPresenter { public: MxLoopingFlcPresenter(); virtual ~MxLoopingFlcPresenter() override; - // OFFSET: LEGO1 0x100b4380 + // FUNCTION: LEGO1 0x100b4380 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x10101e20 + // GLOBAL: LEGO1 0x10101e20 return "MxLoopingFlcPresenter"; } diff --git a/LEGO1/mxloopingmidipresenter.cpp b/LEGO1/mxloopingmidipresenter.cpp index 17bbe7ec..3d58e56b 100644 --- a/LEGO1/mxloopingmidipresenter.cpp +++ b/LEGO1/mxloopingmidipresenter.cpp @@ -7,16 +7,16 @@ DECOMP_SIZE_ASSERT(MxLoopingMIDIPresenter, 0x58); -// OFFSET: LEGO1 0x100b1830 TEMPLATE +// FUNCTION: LEGO1 0x100b1830 // MxLoopingMIDIPresenter::ClassName -// OFFSET: LEGO1 0x100b1840 TEMPLATE +// FUNCTION: LEGO1 0x100b1840 // MxLoopingMIDIPresenter::IsA -// OFFSET: LEGO1 0x100b19c0 TEMPLATE +// SYNTHETIC: LEGO1 0x100b19c0 // MxLoopingMIDIPresenter::`scalar deleting destructor' -// OFFSET: LEGO1 0x100c2a80 +// FUNCTION: LEGO1 0x100c2a80 void MxLoopingMIDIPresenter::StreamingTickle() { if (m_action->GetLoopCount()) { @@ -35,7 +35,7 @@ void MxLoopingMIDIPresenter::StreamingTickle() } } -// OFFSET: LEGO1 0x100c2ae0 +// FUNCTION: LEGO1 0x100c2ae0 void MxLoopingMIDIPresenter::DoneTickle() { if (m_action->GetLoopCount()) @@ -44,7 +44,7 @@ void MxLoopingMIDIPresenter::DoneTickle() EndAction(); } -// OFFSET: LEGO1 0x100c2b00 +// FUNCTION: LEGO1 0x100c2b00 MxResult MxLoopingMIDIPresenter::PutData() { m_criticalSection.Enter(); diff --git a/LEGO1/mxloopingmidipresenter.h b/LEGO1/mxloopingmidipresenter.h index c9d8b772..3f393581 100644 --- a/LEGO1/mxloopingmidipresenter.h +++ b/LEGO1/mxloopingmidipresenter.h @@ -3,13 +3,13 @@ #include "mxmidipresenter.h" -// VTABLE 0x100dc240 +// VTABLE: LEGO1 0x100dc240 // SIZE 0x58 class MxLoopingMIDIPresenter : public MxMIDIPresenter { public: inline virtual const char* ClassName() const override // vtable+0xc { - // 0x10101de0 + // GLOBAL: LEGO1 0x10101de0 return "MxLoopingMIDIPresenter"; } diff --git a/LEGO1/mxloopingsmkpresenter.cpp b/LEGO1/mxloopingsmkpresenter.cpp index 19ca1b0d..ce4f41c2 100644 --- a/LEGO1/mxloopingsmkpresenter.cpp +++ b/LEGO1/mxloopingsmkpresenter.cpp @@ -4,19 +4,19 @@ DECOMP_SIZE_ASSERT(MxLoopingSmkPresenter, 0x724); -// OFFSET: LEGO1 0x100b48b0 +// FUNCTION: LEGO1 0x100b48b0 MxLoopingSmkPresenter::MxLoopingSmkPresenter() { Init(); } -// OFFSET: LEGO1 0x100b4950 +// FUNCTION: LEGO1 0x100b4950 MxLoopingSmkPresenter::~MxLoopingSmkPresenter() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100b49b0 +// FUNCTION: LEGO1 0x100b49b0 void MxLoopingSmkPresenter::Init() { this->m_unk720 = 0; @@ -24,7 +24,7 @@ void MxLoopingSmkPresenter::Init() this->m_flags &= 0xfb; } -// OFFSET: LEGO1 0x100b49d0 STUB +// STUB: LEGO1 0x100b49d0 void MxLoopingSmkPresenter::Destroy(MxBool p_fromDestructor) { } diff --git a/LEGO1/mxloopingsmkpresenter.h b/LEGO1/mxloopingsmkpresenter.h index 54dad73b..16061cee 100644 --- a/LEGO1/mxloopingsmkpresenter.h +++ b/LEGO1/mxloopingsmkpresenter.h @@ -4,17 +4,17 @@ #include "decomp.h" #include "mxsmkpresenter.h" -// VTABLE 0x100dc540 +// VTABLE: LEGO1 0x100dc540 // SIZE 0x724 class MxLoopingSmkPresenter : public MxSmkPresenter { public: MxLoopingSmkPresenter(); virtual ~MxLoopingSmkPresenter() override; // vtable+0x0 - // OFFSET: LEGO1 0x100b4920 + // FUNCTION: LEGO1 0x100b4920 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x10101e08 + // GLOBAL: LEGO1 0x10101e08 return "MxLoopingSmkPresenter"; } diff --git a/LEGO1/mxmediamanager.cpp b/LEGO1/mxmediamanager.cpp index 4a63791a..47993fe8 100644 --- a/LEGO1/mxmediamanager.cpp +++ b/LEGO1/mxmediamanager.cpp @@ -8,19 +8,19 @@ DECOMP_SIZE_ASSERT(MxMediaManager, 0x2c); -// OFFSET: LEGO1 0x100b84c0 +// FUNCTION: LEGO1 0x100b84c0 MxMediaManager::MxMediaManager() { Init(); } -// OFFSET: LEGO1 0x100b8560 +// FUNCTION: LEGO1 0x100b8560 MxMediaManager::~MxMediaManager() { Destroy(); } -// OFFSET: LEGO1 0x100b85d0 +// FUNCTION: LEGO1 0x100b85d0 MxResult MxMediaManager::Init() { this->m_presenters = NULL; @@ -28,7 +28,7 @@ MxResult MxMediaManager::Init() return SUCCESS; } -// OFFSET: LEGO1 0x100b85e0 +// FUNCTION: LEGO1 0x100b85e0 MxResult MxMediaManager::InitPresenters() { MxAutoLocker lock(&this->m_criticalSection); @@ -43,7 +43,7 @@ MxResult MxMediaManager::InitPresenters() return SUCCESS; } -// OFFSET: LEGO1 0x100b8710 +// FUNCTION: LEGO1 0x100b8710 void MxMediaManager::Destroy() { MxAutoLocker lock(&this->m_criticalSection); @@ -54,7 +54,7 @@ void MxMediaManager::Destroy() Init(); } -// OFFSET: LEGO1 0x100b8790 +// FUNCTION: LEGO1 0x100b8790 MxResult MxMediaManager::Tickle() { MxAutoLocker lock(&this->m_criticalSection); @@ -72,7 +72,7 @@ MxResult MxMediaManager::Tickle() return SUCCESS; } -// OFFSET: LEGO1 0x100b88c0 +// FUNCTION: LEGO1 0x100b88c0 void MxMediaManager::AddPresenter(MxPresenter& p_presenter) { MxAutoLocker lock(&this->m_criticalSection); @@ -80,7 +80,7 @@ void MxMediaManager::AddPresenter(MxPresenter& p_presenter) this->m_presenters->Append(&p_presenter); } -// OFFSET: LEGO1 0x100b8980 +// FUNCTION: LEGO1 0x100b8980 void MxMediaManager::RemovePresenter(MxPresenter& p_presenter) { MxAutoLocker lock(&this->m_criticalSection); @@ -90,7 +90,7 @@ void MxMediaManager::RemovePresenter(MxPresenter& p_presenter) cursor.Detach(); } -// OFFSET: LEGO1 0x100b8ac0 +// FUNCTION: LEGO1 0x100b8ac0 void MxMediaManager::StopPresenters() { MxAutoLocker lock(&this->m_criticalSection); diff --git a/LEGO1/mxmediamanager.h b/LEGO1/mxmediamanager.h index 88666b45..47f7f0d1 100644 --- a/LEGO1/mxmediamanager.h +++ b/LEGO1/mxmediamanager.h @@ -7,7 +7,7 @@ #include "mxthread.h" #include "mxtypes.h" -// VTABLE 0x100dc6b0 +// VTABLE: LEGO1 0x100dc6b0 // SIZE 0x2c class MxMediaManager : public MxCore { public: diff --git a/LEGO1/mxmediapresenter.cpp b/LEGO1/mxmediapresenter.cpp index a1c6f98e..314f89c7 100644 --- a/LEGO1/mxmediapresenter.cpp +++ b/LEGO1/mxmediapresenter.cpp @@ -9,19 +9,19 @@ DECOMP_SIZE_ASSERT(MxMediaPresenter, 0x50); -// OFFSET: LEGO1 0x1000c550 +// FUNCTION: LEGO1 0x1000c550 MxMediaPresenter::~MxMediaPresenter() { Destroy(TRUE); } -// OFFSET: LEGO1 0x1000c5b0 +// FUNCTION: LEGO1 0x1000c5b0 void MxMediaPresenter::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x100b54e0 +// FUNCTION: LEGO1 0x100b54e0 void MxMediaPresenter::Init() { this->m_subscriber = NULL; @@ -30,7 +30,7 @@ void MxMediaPresenter::Init() this->m_currentChunk = NULL; } -// OFFSET: LEGO1 0x100b54f0 +// FUNCTION: LEGO1 0x100b54f0 void MxMediaPresenter::Destroy(MxBool p_fromDestructor) { { @@ -62,7 +62,7 @@ void MxMediaPresenter::Destroy(MxBool p_fromDestructor) MxPresenter::Destroy(); } -// OFFSET: LEGO1 0x100b5650 +// FUNCTION: LEGO1 0x100b5650 MxStreamChunk* MxMediaPresenter::FUN_100b5650() { MxStreamChunk* result = NULL; @@ -83,7 +83,7 @@ MxStreamChunk* MxMediaPresenter::FUN_100b5650() return result; } -// OFFSET: LEGO1 0x100b56b0 +// FUNCTION: LEGO1 0x100b56b0 MxStreamChunk* MxMediaPresenter::NextChunk() { MxStreamChunk* result = NULL; @@ -103,7 +103,7 @@ MxStreamChunk* MxMediaPresenter::NextChunk() return result; } -// OFFSET: LEGO1 0x100b5700 +// FUNCTION: LEGO1 0x100b5700 MxResult MxMediaPresenter::StartAction(MxStreamController* p_controller, MxDSAction* p_action) { MxResult result = FAILURE; @@ -133,7 +133,7 @@ MxResult MxMediaPresenter::StartAction(MxStreamController* p_controller, MxDSAct return result; } -// OFFSET: LEGO1 0x100b5bc0 +// FUNCTION: LEGO1 0x100b5bc0 void MxMediaPresenter::EndAction() { MxAutoLocker lock(&m_criticalSection); @@ -166,7 +166,7 @@ void MxMediaPresenter::EndAction() } } -// OFFSET: LEGO1 0x100b5d10 +// FUNCTION: LEGO1 0x100b5d10 MxResult MxMediaPresenter::Tickle() { MxAutoLocker lock(&m_criticalSection); @@ -176,7 +176,7 @@ MxResult MxMediaPresenter::Tickle() return MxPresenter::Tickle(); } -// OFFSET: LEGO1 0x100b5d90 +// FUNCTION: LEGO1 0x100b5d90 void MxMediaPresenter::StreamingTickle() { if (!m_currentChunk) { @@ -201,7 +201,7 @@ void MxMediaPresenter::StreamingTickle() } } -// OFFSET: LEGO1 0x100b5e10 +// FUNCTION: LEGO1 0x100b5e10 void MxMediaPresenter::RepeatingTickle() { if (IsEnabled() && !m_currentChunk) { @@ -225,7 +225,7 @@ void MxMediaPresenter::RepeatingTickle() } } -// OFFSET: LEGO1 0x100b5ef0 +// FUNCTION: LEGO1 0x100b5ef0 void MxMediaPresenter::DoneTickle() { m_previousTickleStates |= 1 << m_currentTickleState; @@ -233,7 +233,7 @@ void MxMediaPresenter::DoneTickle() EndAction(); } -// OFFSET: LEGO1 0x100b5f10 +// FUNCTION: LEGO1 0x100b5f10 void MxMediaPresenter::AppendChunk(MxStreamChunk* p_chunk) { MxStreamChunk* chunk = new MxStreamChunk; @@ -247,7 +247,7 @@ void MxMediaPresenter::AppendChunk(MxStreamChunk* p_chunk) m_chunks->Append(chunk); } -// OFFSET: LEGO1 0x100b6030 +// FUNCTION: LEGO1 0x100b6030 void MxMediaPresenter::Enable(MxBool p_enable) { if (IsEnabled() != p_enable) { diff --git a/LEGO1/mxmediapresenter.h b/LEGO1/mxmediapresenter.h index 3706b225..85ad612f 100644 --- a/LEGO1/mxmediapresenter.h +++ b/LEGO1/mxmediapresenter.h @@ -6,7 +6,7 @@ #include "mxpresenter.h" #include "mxstreamchunklist.h" -// VTABLE 0x100d4cd8 +// VTABLE: LEGO1 0x100d4cd8 // SIZE 0x50 class MxMediaPresenter : public MxPresenter { public: @@ -15,14 +15,14 @@ class MxMediaPresenter : public MxPresenter { virtual MxResult Tickle() override; // vtable+0x8 - // OFFSET: LEGO1 0x1000c5c0 + // FUNCTION: LEGO1 0x1000c5c0 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x100f074c + // GLOBAL: LEGO1 0x100f074c return "MxMediaPresenter"; } - // OFFSET: LEGO1 0x1000c5d0 + // FUNCTION: LEGO1 0x1000c5d0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxMediaPresenter::ClassName()) || MxPresenter::IsA(name); diff --git a/LEGO1/mxmidipresenter.cpp b/LEGO1/mxmidipresenter.cpp index 1141cbb0..b648eff7 100644 --- a/LEGO1/mxmidipresenter.cpp +++ b/LEGO1/mxmidipresenter.cpp @@ -8,25 +8,25 @@ DECOMP_SIZE_ASSERT(MxMIDIPresenter, 0x58); -// OFFSET: LEGO1 0x100c25e0 +// FUNCTION: LEGO1 0x100c25e0 MxMIDIPresenter::MxMIDIPresenter() { Init(); } -// OFFSET: LEGO1 0x100c27c0 +// FUNCTION: LEGO1 0x100c27c0 MxMIDIPresenter::~MxMIDIPresenter() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100c2820 +// FUNCTION: LEGO1 0x100c2820 void MxMIDIPresenter::Init() { m_chunk = NULL; } -// OFFSET: LEGO1 0x100c2830 +// FUNCTION: LEGO1 0x100c2830 void MxMIDIPresenter::Destroy(MxBool p_fromDestructor) { if (MusicManager()) { @@ -45,7 +45,7 @@ void MxMIDIPresenter::Destroy(MxBool p_fromDestructor) MxMusicPresenter::Destroy(); } -// OFFSET: LEGO1 0x100c2890 +// FUNCTION: LEGO1 0x100c2890 void MxMIDIPresenter::ReadyTickle() { MxStreamChunk* chunk = NextChunk(); @@ -58,7 +58,7 @@ void MxMIDIPresenter::ReadyTickle() } } -// OFFSET: LEGO1 0x100c28d0 +// FUNCTION: LEGO1 0x100c28d0 void MxMIDIPresenter::StartingTickle() { MxStreamChunk* chunk = FUN_100b5650(); @@ -69,7 +69,7 @@ void MxMIDIPresenter::StartingTickle() } } -// OFFSET: LEGO1 0x100c2910 +// FUNCTION: LEGO1 0x100c2910 void MxMIDIPresenter::StreamingTickle() { if (m_chunk) { @@ -80,20 +80,20 @@ void MxMIDIPresenter::StreamingTickle() m_chunk = NextChunk(); } -// OFFSET: LEGO1 0x100c2940 +// FUNCTION: LEGO1 0x100c2940 void MxMIDIPresenter::DoneTickle() { if (!MusicManager()->GetMIDIInitialized()) EndAction(); } -// OFFSET: LEGO1 0x100c2960 +// FUNCTION: LEGO1 0x100c2960 void MxMIDIPresenter::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x100c2970 +// FUNCTION: LEGO1 0x100c2970 MxResult MxMIDIPresenter::PutData() { m_criticalSection.Enter(); @@ -109,7 +109,7 @@ MxResult MxMIDIPresenter::PutData() return SUCCESS; } -// OFFSET: LEGO1 0x100c29e0 +// FUNCTION: LEGO1 0x100c29e0 void MxMIDIPresenter::EndAction() { if (m_action) { @@ -120,7 +120,7 @@ void MxMIDIPresenter::EndAction() } } -// OFFSET: LEGO1 0x100c2a60 +// FUNCTION: LEGO1 0x100c2a60 void MxMIDIPresenter::SetVolume(MxS32 p_volume) { m_volume = p_volume; diff --git a/LEGO1/mxmidipresenter.h b/LEGO1/mxmidipresenter.h index cbef00fa..7e642383 100644 --- a/LEGO1/mxmidipresenter.h +++ b/LEGO1/mxmidipresenter.h @@ -4,21 +4,21 @@ #include "mxmusicpresenter.h" #include "mxstreamchunk.h" -// VTABLE 0x100dca20 +// VTABLE: LEGO1 0x100dca20 // SIZE 0x58 class MxMIDIPresenter : public MxMusicPresenter { public: MxMIDIPresenter(); virtual ~MxMIDIPresenter() override; - // OFFSET: LEGO1 0x100c2650 + // FUNCTION: LEGO1 0x100c2650 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x10101df8 + // GLOBAL: LEGO1 0x10101df8 return "MxMIDIPresenter"; } - // OFFSET: LEGO1 0x100c2660 + // FUNCTION: LEGO1 0x100c2660 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxMIDIPresenter::ClassName()) || MxMusicPresenter::IsA(name); diff --git a/LEGO1/mxmusicmanager.cpp b/LEGO1/mxmusicmanager.cpp index 90af1789..4541cf19 100644 --- a/LEGO1/mxmusicmanager.cpp +++ b/LEGO1/mxmusicmanager.cpp @@ -7,26 +7,26 @@ DECOMP_SIZE_ASSERT(MxMusicManager, 0x58); -// OFFSET: LEGO1 0x100c05a0 +// FUNCTION: LEGO1 0x100c05a0 MxMusicManager::MxMusicManager() { Init(); } -// OFFSET: LEGO1 0x100c0630 +// FUNCTION: LEGO1 0x100c0630 MxMusicManager::~MxMusicManager() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100c0690 +// FUNCTION: LEGO1 0x100c0690 void MxMusicManager::Init() { m_multiplier = 100; InitData(); } -// OFFSET: LEGO1 0x100c06a0 +// FUNCTION: LEGO1 0x100c06a0 void MxMusicManager::InitData() { m_MIDIStreamH = 0; @@ -39,7 +39,7 @@ void MxMusicManager::InitData() m_MIDIHdrP = NULL; } -// OFFSET: LEGO1 0x100c06c0 +// FUNCTION: LEGO1 0x100c06c0 void MxMusicManager::Destroy(MxBool p_fromDestructor) { if (m_thread) { @@ -62,7 +62,7 @@ void MxMusicManager::Destroy(MxBool p_fromDestructor) } } -// OFFSET: LEGO1 0x100c07f0 +// FUNCTION: LEGO1 0x100c07f0 void MxMusicManager::SetMIDIVolume() { MxS32 result = (m_volume * m_multiplier) / 0x64; @@ -74,7 +74,7 @@ void MxMusicManager::SetMIDIVolume() } } -// OFFSET: LEGO1 0x100c0840 +// FUNCTION: LEGO1 0x100c0840 MxResult MxMusicManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) { MxResult status = FAILURE; @@ -105,13 +105,13 @@ MxResult MxMusicManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) return status; } -// OFFSET: LEGO1 0x100c0930 +// FUNCTION: LEGO1 0x100c0930 void MxMusicManager::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x100c0940 +// FUNCTION: LEGO1 0x100c0940 void MxMusicManager::SetVolume(MxS32 p_volume) { MxAudioManager::SetVolume(p_volume); @@ -120,7 +120,7 @@ void MxMusicManager::SetVolume(MxS32 p_volume) m_criticalSection.Leave(); } -// OFFSET: LEGO1 0x100c0970 +// FUNCTION: LEGO1 0x100c0970 void MxMusicManager::SetMultiplier(MxS32 p_multiplier) { m_criticalSection.Enter(); @@ -129,21 +129,21 @@ void MxMusicManager::SetMultiplier(MxS32 p_multiplier) m_criticalSection.Leave(); } -// OFFSET: LEGO1 0x100c09a0 +// FUNCTION: LEGO1 0x100c09a0 MxS32 MxMusicManager::CalculateVolume(MxS32 p_volume) { MxS32 result = (p_volume * 0xffff) / 100; return (result << 0x10) | result; } -// OFFSET: LEGO1 0x100c09c0 STUB +// STUB: LEGO1 0x100c09c0 undefined4 MxMusicManager::FUN_100c09c0(MxU8* p_data, MxS32 p_loopCount) { // TODO return 0; } -// OFFSET: LEGO1 0x100c0b20 +// FUNCTION: LEGO1 0x100c0b20 void MxMusicManager::DeinitializeMIDI() { m_criticalSection.Enter(); diff --git a/LEGO1/mxmusicmanager.h b/LEGO1/mxmusicmanager.h index 36c9ddf3..7b594803 100644 --- a/LEGO1/mxmusicmanager.h +++ b/LEGO1/mxmusicmanager.h @@ -4,7 +4,7 @@ #include "decomp.h" #include "mxaudiomanager.h" -// VTABLE 0x100dc930 +// VTABLE: LEGO1 0x100dc930 // SIZE 0x58 class MxMusicManager : public MxAudioManager { public: diff --git a/LEGO1/mxmusicpresenter.cpp b/LEGO1/mxmusicpresenter.cpp index e963a8e1..dc2f4b7f 100644 --- a/LEGO1/mxmusicpresenter.cpp +++ b/LEGO1/mxmusicpresenter.cpp @@ -6,24 +6,24 @@ DECOMP_SIZE_ASSERT(MxMusicPresenter, 0x54); -// OFFSET: LEGO1 0x100c22c0 +// FUNCTION: LEGO1 0x100c22c0 MxMusicPresenter::MxMusicPresenter() { Init(); } -// OFFSET: LEGO1 0x100c24e0 +// FUNCTION: LEGO1 0x100c24e0 MxMusicPresenter::~MxMusicPresenter() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100c2540 +// FUNCTION: LEGO1 0x100c2540 void MxMusicPresenter::Init() { } -// OFFSET: LEGO1 0x100c2550 +// FUNCTION: LEGO1 0x100c2550 void MxMusicPresenter::Destroy(MxBool p_fromDestructor) { if (MusicManager()) { @@ -39,7 +39,7 @@ void MxMusicPresenter::Destroy(MxBool p_fromDestructor) } } -// OFFSET: LEGO1 0x100c25a0 +// FUNCTION: LEGO1 0x100c25a0 MxResult MxMusicPresenter::AddToManager() { MxResult result = FAILURE; @@ -52,7 +52,7 @@ MxResult MxMusicPresenter::AddToManager() return result; } -// OFFSET: LEGO1 0x100c25d0 +// FUNCTION: LEGO1 0x100c25d0 void MxMusicPresenter::Destroy() { Destroy(FALSE); diff --git a/LEGO1/mxmusicpresenter.h b/LEGO1/mxmusicpresenter.h index 2f96d64e..c4587786 100644 --- a/LEGO1/mxmusicpresenter.h +++ b/LEGO1/mxmusicpresenter.h @@ -3,21 +3,21 @@ #include "mxaudiopresenter.h" -// VTABLE 0x100dc9b8 +// VTABLE: LEGO1 0x100dc9b8 // SIZE 0x54 class MxMusicPresenter : public MxAudioPresenter { public: MxMusicPresenter(); virtual ~MxMusicPresenter() override; - // OFFSET: LEGO1 0x100c23a0 + // FUNCTION: LEGO1 0x100c23a0 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x10101e48 + // GLOBAL: LEGO1 0x10101e48 return "MxMusicPresenter"; } - // OFFSET: LEGO1 0x100c23b0 + // FUNCTION: LEGO1 0x100c23b0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxMusicPresenter::ClassName()) || MxAudioPresenter::IsA(name); diff --git a/LEGO1/mxnextactiondatastart.h b/LEGO1/mxnextactiondatastart.h index 63417e4b..ecad22e4 100644 --- a/LEGO1/mxnextactiondatastart.h +++ b/LEGO1/mxnextactiondatastart.h @@ -3,7 +3,7 @@ #include "mxcore.h" -// VTABLE 0x100dc9a0 +// VTABLE: LEGO1 0x100dc9a0 // SIZE 0x14 class MxNextActionDataStart : public MxCore { public: @@ -15,14 +15,14 @@ class MxNextActionDataStart : public MxCore { m_data = p_data; } - // OFFSET: LEGO1 0x100c1900 + // FUNCTION: LEGO1 0x100c1900 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x101025a0 + // GLOBAL: LEGO1 0x101025a0 return "MxNextActionDataStart"; } - // OFFSET: LEGO1 0x100c1910 + // FUNCTION: LEGO1 0x100c1910 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxNextActionDataStart::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxnotificationmanager.cpp b/LEGO1/mxnotificationmanager.cpp index 5f7847a1..f7bdcd70 100644 --- a/LEGO1/mxnotificationmanager.cpp +++ b/LEGO1/mxnotificationmanager.cpp @@ -11,20 +11,20 @@ DECOMP_SIZE_ASSERT(MxNotification, 0x8); DECOMP_SIZE_ASSERT(MxNotificationManager, 0x40); -// OFFSET: LEGO1 0x100ac220 +// FUNCTION: LEGO1 0x100ac220 MxNotification::MxNotification(MxCore* p_target, MxNotificationParam* p_param) { m_target = p_target; m_param = p_param->Clone(); } -// OFFSET: LEGO1 0x100ac240 +// FUNCTION: LEGO1 0x100ac240 MxNotification::~MxNotification() { delete m_param; } -// OFFSET: LEGO1 0x100ac250 +// FUNCTION: LEGO1 0x100ac250 MxNotificationManager::MxNotificationManager() : MxCore(), m_lock(), m_listenerIds() { m_unk2c = 0; @@ -33,7 +33,7 @@ MxNotificationManager::MxNotificationManager() : MxCore(), m_lock(), m_listenerI m_sendList = NULL; } -// OFFSET: LEGO1 0x100ac450 +// FUNCTION: LEGO1 0x100ac450 MxNotificationManager::~MxNotificationManager() { MxAutoLocker lock(&m_lock); @@ -44,7 +44,7 @@ MxNotificationManager::~MxNotificationManager() TickleManager()->UnregisterClient(this); } -// OFFSET: LEGO1 0x100ac600 +// FUNCTION: LEGO1 0x100ac600 MxResult MxNotificationManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) { MxResult result = SUCCESS; @@ -60,7 +60,7 @@ MxResult MxNotificationManager::Create(MxU32 p_frequencyMS, MxBool p_createThrea return result; } -// OFFSET: LEGO1 0x100ac6c0 +// FUNCTION: LEGO1 0x100ac6c0 MxResult MxNotificationManager::Send(MxCore* p_listener, MxNotificationParam* p_param) { MxAutoLocker lock(&m_lock); @@ -85,7 +85,7 @@ MxResult MxNotificationManager::Send(MxCore* p_listener, MxNotificationParam* p_ return FAILURE; } -// OFFSET: LEGO1 0x100ac800 +// FUNCTION: LEGO1 0x100ac800 MxResult MxNotificationManager::Tickle() { m_sendList = new MxNotificationPtrList(); @@ -114,7 +114,7 @@ MxResult MxNotificationManager::Tickle() } } -// OFFSET: LEGO1 0x100ac990 +// FUNCTION: LEGO1 0x100ac990 void MxNotificationManager::FlushPending(MxCore* p_listener) { MxNotificationPtrList pending; @@ -163,7 +163,7 @@ void MxNotificationManager::FlushPending(MxCore* p_listener) } } -// OFFSET: LEGO1 0x100acd20 +// FUNCTION: LEGO1 0x100acd20 void MxNotificationManager::Register(MxCore* p_listener) { MxAutoLocker lock(&m_lock); @@ -175,7 +175,7 @@ void MxNotificationManager::Register(MxCore* p_listener) m_listenerIds.push_back(p_listener->GetId()); } -// OFFSET: LEGO1 0x100acdf0 +// FUNCTION: LEGO1 0x100acdf0 void MxNotificationManager::Unregister(MxCore* p_listener) { MxAutoLocker lock(&m_lock); diff --git a/LEGO1/mxnotificationmanager.h b/LEGO1/mxnotificationmanager.h index 1dcfb49a..a26f3748 100644 --- a/LEGO1/mxnotificationmanager.h +++ b/LEGO1/mxnotificationmanager.h @@ -24,7 +24,7 @@ class MxIdList : public list {}; class MxNotificationPtrList : public list {}; -// VTABLE 0x100dc078 +// VTABLE: LEGO1 0x100dc078 class MxNotificationManager : public MxCore { private: MxNotificationPtrList* m_queue; // 0x8 diff --git a/LEGO1/mxnotificationparam.cpp b/LEGO1/mxnotificationparam.cpp index ddc35b38..0797c9f1 100644 --- a/LEGO1/mxnotificationparam.cpp +++ b/LEGO1/mxnotificationparam.cpp @@ -4,7 +4,7 @@ DECOMP_SIZE_ASSERT(MxNotificationParam, 0xc); -// OFFSET: LEGO1 0x10010390 +// FUNCTION: LEGO1 0x10010390 MxNotificationParam* MxNotificationParam::Clone() { return new MxNotificationParam(m_type, m_sender); diff --git a/LEGO1/mxnotificationparam.h b/LEGO1/mxnotificationparam.h index ec58fde6..66f9dd95 100644 --- a/LEGO1/mxnotificationparam.h +++ b/LEGO1/mxnotificationparam.h @@ -33,7 +33,7 @@ enum NotificationId { MXTRANSITIONMANAGER_TRANSITIONENDED = 24 }; -// VTABLE 0x100d56e0 +// VTABLE: LEGO1 0x100d56e0 class MxNotificationParam : public MxParam { public: inline MxNotificationParam(NotificationId p_type, MxCore* p_sender) : MxParam(), m_type(p_type), m_sender(p_sender) diff --git a/LEGO1/mxobjectfactory.cpp b/LEGO1/mxobjectfactory.cpp index e72c57b4..a4e5efd1 100644 --- a/LEGO1/mxobjectfactory.cpp +++ b/LEGO1/mxobjectfactory.cpp @@ -16,7 +16,7 @@ DECOMP_SIZE_ASSERT(MxObjectFactory, 0x38); // 100af1db -// OFFSET: LEGO1 0x100b0d80 +// FUNCTION: LEGO1 0x100b0d80 MxObjectFactory::MxObjectFactory() { #define X(V) this->m_id##V = MxAtomId(#V, LookupMode_Exact); @@ -24,7 +24,7 @@ MxObjectFactory::MxObjectFactory() #undef X } -// OFFSET: LEGO1 0x100b12c0 +// FUNCTION: LEGO1 0x100b12c0 MxCore* MxObjectFactory::Create(const char* p_name) { MxCore* object = NULL; @@ -42,7 +42,7 @@ MxCore* MxObjectFactory::Create(const char* p_name) return object; } -// OFFSET: LEGO1 0x100b1a30 +// FUNCTION: LEGO1 0x100b1a30 void MxObjectFactory::Destroy(MxCore* p_object) { delete p_object; diff --git a/LEGO1/mxobjectfactory.h b/LEGO1/mxobjectfactory.h index e02956a7..2781852d 100644 --- a/LEGO1/mxobjectfactory.h +++ b/LEGO1/mxobjectfactory.h @@ -18,19 +18,19 @@ X(MxLoopingSmkPresenter) \ X(MxLoopingMIDIPresenter) -// VTABLE 0x100dc220 +// VTABLE: LEGO1 0x100dc220 class MxObjectFactory : public MxCore { public: MxObjectFactory(); - // OFFSET: LEGO1 0x10008f70 + // FUNCTION: LEGO1 0x10008f70 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x100f0730 + // GLOBAL: LEGO1 0x100f0730 return "MxObjectFactory"; } - // OFFSET: LEGO1 0x10008f80 + // FUNCTION: LEGO1 0x10008f80 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxObjectFactory::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxomni.cpp b/LEGO1/mxomni.cpp index 5c4cd79e..9e4949f5 100644 --- a/LEGO1/mxomni.cpp +++ b/LEGO1/mxomni.cpp @@ -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 @@ MxResult MxOmni::Create(MxOmniCreateParam& p) 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) { diff --git a/LEGO1/mxomni.h b/LEGO1/mxomni.h index bdafe9c1..246ae2fc 100644 --- a/LEGO1/mxomni.h +++ b/LEGO1/mxomni.h @@ -23,7 +23,7 @@ class MxVariableTable; class MxVideoManager; class MxEntity; -// VTABLE 0x100dc168 +// VTABLE: LEGO1 0x100dc168 // SIZE 0x68 class MxOmni : public MxCore { public: diff --git a/LEGO1/mxomnicreateflags.cpp b/LEGO1/mxomnicreateflags.cpp index 4671c609..dd4e14b8 100644 --- a/LEGO1/mxomnicreateflags.cpp +++ b/LEGO1/mxomnicreateflags.cpp @@ -1,6 +1,6 @@ #include "mxomnicreateflags.h" -// OFFSET: LEGO1 0x100b0a30 +// FUNCTION: LEGO1 0x100b0a30 MxOmniCreateFlags::MxOmniCreateFlags() { this->CreateObjectFactory(TRUE); diff --git a/LEGO1/mxomnicreateparam.cpp b/LEGO1/mxomnicreateparam.cpp index a97a111a..bfe71635 100644 --- a/LEGO1/mxomnicreateparam.cpp +++ b/LEGO1/mxomnicreateparam.cpp @@ -1,6 +1,6 @@ #include "mxomnicreateparam.h" -// OFFSET: LEGO1 0x100b0b00 +// FUNCTION: LEGO1 0x100b0b00 MxOmniCreateParam::MxOmniCreateParam( const char* mediaPath, struct HWND__* windowHandle, diff --git a/LEGO1/mxpalette.cpp b/LEGO1/mxpalette.cpp index 2634bb59..bc1df5ff 100644 --- a/LEGO1/mxpalette.cpp +++ b/LEGO1/mxpalette.cpp @@ -3,7 +3,8 @@ #include "mxomni.h" #include "mxvideomanager.h" -// GLOBAL: LEGO1 0x10102188 0x400 +// GLOBAL: LEGO1 0x10102188 +// SIZE 0x400 PALETTEENTRY g_defaultPaletteEntries[256] = { {0u, 0u, 0u, 0u}, {128u, 0u, 0u, 0u}, {0u, 128u, 0u, 0u}, {128u, 128u, 0u, 0u}, {0u, 0u, 128u, 0u}, {128u, 0u, 128u, 0u}, {0u, 128u, 128u, 0u}, {128u, 128u, 128u, 0u}, @@ -71,7 +72,7 @@ PALETTEENTRY g_defaultPaletteEntries[256] = { {0u, 0u, 255u, 0u}, {255u, 0u, 255u, 0u}, {0u, 255u, 255u, 0u}, {255u, 255u, 255u, 0u} }; -// OFFSET: LEGO1 0x100bee30 +// FUNCTION: LEGO1 0x100bee30 MxPalette::MxPalette() { this->m_overrideSkyColor = FALSE; @@ -80,7 +81,7 @@ MxPalette::MxPalette() this->m_skyColor = this->m_entries[141]; } -// OFFSET: LEGO1 0x100beed0 +// FUNCTION: LEGO1 0x100beed0 MxPalette::MxPalette(const RGBQUAD* p_colors) { this->m_overrideSkyColor = FALSE; @@ -97,7 +98,7 @@ MxPalette::MxPalette(const RGBQUAD* p_colors) this->m_skyColor = this->m_entries[141]; } -// OFFSET: LEGO1 0x100bef90 +// FUNCTION: LEGO1 0x100bef90 MxPalette::~MxPalette() { if (m_palette) { @@ -105,7 +106,7 @@ MxPalette::~MxPalette() } } -// OFFSET: LEGO1 0x100bf000 +// FUNCTION: LEGO1 0x100bf000 LPDIRECTDRAWPALETTE MxPalette::CreateNativePalette() { MxS32 i; @@ -131,7 +132,7 @@ LPDIRECTDRAWPALETTE MxPalette::CreateNativePalette() return this->m_palette; } -// OFFSET: LEGO1 0x100bf0b0 +// FUNCTION: LEGO1 0x100bf0b0 MxPalette* MxPalette::Clone() { MxPalette* result = new MxPalette; @@ -140,14 +141,14 @@ MxPalette* MxPalette::Clone() return result; } -// OFFSET: LEGO1 0x100bf150 +// FUNCTION: LEGO1 0x100bf150 MxResult MxPalette::GetEntries(LPPALETTEENTRY p_entries) { memcpy(p_entries, this->m_entries, sizeof(this->m_entries)); return SUCCESS; } -// OFFSET: LEGO1 0x100bf170 +// FUNCTION: LEGO1 0x100bf170 MxResult MxPalette::SetEntries(LPPALETTEENTRY p_entries) { MxS32 i; @@ -196,7 +197,7 @@ MxResult MxPalette::SetEntries(LPPALETTEENTRY p_entries) return status; } -// OFFSET: LEGO1 0x100bf2d0 +// FUNCTION: LEGO1 0x100bf2d0 MxResult MxPalette::SetSkyColor(LPPALETTEENTRY p_sky_color) { MxResult status = 0; @@ -212,13 +213,13 @@ MxResult MxPalette::SetSkyColor(LPPALETTEENTRY p_sky_color) return status; } -// OFFSET: LEGO1 0x100bf330 +// FUNCTION: LEGO1 0x100bf330 void MxPalette::Detach() { this->m_palette = NULL; } -// OFFSET: LEGO1 0x100bf340 +// FUNCTION: LEGO1 0x100bf340 MxBool MxPalette::operator==(MxPalette& other) { for (MxS32 i = 0; i < 256; i++) { @@ -232,7 +233,7 @@ MxBool MxPalette::operator==(MxPalette& other) return TRUE; } -// OFFSET: LEGO1 0x100bf390 +// FUNCTION: LEGO1 0x100bf390 void MxPalette::ApplySystemEntriesToPalette(LPPALETTEENTRY p_entries) { HDC hdc; @@ -249,7 +250,7 @@ void MxPalette::ApplySystemEntriesToPalette(LPPALETTEENTRY p_entries) ReleaseDC(0, hdc); } -// OFFSET: LEGO1 0x100bf420 +// FUNCTION: LEGO1 0x100bf420 void MxPalette::GetDefaultPalette(LPPALETTEENTRY p_entries) { HDC hdc; @@ -266,7 +267,7 @@ void MxPalette::GetDefaultPalette(LPPALETTEENTRY p_entries) ReleaseDC(0, hdc); } -// OFFSET: LEGO1 0x100bf490 +// FUNCTION: LEGO1 0x100bf490 void MxPalette::Reset(MxBool p_ignoreSkyColor) { if (this->m_palette != NULL) { diff --git a/LEGO1/mxpalette.h b/LEGO1/mxpalette.h index 51687a97..9cd1f85b 100644 --- a/LEGO1/mxpalette.h +++ b/LEGO1/mxpalette.h @@ -6,7 +6,7 @@ #include -// VTABLE 0x100dc848 +// VTABLE: LEGO1 0x100dc848 // SIZE 0x414 class MxPalette : public MxCore { public: diff --git a/LEGO1/mxpresenter.cpp b/LEGO1/mxpresenter.cpp index 163abe27..cf11536e 100644 --- a/LEGO1/mxpresenter.cpp +++ b/LEGO1/mxpresenter.cpp @@ -16,12 +16,12 @@ DECOMP_SIZE_ASSERT(MxPresenter, 0x40); -// OFFSET: LEGO1 0x1000be30 +// FUNCTION: LEGO1 0x1000be30 void MxPresenter::VTable0x14() { } -// OFFSET: LEGO1 0x1000be40 +// FUNCTION: LEGO1 0x1000be40 void MxPresenter::ReadyTickle() { ParseExtra(); @@ -30,84 +30,84 @@ void MxPresenter::ReadyTickle() m_currentTickleState = TickleState_Starting; } -// OFFSET: LEGO1 0x1000be60 +// FUNCTION: LEGO1 0x1000be60 void MxPresenter::StartingTickle() { m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState; m_currentTickleState = TickleState_Streaming; } -// OFFSET: LEGO1 0x1000be80 +// FUNCTION: LEGO1 0x1000be80 void MxPresenter::StreamingTickle() { m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState; m_currentTickleState = TickleState_Repeating; } -// OFFSET: LEGO1 0x1000bea0 +// FUNCTION: LEGO1 0x1000bea0 void MxPresenter::RepeatingTickle() { m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState; m_currentTickleState = TickleState_unk5; } -// OFFSET: LEGO1 0x1000bec0 +// FUNCTION: LEGO1 0x1000bec0 void MxPresenter::Unk5Tickle() { m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState; m_currentTickleState = TickleState_Done; } -// OFFSET: LEGO1 0x1000bee0 +// FUNCTION: LEGO1 0x1000bee0 void MxPresenter::DoneTickle() { m_previousTickleStates |= 1 << m_currentTickleState; m_currentTickleState = TickleState_Idle; } -// OFFSET: LEGO1 0x1000bf00 +// FUNCTION: LEGO1 0x1000bf00 MxPresenter::~MxPresenter() { } -// OFFSET: LEGO1 0x1000bf70 +// FUNCTION: LEGO1 0x1000bf70 MxResult MxPresenter::AddToManager() { return SUCCESS; } -// OFFSET: LEGO1 0x1000bf80 +// FUNCTION: LEGO1 0x1000bf80 void MxPresenter::Destroy() { Init(); } -// OFFSET: LEGO1 0x1000bf90 +// FUNCTION: LEGO1 0x1000bf90 void MxPresenter::SetTickleState(TickleState p_tickleState) { m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState; m_currentTickleState = p_tickleState; } -// OFFSET: LEGO1 0x1000bfb0 +// FUNCTION: LEGO1 0x1000bfb0 MxBool MxPresenter::HasTickleStatePassed(TickleState p_tickleState) { return m_previousTickleStates & (1 << (unsigned char) p_tickleState); } -// OFFSET: LEGO1 0x1000bfc0 +// FUNCTION: LEGO1 0x1000bfc0 MxResult MxPresenter::PutData() { return SUCCESS; } -// OFFSET: LEGO1 0x1000bfd0 +// FUNCTION: LEGO1 0x1000bfd0 MxBool MxPresenter::IsHit(MxS32 p_x, MxS32 p_y) { return FALSE; } -// OFFSET: LEGO1 0x100b4d50 +// FUNCTION: LEGO1 0x100b4d50 void MxPresenter::Init() { m_currentTickleState = TickleState_Idle; @@ -118,7 +118,7 @@ void MxPresenter::Init() m_previousTickleStates = 0; } -// OFFSET: LEGO1 0x100b4d80 +// FUNCTION: LEGO1 0x100b4d80 MxResult MxPresenter::StartAction(MxStreamController*, MxDSAction* p_action) { MxAutoLocker lock(&this->m_criticalSection); @@ -136,7 +136,7 @@ MxResult MxPresenter::StartAction(MxStreamController*, MxDSAction* p_action) return SUCCESS; } -// OFFSET: LEGO1 0x100b4e40 +// FUNCTION: LEGO1 0x100b4e40 void MxPresenter::EndAction() { if (this->m_action == NULL) @@ -156,7 +156,7 @@ void MxPresenter::EndAction() this->m_currentTickleState = TickleState_Idle; } -// OFFSET: LEGO1 0x100b4fc0 +// FUNCTION: LEGO1 0x100b4fc0 void MxPresenter::ParseExtra() { MxAutoLocker lock(&m_criticalSection); @@ -187,7 +187,7 @@ void MxPresenter::ParseExtra() } } -// OFFSET: LEGO1 0x100b5120 +// FUNCTION: LEGO1 0x100b5120 void MxPresenter::SendToCompositePresenter(MxOmni* p_omni) { if (m_compositePresenter) { @@ -200,7 +200,7 @@ void MxPresenter::SendToCompositePresenter(MxOmni* p_omni) } } -// OFFSET: LEGO1 0x100b5200 +// FUNCTION: LEGO1 0x100b5200 MxResult MxPresenter::Tickle() { MxAutoLocker lock(&this->m_criticalSection); @@ -240,7 +240,7 @@ MxResult MxPresenter::Tickle() return SUCCESS; } -// OFFSET: LEGO1 0x100b52d0 +// FUNCTION: LEGO1 0x100b52d0 void MxPresenter::Enable(MxBool p_enable) { if (this->m_action && this->IsEnabled() != p_enable) { @@ -253,7 +253,7 @@ void MxPresenter::Enable(MxBool p_enable) } } -// OFFSET: LEGO1 0x100b5310 +// FUNCTION: LEGO1 0x100b5310 const char* PresenterNameDispatch(const MxDSAction& p_action) { const char* name = p_action.GetSourceName(); @@ -304,7 +304,7 @@ const char* PresenterNameDispatch(const MxDSAction& p_action) return name; } -// OFFSET: LEGO1 0x100b54c0 +// FUNCTION: LEGO1 0x100b54c0 MxBool MxPresenter::IsEnabled() { return this->m_action && this->m_action->GetFlags() & MxDSAction::Flag_Enabled; diff --git a/LEGO1/mxpresenter.h b/LEGO1/mxpresenter.h index b6ca86a0..3e2c372f 100644 --- a/LEGO1/mxpresenter.h +++ b/LEGO1/mxpresenter.h @@ -11,7 +11,7 @@ class MxCompositePresenter; class MxStreamController; -// VTABLE 0x100d4d38 +// VTABLE: LEGO1 0x100d4d38 // SIZE 0x40 class MxPresenter : public MxCore { public: @@ -30,14 +30,14 @@ class MxPresenter : public MxCore { __declspec(dllexport) virtual ~MxPresenter(); // vtable+0x0 __declspec(dllexport) virtual MxResult Tickle() override; // vtable+0x8 - // OFFSET: LEGO1 0x1000bfe0 + // FUNCTION: LEGO1 0x1000bfe0 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x100f0740 + // GLOBAL: LEGO1 0x100f0740 return "MxPresenter"; } - // OFFSET: LEGO1 0x1000bff0 + // FUNCTION: LEGO1 0x1000bff0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxPresenter::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxpresenterlist.cpp b/LEGO1/mxpresenterlist.cpp index da625f24..6dc0a0f2 100644 --- a/LEGO1/mxpresenterlist.cpp +++ b/LEGO1/mxpresenterlist.cpp @@ -5,32 +5,32 @@ DECOMP_SIZE_ASSERT(MxPresenterList, 0x18); DECOMP_SIZE_ASSERT(MxPresenterListCursor, 0x10); -// OFFSET: LEGO1 0x1001cd00 +// FUNCTION: LEGO1 0x1001cd00 MxS8 MxPresenterList::Compare(MxPresenter* p_a, MxPresenter* p_b) { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } -// OFFSET: LEGO1 0x1001cd20 TEMPLATE +// TEMPLATE: LEGO1 0x1001cd20 // MxCollection::Compare -// OFFSET: LEGO1 0x1001cd30 TEMPLATE +// TEMPLATE: LEGO1 0x1001cd30 // MxCollection::Destroy -// OFFSET: LEGO1 0x1001cd40 TEMPLATE +// TEMPLATE: LEGO1 0x1001cd40 // MxList::MxList -// OFFSET: LEGO1 0x1001cdd0 TEMPLATE +// TEMPLATE: LEGO1 0x1001cdd0 // MxCollection::~MxCollection -// OFFSET: LEGO1 0x1001ce20 TEMPLATE +// TEMPLATE: LEGO1 0x1001ce20 // MxList::~MxList -// OFFSET: LEGO1 0x1001cf70 TEMPLATE +// SYNTHETIC: LEGO1 0x1001cf70 // MxCollection::`scalar deleting destructor' -// OFFSET: LEGO1 0x1001cfe0 TEMPLATE +// SYNTHETIC: LEGO1 0x1001cfe0 // MxList::`scalar deleting destructor' -// OFFSET: LEGO1 0x1001d090 TEMPLATE +// SYNTHETIC: LEGO1 0x1001d090 // MxPtrList::`scalar deleting destructor' diff --git a/LEGO1/mxpresenterlist.h b/LEGO1/mxpresenterlist.h index b8c95950..d96374b9 100644 --- a/LEGO1/mxpresenterlist.h +++ b/LEGO1/mxpresenterlist.h @@ -5,10 +5,10 @@ class MxPresenter; -// VTABLE 0x100d62f0 TEMPLATE +// VTABLE: LEGO1 0x100d62f0 // class MxPtrList -// VTABLE 0x100d6308 +// VTABLE: LEGO1 0x100d6308 // SIZE 0x18 class MxPresenterList : public MxPtrList { public: @@ -17,10 +17,10 @@ class MxPresenterList : public MxPtrList { typedef MxListCursorChildChild MxPresenterListCursor; -// VTABLE 0x100d6350 TEMPLATE +// VTABLE: LEGO1 0x100d6350 // class MxCollection -// VTABLE 0x100d6368 TEMPLATE +// VTABLE: LEGO1 0x100d6368 // class MxList #endif // MXPRESENTERLIST_H diff --git a/LEGO1/mxramstreamcontroller.cpp b/LEGO1/mxramstreamcontroller.cpp index 4689518f..e16e6190 100644 --- a/LEGO1/mxramstreamcontroller.cpp +++ b/LEGO1/mxramstreamcontroller.cpp @@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(MxRAMStreamController, 0x98); undefined* __cdecl FUN_100d0d80(MxU32* p_fileSizeBuffer, MxU32 p_fileSize); -// OFFSET: LEGO1 0x100c6110 +// FUNCTION: LEGO1 0x100c6110 MxResult MxRAMStreamController::Open(const char* p_filename) { MxAutoLocker locker(&m_criticalSection); @@ -35,21 +35,21 @@ MxResult MxRAMStreamController::Open(const char* p_filename) return FAILURE; } -// OFFSET: LEGO1 0x100c6210 STUB +// STUB: LEGO1 0x100c6210 MxResult MxRAMStreamController::vtable0x20(MxDSAction* p_action) { // TODO STUB return FAILURE; } -// OFFSET: LEGO1 0x100c6320 STUB +// STUB: LEGO1 0x100c6320 MxResult MxRAMStreamController::vtable0x24(undefined4 p_unknown) { // TODO STUB return FAILURE; } -// OFFSET: LEGO1 0x100d0d80 STUB +// STUB: LEGO1 0x100d0d80 undefined* __cdecl FUN_100d0d80(MxU32* p_fileSizeBuffer, MxU32 p_fileSize) { return NULL; diff --git a/LEGO1/mxramstreamcontroller.h b/LEGO1/mxramstreamcontroller.h index d728c42d..26e9a4e1 100644 --- a/LEGO1/mxramstreamcontroller.h +++ b/LEGO1/mxramstreamcontroller.h @@ -4,20 +4,20 @@ #include "mxdsbuffer.h" #include "mxstreamcontroller.h" -// VTABLE 0x100dc728 +// VTABLE: LEGO1 0x100dc728 // SIZE 0x98 class MxRAMStreamController : public MxStreamController { public: inline MxRAMStreamController() {} - // OFFSET: LEGO1 0x100b9430 + // FUNCTION: LEGO1 0x100b9430 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x10102130 + // GLOBAL: LEGO1 0x10102130 return "MxRAMStreamController"; } - // OFFSET: LEGO1 0x100b9440 + // FUNCTION: LEGO1 0x100b9440 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxRAMStreamController::ClassName()) || !strcmp(name, MxStreamController::ClassName()) || diff --git a/LEGO1/mxramstreamprovider.cpp b/LEGO1/mxramstreamprovider.cpp index 47a9dc4c..82c498cd 100644 --- a/LEGO1/mxramstreamprovider.cpp +++ b/LEGO1/mxramstreamprovider.cpp @@ -4,7 +4,7 @@ DECOMP_SIZE_ASSERT(MxRAMStreamProvider, 0x24); -// OFFSET: LEGO1 0x100d0730 +// FUNCTION: LEGO1 0x100d0730 MxRAMStreamProvider::MxRAMStreamProvider() { m_bufferSize = 0; @@ -14,31 +14,31 @@ MxRAMStreamProvider::MxRAMStreamProvider() m_bufferForDWords = NULL; } -// OFFSET: LEGO1 0x100d0930 +// FUNCTION: LEGO1 0x100d0930 MxU32 MxRAMStreamProvider::GetFileSize() { return m_fileSize; } -// OFFSET: LEGO1 0x100d0940 +// FUNCTION: LEGO1 0x100d0940 MxU32 MxRAMStreamProvider::GetStreamBuffersNum() { return 1; } -// OFFSET: LEGO1 0x100d0950 +// FUNCTION: LEGO1 0x100d0950 MxU32 MxRAMStreamProvider::GetLengthInDWords() { return m_lengthInDWords; } -// OFFSET: LEGO1 0x100d0960 +// FUNCTION: LEGO1 0x100d0960 MxU32* MxRAMStreamProvider::GetBufferForDWords() { return m_bufferForDWords; } -// OFFSET: LEGO1 0x100d0a50 +// FUNCTION: LEGO1 0x100d0a50 MxRAMStreamProvider::~MxRAMStreamProvider() { m_bufferSize = 0; @@ -53,7 +53,7 @@ MxRAMStreamProvider::~MxRAMStreamProvider() m_bufferForDWords = NULL; } -// OFFSET: LEGO1 0x100d0ae0 STUB +// STUB: LEGO1 0x100d0ae0 MxResult MxRAMStreamProvider::SetResourceToGet(MxStreamController* p_resource) { return FAILURE; diff --git a/LEGO1/mxramstreamprovider.h b/LEGO1/mxramstreamprovider.h index 0dfd33ef..4e656214 100644 --- a/LEGO1/mxramstreamprovider.h +++ b/LEGO1/mxramstreamprovider.h @@ -3,20 +3,20 @@ #include "mxstreamprovider.h" -// VTABLE 0x100dd0d0 +// VTABLE: LEGO1 0x100dd0d0 class MxRAMStreamProvider : public MxStreamProvider { public: MxRAMStreamProvider(); virtual ~MxRAMStreamProvider() override; - // OFFSET: LEGO1 0x100d0970 + // FUNCTION: LEGO1 0x100d0970 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x10102864 + // GLOBAL: LEGO1 0x10102864 return "MxRAMStreamProvider"; } - // OFFSET: LEGO1 0x100d0980 + // FUNCTION: LEGO1 0x100d0980 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxRAMStreamProvider::ClassName()) || MxStreamProvider::IsA(name); diff --git a/LEGO1/mxregion.cpp b/LEGO1/mxregion.cpp index d338f322..afd546d6 100644 --- a/LEGO1/mxregion.cpp +++ b/LEGO1/mxregion.cpp @@ -6,7 +6,7 @@ DECOMP_SIZE_ASSERT(MxRegion, 0x1c); DECOMP_SIZE_ASSERT(MxRegionTopBottom, 0x0c); DECOMP_SIZE_ASSERT(MxRegionLeftRight, 0x08); -// OFFSET: LEGO1 0x100c31c0 +// FUNCTION: LEGO1 0x100c31c0 MxRegion::MxRegion() { m_list = new MxRegionList; @@ -14,20 +14,20 @@ MxRegion::MxRegion() m_rect.SetSize(MxSize32(-1, -1)); } -// OFFSET: LEGO1 0x100c3660 +// FUNCTION: LEGO1 0x100c3660 MxBool MxRegion::vtable20() { return m_list->GetCount() == 0; } -// OFFSET: LEGO1 0x100c3690 +// FUNCTION: LEGO1 0x100c3690 MxRegion::~MxRegion() { if (m_list) delete m_list; } -// OFFSET: LEGO1 0x100c3700 +// FUNCTION: LEGO1 0x100c3700 void MxRegion::Reset() { m_list->DeleteAll(); @@ -35,7 +35,7 @@ void MxRegion::Reset() m_rect.SetSize(MxSize32(-1, -1)); } -// OFFSET: LEGO1 0x100c3750 +// FUNCTION: LEGO1 0x100c3750 void MxRegion::vtable18(MxRect32& p_rect) { MxRect32 rect(p_rect.GetPoint(), MxSize32(p_rect.GetRight(), p_rect.GetBottom())); @@ -86,7 +86,7 @@ void MxRegion::vtable18(MxRect32& p_rect) m_rect.UpdateBounds(p_rect); } -// OFFSET: LEGO1 0x100c3e20 +// FUNCTION: LEGO1 0x100c3e20 MxBool MxRegion::vtable1c(MxRect32& p_rect) { if (!m_rect.IntersectsWith(p_rect)) @@ -105,7 +105,7 @@ MxBool MxRegion::vtable1c(MxRect32& p_rect) return FALSE; } -// OFFSET: LEGO1 0x100c4c90 +// FUNCTION: LEGO1 0x100c4c90 MxRegionTopBottom::MxRegionTopBottom(MxS32 p_top, MxS32 p_bottom) { m_top = p_top; @@ -113,7 +113,7 @@ MxRegionTopBottom::MxRegionTopBottom(MxS32 p_top, MxS32 p_bottom) m_leftRightList = new MxRegionLeftRightList; } -// OFFSET: LEGO1 0x100c50e0 +// FUNCTION: LEGO1 0x100c50e0 MxRegionTopBottom::MxRegionTopBottom(MxRect32& p_rect) { m_top = p_rect.GetTop(); @@ -124,7 +124,7 @@ MxRegionTopBottom::MxRegionTopBottom(MxRect32& p_rect) m_leftRightList->Append(leftRight); } -// OFFSET: LEGO1 0x100c5280 +// FUNCTION: LEGO1 0x100c5280 void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right) { MxRegionLeftRightListCursor a(m_leftRightList); @@ -167,7 +167,7 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right) } } -// OFFSET: LEGO1 0x100c55d0 +// FUNCTION: LEGO1 0x100c55d0 MxRegionTopBottom* MxRegionTopBottom::Clone() { MxRegionTopBottom* clone = new MxRegionTopBottom(m_top, m_bottom); @@ -181,7 +181,7 @@ MxRegionTopBottom* MxRegionTopBottom::Clone() return clone; } -// OFFSET: LEGO1 0x100c57b0 +// FUNCTION: LEGO1 0x100c57b0 MxBool MxRegionTopBottom::FUN_100c57b0(MxRect32& p_rect) { MxRegionLeftRightListCursor cursor(m_leftRightList); diff --git a/LEGO1/mxregion.h b/LEGO1/mxregion.h index a0fa7475..84e46a41 100644 --- a/LEGO1/mxregion.h +++ b/LEGO1/mxregion.h @@ -50,7 +50,7 @@ struct MxRegionLeftRight { MxS32 m_right; }; -// VTABLE 0x100dcae8 +// VTABLE: LEGO1 0x100dcae8 // SIZE 0x1c class MxRegion : public MxCore { public: diff --git a/LEGO1/mxregionlist.cpp b/LEGO1/mxregionlist.cpp index b9231d35..c1abb0e7 100644 --- a/LEGO1/mxregionlist.cpp +++ b/LEGO1/mxregionlist.cpp @@ -2,13 +2,13 @@ #include "mxregion.h" -// OFFSET: LEGO1 0x100c32e0 TEMPLATE +// TEMPLATE: LEGO1 0x100c32e0 // MxCollection::Compare -// OFFSET: LEGO1 0x100c3340 TEMPLATE +// TEMPLATE: LEGO1 0x100c3340 // MxCollection::Destroy -// OFFSET: LEGO1 0x100c33e0 +// FUNCTION: LEGO1 0x100c33e0 void MxRegionList::Destroy(MxRegionTopBottom* p_topBottom) { if (p_topBottom) { @@ -18,47 +18,47 @@ void MxRegionList::Destroy(MxRegionTopBottom* p_topBottom) } } -// OFFSET: LEGO1 0x100c34d0 TEMPLATE +// SYNTHETIC: LEGO1 0x100c34d0 // MxCollection::`scalar deleting destructor' -// OFFSET: LEGO1 0x100c3540 TEMPLATE +// SYNTHETIC: LEGO1 0x100c3540 // MxList::`scalar deleting destructor' -// OFFSET: LEGO1 0x100c35f0 TEMPLATE +// SYNTHETIC: LEGO1 0x100c35f0 // MxPtrList::`scalar deleting destructor' -// OFFSET: LEGO1 0x100c4d80 TEMPLATE +// TEMPLATE: LEGO1 0x100c4d80 // MxCollection::Compare -// OFFSET: LEGO1 0x100c4de0 TEMPLATE +// TEMPLATE: LEGO1 0x100c4de0 // MxCollection::Destroy -// OFFSET: LEGO1 0x100c4e80 +// FUNCTION: LEGO1 0x100c4e80 void MxRegionLeftRightList::Destroy(MxRegionLeftRight* p_leftRight) { delete p_leftRight; } -// OFFSET: LEGO1 0x100c4f50 TEMPLATE +// SYNTHETIC: LEGO1 0x100c4f50 // MxCollection::`scalar deleting destructor' -// OFFSET: LEGO1 0x100c4fc0 TEMPLATE +// SYNTHETIC: LEGO1 0x100c4fc0 // MxList::`scalar deleting destructor' -// OFFSET: LEGO1 0x100c5070 TEMPLATE +// SYNTHETIC: LEGO1 0x100c5070 // MxPtrList::`scalar deleting destructor' -// OFFSET: LEGO1 0x100c54f0 TEMPLATE +// TEMPLATE: LEGO1 0x100c54f0 // MxListCursor::MxListCursor -// OFFSET: LEGO1 0x100c58c0 TEMPLATE +// TEMPLATE: LEGO1 0x100c58c0 // MxList::_InsertEntry -// OFFSET: LEGO1 0x100c5970 TEMPLATE +// TEMPLATE: LEGO1 0x100c5970 // MxList::_InsertEntry -// OFFSET: LEGO1 0x100c5a20 TEMPLATE +// TEMPLATE: LEGO1 0x100c5a20 // MxListEntry::MxListEntry -// OFFSET: LEGO1 0x100c5a40 TEMPLATE +// TEMPLATE: LEGO1 0x100c5a40 // MxList::_DeleteEntry diff --git a/LEGO1/mxregionlist.h b/LEGO1/mxregionlist.h index c3a5d2ef..3aa0487b 100644 --- a/LEGO1/mxregionlist.h +++ b/LEGO1/mxregionlist.h @@ -6,16 +6,16 @@ struct MxRegionTopBottom; struct MxRegionLeftRight; -// VTABLE 0x100dcb10 TEMPLATE +// VTABLE: LEGO1 0x100dcb10 // class MxCollection -// VTABLE 0x100dcb28 TEMPLATE +// VTABLE: LEGO1 0x100dcb28 // class MxList -// VTABLE 0x100dcb40 TEMPLATE +// VTABLE: LEGO1 0x100dcb40 // class MxPtrList -// VTABLE 0x100dcb58 +// VTABLE: LEGO1 0x100dcb58 // SIZE 0x18 class MxRegionList : public MxPtrList { public: @@ -23,22 +23,24 @@ class MxRegionList : public MxPtrList { static void Destroy(MxRegionTopBottom*); }; -// VTABLE 0x100dcb88 +// VTABLE: LEGO1 0x100dcb88 +// class MxListCursorChildChild typedef MxListCursorChildChild MxRegionListCursor; -// VTABLE 0x100dcc10 +// VTABLE: LEGO1 0x100dcc10 +// class MxListCursorChildChild typedef MxListCursorChildChild MxRegionLeftRightListCursor; -// VTABLE 0x100dcc40 TEMPLATE +// VTABLE: LEGO1 0x100dcc40 // class MxCollection -// VTABLE 0x100dcc58 TEMPLATE +// VTABLE: LEGO1 0x100dcc58 // class MxList -// VTABLE 0x100dcc70 TEMPLATE +// VTABLE: LEGO1 0x100dcc70 // class MxPtrList -// VTABLE 0x100dcc88 +// VTABLE: LEGO1 0x100dcc88 // SIZE 0x18 class MxRegionLeftRightList : public MxPtrList { public: diff --git a/LEGO1/mxscheduler.cpp b/LEGO1/mxscheduler.cpp index e9b671f7..0703782f 100644 --- a/LEGO1/mxscheduler.cpp +++ b/LEGO1/mxscheduler.cpp @@ -1,13 +1,13 @@ #include "mxscheduler.h" -// OFFSET: LEGO1 0x100bf4f0 +// FUNCTION: LEGO1 0x100bf4f0 MxScheduler* MxScheduler::GetInstance() { // Intentionally empty return 0; } -// OFFSET: LEGO1 0x100bf500 +// FUNCTION: LEGO1 0x100bf500 void MxScheduler::StartMultiTasking(MxULong) { // Intentionally empty diff --git a/LEGO1/mxsemaphore.cpp b/LEGO1/mxsemaphore.cpp index dfcb8707..18637185 100644 --- a/LEGO1/mxsemaphore.cpp +++ b/LEGO1/mxsemaphore.cpp @@ -1,13 +1,13 @@ #include "mxsemaphore.h" -// OFFSET: LEGO1 0x100c87d0 +// FUNCTION: LEGO1 0x100c87d0 MxSemaphore::MxSemaphore() { m_hSemaphore = NULL; } -// OFFSET: LEGO1 0x100c8800 +// FUNCTION: LEGO1 0x100c8800 MxResult MxSemaphore::Init(MxU32 p_initialCount, MxU32 p_maxCount) { MxResult result = FAILURE; @@ -16,13 +16,13 @@ MxResult MxSemaphore::Init(MxU32 p_initialCount, MxU32 p_maxCount) return result; } -// OFFSET: LEGO1 0x100c8830 +// FUNCTION: LEGO1 0x100c8830 void MxSemaphore::Wait(MxU32 p_timeoutMS) { WaitForSingleObject(m_hSemaphore, p_timeoutMS); } -// OFFSET: LEGO1 0x100c8850 +// FUNCTION: LEGO1 0x100c8850 void MxSemaphore::Release(MxU32 p_releaseCount) { ReleaseSemaphore(m_hSemaphore, p_releaseCount, NULL); diff --git a/LEGO1/mxsmkpresenter.cpp b/LEGO1/mxsmkpresenter.cpp index 59687742..e77e525b 100644 --- a/LEGO1/mxsmkpresenter.cpp +++ b/LEGO1/mxsmkpresenter.cpp @@ -5,19 +5,19 @@ DECOMP_SIZE_ASSERT(MxSmkPresenter, 0x720); -// OFFSET: LEGO1 0x100b3650 +// FUNCTION: LEGO1 0x100b3650 MxSmkPresenter::MxSmkPresenter() { Init(); } -// OFFSET: LEGO1 0x100b3870 +// FUNCTION: LEGO1 0x100b3870 MxSmkPresenter::~MxSmkPresenter() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100b38d0 +// FUNCTION: LEGO1 0x100b38d0 void MxSmkPresenter::Init() { m_unk0x71c = 0; @@ -26,7 +26,7 @@ void MxSmkPresenter::Init() m_flags &= 0xfb; } -// OFFSET: LEGO1 0x100b3900 +// FUNCTION: LEGO1 0x100b3900 void MxSmkPresenter::Destroy(MxBool p_fromDestructor) { m_criticalSection.Enter(); @@ -41,13 +41,13 @@ void MxSmkPresenter::Destroy(MxBool p_fromDestructor) } } -// OFFSET: LEGO1 0x100b3940 STUB +// STUB: LEGO1 0x100b3940 void MxSmkPresenter::LoadHeader(MxStreamChunk* p_chunk) { // TODO } -// OFFSET: LEGO1 0x100b3960 +// FUNCTION: LEGO1 0x100b3960 void MxSmkPresenter::CreateBitmap() { if (m_bitmap) @@ -57,13 +57,13 @@ void MxSmkPresenter::CreateBitmap() m_bitmap->SetSize(m_mxSmack.m_smack.m_width, m_mxSmack.m_smack.m_height, NULL, FALSE); } -// OFFSET: LEGO1 0x100b3a00 STUB +// STUB: LEGO1 0x100b3a00 void MxSmkPresenter::LoadFrame(MxStreamChunk* p_chunk) { // TODO } -// OFFSET: LEGO1 0x100b4260 +// FUNCTION: LEGO1 0x100b4260 MxU32 MxSmkPresenter::VTable0x88() { MxU32 result = m_unk0x71c; @@ -84,7 +84,7 @@ MxU32 MxSmkPresenter::VTable0x88() } } -// OFFSET: LEGO1 0x100b42c0 +// FUNCTION: LEGO1 0x100b42c0 void MxSmkPresenter::VTable0x70() { MxPalette* palette = m_bitmap->CreatePalette(); @@ -92,13 +92,13 @@ void MxSmkPresenter::VTable0x70() delete palette; } -// OFFSET: LEGO1 0x100b4300 +// FUNCTION: LEGO1 0x100b4300 void MxSmkPresenter::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x100c5d40 +// FUNCTION: LEGO1 0x100c5d40 void MxSmkPresenter::FUN_100c5d40(MxSmack* p_mxSmack) { if (p_mxSmack->m_unk0x6a0) diff --git a/LEGO1/mxsmkpresenter.h b/LEGO1/mxsmkpresenter.h index 4a449e1e..06966b9f 100644 --- a/LEGO1/mxsmkpresenter.h +++ b/LEGO1/mxsmkpresenter.h @@ -6,21 +6,21 @@ #include -// VTABLE 0x100dc348 +// VTABLE: LEGO1 0x100dc348 // SIZE 0x720 class MxSmkPresenter : public MxVideoPresenter { public: MxSmkPresenter(); virtual ~MxSmkPresenter() override; - // OFFSET: LEGO1 0x100b3730 + // FUNCTION: LEGO1 0x100b3730 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x10101e38 + // GLOBAL: LEGO1 0x10101e38 return "MxSmkPresenter"; } - // OFFSET: LEGO1 0x100b3740 + // FUNCTION: LEGO1 0x100b3740 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxSmkPresenter::ClassName()) || MxVideoPresenter::IsA(name); diff --git a/LEGO1/mxsoundmanager.cpp b/LEGO1/mxsoundmanager.cpp index 5ed0cc7a..73555515 100644 --- a/LEGO1/mxsoundmanager.cpp +++ b/LEGO1/mxsoundmanager.cpp @@ -9,29 +9,29 @@ DECOMP_SIZE_ASSERT(MxSoundManager, 0x3c); -// OFFSET: LEGO1 0x100ae740 +// FUNCTION: LEGO1 0x100ae740 MxSoundManager::MxSoundManager() { Init(); } -// OFFSET: LEGO1 0x100ae7b0 TEMPLATE +// SYNTHETIC: LEGO1 0x100ae7b0 // MxSoundManager::`scalar deleting destructor' -// OFFSET: LEGO1 0x100ae7d0 +// FUNCTION: LEGO1 0x100ae7d0 MxSoundManager::~MxSoundManager() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100ae830 +// FUNCTION: LEGO1 0x100ae830 void MxSoundManager::Init() { m_directSound = NULL; m_dsBuffer = NULL; } -// OFFSET: LEGO1 0x100ae840 +// FUNCTION: LEGO1 0x100ae840 void MxSoundManager::Destroy(MxBool p_fromDestructor) { if (this->m_thread) { @@ -56,7 +56,7 @@ void MxSoundManager::Destroy(MxBool p_fromDestructor) } } -// OFFSET: LEGO1 0x100ae8b0 +// FUNCTION: LEGO1 0x100ae8b0 MxResult MxSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) { MxResult status = FAILURE; @@ -131,13 +131,13 @@ MxResult MxSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread) return status; } -// OFFSET: LEGO1 0x100aeab0 +// FUNCTION: LEGO1 0x100aeab0 void MxSoundManager::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x100aeac0 +// FUNCTION: LEGO1 0x100aeac0 void MxSoundManager::SetVolume(MxS32 p_volume) { MxAudioManager::SetVolume(p_volume); @@ -153,7 +153,7 @@ void MxSoundManager::SetVolume(MxS32 p_volume) m_criticalSection.Leave(); } -// OFFSET: LEGO1 0x100aebd0 +// FUNCTION: LEGO1 0x100aebd0 MxPresenter* MxSoundManager::FUN_100aebd0(const MxAtomId& p_atomId, MxU32 p_objectId) { MxAutoLocker lock(&m_criticalSection); @@ -170,7 +170,7 @@ MxPresenter* MxSoundManager::FUN_100aebd0(const MxAtomId& p_atomId, MxU32 p_obje return NULL; } -// OFFSET: LEGO1 0x100aecf0 +// FUNCTION: LEGO1 0x100aecf0 MxS32 MxSoundManager::FUN_100aecf0(MxU32 p_unk) { if (!p_unk) @@ -178,7 +178,7 @@ MxS32 MxSoundManager::FUN_100aecf0(MxU32 p_unk) return g_mxcoreCount[p_unk]; } -// OFFSET: LEGO1 0x100aed10 +// FUNCTION: LEGO1 0x100aed10 void MxSoundManager::Pause() { MxAutoLocker lock(&m_criticalSection); @@ -191,7 +191,7 @@ void MxSoundManager::Pause() ((MxWavePresenter*) presenter)->Pause(); } -// OFFSET: LEGO1 0x100aee10 +// FUNCTION: LEGO1 0x100aee10 void MxSoundManager::Resume() { MxAutoLocker lock(&m_criticalSection); diff --git a/LEGO1/mxsoundmanager.h b/LEGO1/mxsoundmanager.h index 671943c6..b804ef23 100644 --- a/LEGO1/mxsoundmanager.h +++ b/LEGO1/mxsoundmanager.h @@ -7,7 +7,7 @@ #include -// VTABLE 0x100dc128 +// VTABLE: LEGO1 0x100dc128 // SIZE 0x3c class MxSoundManager : public MxAudioManager { public: diff --git a/LEGO1/mxsoundpresenter.cpp b/LEGO1/mxsoundpresenter.cpp index 540dcbac..1065fc99 100644 --- a/LEGO1/mxsoundpresenter.cpp +++ b/LEGO1/mxsoundpresenter.cpp @@ -5,19 +5,19 @@ DECOMP_SIZE_ASSERT(MxSoundPresenter, 0x54) -// OFFSET: LEGO1 0x1000d430 +// FUNCTION: LEGO1 0x1000d430 MxSoundPresenter::~MxSoundPresenter() { Destroy(TRUE); } -// OFFSET: LEGO1 0x1000d490 +// FUNCTION: LEGO1 0x1000d490 void MxSoundPresenter::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x100b1a50 +// FUNCTION: LEGO1 0x100b1a50 void MxSoundPresenter::Destroy(MxBool p_fromDestructor) { if (MSoundManager()) @@ -31,7 +31,7 @@ void MxSoundPresenter::Destroy(MxBool p_fromDestructor) MxMediaPresenter::Destroy(FALSE); } -// OFFSET: LEGO1 0x100b1aa0 +// FUNCTION: LEGO1 0x100b1aa0 MxResult MxSoundPresenter::AddToManager() { MxResult ret = FAILURE; diff --git a/LEGO1/mxsoundpresenter.h b/LEGO1/mxsoundpresenter.h index 70ca14ca..e6fa74d2 100644 --- a/LEGO1/mxsoundpresenter.h +++ b/LEGO1/mxsoundpresenter.h @@ -4,20 +4,20 @@ #include "mxaudiopresenter.h" #include "mxomni.h" -// VTABLE 0x100d4b08 +// VTABLE: LEGO1 0x100d4b08 // SIZE 0x54 class MxSoundPresenter : public MxAudioPresenter { public: virtual ~MxSoundPresenter() override; - // OFFSET: LEGO1 0x1000d4a0 + // FUNCTION: LEGO1 0x1000d4a0 inline virtual const char* ClassName() const // vtable+0x0c { - // 0x100f07a0 + // GLOBAL: LEGO1 0x100f07a0 return "MxSoundPresenter"; }; - // OFFSET: LEGO1 0x1000d4b0 + // FUNCTION: LEGO1 0x1000d4b0 inline virtual MxBool IsA(const char* name) const // vtable+0x10 { return !strcmp(name, MxSoundPresenter::ClassName()) || MxAudioPresenter::IsA(name); diff --git a/LEGO1/mxstillpresenter.cpp b/LEGO1/mxstillpresenter.cpp index c91af5c3..e3adaa90 100644 --- a/LEGO1/mxstillpresenter.cpp +++ b/LEGO1/mxstillpresenter.cpp @@ -8,28 +8,28 @@ DECOMP_SIZE_ASSERT(MxStillPresenter, 0x6c); -// 0x10101eb0 +// GLOBAL: LEGO1 0x10101eb0 const char* g_strBMP_ISMAP = "BMP_ISMAP"; -// OFFSET: LEGO1 0x10043550 TEMPLATE +// FUNCTION: LEGO1 0x10043550 // MxStillPresenter::~MxStillPresenter -// OFFSET: LEGO1 0x100435b0 +// FUNCTION: LEGO1 0x100435b0 void MxStillPresenter::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x100435c0 TEMPLATE +// FUNCTION: LEGO1 0x100435c0 // MxStillPresenter::ClassName -// OFFSET: LEGO1 0x100435d0 TEMPLATE +// FUNCTION: LEGO1 0x100435d0 // MxStillPresenter::IsA -// OFFSET: LEGO1 0x100436e0 TEMPLATE +// SYNTHETIC: LEGO1 0x100436e0 // MxStillPresenter::`scalar deleting destructor' -// OFFSET: LEGO1 0x100b9c70 +// FUNCTION: LEGO1 0x100b9c70 void MxStillPresenter::Destroy(MxBool p_fromDestructor) { m_criticalSection.Enter(); @@ -44,7 +44,7 @@ void MxStillPresenter::Destroy(MxBool p_fromDestructor) MxVideoPresenter::Destroy(FALSE); } -// OFFSET: LEGO1 0x100b9cc0 +// FUNCTION: LEGO1 0x100b9cc0 void MxStillPresenter::LoadHeader(MxStreamChunk* p_chunk) { if (m_bitmapInfo) @@ -55,7 +55,7 @@ void MxStillPresenter::LoadHeader(MxStreamChunk* p_chunk) memcpy(m_bitmapInfo, p_chunk->GetData(), p_chunk->GetLength()); } -// OFFSET: LEGO1 0x100b9d10 +// FUNCTION: LEGO1 0x100b9d10 void MxStillPresenter::CreateBitmap() { if (m_bitmap) @@ -68,7 +68,7 @@ void MxStillPresenter::CreateBitmap() m_bitmapInfo = NULL; } -// OFFSET: LEGO1 0x100b9db0 +// FUNCTION: LEGO1 0x100b9db0 void MxStillPresenter::NextFrame() { MxStreamChunk* chunk = NextChunk(); @@ -76,7 +76,7 @@ void MxStillPresenter::NextFrame() m_subscriber->FUN_100b8390(chunk); } -// OFFSET: LEGO1 0x100b9dd0 +// FUNCTION: LEGO1 0x100b9dd0 void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk) { memcpy(m_bitmap->GetBitmapData(), p_chunk->GetData(), p_chunk->GetLength()); @@ -113,43 +113,43 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk) } } -// OFFSET: LEGO1 0x100b9f30 STUB +// STUB: LEGO1 0x100b9f30 void MxStillPresenter::VTable0x70() { // TODO } -// OFFSET: LEGO1 0x100b9f60 STUB +// STUB: LEGO1 0x100b9f60 void MxStillPresenter::StartingTickle() { // TODO } -// OFFSET: LEGO1 0x100b9f90 STUB +// STUB: LEGO1 0x100b9f90 void MxStillPresenter::StreamingTickle() { // TODO } -// OFFSET: LEGO1 0x100b9ff0 STUB +// STUB: LEGO1 0x100b9ff0 void MxStillPresenter::RepeatingTickle() { // TODO } -// OFFSET: LEGO1 0x100ba040 STUB +// STUB: LEGO1 0x100ba040 void MxStillPresenter::VTable0x88(undefined4, undefined4) { // TODO } -// OFFSET: LEGO1 0x100ba140 STUB +// STUB: LEGO1 0x100ba140 void MxStillPresenter::Enable(MxBool p_enable) { // TODO } -// OFFSET: LEGO1 0x100ba1e0 +// FUNCTION: LEGO1 0x100ba1e0 void MxStillPresenter::ParseExtra() { MxPresenter::ParseExtra(); @@ -182,7 +182,7 @@ void MxStillPresenter::ParseExtra() } } -// OFFSET: LEGO1 0x100ba2c0 STUB +// STUB: LEGO1 0x100ba2c0 MxStillPresenter* MxStillPresenter::Clone() { // TODO diff --git a/LEGO1/mxstillpresenter.h b/LEGO1/mxstillpresenter.h index 4d665ca2..d61f2161 100644 --- a/LEGO1/mxstillpresenter.h +++ b/LEGO1/mxstillpresenter.h @@ -4,7 +4,7 @@ #include "decomp.h" #include "mxvideopresenter.h" -// VTABLE 0x100d7a38 +// VTABLE: LEGO1 0x100d7a38 // SIZE 0x6c class MxStillPresenter : public MxVideoPresenter { public: @@ -13,7 +13,7 @@ class MxStillPresenter : public MxVideoPresenter { inline virtual const char* ClassName() const override // vtable+0xc { - // 0x100f0184 + // GLOBAL: LEGO1 0x100f0184 return "MxStillPresenter"; } diff --git a/LEGO1/mxstreamchunk.h b/LEGO1/mxstreamchunk.h index f31f891a..d06d4103 100644 --- a/LEGO1/mxstreamchunk.h +++ b/LEGO1/mxstreamchunk.h @@ -3,20 +3,20 @@ #include "mxdschunk.h" -// VTABLE 0x100dc2a8 +// VTABLE: LEGO1 0x100dc2a8 // SIZE 0x20 class MxStreamChunk : public MxDSChunk { public: inline MxStreamChunk() : m_unk1c(NULL) {} - // OFFSET: LEGO1 0x100b1fe0 + // FUNCTION: LEGO1 0x100b1fe0 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x10101e5c + // GLOBAL: LEGO1 0x10101e5c return "MxStreamChunk"; } - // OFFSET: LEGO1 0x100b1ff0 + // FUNCTION: LEGO1 0x100b1ff0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxStreamChunk::ClassName()) || MxDSChunk::IsA(name); diff --git a/LEGO1/mxstreamchunklist.cpp b/LEGO1/mxstreamchunklist.cpp index 46a610ad..3c4bee9c 100644 --- a/LEGO1/mxstreamchunklist.cpp +++ b/LEGO1/mxstreamchunklist.cpp @@ -5,30 +5,30 @@ DECOMP_SIZE_ASSERT(MxStreamChunkList, 0x18); DECOMP_SIZE_ASSERT(MxStreamChunkListCursor, 0x10); -// OFFSET: LEGO1 0x100b5900 +// FUNCTION: LEGO1 0x100b5900 MxS8 MxStreamChunkList::Compare(MxStreamChunk* p_a, MxStreamChunk* p_b) { return p_a == p_b ? 0 : p_a < p_b ? -1 : 1; } -// OFFSET: LEGO1 0x100b5920 +// FUNCTION: LEGO1 0x100b5920 void MxStreamChunkList::Destroy(MxStreamChunk* p_chunk) { if (p_chunk) delete p_chunk; } -// OFFSET: LEGO1 0x100b5930 TEMPLATE +// TEMPLATE: LEGO1 0x100b5930 // MxCollection::Compare -// OFFSET: LEGO1 0x100b5990 TEMPLATE +// TEMPLATE: LEGO1 0x100b5990 // MxCollection::Destroy -// OFFSET: LEGO1 0x100b59a0 TEMPLATE +// TEMPLATE: LEGO1 0x100b59a0 // MxList::~MxList -// OFFSET: LEGO1 0x100b5aa0 TEMPLATE +// SYNTHETIC: LEGO1 0x100b5aa0 // MxCollection::`scalar deleting destructor' -// OFFSET: LEGO1 0x100b5b10 TEMPLATE +// SYNTHETIC: LEGO1 0x100b5b10 // MxList::`scalar deleting destructor' diff --git a/LEGO1/mxstreamchunklist.h b/LEGO1/mxstreamchunklist.h index 9a84e572..4924b6ff 100644 --- a/LEGO1/mxstreamchunklist.h +++ b/LEGO1/mxstreamchunklist.h @@ -6,13 +6,13 @@ class MxStreamChunk; -// VTABLE 0x100dc5d0 TEMPLATE +// VTABLE: LEGO1 0x100dc5d0 // class MxCollection -// VTABLE 0x100dc5e8 TEMPLATE +// VTABLE: LEGO1 0x100dc5e8 // class MxList -// VTABLE 0x100dc600 +// VTABLE: LEGO1 0x100dc600 // SIZE 0x18 class MxStreamChunkList : public MxList { public: diff --git a/LEGO1/mxstreamcontroller.cpp b/LEGO1/mxstreamcontroller.cpp index 24810db9..2ecf0b43 100644 --- a/LEGO1/mxstreamcontroller.cpp +++ b/LEGO1/mxstreamcontroller.cpp @@ -8,25 +8,25 @@ DECOMP_SIZE_ASSERT(MxStreamController, 0x64) DECOMP_SIZE_ASSERT(MxNextActionDataStart, 0x14) -// OFFSET: LEGO1 0x100b9400 +// FUNCTION: LEGO1 0x100b9400 MxResult MxStreamController::vtable0x18(undefined4 p_unknown, undefined4 p_unknown2) { return FAILURE; } -// OFFSET: LEGO1 0x100b9410 +// FUNCTION: LEGO1 0x100b9410 MxResult MxStreamController::vtable0x1C(undefined4 p_unknown, undefined4 p_unknown2) { return FAILURE; } -// OFFSET: LEGO1 0x100b9420 +// FUNCTION: LEGO1 0x100b9420 MxResult MxStreamController::vtable0x28() { return SUCCESS; } -// OFFSET: LEGO1 0x100c0b90 +// FUNCTION: LEGO1 0x100c0b90 MxStreamController::MxStreamController() { m_provider = NULL; @@ -34,57 +34,57 @@ MxStreamController::MxStreamController() m_action0x60 = NULL; } -// OFFSET: LEGO1 0x100c0d60 TEMPLATE +// TEMPLATE: LEGO1 0x100c0d60 // list >::~list > -// OFFSET: LEGO1 0x100c0dd0 TEMPLATE +// TEMPLATE: LEGO1 0x100c0dd0 // list >::~list > -// OFFSET: LEGO1 0x100c0e40 TEMPLATE +// TEMPLATE: LEGO1 0x100c0e40 // list >::_Buynode // clang-format off -// OFFSET: LEGO1 0x100c0e70 TEMPLATE +// TEMPLATE: LEGO1 0x100c0e70 // list >::~list > // clang-format on -// OFFSET: LEGO1 0x100c0ee0 TEMPLATE +// TEMPLATE: LEGO1 0x100c0ee0 // list >::_Buynode -// OFFSET: LEGO1 0x100c0fc0 TEMPLATE +// TEMPLATE: LEGO1 0x100c0fc0 // MxStreamListMxDSSubscriber::~MxStreamListMxDSSubscriber -// OFFSET: LEGO1 0x100c1010 TEMPLATE +// TEMPLATE: LEGO1 0x100c1010 // MxStreamListMxDSAction::~MxStreamListMxDSAction -// OFFSET: LEGO1 0x100c1060 TEMPLATE +// TEMPLATE: LEGO1 0x100c1060 // MxStreamListMxNextActionDataStart::~MxStreamListMxNextActionDataStart -// OFFSET: LEGO1 0x100c10b0 TEMPLATE +// TEMPLATE: LEGO1 0x100c10b0 // MxStreamList::~MxStreamList -// OFFSET: LEGO1 0x100c1100 TEMPLATE +// TEMPLATE: LEGO1 0x100c1100 // MxStreamList::~MxStreamList -// OFFSET: LEGO1 0x100c1150 TEMPLATE +// TEMPLATE: LEGO1 0x100c1150 // MxStreamList::~MxStreamList -// OFFSET: LEGO1 0x100c11a0 TEMPLATE +// TEMPLATE: LEGO1 0x100c11a0 // List::~List -// OFFSET: LEGO1 0x100c11f0 TEMPLATE +// TEMPLATE: LEGO1 0x100c11f0 // List::~List -// OFFSET: LEGO1 0x100c1240 TEMPLATE +// TEMPLATE: LEGO1 0x100c1240 // List::~List -// OFFSET: LEGO1 0x100c1290 STUB +// STUB: LEGO1 0x100c1290 MxStreamController::~MxStreamController() { // TODO } -// OFFSET: LEGO1 0x100c1520 +// FUNCTION: LEGO1 0x100c1520 MxResult MxStreamController::Open(const char* p_filename) { char sourceName[256]; @@ -95,7 +95,7 @@ MxResult MxStreamController::Open(const char* p_filename) return SUCCESS; } -// OFFSET: LEGO1 0x100c1690 +// FUNCTION: LEGO1 0x100c1690 MxResult MxStreamController::vtable0x20(MxDSAction* p_action) { MxAutoLocker locker(&m_criticalSection); @@ -117,14 +117,14 @@ MxResult MxStreamController::vtable0x20(MxDSAction* p_action) return result; } -// OFFSET: LEGO1 0x100c1740 STUB +// STUB: LEGO1 0x100c1740 MxResult MxStreamController::vtable0x24(undefined4 p_unknown) { // TODO STUB return FAILURE; } -// OFFSET: LEGO1 0x100c1800 +// FUNCTION: LEGO1 0x100c1800 MxResult MxStreamController::FUN_100c1800(MxDSAction* p_action, MxU32 p_val) { MxNextActionDataStart* dataActionStart = @@ -137,13 +137,13 @@ MxResult MxStreamController::FUN_100c1800(MxDSAction* p_action, MxU32 p_val) return SUCCESS; } -// OFFSET: LEGO1 0x100c1a00 STUB +// STUB: LEGO1 0x100c1a00 MxResult MxStreamController::FUN_100c1a00(MxDSAction* p_action, MxU32 p_bufferval) { return FAILURE; } -// OFFSET: LEGO1 0x100c1c10 +// FUNCTION: LEGO1 0x100c1c10 MxResult MxStreamController::vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval) { MxAutoLocker locker(&m_criticalSection); @@ -153,13 +153,13 @@ MxResult MxStreamController::vtable0x2c(MxDSAction* p_action, MxU32 p_bufferval) return FUN_100c1800(p_action, (p_bufferval / m_provider->GetFileSize()) * m_provider->GetFileSize()); } -// OFFSET: LEGO1 0x100c1ce0 STUB +// STUB: LEGO1 0x100c1ce0 MxResult MxStreamController::vtable0x30(undefined4 p_unknown) { return FAILURE; } -// OFFSET: LEGO1 0x100c20d0 STUB +// STUB: LEGO1 0x100c20d0 MxBool MxStreamController::FUN_100c20d0(MxDSObject& p_obj) { // TODO diff --git a/LEGO1/mxstreamcontroller.h b/LEGO1/mxstreamcontroller.h index 5d6d2cce..80ff9e35 100644 --- a/LEGO1/mxstreamcontroller.h +++ b/LEGO1/mxstreamcontroller.h @@ -11,7 +11,7 @@ #include "mxstreamlist.h" #include "mxstreamprovider.h" -// VTABLE 0x100dc968 +// VTABLE: LEGO1 0x100dc968 // SIZE 0x64 class MxStreamController : public MxCore { public: @@ -19,14 +19,14 @@ class MxStreamController : public MxCore { virtual ~MxStreamController() override; // vtable+0x0 - // OFFSET: LEGO1 0x100c0f10 + // FUNCTION: LEGO1 0x100c0f10 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x10102130 + // GLOBAL: LEGO1 0x10102130 return "MxStreamController"; } - // OFFSET: LEGO1 0x100c0f20 + // FUNCTION: LEGO1 0x100c0f20 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxStreamController::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxstreamer.cpp b/LEGO1/mxstreamer.cpp index ee492e0d..32180214 100644 --- a/LEGO1/mxstreamer.cpp +++ b/LEGO1/mxstreamer.cpp @@ -9,13 +9,13 @@ DECOMP_SIZE_ASSERT(MxStreamer, 0x2c); -// OFFSET: LEGO1 0x100b8f00 +// FUNCTION: LEGO1 0x100b8f00 MxStreamer::MxStreamer() { NotificationManager()->Register(this); } -// OFFSET: LEGO1 0x100b9190 +// FUNCTION: LEGO1 0x100b9190 MxResult MxStreamer::Create() { undefined* b = new undefined[m_subclass1.GetSize() * 0x5800]; @@ -31,7 +31,7 @@ MxResult MxStreamer::Create() return FAILURE; } -// OFFSET: LEGO1 0x100b91d0 +// FUNCTION: LEGO1 0x100b91d0 MxStreamer::~MxStreamer() { while (!m_openStreams.empty()) { @@ -43,7 +43,7 @@ MxStreamer::~MxStreamer() NotificationManager()->Unregister(this); } -// OFFSET: LEGO1 0x100b92c0 +// FUNCTION: LEGO1 0x100b92c0 MxStreamController* MxStreamer::Open(const char* p_name, MxU16 p_lookupType) { // TODO @@ -68,7 +68,7 @@ MxStreamController* MxStreamer::Open(const char* p_name, MxU16 p_lookupType) return stream; } -// OFFSET: LEGO1 0x100b9570 +// FUNCTION: LEGO1 0x100b9570 MxLong MxStreamer::Close(const char* p) { MxDSAction ds; @@ -97,13 +97,13 @@ MxLong MxStreamer::Close(const char* p) return FAILURE; } -// OFFSET: LEGO1 0x100b9700 +// FUNCTION: LEGO1 0x100b9700 MxNotificationParam* MxStreamerNotification::Clone() { return new MxStreamerNotification(m_type, m_sender, m_controller); } -// OFFSET: LEGO1 0x100b9870 +// FUNCTION: LEGO1 0x100b9870 MxStreamController* MxStreamer::GetOpenStream(const char* p_name) { for (list::iterator it = m_openStreams.begin(); it != m_openStreams.end(); it++) { @@ -119,7 +119,7 @@ MxStreamController* MxStreamer::GetOpenStream(const char* p_name) return NULL; } -// OFFSET: LEGO1 0x100b9930 +// FUNCTION: LEGO1 0x100b9930 MxResult MxStreamer::AddStreamControllerToOpenList(MxStreamController* stream) { if (find(m_openStreams.begin(), m_openStreams.end(), stream) == m_openStreams.end()) { @@ -130,7 +130,7 @@ MxResult MxStreamer::AddStreamControllerToOpenList(MxStreamController* stream) return FAILURE; } -// OFFSET: LEGO1 0x100b99b0 +// FUNCTION: LEGO1 0x100b99b0 MxResult MxStreamer::FUN_100b99b0(MxDSAction* p_action) { MxStreamController* controller; @@ -144,7 +144,7 @@ MxResult MxStreamer::FUN_100b99b0(MxDSAction* p_action) return FAILURE; } -// OFFSET: LEGO1 0x100b9b30 +// FUNCTION: LEGO1 0x100b9b30 MxBool MxStreamer::FUN_100b9b30(MxDSObject& p_dsObject) { MxStreamController* controller = GetOpenStream(p_dsObject.GetAtomId().GetInternal()); @@ -153,7 +153,7 @@ MxBool MxStreamer::FUN_100b9b30(MxDSObject& p_dsObject) return TRUE; } -// OFFSET: LEGO1 0x100b9b60 +// FUNCTION: LEGO1 0x100b9b60 MxLong MxStreamer::Notify(MxParam& p) { if (((MxNotificationParam&) p).GetNotification() == MXSTREAMER_DELETE_NOTIFY) { diff --git a/LEGO1/mxstreamer.h b/LEGO1/mxstreamer.h index 6e0500cb..3b2af7e1 100644 --- a/LEGO1/mxstreamer.h +++ b/LEGO1/mxstreamer.h @@ -58,7 +58,7 @@ class MxStreamerNotification : public MxNotificationParam { MxStreamController* m_controller; }; -// VTABLE 0x100dc710 +// VTABLE: LEGO1 0x100dc710 // SIZE 0x2c class MxStreamer : public MxCore { public: @@ -75,14 +75,14 @@ class MxStreamer : public MxCore { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 - // OFFSET: LEGO1 0x100b9000 + // FUNCTION: LEGO1 0x100b9000 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x1010210c + // GLOBAL: LEGO1 0x1010210c return "MxStreamer"; } - // OFFSET: LEGO1 0x100b9010 + // FUNCTION: LEGO1 0x100b9010 inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10 { return !strcmp(p_name, MxStreamer::ClassName()) || MxCore::IsA(p_name); diff --git a/LEGO1/mxstreamlist.cpp b/LEGO1/mxstreamlist.cpp index 94f78fc7..1fa4dd48 100644 --- a/LEGO1/mxstreamlist.cpp +++ b/LEGO1/mxstreamlist.cpp @@ -5,10 +5,10 @@ DECOMP_SIZE_ASSERT(MxStreamListMxDSAction, 0xc); DECOMP_SIZE_ASSERT(MxStreamListMxNextActionDataStart, 0xc); DECOMP_SIZE_ASSERT(MxStreamListMxDSSubscriber, 0xc); -// OFFSET: LEGO1 0x100bfa80 +// FUNCTION: LEGO1 0x100bfa80 MxDSAction* MxStreamListMxDSAction::Find(MxDSAction* p_action, MxBool p_delete) { - // DECOMP: ALPHA 0x1008b99d ? + // DECOMP ALPHA 0x1008b99d ? MxDSAction* found = NULL; @@ -30,7 +30,7 @@ MxDSAction* MxStreamListMxDSAction::Find(MxDSAction* p_action, MxBool p_delete) return found; } -// OFFSET: LEGO1 0x100c2240 +// FUNCTION: LEGO1 0x100c2240 MxNextActionDataStart* MxStreamListMxNextActionDataStart::Find(MxU32 p_id, MxS16 p_value) { MxNextActionDataStart* match = NULL; diff --git a/LEGO1/mxstreamprovider.cpp b/LEGO1/mxstreamprovider.cpp index c1ba84cd..f80788dc 100644 --- a/LEGO1/mxstreamprovider.cpp +++ b/LEGO1/mxstreamprovider.cpp @@ -4,14 +4,14 @@ DECOMP_SIZE_ASSERT(MxStreamProvider, 0x10); -// OFFSET: LEGO1 0x100d07c0 +// FUNCTION: LEGO1 0x100d07c0 MxResult MxStreamProvider::SetResourceToGet(MxStreamController* p_resource) { m_pLookup = p_resource; return SUCCESS; } -// OFFSET: LEGO1 0x100d07d0 +// FUNCTION: LEGO1 0x100d07d0 void MxStreamProvider::vtable0x20(undefined4 p_unknown1) { } diff --git a/LEGO1/mxstreamprovider.h b/LEGO1/mxstreamprovider.h index 77d4fd89..6851b295 100644 --- a/LEGO1/mxstreamprovider.h +++ b/LEGO1/mxstreamprovider.h @@ -7,19 +7,19 @@ class MxStreamController; -// VTABLE 0x100dd100 +// VTABLE: LEGO1 0x100dd100 // SIZE 0x10 class MxStreamProvider : public MxCore { public: inline MxStreamProvider() : m_pLookup(NULL), m_pFile(NULL) {} - // OFFSET: LEGO1 0x100d07e0 + // FUNCTION: LEGO1 0x100d07e0 inline virtual const char* ClassName() const override // vtable+0x0c { return "MxStreamProvider"; } - // OFFSET: LEGO1 0x100d07f0 + // FUNCTION: LEGO1 0x100d07f0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxStreamProvider::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxstring.cpp b/LEGO1/mxstring.cpp index c6e6a2a7..a48f665d 100644 --- a/LEGO1/mxstring.cpp +++ b/LEGO1/mxstring.cpp @@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(MxString, 0x10) -// OFFSET: LEGO1 0x100ae200 +// FUNCTION: LEGO1 0x100ae200 MxString::MxString() { // Set string to one char in length and set that char to null terminator @@ -16,7 +16,7 @@ MxString::MxString() this->m_length = 0; } -// OFFSET: LEGO1 0x100ae2a0 +// FUNCTION: LEGO1 0x100ae2a0 MxString::MxString(const MxString& str) { this->m_length = str.m_length; @@ -24,7 +24,7 @@ MxString::MxString(const MxString& str) strcpy(this->m_data, str.m_data); } -// OFFSET: LEGO1 0x100ae350 +// FUNCTION: LEGO1 0x100ae350 MxString::MxString(const char* str) { if (str) { @@ -39,25 +39,25 @@ MxString::MxString(const char* str) } } -// OFFSET: LEGO1 0x100ae420 +// FUNCTION: LEGO1 0x100ae420 MxString::~MxString() { delete[] this->m_data; } -// OFFSET: LEGO1 0x100ae490 +// FUNCTION: LEGO1 0x100ae490 void MxString::ToUpperCase() { strupr(this->m_data); } -// OFFSET: LEGO1 0x100ae4a0 +// FUNCTION: LEGO1 0x100ae4a0 void MxString::ToLowerCase() { strlwr(this->m_data); } -// OFFSET: LEGO1 0x100ae4b0 +// FUNCTION: LEGO1 0x100ae4b0 MxString& MxString::operator=(const MxString& param) { if (this->m_data != param.m_data) { @@ -70,7 +70,7 @@ MxString& MxString::operator=(const MxString& param) return *this; } -// OFFSET: LEGO1 0x100ae510 +// FUNCTION: LEGO1 0x100ae510 const MxString& MxString::operator=(const char* param) { if (this->m_data != param) { @@ -85,7 +85,7 @@ const MxString& MxString::operator=(const char* param) // Return type is intentionally just MxString, not MxString&. // This forces MSVC to add $ReturnUdt$ to the stack for 100% match. -// OFFSET: LEGO1 0x100ae580 +// FUNCTION: LEGO1 0x100ae580 MxString MxString::operator+(const char* str) { // MxString constructor allocates 1 byte for m_data, so free that first @@ -101,7 +101,7 @@ MxString MxString::operator+(const char* str) return MxString(tmp); } -// OFFSET: LEGO1 0x100ae690 +// FUNCTION: LEGO1 0x100ae690 MxString& MxString::operator+=(const char* str) { int newlen = this->m_length + strlen(str); diff --git a/LEGO1/mxstring.h b/LEGO1/mxstring.h index 3984f428..7e22fe87 100644 --- a/LEGO1/mxstring.h +++ b/LEGO1/mxstring.h @@ -3,7 +3,7 @@ #include "mxcore.h" -// VTABLE 0x100dc110 +// VTABLE: LEGO1 0x100dc110 class MxString : public MxCore { public: __declspec(dllexport) MxString(const MxString&); diff --git a/LEGO1/mxstringlist.cpp b/LEGO1/mxstringlist.cpp index 9279e8cf..1c839a85 100644 --- a/LEGO1/mxstringlist.cpp +++ b/LEGO1/mxstringlist.cpp @@ -4,23 +4,23 @@ DECOMP_SIZE_ASSERT(MxListEntry, 0x18) -// OFFSET: LEGO1 0x100cb3c0 TEMPLATE +// TEMPLATE: LEGO1 0x100cb3c0 // MxCollection::Compare -// OFFSET: LEGO1 0x100cb470 TEMPLATE +// TEMPLATE: LEGO1 0x100cb470 // MxCollection::Destroy -// OFFSET: LEGO1 0x100cb4c0 TEMPLATE +// TEMPLATE: LEGO1 0x100cb4c0 // MxList::~MxList -// OFFSET: LEGO1 0x100cbb40 TEMPLATE +// TEMPLATE: LEGO1 0x100cbb40 // MxList::Append -// OFFSET: LEGO1 0x100cc2d0 TEMPLATE +// TEMPLATE: LEGO1 0x100cc2d0 // MxList::_InsertEntry -// OFFSET: LEGO1 0x100cc3c0 TEMPLATE +// TEMPLATE: LEGO1 0x100cc3c0 // MxListEntry::MxListEntry -// OFFSET: LEGO1 0x100cc450 TEMPLATE +// TEMPLATE: LEGO1 0x100cc450 // MxListEntry::GetValue diff --git a/LEGO1/mxstringlist.h b/LEGO1/mxstringlist.h index f397fbf7..08754405 100644 --- a/LEGO1/mxstringlist.h +++ b/LEGO1/mxstringlist.h @@ -4,11 +4,11 @@ #include "mxlist.h" #include "mxstring.h" -// VTABLE 0x100dd040 +// VTABLE: LEGO1 0x100dd040 // SIZE 0x18 class MxStringList : public MxList {}; -// VTABLE 0x100dd058 +// VTABLE: LEGO1 0x100dd058 typedef MxListCursorChild MxStringListCursor; #endif // MXSTRINGLIST_H diff --git a/LEGO1/mxthread.cpp b/LEGO1/mxthread.cpp index a54e037a..fa78b9b1 100644 --- a/LEGO1/mxthread.cpp +++ b/LEGO1/mxthread.cpp @@ -6,7 +6,7 @@ #include -// OFFSET: LEGO1 0x100b8bb0 +// FUNCTION: LEGO1 0x100b8bb0 MxTickleThread::MxTickleThread(MxCore* p_target, int p_frequencyMS) { m_target = p_target; @@ -14,7 +14,7 @@ MxTickleThread::MxTickleThread(MxCore* p_target, int p_frequencyMS) } // Match except for register allocation -// OFFSET: LEGO1 0x100b8c90 +// FUNCTION: LEGO1 0x100b8c90 MxResult MxTickleThread::Run() { MxTimer* timer = Timer(); @@ -36,7 +36,7 @@ MxResult MxTickleThread::Run() return MxThread::Run(); } -// OFFSET: LEGO1 0x100bf510 +// FUNCTION: LEGO1 0x100bf510 MxThread::MxThread() { m_hThread = NULL; @@ -44,7 +44,7 @@ MxThread::MxThread() m_threadId = 0; } -// OFFSET: LEGO1 0x100bf5a0 +// FUNCTION: LEGO1 0x100bf5a0 MxThread::~MxThread() { if (m_hThread) @@ -53,7 +53,7 @@ MxThread::~MxThread() typedef unsigned(__stdcall* ThreadFunc)(void*); -// OFFSET: LEGO1 0x100bf610 +// FUNCTION: LEGO1 0x100bf610 MxResult MxThread::Start(int p_stack, int p_flag) { MxResult result = FAILURE; @@ -65,26 +65,26 @@ MxResult MxThread::Start(int p_stack, int p_flag) return result; } -// OFFSET: LEGO1 0x100bf660 +// FUNCTION: LEGO1 0x100bf660 void MxThread::Sleep(MxS32 p_milliseconds) { ::Sleep(p_milliseconds); } -// OFFSET: LEGO1 0x100bf670 +// FUNCTION: LEGO1 0x100bf670 void MxThread::Terminate() { m_running = FALSE; m_semaphore.Wait(INFINITE); } -// OFFSET: LEGO1 0x100bf680 +// FUNCTION: LEGO1 0x100bf680 unsigned MxThread::ThreadProc(void* p_thread) { return static_cast(p_thread)->Run(); } -// OFFSET: LEGO1 0x100bf690 +// FUNCTION: LEGO1 0x100bf690 MxResult MxThread::Run() { m_semaphore.Release(1); diff --git a/LEGO1/mxthread.h b/LEGO1/mxthread.h index 59b31554..a9f15488 100644 --- a/LEGO1/mxthread.h +++ b/LEGO1/mxthread.h @@ -7,7 +7,7 @@ class MxCore; -// VTABLE 0x100dc860 +// VTABLE: LEGO1 0x100dc860 class MxThread { public: // Note: Comes before virtual destructor @@ -40,7 +40,7 @@ class MxThread { MxCore* m_target; }; -// VTABLE 0x100dc6d8 +// VTABLE: LEGO1 0x100dc6d8 class MxTickleThread : public MxThread { public: MxTickleThread(MxCore* p_target, int p_frequencyMS); diff --git a/LEGO1/mxticklemanager.cpp b/LEGO1/mxticklemanager.cpp index 4bd66745..28a6c141 100644 --- a/LEGO1/mxticklemanager.cpp +++ b/LEGO1/mxticklemanager.cpp @@ -10,7 +10,7 @@ DECOMP_SIZE_ASSERT(MxTickleClient, 0x10); DECOMP_SIZE_ASSERT(MxTickleManager, 0x14); -// OFFSET: LEGO1 0x100bdd10 +// FUNCTION: LEGO1 0x100bdd10 MxTickleClient::MxTickleClient(MxCore* p_client, MxTime p_interval) { m_flags = 0; @@ -19,7 +19,7 @@ MxTickleClient::MxTickleClient(MxCore* p_client, MxTime p_interval) m_lastUpdateTime = -m_interval; } -// OFFSET: LEGO1 0x100bdd30 +// FUNCTION: LEGO1 0x100bdd30 MxTickleManager::~MxTickleManager() { while (m_clients.size() != 0) { @@ -30,7 +30,7 @@ MxTickleManager::~MxTickleManager() } // TODO: Match. -// OFFSET: LEGO1 0x100bdde0 +// FUNCTION: LEGO1 0x100bdde0 MxResult MxTickleManager::Tickle() { MxTime time = Timer()->GetTime(); @@ -59,7 +59,7 @@ MxResult MxTickleManager::Tickle() return SUCCESS; } -// OFFSET: LEGO1 0x100bde80 +// FUNCTION: LEGO1 0x100bde80 void MxTickleManager::RegisterClient(MxCore* p_client, MxTime p_interval) { MxTime interval = GetClientTickleInterval(p_client); @@ -70,7 +70,7 @@ void MxTickleManager::RegisterClient(MxCore* p_client, MxTime p_interval) } } -// OFFSET: LEGO1 0x100bdf60 +// FUNCTION: LEGO1 0x100bdf60 void MxTickleManager::UnregisterClient(MxCore* p_client) { MxTickleClientPtrList::iterator it = m_clients.begin(); @@ -85,7 +85,7 @@ void MxTickleManager::UnregisterClient(MxCore* p_client) } } -// OFFSET: LEGO1 0x100bdfa0 +// FUNCTION: LEGO1 0x100bdfa0 void MxTickleManager::SetClientTickleInterval(MxCore* p_client, MxTime p_interval) { for (MxTickleClientPtrList::iterator it = m_clients.begin(); it != m_clients.end(); it++) { @@ -97,7 +97,7 @@ void MxTickleManager::SetClientTickleInterval(MxCore* p_client, MxTime p_interva } } -// OFFSET: LEGO1 0x100be000 +// FUNCTION: LEGO1 0x100be000 MxTime MxTickleManager::GetClientTickleInterval(MxCore* p_client) { MxTickleClientPtrList::iterator it = m_clients.begin(); diff --git a/LEGO1/mxticklemanager.h b/LEGO1/mxticklemanager.h index 93d748c3..b7d90763 100644 --- a/LEGO1/mxticklemanager.h +++ b/LEGO1/mxticklemanager.h @@ -32,7 +32,7 @@ class MxTickleClient { typedef list MxTickleClientPtrList; -// VTABLE 0x100d86d8 +// VTABLE: LEGO1 0x100d86d8 class MxTickleManager : public MxCore { public: inline MxTickleManager() {} diff --git a/LEGO1/mxtimer.cpp b/LEGO1/mxtimer.cpp index 79225bfd..f46d570a 100644 --- a/LEGO1/mxtimer.cpp +++ b/LEGO1/mxtimer.cpp @@ -2,13 +2,13 @@ #include -// 0x10101414 +// GLOBAL: LEGO1 0x10101414 MxLong MxTimer::s_LastTimeCalculated = 0; -// 0x10101418 +// GLOBAL: LEGO1 0x10101418 MxLong MxTimer::s_LastTimeTimerStarted = 0; -// OFFSET: LEGO1 0x100ae060 +// FUNCTION: LEGO1 0x100ae060 MxTimer::MxTimer() { this->m_isRunning = FALSE; @@ -17,21 +17,21 @@ MxTimer::MxTimer() s_LastTimeCalculated = m_startTime; } -// OFFSET: LEGO1 0x100ae140 +// FUNCTION: LEGO1 0x100ae140 MxLong MxTimer::GetRealTime() { MxTimer::s_LastTimeCalculated = timeGetTime(); return MxTimer::s_LastTimeCalculated - this->m_startTime; } -// OFFSET: LEGO1 0x100ae160 +// FUNCTION: LEGO1 0x100ae160 void MxTimer::Start() { s_LastTimeTimerStarted = this->GetRealTime(); this->m_isRunning = TRUE; } -// OFFSET: LEGO1 0x100ae180 +// FUNCTION: LEGO1 0x100ae180 void MxTimer::Stop() { MxLong elapsed = this->GetRealTime(); diff --git a/LEGO1/mxtimer.h b/LEGO1/mxtimer.h index 9cab7358..26548433 100644 --- a/LEGO1/mxtimer.h +++ b/LEGO1/mxtimer.h @@ -3,7 +3,7 @@ #include "mxcore.h" -// VTABLE 0x100dc0e0 +// VTABLE: LEGO1 0x100dc0e0 // SIZE 0x10 class MxTimer : public MxCore { public: diff --git a/LEGO1/mxtransitionmanager.cpp b/LEGO1/mxtransitionmanager.cpp index 3cf5b687..652dd628 100644 --- a/LEGO1/mxtransitionmanager.cpp +++ b/LEGO1/mxtransitionmanager.cpp @@ -10,10 +10,10 @@ DECOMP_SIZE_ASSERT(MxTransitionManager, 0x900); -// 0x100f4378 +// GLOBAL: LEGO1 0x100f4378 RECT g_fullScreenRect = {0, 0, 640, 480}; -// OFFSET: LEGO1 0x1004b8d0 +// FUNCTION: LEGO1 0x1004b8d0 MxTransitionManager::MxTransitionManager() { m_animationTimer = 0; @@ -26,7 +26,7 @@ MxTransitionManager::MxTransitionManager() m_unk24 = 0; } -// OFFSET: LEGO1 0x1004ba00 +// FUNCTION: LEGO1 0x1004ba00 MxTransitionManager::~MxTransitionManager() { delete[] m_copyBuffer; @@ -39,7 +39,7 @@ MxTransitionManager::~MxTransitionManager() TickleManager()->UnregisterClient(this); } -// OFFSET: LEGO1 0x1004baa0 +// FUNCTION: LEGO1 0x1004baa0 MxResult MxTransitionManager::GetDDrawSurfaceFromVideoManager() // vtable+0x14 { LegoVideoManager* videoManager = VideoManager(); @@ -47,7 +47,7 @@ MxResult MxTransitionManager::GetDDrawSurfaceFromVideoManager() // vtable+0x14 return SUCCESS; } -// OFFSET: LEGO1 0x1004bac0 +// FUNCTION: LEGO1 0x1004bac0 MxResult MxTransitionManager::Tickle() { if (this->m_animationSpeed + this->m_systemTime > timeGetTime()) { @@ -79,7 +79,7 @@ MxResult MxTransitionManager::Tickle() return SUCCESS; } -// OFFSET: LEGO1 0x1004bb70 +// FUNCTION: LEGO1 0x1004bb70 MxResult MxTransitionManager::StartTransition( TransitionType p_animationType, MxS32 p_speed, @@ -126,7 +126,7 @@ MxResult MxTransitionManager::StartTransition( return FAILURE; } -// OFFSET: LEGO1 0x1004bc30 +// FUNCTION: LEGO1 0x1004bc30 void MxTransitionManager::EndTransition(MxBool p_notifyWorld) { if (m_transitionType != NOT_TRANSITIONING) { @@ -146,7 +146,7 @@ void MxTransitionManager::EndTransition(MxBool p_notifyWorld) } } -// OFFSET: LEGO1 0x1004bcf0 +// FUNCTION: LEGO1 0x1004bcf0 void MxTransitionManager::Transition_None() { LegoVideoManager* videoManager = VideoManager(); @@ -154,7 +154,7 @@ void MxTransitionManager::Transition_None() EndTransition(TRUE); } -// OFFSET: LEGO1 0x1004bd10 +// FUNCTION: LEGO1 0x1004bd10 void MxTransitionManager::Transition_Dissolve() { // If the animation is finished @@ -236,7 +236,7 @@ void MxTransitionManager::Transition_Dissolve() } } -// OFFSET: LEGO1 0x1004bed0 +// FUNCTION: LEGO1 0x1004bed0 void MxTransitionManager::Transition_Pixelation() { if (m_animationTimer == 16) { @@ -353,7 +353,7 @@ void MxTransitionManager::Transition_Pixelation() } } -// OFFSET: LEGO1 0x1004c170 +// FUNCTION: LEGO1 0x1004c170 void MxTransitionManager::Transition_Wipe() { // If the animation is finished @@ -392,7 +392,7 @@ void MxTransitionManager::Transition_Wipe() } } -// OFFSET: LEGO1 0x1004c270 +// FUNCTION: LEGO1 0x1004c270 void MxTransitionManager::Transition_Windows() { if (m_animationTimer == 240) { @@ -438,7 +438,7 @@ void MxTransitionManager::Transition_Windows() } } -// OFFSET: LEGO1 0x1004c3e0 +// FUNCTION: LEGO1 0x1004c3e0 void MxTransitionManager::Transition_Broken() { // This function has no actual animation logic. @@ -463,7 +463,7 @@ void MxTransitionManager::Transition_Broken() } } -// OFFSET: LEGO1 0x1004c470 +// FUNCTION: LEGO1 0x1004c470 void MxTransitionManager::SetWaitIndicator(MxVideoPresenter* p_waitIndicator) { // End current wait indicator @@ -491,7 +491,7 @@ void MxTransitionManager::SetWaitIndicator(MxVideoPresenter* p_waitIndicator) } } -// OFFSET: LEGO1 0x1004c4d0 +// FUNCTION: LEGO1 0x1004c4d0 void MxTransitionManager::SubmitCopyRect(LPDDSURFACEDESC ddsc) { // Check if the copy rect is setup @@ -523,7 +523,7 @@ void MxTransitionManager::SubmitCopyRect(LPDDSURFACEDESC ddsc) m_copyBuffer = NULL; } -// OFFSET: LEGO1 0x1004c580 +// FUNCTION: LEGO1 0x1004c580 void MxTransitionManager::SetupCopyRect(LPDDSURFACEDESC ddsc) { // Check if the copy rect is setup diff --git a/LEGO1/mxtransitionmanager.h b/LEGO1/mxtransitionmanager.h index 933c1c0a..e66c2feb 100644 --- a/LEGO1/mxtransitionmanager.h +++ b/LEGO1/mxtransitionmanager.h @@ -7,7 +7,7 @@ #include -// VTABLE 0x100d7ea0 +// VTABLE: LEGO1 0x100d7ea0 class MxTransitionManager : public MxCore { public: MxTransitionManager(); @@ -17,13 +17,13 @@ class MxTransitionManager : public MxCore { virtual MxResult Tickle(); // vtable+0x8 - // OFFSET: LEGO1 0x1004b950 + // FUNCTION: LEGO1 0x1004b950 inline virtual const char* ClassName() const override // vtable+0x0c { return "MxTransitionManager"; } - // OFFSET: LEGO1 0x1004b960 + // FUNCTION: LEGO1 0x1004b960 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxTransitionManager::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/mxvariable.cpp b/LEGO1/mxvariable.cpp index b0fe5600..59fd0a8b 100644 --- a/LEGO1/mxvariable.cpp +++ b/LEGO1/mxvariable.cpp @@ -5,19 +5,19 @@ DECOMP_SIZE_ASSERT(MxVariable, 0x24) -// OFFSET: LEGO1 0x1003bea0 +// FUNCTION: LEGO1 0x1003bea0 MxString* MxVariable::GetValue() { return &m_value; } -// OFFSET: LEGO1 0x1003beb0 +// FUNCTION: LEGO1 0x1003beb0 void MxVariable::SetValue(const char* value) { m_value = value; } -// OFFSET: LEGO1 0x1003bec0 +// FUNCTION: LEGO1 0x1003bec0 void MxVariable::Destroy() { delete this; diff --git a/LEGO1/mxvariable.h b/LEGO1/mxvariable.h index ef1a6d28..d4f2e76e 100644 --- a/LEGO1/mxvariable.h +++ b/LEGO1/mxvariable.h @@ -4,7 +4,7 @@ #include "mxcore.h" #include "mxstring.h" -// VTABLE 0x100d7498 +// VTABLE: LEGO1 0x100d7498 // SIZE 0x24 class MxVariable { public: diff --git a/LEGO1/mxvariabletable.cpp b/LEGO1/mxvariabletable.cpp index cd7fc9ed..dda73bee 100644 --- a/LEGO1/mxvariabletable.cpp +++ b/LEGO1/mxvariabletable.cpp @@ -1,36 +1,36 @@ #include "mxvariabletable.h" -// OFFSET: LEGO1 0x100afcd0 TEMPLATE +// TEMPLATE: LEGO1 0x100afcd0 // MxCollection::Compare -// OFFSET: LEGO1 0x100afce0 TEMPLATE +// TEMPLATE: LEGO1 0x100afce0 // MxCollection::~MxCollection -// OFFSET: LEGO1 0x100afd30 TEMPLATE +// TEMPLATE: LEGO1 0x100afd30 // MxCollection::Destroy -// OFFSET: LEGO1 0x100afd40 TEMPLATE +// SYNTHETIC: LEGO1 0x100afd40 // MxCollection::`scalar deleting destructor' -// OFFSET: LEGO1 0x100afdb0 TEMPLATE +// TEMPLATE: LEGO1 0x100afdb0 // MxVariableTable::Destroy -// OFFSET: LEGO1 0x100afdc0 TEMPLATE +// TEMPLATE: LEGO1 0x100afdc0 // MxHashTable::Hash -// OFFSET: LEGO1 0x100b0bd0 TEMPLATE +// TEMPLATE: LEGO1 0x100b0bd0 // MxHashTable::~MxHashTable -// OFFSET: LEGO1 0x100b0ca0 TEMPLATE +// SYNTHETIC: LEGO1 0x100b0ca0 // MxHashTable::`scalar deleting destructor' -// OFFSET: LEGO1 0x100b7330 +// FUNCTION: LEGO1 0x100b7330 MxS8 MxVariableTable::Compare(MxVariable* p_var0, MxVariable* p_var1) { return p_var0->GetKey()->Compare(*p_var1->GetKey()); } -// OFFSET: LEGO1 0x100b7370 +// FUNCTION: LEGO1 0x100b7370 MxU32 MxVariableTable::Hash(MxVariable* p_var) { const char* str = p_var->GetKey()->GetData(); @@ -43,7 +43,7 @@ MxU32 MxVariableTable::Hash(MxVariable* p_var) return value; } -// OFFSET: LEGO1 0x100b73a0 +// FUNCTION: LEGO1 0x100b73a0 void MxVariableTable::SetVariable(const char* p_key, const char* p_value) { MxHashTableCursor cursor(this); @@ -59,7 +59,7 @@ void MxVariableTable::SetVariable(const char* p_key, const char* p_value) } } -// OFFSET: LEGO1 0x100b7740 +// FUNCTION: LEGO1 0x100b7740 void MxVariableTable::SetVariable(MxVariable* p_var) { MxHashTableCursor cursor(this); @@ -71,7 +71,7 @@ void MxVariableTable::SetVariable(MxVariable* p_var) MxHashTable::Add(p_var); } -// OFFSET: LEGO1 0x100b78f0 +// FUNCTION: LEGO1 0x100b78f0 const char* MxVariableTable::GetVariable(const char* p_key) { const char* value = ""; @@ -89,8 +89,8 @@ const char* MxVariableTable::GetVariable(const char* p_key) return value; } -// OFFSET: LEGO1 0x100b7ab0 TEMPLATE +// TEMPLATE: LEGO1 0x100b7ab0 // MxHashTable::Resize -// OFFSET: LEGO1 0x100b7b80 TEMPLATE +// TEMPLATE: LEGO1 0x100b7b80 // MxHashTable::_NodeInsert diff --git a/LEGO1/mxvariabletable.h b/LEGO1/mxvariabletable.h index 5d36fc71..1a91da26 100644 --- a/LEGO1/mxvariabletable.h +++ b/LEGO1/mxvariabletable.h @@ -5,7 +5,7 @@ #include "mxtypes.h" #include "mxvariable.h" -// VTABLE 0x100dc1c8 +// VTABLE: LEGO1 0x100dc1c8 // SIZE 0x28 class MxVariableTable : public MxHashTable { public: @@ -20,10 +20,10 @@ class MxVariableTable : public MxHashTable { virtual MxU32 Hash(MxVariable*) override; // vtable+0x18 }; -// VTABLE 0x100dc1b0 TEMPLATE +// VTABLE: LEGO1 0x100dc1b0 // class MxCollection -// VTABLE 0x100dc1e8 TEMPLATE +// VTABLE: LEGO1 0x100dc1e8 // class MxHashTable #endif // MXVARIABLETABLE_H diff --git a/LEGO1/mxvideomanager.cpp b/LEGO1/mxvideomanager.cpp index 754a1aee..e748e9b9 100644 --- a/LEGO1/mxvideomanager.cpp +++ b/LEGO1/mxvideomanager.cpp @@ -7,24 +7,24 @@ DECOMP_SIZE_ASSERT(MxVideoManager, 0x64) -// OFFSET: LEGO1 0x100be1f0 +// FUNCTION: LEGO1 0x100be1f0 MxVideoManager::MxVideoManager() { Init(); } -// OFFSET: LEGO1 0x100be270 +// FUNCTION: LEGO1 0x100be270 void MxVideoManager::vtable0x34(MxU32 p_x, MxU32 p_y, MxU32 p_width, MxU32 p_height) { } -// OFFSET: LEGO1 0x100be2a0 +// FUNCTION: LEGO1 0x100be2a0 MxVideoManager::~MxVideoManager() { Destroy(TRUE); } -// OFFSET: LEGO1 0x100be320 +// FUNCTION: LEGO1 0x100be320 MxResult MxVideoManager::Init() { this->m_pDirectDraw = NULL; @@ -36,7 +36,7 @@ MxResult MxVideoManager::Init() return SUCCESS; } -// OFFSET: LEGO1 0x100be340 +// FUNCTION: LEGO1 0x100be340 void MxVideoManager::Destroy(MxBool p_fromDestructor) { if (m_thread) { @@ -71,7 +71,7 @@ void MxVideoManager::Destroy(MxBool p_fromDestructor) MxMediaManager::Destroy(); } -// OFFSET: LEGO1 0x100be3e0 +// FUNCTION: LEGO1 0x100be3e0 void MxVideoManager::UpdateRegion() { if (m_region->vtable20() == FALSE) { @@ -81,7 +81,7 @@ void MxVideoManager::UpdateRegion() } } -// OFFSET: LEGO1 0x100be440 +// FUNCTION: LEGO1 0x100be440 void MxVideoManager::SortPresenterList() { if (this->m_presenters->GetCount() <= 1) @@ -114,7 +114,7 @@ void MxVideoManager::SortPresenterList() } } -// OFFSET: LEGO1 0x100be600 +// FUNCTION: LEGO1 0x100be600 MxResult MxVideoManager::vtable0x28( MxVideoParam& p_videoParam, LPDIRECTDRAW p_pDirectDraw, @@ -188,7 +188,7 @@ MxResult MxVideoManager::vtable0x28( return status; } -// OFFSET: LEGO1 0x100be820 +// FUNCTION: LEGO1 0x100be820 MxResult MxVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, MxBool p_createThread) { MxBool locked = FALSE; @@ -256,13 +256,13 @@ MxResult MxVideoManager::Create(MxVideoParam& p_videoParam, MxU32 p_frequencyMS, return status; } -// OFFSET: LEGO1 0x100bea50 +// FUNCTION: LEGO1 0x100bea50 void MxVideoManager::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x100bea60 +// FUNCTION: LEGO1 0x100bea60 void MxVideoManager::InvalidateRect(MxRect32& p_rect) { m_criticalSection.Enter(); @@ -273,7 +273,7 @@ void MxVideoManager::InvalidateRect(MxRect32& p_rect) m_criticalSection.Leave(); } -// OFFSET: LEGO1 0x100bea90 +// FUNCTION: LEGO1 0x100bea90 MxResult MxVideoManager::Tickle() { MxAutoLocker lock(&this->m_criticalSection); @@ -297,7 +297,7 @@ MxResult MxVideoManager::Tickle() return SUCCESS; } -// OFFSET: LEGO1 0x100bebe0 +// FUNCTION: LEGO1 0x100bebe0 MxResult MxVideoManager::RealizePalette(MxPalette* p_palette) { PALETTEENTRY paletteEntries[256]; diff --git a/LEGO1/mxvideomanager.h b/LEGO1/mxvideomanager.h index 8b006241..1fffe403 100644 --- a/LEGO1/mxvideomanager.h +++ b/LEGO1/mxvideomanager.h @@ -7,7 +7,7 @@ #include "mxregion.h" #include "mxvideoparam.h" -// VTABLE 0x100dc810 +// VTABLE: LEGO1 0x100dc810 // SIZE 0x64 class MxVideoManager : public MxMediaManager { public: diff --git a/LEGO1/mxvideoparam.cpp b/LEGO1/mxvideoparam.cpp index 40e25c79..cfcd3098 100644 --- a/LEGO1/mxvideoparam.cpp +++ b/LEGO1/mxvideoparam.cpp @@ -3,7 +3,7 @@ #include #include -// OFFSET: LEGO1 0x100bec70 +// FUNCTION: LEGO1 0x100bec70 MxVideoParam::MxVideoParam() { this->m_rect.SetRight(640); @@ -16,7 +16,7 @@ MxVideoParam::MxVideoParam() this->m_deviceId = NULL; } -// OFFSET: LEGO1 0x100beca0 +// FUNCTION: LEGO1 0x100beca0 MxVideoParam::MxVideoParam( COMPAT_CONST MxRect32& p_rect, MxPalette* p_pal, @@ -32,7 +32,7 @@ MxVideoParam::MxVideoParam( this->m_deviceId = NULL; } -// OFFSET: LEGO1 0x100becf0 +// FUNCTION: LEGO1 0x100becf0 MxVideoParam::MxVideoParam(MxVideoParam& p_videoParam) { this->m_rect = p_videoParam.m_rect; @@ -44,14 +44,14 @@ MxVideoParam::MxVideoParam(MxVideoParam& p_videoParam) SetDeviceName(p_videoParam.m_deviceId); } -// OFFSET: LEGO1 0x100bed50 +// FUNCTION: LEGO1 0x100bed50 MxVideoParam::~MxVideoParam() { if (this->m_deviceId != NULL) delete[] this->m_deviceId; } -// OFFSET: LEGO1 0x100bed70 +// FUNCTION: LEGO1 0x100bed70 void MxVideoParam::SetDeviceName(char* id) { if (this->m_deviceId != NULL) @@ -69,7 +69,7 @@ void MxVideoParam::SetDeviceName(char* id) } } -// OFFSET: LEGO1 0x100bede0 +// FUNCTION: LEGO1 0x100bede0 MxVideoParam& MxVideoParam::operator=(const MxVideoParam& p_videoParam) { this->m_rect = p_videoParam.m_rect; diff --git a/LEGO1/mxvideoparamflags.cpp b/LEGO1/mxvideoparamflags.cpp index babcb03c..30305c3d 100644 --- a/LEGO1/mxvideoparamflags.cpp +++ b/LEGO1/mxvideoparamflags.cpp @@ -1,6 +1,6 @@ #include "mxvideoparamflags.h" -// OFFSET: LEGO1 0x100bec40 +// FUNCTION: LEGO1 0x100bec40 MxVideoParamFlags::MxVideoParamFlags() { this->SetFullScreen(0); diff --git a/LEGO1/mxvideopresenter.cpp b/LEGO1/mxvideopresenter.cpp index a6731fcc..09db8738 100644 --- a/LEGO1/mxvideopresenter.cpp +++ b/LEGO1/mxvideopresenter.cpp @@ -7,67 +7,67 @@ DECOMP_SIZE_ASSERT(MxVideoPresenter, 0x64); DECOMP_SIZE_ASSERT(MxVideoPresenter::AlphaMask, 0xc); -// OFFSET: LEGO1 0x1000c700 +// FUNCTION: LEGO1 0x1000c700 void MxVideoPresenter::LoadHeader(MxStreamChunk* p_chunk) { // Empty } -// OFFSET: LEGO1 0x1000c710 +// FUNCTION: LEGO1 0x1000c710 void MxVideoPresenter::CreateBitmap() { // Empty } -// OFFSET: LEGO1 0x1000c720 +// FUNCTION: LEGO1 0x1000c720 void MxVideoPresenter::LoadFrame(MxStreamChunk* p_chunk) { // Empty } -// OFFSET: LEGO1 0x1000c730 +// FUNCTION: LEGO1 0x1000c730 void MxVideoPresenter::VTable0x70() { // Empty } -// OFFSET: LEGO1 0x1000c740 +// FUNCTION: LEGO1 0x1000c740 MxVideoPresenter::~MxVideoPresenter() { Destroy(TRUE); } -// OFFSET: LEGO1 0x1000c7a0 +// FUNCTION: LEGO1 0x1000c7a0 void MxVideoPresenter::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x1000c7b0 +// FUNCTION: LEGO1 0x1000c7b0 LPDIRECTDRAWSURFACE MxVideoPresenter::VTable0x78() { return m_unk58; } -// OFFSET: LEGO1 0x1000c7c0 +// FUNCTION: LEGO1 0x1000c7c0 MxBool MxVideoPresenter::VTable0x7c() { return (m_bitmap != NULL) || (m_alpha != NULL); } -// OFFSET: LEGO1 0x1000c7e0 +// FUNCTION: LEGO1 0x1000c7e0 MxS32 MxVideoPresenter::GetWidth() { return m_alpha ? m_alpha->m_width : m_bitmap->GetBmiHeader()->biWidth; } -// OFFSET: LEGO1 0x1000c800 +// FUNCTION: LEGO1 0x1000c800 MxS32 MxVideoPresenter::GetHeight() { return m_alpha ? m_alpha->m_height : m_bitmap->GetBmiHeader()->biHeight; } -// OFFSET: LEGO1 0x100b24f0 +// FUNCTION: LEGO1 0x100b24f0 MxVideoPresenter::AlphaMask::AlphaMask(const MxBitmap& p_bitmap) { m_width = p_bitmap.GetBmiWidth(); @@ -152,7 +152,7 @@ MxVideoPresenter::AlphaMask::AlphaMask(const MxBitmap& p_bitmap) } } -// OFFSET: LEGO1 0x100b2670 +// FUNCTION: LEGO1 0x100b2670 MxVideoPresenter::AlphaMask::AlphaMask(const MxVideoPresenter::AlphaMask& p_alpha) { m_width = p_alpha.m_width; @@ -163,14 +163,14 @@ MxVideoPresenter::AlphaMask::AlphaMask(const MxVideoPresenter::AlphaMask& p_alph memcpy(m_bitmask, p_alpha.m_bitmask, size); } -// OFFSET: LEGO1 0x100b26d0 +// FUNCTION: LEGO1 0x100b26d0 MxVideoPresenter::AlphaMask::~AlphaMask() { if (m_bitmask) delete[] m_bitmask; } -// OFFSET: LEGO1 0x100b26f0 +// FUNCTION: LEGO1 0x100b26f0 MxS32 MxVideoPresenter::AlphaMask::IsHit(MxU32 p_x, MxU32 p_y) { if (p_x >= m_width || p_y >= m_height) @@ -180,7 +180,7 @@ MxS32 MxVideoPresenter::AlphaMask::IsHit(MxU32 p_x, MxU32 p_y) return m_bitmask[pos / 8] & (1 << abs(abs(pos) & 7)) ? 1 : 0; } -// OFFSET: LEGO1 0x100b2760 +// FUNCTION: LEGO1 0x100b2760 void MxVideoPresenter::Init() { m_bitmap = NULL; @@ -200,7 +200,7 @@ void MxVideoPresenter::Init() m_flags = m_flags & 0xef; } -// OFFSET: LEGO1 0x100b27b0 +// FUNCTION: LEGO1 0x100b27b0 void MxVideoPresenter::Destroy(MxBool p_fromDestructor) { if (MVideoManager() != NULL) @@ -234,7 +234,7 @@ void MxVideoPresenter::Destroy(MxBool p_fromDestructor) MxMediaPresenter::Destroy(FALSE); } -// OFFSET: LEGO1 0x100b28b0 +// FUNCTION: LEGO1 0x100b28b0 void MxVideoPresenter::NextFrame() { MxStreamChunk* chunk = NextChunk(); @@ -250,7 +250,7 @@ void MxVideoPresenter::NextFrame() } } -// OFFSET: LEGO1 0x100b2900 +// FUNCTION: LEGO1 0x100b2900 MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y) { MxDSAction* action = GetAction(); @@ -312,13 +312,13 @@ MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y) return TRUE; } -// OFFSET: LEGO1 0x100b2a70 STUB +// STUB: LEGO1 0x100b2a70 void MxVideoPresenter::VTable0x6c() { // TODO } -// OFFSET: LEGO1 0x100b2f60 +// FUNCTION: LEGO1 0x100b2f60 void MxVideoPresenter::ReadyTickle() { MxStreamChunk* chunk = NextChunk(); @@ -332,7 +332,7 @@ void MxVideoPresenter::ReadyTickle() } } -// OFFSET: LEGO1 0x100b2fa0 +// FUNCTION: LEGO1 0x100b2fa0 void MxVideoPresenter::StartingTickle() { MxStreamChunk* chunk = FUN_100b5650(); @@ -344,7 +344,7 @@ void MxVideoPresenter::StartingTickle() } } -// OFFSET: LEGO1 0x100b2fe0 +// FUNCTION: LEGO1 0x100b2fe0 void MxVideoPresenter::StreamingTickle() { if (m_action->GetFlags() & MxDSAction::Flag_Bit9) { @@ -382,7 +382,7 @@ void MxVideoPresenter::StreamingTickle() } } -// OFFSET: LEGO1 0x100b3080 +// FUNCTION: LEGO1 0x100b3080 void MxVideoPresenter::RepeatingTickle() { if (IsEnabled()) { @@ -421,7 +421,7 @@ void MxVideoPresenter::RepeatingTickle() } } -// OFFSET: LEGO1 0x100b3130 +// FUNCTION: LEGO1 0x100b3130 void MxVideoPresenter::Unk5Tickle() { MxLong sustainTime = ((MxDSMediaAction*) m_action)->GetSustainTime(); @@ -443,7 +443,7 @@ void MxVideoPresenter::Unk5Tickle() } } -// OFFSET: LEGO1 0x100b31a0 +// FUNCTION: LEGO1 0x100b31a0 MxResult MxVideoPresenter::AddToManager() { MxResult result = FAILURE; @@ -456,7 +456,7 @@ MxResult MxVideoPresenter::AddToManager() return result; } -// OFFSET: LEGO1 0x100b31d0 +// FUNCTION: LEGO1 0x100b31d0 void MxVideoPresenter::EndAction() { if (m_action) { @@ -476,7 +476,7 @@ void MxVideoPresenter::EndAction() } } -// OFFSET: LEGO1 0x100b3280 +// FUNCTION: LEGO1 0x100b3280 MxResult MxVideoPresenter::PutData() { MxAutoLocker lock(&m_criticalSection); @@ -487,7 +487,7 @@ MxResult MxVideoPresenter::PutData() return SUCCESS; } -// OFFSET: LEGO1 0x100b3300 +// FUNCTION: LEGO1 0x100b3300 undefined MxVideoPresenter::VTable0x74() { return 0; diff --git a/LEGO1/mxvideopresenter.h b/LEGO1/mxvideopresenter.h index a81370b3..6b0eb620 100644 --- a/LEGO1/mxvideopresenter.h +++ b/LEGO1/mxvideopresenter.h @@ -5,7 +5,7 @@ #include "mxbitmap.h" #include "mxmediapresenter.h" -// VTABLE 0x100d4be8 +// VTABLE: LEGO1 0x100d4be8 // SIZE 0x64 class MxVideoPresenter : public MxMediaPresenter { public: @@ -20,14 +20,14 @@ class MxVideoPresenter : public MxMediaPresenter { MxVideoPresenter() { Init(); } virtual ~MxVideoPresenter() override; // vtable+0x0 - // OFFSET: LEGO1 0x1000c820 + // FUNCTION: LEGO1 0x1000c820 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0760 + // GLOBAL: LEGO1 0x100f0760 return "MxVideoPresenter"; } - // OFFSET: LEGO1 0x1000c830 + // FUNCTION: LEGO1 0x1000c830 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxVideoPresenter::ClassName()) || MxMediaPresenter::IsA(name); diff --git a/LEGO1/mxwavepresenter.cpp b/LEGO1/mxwavepresenter.cpp index 87933eef..3468b538 100644 --- a/LEGO1/mxwavepresenter.cpp +++ b/LEGO1/mxwavepresenter.cpp @@ -11,25 +11,25 @@ DECOMP_SIZE_ASSERT(MxWavePresenter, 0x6c); DECOMP_SIZE_ASSERT(MxWavePresenter::WaveFormat, 0x1c); -// OFFSET: LEGO1 0x1000d640 +// FUNCTION: LEGO1 0x1000d640 MxWavePresenter::~MxWavePresenter() { Destroy(TRUE); } -// OFFSET: LEGO1 0x1000d6a0 +// FUNCTION: LEGO1 0x1000d6a0 void MxWavePresenter::Destroy() { Destroy(FALSE); } -// OFFSET: LEGO1 0x1000d6b0 +// FUNCTION: LEGO1 0x1000d6b0 MxBool MxWavePresenter::IsPaused() { return m_paused; } -// OFFSET: LEGO1 0x100b1ad0 +// FUNCTION: LEGO1 0x100b1ad0 void MxWavePresenter::Init() { m_waveFormat = NULL; @@ -42,7 +42,7 @@ void MxWavePresenter::Init() m_paused = FALSE; } -// OFFSET: LEGO1 0x100b1af0 +// FUNCTION: LEGO1 0x100b1af0 MxResult MxWavePresenter::AddToManager() { MxResult result = MxSoundPresenter::AddToManager(); @@ -50,7 +50,7 @@ MxResult MxWavePresenter::AddToManager() return result; } -// OFFSET: LEGO1 0x100b1b10 +// FUNCTION: LEGO1 0x100b1b10 void MxWavePresenter::Destroy(MxBool p_fromDestructor) { if (m_dsBuffer) { @@ -67,7 +67,7 @@ void MxWavePresenter::Destroy(MxBool p_fromDestructor) MxSoundPresenter::Destroy(FALSE); } -// OFFSET: LEGO1 0x100b1b60 +// FUNCTION: LEGO1 0x100b1b60 MxS8 MxWavePresenter::GetPlayedChunks() { DWORD dwCurrentPlayCursor, dwCurrentWriteCursor; @@ -79,13 +79,13 @@ MxS8 MxWavePresenter::GetPlayedChunks() return playedChunks; } -// OFFSET: LEGO1 0x100b1ba0 +// FUNCTION: LEGO1 0x100b1ba0 MxBool MxWavePresenter::FUN_100b1ba0() { return !m_started || GetPlayedChunks() != m_writtenChunks; } -// OFFSET: LEGO1 0x100b1bd0 +// FUNCTION: LEGO1 0x100b1bd0 void MxWavePresenter::WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length) { DWORD dwStatus; @@ -126,7 +126,7 @@ void MxWavePresenter::WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length) } } -// OFFSET: LEGO1 0x100b1cf0 +// FUNCTION: LEGO1 0x100b1cf0 void MxWavePresenter::ReadyTickle() { MxStreamChunk* chunk = NextChunk(); @@ -141,7 +141,7 @@ void MxWavePresenter::ReadyTickle() } } -// OFFSET: LEGO1 0x100b1d50 +// FUNCTION: LEGO1 0x100b1d50 void MxWavePresenter::StartingTickle() { MxStreamChunk* chunk = NextChunk(); @@ -194,7 +194,7 @@ void MxWavePresenter::StartingTickle() } } -// OFFSET: LEGO1 0x100b1ea0 +// FUNCTION: LEGO1 0x100b1ea0 void MxWavePresenter::StreamingTickle() { if (!m_currentChunk) { @@ -220,7 +220,7 @@ void MxWavePresenter::StreamingTickle() } } -// OFFSET: LEGO1 0x100b20c0 +// FUNCTION: LEGO1 0x100b20c0 void MxWavePresenter::DoneTickle() { if (m_dsBuffer) { @@ -236,7 +236,7 @@ void MxWavePresenter::DoneTickle() MxMediaPresenter::DoneTickle(); } -// OFFSET: LEGO1 0x100b2130 +// FUNCTION: LEGO1 0x100b2130 void MxWavePresenter::AppendChunk(MxStreamChunk* p_chunk) { WriteToSoundBuffer(p_chunk->GetData(), p_chunk->GetLength()); @@ -244,7 +244,7 @@ void MxWavePresenter::AppendChunk(MxStreamChunk* p_chunk) m_subscriber->FUN_100b8390(p_chunk); } -// OFFSET: LEGO1 0x100b2160 +// FUNCTION: LEGO1 0x100b2160 MxResult MxWavePresenter::PutData() { MxAutoLocker lock(&m_criticalSection); @@ -279,7 +279,7 @@ MxResult MxWavePresenter::PutData() return SUCCESS; } -// OFFSET: LEGO1 0x100b2280 +// FUNCTION: LEGO1 0x100b2280 void MxWavePresenter::EndAction() { if (m_action) { @@ -291,7 +291,7 @@ void MxWavePresenter::EndAction() } } -// OFFSET: LEGO1 0x100b2300 +// FUNCTION: LEGO1 0x100b2300 void MxWavePresenter::SetVolume(MxS32 p_volume) { m_criticalSection.Enter(); @@ -306,7 +306,7 @@ void MxWavePresenter::SetVolume(MxS32 p_volume) m_criticalSection.Leave(); } -// OFFSET: LEGO1 0x100b2360 +// FUNCTION: LEGO1 0x100b2360 void MxWavePresenter::Enable(MxBool p_enable) { if (IsEnabled() != p_enable) { @@ -321,7 +321,7 @@ void MxWavePresenter::Enable(MxBool p_enable) } } -// OFFSET: LEGO1 0x100b23a0 +// FUNCTION: LEGO1 0x100b23a0 void MxWavePresenter::ParseExtra() { char extraCopy[512]; @@ -343,7 +343,7 @@ void MxWavePresenter::ParseExtra() } } -// OFFSET: LEGO1 0x100b2440 +// FUNCTION: LEGO1 0x100b2440 void MxWavePresenter::Pause() { if (!m_paused && m_started) { @@ -353,7 +353,7 @@ void MxWavePresenter::Pause() } } -// OFFSET: LEGO1 0x100b2470 +// FUNCTION: LEGO1 0x100b2470 void MxWavePresenter::Resume() { if (m_paused) { diff --git a/LEGO1/mxwavepresenter.h b/LEGO1/mxwavepresenter.h index b5379a26..97308dba 100644 --- a/LEGO1/mxwavepresenter.h +++ b/LEGO1/mxwavepresenter.h @@ -6,21 +6,21 @@ #include -// VTABLE 0x100d49a8 +// VTABLE: LEGO1 0x100d49a8 // SIZE 0x6c class MxWavePresenter : public MxSoundPresenter { public: MxWavePresenter() { Init(); } virtual ~MxWavePresenter() override; // vtable+0x00 - // OFFSET: LEGO1 0x1000d6c0 + // FUNCTION: LEGO1 0x1000d6c0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f07b4 + // GLOBAL: LEGO1 0x100f07b4 return "MxWavePresenter"; } - // OFFSET: LEGO1 0x1000d6d0 + // FUNCTION: LEGO1 0x1000d6d0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, MxWavePresenter::ClassName()) || MxSoundPresenter::IsA(name); diff --git a/LEGO1/pizza.cpp b/LEGO1/pizza.cpp index 13df0739..1a07d27a 100644 --- a/LEGO1/pizza.cpp +++ b/LEGO1/pizza.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(Pizza, 0x9c); -// OFFSET: LEGO1 0x10037ef0 +// FUNCTION: LEGO1 0x10037ef0 Pizza::Pizza() { this->m_unk7c = 0; @@ -14,13 +14,13 @@ Pizza::Pizza() this->m_unk90 = 0x80000000; } -// OFFSET: LEGO1 0x10038100 +// FUNCTION: LEGO1 0x10038100 Pizza::~Pizza() { TickleManager()->UnregisterClient(this); } -// OFFSET: LEGO1 0x100388a0 STUB +// STUB: LEGO1 0x100388a0 MxResult Pizza::Tickle() { // TODO diff --git a/LEGO1/pizza.h b/LEGO1/pizza.h index eed42084..b92f21ac 100644 --- a/LEGO1/pizza.h +++ b/LEGO1/pizza.h @@ -8,7 +8,7 @@ #include "mxticklemanager.h" #include "mxtypes.h" -// VTABLE 0x100d7380 +// VTABLE: LEGO1 0x100d7380 // SIZE 0x9c class Pizza : public IsleActor { public: @@ -17,14 +17,14 @@ class Pizza : public IsleActor { virtual MxResult Tickle() override; // vtable+08 - // OFFSET: LEGO1 0x10037f90 + // FUNCTION: LEGO1 0x10037f90 inline const char* ClassName() const // vtable+0c { - // 0x100f038c + // GLOBAL: LEGO1 0x100f038c return "Pizza"; } - // OFFSET: LEGO1 0x10037fa0 + // FUNCTION: LEGO1 0x10037fa0 inline MxBool IsA(const char* name) const override // vtable+10 { return !strcmp(name, Pizza::ClassName()) || IsleActor::IsA(name); diff --git a/LEGO1/pizzamissionstate.cpp b/LEGO1/pizzamissionstate.cpp index 83d5457c..7b2c3628 100644 --- a/LEGO1/pizzamissionstate.cpp +++ b/LEGO1/pizzamissionstate.cpp @@ -3,7 +3,7 @@ DECOMP_SIZE_ASSERT(PizzaMissionStateEntry, 0x20) DECOMP_SIZE_ASSERT(PizzaMissionState, 0xb0) -// OFFSET: LEGO1 0x10039510 +// FUNCTION: LEGO1 0x10039510 PizzaMissionStateEntry* PizzaMissionState::GetState(MxU8 id) { for (MxS16 i = 0; i < 5; i++) diff --git a/LEGO1/pizzamissionstate.h b/LEGO1/pizzamissionstate.h index 451223c6..50db4af1 100644 --- a/LEGO1/pizzamissionstate.h +++ b/LEGO1/pizzamissionstate.h @@ -12,17 +12,17 @@ struct PizzaMissionStateEntry { undefined m_unk18[6]; }; -// VTABLE 0x100d7408 +// VTABLE: LEGO1 0x100d7408 class PizzaMissionState : public LegoState { public: - // OFFSET: LEGO1 0x10039290 + // FUNCTION: LEGO1 0x10039290 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f00d4 + // GLOBAL: LEGO1 0x100f00d4 return "PizzaMissionState"; } - // OFFSET: LEGO1 0x100392a0 + // FUNCTION: LEGO1 0x100392a0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, PizzaMissionState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/pizzeria.h b/LEGO1/pizzeria.h index a06aa9e5..f656716c 100644 --- a/LEGO1/pizzeria.h +++ b/LEGO1/pizzeria.h @@ -3,18 +3,18 @@ #include "isleactor.h" -// VTABLE 0x100d5520 +// VTABLE: LEGO1 0x100d5520 // SIZE 0x84 class Pizzeria : public IsleActor { public: - // OFFSET: LEGO1 0x1000e780 + // FUNCTION: LEGO1 0x1000e780 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0380 + // GLOBAL: LEGO1 0x100f0380 return "Pizzeria"; } - // OFFSET: LEGO1 0x1000e790 + // FUNCTION: LEGO1 0x1000e790 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Pizzeria::ClassName()) || IsleActor::IsA(name); diff --git a/LEGO1/pizzeriastate.cpp b/LEGO1/pizzeriastate.cpp index 0515d298..ea54a028 100644 --- a/LEGO1/pizzeriastate.cpp +++ b/LEGO1/pizzeriastate.cpp @@ -1,6 +1,6 @@ #include "pizzeriastate.h" -// OFFSET: LEGO1 0x10017af0 STUB +// STUB: LEGO1 0x10017af0 PizzeriaState::PizzeriaState() { // TODO diff --git a/LEGO1/pizzeriastate.h b/LEGO1/pizzeriastate.h index 76cb1728..d8256b78 100644 --- a/LEGO1/pizzeriastate.h +++ b/LEGO1/pizzeriastate.h @@ -3,20 +3,20 @@ #include "legostate.h" -// VTABLE 0x100d5ee8 +// VTABLE: LEGO1 0x100d5ee8 // SIZE 0xb4 class PizzeriaState : public LegoState { public: PizzeriaState(); - // OFFSET: LEGO1 0x10017c20 + // FUNCTION: LEGO1 0x10017c20 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0370 + // GLOBAL: LEGO1 0x100f0370 return "PizzeriaState"; } - // OFFSET: LEGO1 0x10017c30 + // FUNCTION: LEGO1 0x10017c30 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, PizzeriaState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/police.cpp b/LEGO1/police.cpp index e5909526..a8b409f3 100644 --- a/LEGO1/police.cpp +++ b/LEGO1/police.cpp @@ -1,18 +1,18 @@ #include "police.h" -// OFFSET: LEGO1 0x1005e130 STUB +// STUB: LEGO1 0x1005e130 Police::Police() { // TODO } -// OFFSET: LEGO1 0x1005e320 STUB +// STUB: LEGO1 0x1005e320 Police::~Police() { // TODO } -// OFFSET: LEGO1 0x1005e480 STUB +// STUB: LEGO1 0x1005e480 MxLong Police::Notify(MxParam& p) { // TODO diff --git a/LEGO1/police.h b/LEGO1/police.h index 0d661507..a6b32852 100644 --- a/LEGO1/police.h +++ b/LEGO1/police.h @@ -3,7 +3,7 @@ #include "legoworld.h" -// VTABLE 0x100d8a80 +// VTABLE: LEGO1 0x100d8a80 // SIZE 0x110 // Radio at 0xf8 class Police : public LegoWorld { @@ -13,14 +13,14 @@ class Police : public LegoWorld { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 - // OFFSET: LEGO1 0x1005e1e0 + // FUNCTION: LEGO1 0x1005e1e0 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x100f0450 + // GLOBAL: LEGO1 0x100f0450 return "Police"; } - // OFFSET: LEGO1 0x1005e1f0 + // FUNCTION: LEGO1 0x1005e1f0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Police::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/policeentity.h b/LEGO1/policeentity.h index c4aa6ba9..49e7e492 100644 --- a/LEGO1/policeentity.h +++ b/LEGO1/policeentity.h @@ -3,18 +3,18 @@ #include "buildingentity.h" -// VTABLE 0x100d4ab0 +// VTABLE: LEGO1 0x100d4ab0 // SIZE 0x68 class PoliceEntity : public BuildingEntity { public: - // OFFSET: LEGO1 0x1000ed60 + // FUNCTION: LEGO1 0x1000ed60 inline virtual const char* ClassName() const override // vtable+0xc { - // 0x100f0328 + // GLOBAL: LEGO1 0x100f0328 return "PoliceEntity"; } - // OFFSET: LEGO1 0x1000ed70 + // FUNCTION: LEGO1 0x1000ed70 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, PoliceEntity::ClassName()) || BuildingEntity::IsA(name); diff --git a/LEGO1/policestate.cpp b/LEGO1/policestate.cpp index 4e6fba76..a2c66a45 100644 --- a/LEGO1/policestate.cpp +++ b/LEGO1/policestate.cpp @@ -1,6 +1,6 @@ #include "policestate.h" -// OFFSET: LEGO1 0x1005e7c0 STUB +// STUB: LEGO1 0x1005e7c0 PoliceState::PoliceState() { // TODO diff --git a/LEGO1/policestate.h b/LEGO1/policestate.h index f126a78b..603a4f6c 100644 --- a/LEGO1/policestate.h +++ b/LEGO1/policestate.h @@ -3,20 +3,20 @@ #include "legostate.h" -// VTABLE 0x100d8af0 +// VTABLE: LEGO1 0x100d8af0 // SIZE 0x10 class PoliceState : public LegoState { public: PoliceState(); - // OFFSET: LEGO1 0x1005e860 + // FUNCTION: LEGO1 0x1005e860 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0444 + // GLOBAL: LEGO1 0x100f0444 return "PoliceState"; } - // OFFSET: LEGO1 0x1005e870 + // FUNCTION: LEGO1 0x1005e870 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, PoliceState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/racecar.cpp b/LEGO1/racecar.cpp index ad2dc06c..207c02c9 100644 --- a/LEGO1/racecar.cpp +++ b/LEGO1/racecar.cpp @@ -2,13 +2,13 @@ DECOMP_SIZE_ASSERT(RaceCar, 0x164); -// OFFSET: LEGO1 0x10028200 +// FUNCTION: LEGO1 0x10028200 RaceCar::RaceCar() { this->m_unk13c = 40.0; } -// OFFSET: LEGO1 0x10028420 STUB +// STUB: LEGO1 0x10028420 RaceCar::~RaceCar() { // TODO diff --git a/LEGO1/racecar.h b/LEGO1/racecar.h index f07a2540..01ca89c5 100644 --- a/LEGO1/racecar.h +++ b/LEGO1/racecar.h @@ -4,21 +4,21 @@ #include "decomp.h" #include "islepathactor.h" -// VTABLE 0x100d6918 +// VTABLE: LEGO1 0x100d6918 // SIZE 0x164 class RaceCar : public IslePathActor { public: RaceCar(); virtual ~RaceCar() override; // vtable+0x0 - // OFFSET: LEGO1 0x10028270 + // FUNCTION: LEGO1 0x10028270 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f03e0 + // GLOBAL: LEGO1 0x100f03e0 return "RaceCar"; } - // OFFSET: LEGO1 0x10028280 + // FUNCTION: LEGO1 0x10028280 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, RaceCar::ClassName()) || IslePathActor::IsA(name); diff --git a/LEGO1/racestandsentity.h b/LEGO1/racestandsentity.h index 532d401b..a7359df8 100644 --- a/LEGO1/racestandsentity.h +++ b/LEGO1/racestandsentity.h @@ -3,7 +3,7 @@ #include "buildingentity.h" -// VTABLE 0x100d48a8 +// VTABLE: LEGO1 0x100d48a8 // SIZE 0x68 class RaceStandsEntity : public BuildingEntity {}; diff --git a/LEGO1/racestate.cpp b/LEGO1/racestate.cpp index a690323e..61511536 100644 --- a/LEGO1/racestate.cpp +++ b/LEGO1/racestate.cpp @@ -5,13 +5,13 @@ DECOMP_SIZE_ASSERT(RaceStateEntry, 0x06) // TODO: Must be 0x2c but current structure is incorrect // DECOMP_SIZE_ASSERT(RaceState, 0x2c) -// OFFSET: LEGO1 0x10015f30 STUB +// STUB: LEGO1 0x10015f30 RaceState::RaceState() { // TODO } -// OFFSET: LEGO1 0x10016280 +// FUNCTION: LEGO1 0x10016280 RaceStateEntry* RaceState::GetState(MxU8 id) { for (MxS16 i = 0;; i++) { diff --git a/LEGO1/racestate.h b/LEGO1/racestate.h index 9cc8f364..3ed0c429 100644 --- a/LEGO1/racestate.h +++ b/LEGO1/racestate.h @@ -11,20 +11,20 @@ struct RaceStateEntry { MxU16 m_color; }; -// VTABLE 0x100d5e30 +// VTABLE: LEGO1 0x100d5e30 // SIZE 0x2c class RaceState : public LegoState { public: RaceState(); - // OFFSET: LEGO1 0x10016010 + // FUNCTION: LEGO1 0x10016010 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f07d0 + // GLOBAL: LEGO1 0x100f07d0 return "RaceState"; } - // OFFSET: LEGO1 0x10016020 + // FUNCTION: LEGO1 0x10016020 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, RaceState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/radio.cpp b/LEGO1/radio.cpp index 8ed47409..e2c8e82d 100644 --- a/LEGO1/radio.cpp +++ b/LEGO1/radio.cpp @@ -1,6 +1,6 @@ #include "radio.h" -// OFFSET: LEGO1 0x1002c990 STUB +// STUB: LEGO1 0x1002c990 Radio::~Radio() { // TODO diff --git a/LEGO1/radio.h b/LEGO1/radio.h index e2a4325c..1c4ae4de 100644 --- a/LEGO1/radio.h +++ b/LEGO1/radio.h @@ -3,19 +3,19 @@ #include "mxcore.h" -// VTABLE 0x100d6d10 +// VTABLE: LEGO1 0x100d6d10 class Radio : public MxCore { public: virtual ~Radio() override; - // OFFSET: LEGO1 0x1002c8e0 + // FUNCTION: LEGO1 0x1002c8e0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f328c + // GLOBAL: LEGO1 0x100f328c return "Radio"; } - // OFFSET: LEGO1 0x1002c8f0 + // FUNCTION: LEGO1 0x1002c8f0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Radio::ClassName()) || MxCore::IsA(name); diff --git a/LEGO1/radiostate.cpp b/LEGO1/radiostate.cpp index f3d2e8db..012eea68 100644 --- a/LEGO1/radiostate.cpp +++ b/LEGO1/radiostate.cpp @@ -1,6 +1,6 @@ #include "radiostate.h" -// OFFSET: LEGO1 0x1002ce10 STUB +// STUB: LEGO1 0x1002ce10 RadioState::RadioState() { // TODO diff --git a/LEGO1/radiostate.h b/LEGO1/radiostate.h index 58b75978..20ae9ac6 100644 --- a/LEGO1/radiostate.h +++ b/LEGO1/radiostate.h @@ -3,20 +3,20 @@ #include "legostate.h" -// VTABLE 0x100d6d28 +// VTABLE: LEGO1 0x100d6d28 // SIZE 0x30 class RadioState : public LegoState { public: RadioState(); - // OFFSET: LEGO1 0x1002cf60 + // FUNCTION: LEGO1 0x1002cf60 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f04f8 + // GLOBAL: LEGO1 0x100f04f8 return "RadioState"; } - // OFFSET: LEGO1 0x1002cf70 + // FUNCTION: LEGO1 0x1002cf70 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, RadioState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/realtime/matrix.cpp b/LEGO1/realtime/matrix.cpp index b36a06ff..7b2a94b3 100644 --- a/LEGO1/realtime/matrix.cpp +++ b/LEGO1/realtime/matrix.cpp @@ -10,61 +10,61 @@ DECOMP_SIZE_ASSERT(Matrix4, 0x40); DECOMP_SIZE_ASSERT(Matrix4Impl, 0x8); DECOMP_SIZE_ASSERT(Matrix4Data, 0x48); -// OFFSET: LEGO1 0x10002320 +// FUNCTION: LEGO1 0x10002320 void Matrix4Impl::EqualsMatrixData(const Matrix4& p_matrix) { *m_data = p_matrix; } -// OFFSET: LEGO1 0x10002340 +// FUNCTION: LEGO1 0x10002340 void Matrix4Impl::EqualsMatrixImpl(const Matrix4Impl* p_other) { *m_data = *p_other->m_data; } -// OFFSET: LEGO1 0x10002360 +// FUNCTION: LEGO1 0x10002360 void Matrix4Impl::AnotherSetData(Matrix4& p_data) { m_data = &p_data; } -// OFFSET: LEGO1 0x10002370 +// FUNCTION: LEGO1 0x10002370 void Matrix4Impl::SetData(Matrix4& p_data) { m_data = &p_data; } -// OFFSET: LEGO1 0x10002380 +// FUNCTION: LEGO1 0x10002380 const Matrix4* Matrix4Impl::GetData() const { return m_data; } -// OFFSET: LEGO1 0x10002390 +// FUNCTION: LEGO1 0x10002390 Matrix4* Matrix4Impl::GetData() { return m_data; } -// OFFSET: LEGO1 0x100023a0 +// FUNCTION: LEGO1 0x100023a0 const float* Matrix4Impl::Element(int p_row, int p_col) const { return &(*m_data)[p_row][p_col]; } -// OFFSET: LEGO1 0x100023c0 +// FUNCTION: LEGO1 0x100023c0 float* Matrix4Impl::Element(int p_row, int p_col) { return &(*m_data)[p_row][p_col]; } -// OFFSET: LEGO1 0x100023e0 +// FUNCTION: LEGO1 0x100023e0 void Matrix4Impl::Clear() { memset(m_data, 0, 16 * sizeof(float)); } -// OFFSET: LEGO1 0x100023f0 +// FUNCTION: LEGO1 0x100023f0 void Matrix4Impl::SetIdentity() { Clear(); @@ -74,7 +74,7 @@ void Matrix4Impl::SetIdentity() (*m_data)[3][3] = 1.0f; } -// OFFSET: LEGO1 0x10002430 +// FUNCTION: LEGO1 0x10002430 Matrix4Impl* Matrix4Impl::operator+=(const Matrix4& p_matrix) { for (int i = 0; i < 16; ++i) @@ -84,7 +84,7 @@ Matrix4Impl* Matrix4Impl::operator+=(const Matrix4& p_matrix) // Matches but instructions are significantly out of order. Probably not wrong // code given that the very similar SetTranslation does match. -// OFFSET: LEGO1 0x10002460 +// FUNCTION: LEGO1 0x10002460 void Matrix4Impl::TranslateBy(const float* p_x, const float* p_y, const float* p_z) { ((float*) m_data)[12] += *p_x; @@ -92,7 +92,7 @@ void Matrix4Impl::TranslateBy(const float* p_x, const float* p_y, const float* p ((float*) m_data)[14] += *p_z; } -// OFFSET: LEGO1 0x100024a0 +// FUNCTION: LEGO1 0x100024a0 void Matrix4Impl::SetTranslation(const float* p_x, const float* p_y, const float* p_z) { (*m_data)[3][0] = *p_x; @@ -100,7 +100,7 @@ void Matrix4Impl::SetTranslation(const float* p_x, const float* p_y, const float (*m_data)[3][2] = *p_z; } -// OFFSET: LEGO1 0x100024d0 +// FUNCTION: LEGO1 0x100024d0 void Matrix4Impl::EqualsDataProduct(const Matrix4& p_a, const Matrix4& p_b) { float* cur = (float*) m_data; @@ -115,7 +115,7 @@ void Matrix4Impl::EqualsDataProduct(const Matrix4& p_a, const Matrix4& p_b) } } -// OFFSET: LEGO1 0x10002530 +// FUNCTION: LEGO1 0x10002530 void Matrix4Impl::EqualsMxProduct(const Matrix4Impl* p_a, const Matrix4Impl* p_b) { EqualsDataProduct(*p_a->m_data, *p_b->m_data); @@ -124,7 +124,7 @@ void Matrix4Impl::EqualsMxProduct(const Matrix4Impl* p_a, const Matrix4Impl* p_b // Not close, Ghidra struggles understinging this method so it will have to // be manually worked out. Included since I at least figured out what it was // doing with rotateIndex and what overall operation it's trying to do. -// OFFSET: LEGO1 0x10002550 STUB +// STUB: LEGO1 0x10002550 void Matrix4Impl::ToQuaternion(Vector4Impl* p_outQuat) { /* @@ -138,7 +138,7 @@ void Matrix4Impl::ToQuaternion(Vector4Impl* p_outQuat) return; } - // 0x100d4090 + // GLOBAL: LEGO1 0x100d4090 static int rotateIndex[] = {1, 2, 0}; // Largest element along the trace @@ -167,19 +167,19 @@ void Matrix4Impl::ToQuaternion(Vector4Impl* p_outQuat) // No idea what this function is doing and it will be hard to tell until // we have a confirmed usage site. -// OFFSET: LEGO1 0x10002710 STUB +// STUB: LEGO1 0x10002710 int Matrix4Impl::FUN_10002710(const Vector3Impl* p_vec) { return -1; } -// OFFSET: LEGO1 0x10002850 +// FUNCTION: LEGO1 0x10002850 void Matrix4Impl::operator=(const Matrix4Impl& p_other) { EqualsMatrixImpl(&p_other); } -// OFFSET: LEGO1 0x10002860 +// FUNCTION: LEGO1 0x10002860 void Matrix4Data::operator=(const Matrix4Data& p_other) { EqualsMatrixImpl(&p_other); diff --git a/LEGO1/realtime/matrix.h b/LEGO1/realtime/matrix.h index 4f65e50b..a577815f 100644 --- a/LEGO1/realtime/matrix.h +++ b/LEGO1/realtime/matrix.h @@ -31,7 +31,7 @@ class Matrix4 { float* operator[](long i) { return rows[i]; } }; -// VTABLE 0x100d4350 +// VTABLE: LEGO1 0x100d4350 // SIZE 0x8 class Matrix4Impl { public: @@ -72,7 +72,7 @@ class Matrix4Impl { Matrix4* m_data; }; -// VTABLE 0x100d4300 +// VTABLE: LEGO1 0x100d4300 // SIZE 0x48 class Matrix4Data : public Matrix4Impl { public: diff --git a/LEGO1/realtime/orientableroi.cpp b/LEGO1/realtime/orientableroi.cpp index a1fd6832..651a1ac7 100644 --- a/LEGO1/realtime/orientableroi.cpp +++ b/LEGO1/realtime/orientableroi.cpp @@ -4,14 +4,14 @@ DECOMP_SIZE_ASSERT(OrientableROI, 0xdc) -// OFFSET: LEGO1 0x100a5910 +// FUNCTION: LEGO1 0x100a5910 void OrientableROI::VTable0x1c() { UpdateWorldBoundingVolumes(); UpdateWorldVelocity(); } -// OFFSET: LEGO1 0x100a5930 +// FUNCTION: LEGO1 0x100a5930 void OrientableROI::SetLocalTransform(const Matrix4Impl& p_transform) { reinterpret_cast(m_local2world) = p_transform; @@ -19,7 +19,7 @@ void OrientableROI::SetLocalTransform(const Matrix4Impl& p_transform) UpdateWorldVelocity(); } -// OFFSET: LEGO1 0x100a5960 +// FUNCTION: LEGO1 0x100a5960 void OrientableROI::VTable0x24(const Matrix4Data& p_transform) { Matrix4Data l_matrix(m_local2world); @@ -28,7 +28,7 @@ void OrientableROI::VTable0x24(const Matrix4Data& p_transform) UpdateWorldVelocity(); } -// OFFSET: LEGO1 0x100a59b0 +// FUNCTION: LEGO1 0x100a59b0 void OrientableROI::UpdateWorldData(const Matrix4Data& p_transform) { Matrix4Data l_matrix(m_local2world); @@ -44,24 +44,24 @@ void OrientableROI::UpdateWorldData(const Matrix4Data& p_transform) } } -// OFFSET: LEGO1 0x100a5a50 +// FUNCTION: LEGO1 0x100a5a50 void OrientableROI::UpdateWorldVelocity() { } -// OFFSET: LEGO1 0x100a5d80 +// FUNCTION: LEGO1 0x100a5d80 const Vector3& OrientableROI::GetWorldVelocity() const { return (Vector3&) *m_world_velocity.GetData(); } -// OFFSET: LEGO1 0x100a5d90 +// FUNCTION: LEGO1 0x100a5d90 const BoundingBox& OrientableROI::GetWorldBoundingBox() const { return m_world_bounding_box; } -// OFFSET: LEGO1 0x100a5da0 +// FUNCTION: LEGO1 0x100a5da0 const BoundingSphere& OrientableROI::GetWorldBoundingSphere() const { return m_world_bounding_sphere; diff --git a/LEGO1/realtime/orientableroi.h b/LEGO1/realtime/orientableroi.h index 958ca322..bb14815b 100644 --- a/LEGO1/realtime/orientableroi.h +++ b/LEGO1/realtime/orientableroi.h @@ -6,7 +6,7 @@ class OrientableROI : public ROI { public: - // OFFSET: LEGO1 0x100a4420 + // FUNCTION: LEGO1 0x100a4420 OrientableROI() { FILLVEC3(m_world_bounding_box.Min(), 888888.8); @@ -16,7 +16,7 @@ class OrientableROI : public ROI { ZEROVEC3(m_world_velocity); IDENTMAT4(m_local2world.GetMatrix()); } - // OFFSET: LEGO1 0x100a4630 TEMPLATE + // SYNTHETIC: LEGO1 0x100a4630 // OrientableROI::`scalar deleting destructor' virtual const Vector3& GetWorldVelocity() const; diff --git a/LEGO1/realtime/realtime.cpp b/LEGO1/realtime/realtime.cpp index d2eea110..750082ec 100644 --- a/LEGO1/realtime/realtime.cpp +++ b/LEGO1/realtime/realtime.cpp @@ -1,6 +1,6 @@ #include "realtime.h" -// OFFSET: LEGO1 0x100a5b40 +// FUNCTION: LEGO1 0x100a5b40 void CalcLocalTransform( const Vector3Impl& p_posVec, const Vector3Impl& p_dirVec, diff --git a/LEGO1/realtime/realtimeview.cpp b/LEGO1/realtime/realtimeview.cpp index 6d47547b..5d1fc1a6 100644 --- a/LEGO1/realtime/realtimeview.cpp +++ b/LEGO1/realtime/realtimeview.cpp @@ -2,45 +2,45 @@ #include -// 0x10109598 +// GLOBAL: LEGO1 0x10109598 float g_userMaxLodPower; -// 0x10101044 +// GLOBAL: LEGO1 0x10101044 float g_userMaxBase = 4.0f; -// 0x10101048 +// GLOBAL: LEGO1 0x10101048 float g_userMaxLod = 3.6f; -// 0x1010104c +// GLOBAL: LEGO1 0x1010104c float g_partsThreshold = 1000.0f; -// OFFSET: LEGO1 0x100a5de0 +// FUNCTION: LEGO1 0x100a5de0 void RealtimeView::SetUserMaxLOD(float p_lod) { g_userMaxLod = p_lod; UpdateMaxLOD(); } -// OFFSET: LEGO1 0x100a5df0 +// FUNCTION: LEGO1 0x100a5df0 void RealtimeView::SetPartsThreshold(float p_threshold) { g_partsThreshold = p_threshold; } -// OFFSET: LEGO1 0x100a5e00 +// FUNCTION: LEGO1 0x100a5e00 float RealtimeView::GetUserMaxLOD() { // TODO return 0; } -// OFFSET: LEGO1 0x100a5e10 +// FUNCTION: LEGO1 0x100a5e10 float RealtimeView::GetPartsThreshold() { return g_partsThreshold; } -// OFFSET: LEGO1 0x100a5e20 +// FUNCTION: LEGO1 0x100a5e20 void RealtimeView::UpdateMaxLOD() { g_userMaxLodPower = pow(g_userMaxBase, -g_userMaxLod); diff --git a/LEGO1/realtime/vector.cpp b/LEGO1/realtime/vector.cpp index 5223903e..1d41470c 100644 --- a/LEGO1/realtime/vector.cpp +++ b/LEGO1/realtime/vector.cpp @@ -12,58 +12,58 @@ DECOMP_SIZE_ASSERT(Vector4Impl, 0x8); DECOMP_SIZE_ASSERT(Vector3Data, 0x14); DECOMP_SIZE_ASSERT(Vector4Data, 0x18); -// OFFSET: LEGO1 0x10001f80 +// FUNCTION: LEGO1 0x10001f80 void Vector2Impl::AddVectorImpl(float* p_value) { m_data[0] += p_value[0]; m_data[1] += p_value[1]; } -// OFFSET: LEGO1 0x10001fa0 +// FUNCTION: LEGO1 0x10001fa0 void Vector2Impl::AddScalarImpl(float p_value) { m_data[0] += p_value; m_data[1] += p_value; } -// OFFSET: LEGO1 0x10001fc0 +// FUNCTION: LEGO1 0x10001fc0 void Vector2Impl::SubVectorImpl(float* p_value) { m_data[0] -= p_value[0]; m_data[1] -= p_value[1]; } -// OFFSET: LEGO1 0x10001fe0 +// FUNCTION: LEGO1 0x10001fe0 void Vector2Impl::MullVectorImpl(float* p_value) { m_data[0] *= p_value[0]; m_data[1] *= p_value[1]; } -// OFFSET: LEGO1 0x10002000 +// FUNCTION: LEGO1 0x10002000 void Vector2Impl::MullScalarImpl(float* p_value) { m_data[0] *= *p_value; m_data[1] *= *p_value; } -// OFFSET: LEGO1 0x10002020 +// FUNCTION: LEGO1 0x10002020 void Vector2Impl::DivScalarImpl(float* p_value) { m_data[0] /= *p_value; m_data[1] /= *p_value; } -// OFFSET: LEGO1 0x10002040 +// FUNCTION: LEGO1 0x10002040 float Vector2Impl::DotImpl(float* p_a, float* p_b) const { return p_b[0] * p_a[0] + p_b[1] * p_a[1]; } -// OFFSET: LEGO1 0x10002060 TEMPLATE +// FUNCTION: LEGO1 0x10002060 // Vector2Impl::SetData -// OFFSET: LEGO1 0x10002070 +// FUNCTION: LEGO1 0x10002070 void Vector2Impl::EqualsImpl(float* p_data) { float* vec = m_data; @@ -71,19 +71,19 @@ void Vector2Impl::EqualsImpl(float* p_data) vec[1] = p_data[1]; } -// OFFSET: LEGO1 0x10002090 +// FUNCTION: LEGO1 0x10002090 float* Vector2Impl::GetData() { return m_data; } -// OFFSET: LEGO1 0x100020a0 +// FUNCTION: LEGO1 0x100020a0 const float* Vector2Impl::GetData() const { return m_data; } -// OFFSET: LEGO1 0x100020b0 +// FUNCTION: LEGO1 0x100020b0 void Vector2Impl::Clear() { float* vec = m_data; @@ -91,37 +91,37 @@ void Vector2Impl::Clear() vec[1] = 0.0f; } -// OFFSET: LEGO1 0x100020d0 +// FUNCTION: LEGO1 0x100020d0 float Vector2Impl::Dot(float* p_a, float* p_b) const { return DotImpl(p_a, p_b); } -// OFFSET: LEGO1 0x100020f0 +// FUNCTION: LEGO1 0x100020f0 float Vector2Impl::Dot(Vector2Impl* p_a, Vector2Impl* p_b) const { return DotImpl(p_a->m_data, p_b->m_data); } -// OFFSET: LEGO1 0x10002110 +// FUNCTION: LEGO1 0x10002110 float Vector2Impl::Dot(float* p_a, Vector2Impl* p_b) const { return DotImpl(p_a, p_b->m_data); } -// OFFSET: LEGO1 0x10002130 +// FUNCTION: LEGO1 0x10002130 float Vector2Impl::Dot(Vector2Impl* p_a, float* p_b) const { return DotImpl(p_a->m_data, p_b); } -// OFFSET: LEGO1 0x10002150 +// FUNCTION: LEGO1 0x10002150 float Vector2Impl::LenSquared() const { return m_data[0] * m_data[0] + m_data[1] * m_data[1]; } -// OFFSET: LEGO1 0x10002160 +// FUNCTION: LEGO1 0x10002160 int Vector2Impl::Unitize() { float sq = LenSquared(); @@ -135,73 +135,73 @@ int Vector2Impl::Unitize() return -1; } -// OFFSET: LEGO1 0x100021c0 +// FUNCTION: LEGO1 0x100021c0 void Vector2Impl::AddScalar(float p_value) { AddScalarImpl(p_value); } -// OFFSET: LEGO1 0x100021d0 +// FUNCTION: LEGO1 0x100021d0 void Vector2Impl::AddVector(float* p_other) { AddVectorImpl(p_other); } -// OFFSET: LEGO1 0x100021e0 +// FUNCTION: LEGO1 0x100021e0 void Vector2Impl::AddVector(Vector2Impl* p_other) { AddVectorImpl(p_other->m_data); } -// OFFSET: LEGO1 0x100021f0 +// FUNCTION: LEGO1 0x100021f0 void Vector2Impl::SubVector(float* p_other) { SubVectorImpl(p_other); } -// OFFSET: LEGO1 0x10002200 +// FUNCTION: LEGO1 0x10002200 void Vector2Impl::SubVector(Vector2Impl* p_other) { SubVectorImpl(p_other->m_data); } -// OFFSET: LEGO1 0x10002210 +// FUNCTION: LEGO1 0x10002210 void Vector2Impl::MullVector(float* p_other) { MullVectorImpl(p_other); } -// OFFSET: LEGO1 0x10002220 +// FUNCTION: LEGO1 0x10002220 void Vector2Impl::MullVector(Vector2Impl* p_other) { MullVectorImpl(p_other->m_data); } -// OFFSET: LEGO1 0x10002230 +// FUNCTION: LEGO1 0x10002230 void Vector2Impl::MullScalar(float* p_value) { MullScalarImpl(p_value); } -// OFFSET: LEGO1 0x10002240 +// FUNCTION: LEGO1 0x10002240 void Vector2Impl::DivScalar(float* p_value) { DivScalarImpl(p_value); } -// OFFSET: LEGO1 0x10002250 +// FUNCTION: LEGO1 0x10002250 void Vector2Impl::SetVector(float* p_other) { EqualsImpl(p_other); } -// OFFSET: LEGO1 0x10002260 +// FUNCTION: LEGO1 0x10002260 void Vector2Impl::SetVector(Vector2Impl* p_other) { EqualsImpl(p_other->m_data); } -// OFFSET: LEGO1 0x10002270 +// FUNCTION: LEGO1 0x10002270 void Vector3Impl::EqualsCrossImpl(float* p_a, float* p_b) { m_data[0] = p_a[1] * p_b[2] - p_a[2] * p_b[1]; @@ -209,25 +209,25 @@ void Vector3Impl::EqualsCrossImpl(float* p_a, float* p_b) m_data[2] = p_a[0] * p_b[1] - p_a[1] * p_b[0]; } -// OFFSET: LEGO1 0x100022c0 +// FUNCTION: LEGO1 0x100022c0 void Vector3Impl::EqualsCross(Vector3Impl* p_a, Vector3Impl* p_b) { EqualsCrossImpl(p_a->m_data, p_b->m_data); } -// OFFSET: LEGO1 0x100022e0 +// FUNCTION: LEGO1 0x100022e0 void Vector3Impl::EqualsCross(Vector3Impl* p_a, float* p_b) { EqualsCrossImpl(p_a->m_data, p_b); } -// OFFSET: LEGO1 0x10002300 +// FUNCTION: LEGO1 0x10002300 void Vector3Impl::EqualsCross(float* p_a, Vector3Impl* p_b) { EqualsCrossImpl(p_a, p_b->m_data); } -// OFFSET: LEGO1 0x10002870 +// FUNCTION: LEGO1 0x10002870 void Vector4Impl::AddVectorImpl(float* p_value) { m_data[0] += p_value[0]; @@ -236,7 +236,7 @@ void Vector4Impl::AddVectorImpl(float* p_value) m_data[3] += p_value[3]; } -// OFFSET: LEGO1 0x100028b0 +// FUNCTION: LEGO1 0x100028b0 void Vector4Impl::AddScalarImpl(float p_value) { m_data[0] += p_value; @@ -245,7 +245,7 @@ void Vector4Impl::AddScalarImpl(float p_value) m_data[3] += p_value; } -// OFFSET: LEGO1 0x100028f0 +// FUNCTION: LEGO1 0x100028f0 void Vector4Impl::SubVectorImpl(float* p_value) { m_data[0] -= p_value[0]; @@ -254,7 +254,7 @@ void Vector4Impl::SubVectorImpl(float* p_value) m_data[3] -= p_value[3]; } -// OFFSET: LEGO1 0x10002930 +// FUNCTION: LEGO1 0x10002930 void Vector4Impl::MullVectorImpl(float* p_value) { m_data[0] *= p_value[0]; @@ -263,7 +263,7 @@ void Vector4Impl::MullVectorImpl(float* p_value) m_data[3] *= p_value[3]; } -// OFFSET: LEGO1 0x10002970 +// FUNCTION: LEGO1 0x10002970 void Vector4Impl::MullScalarImpl(float* p_value) { m_data[0] *= *p_value; @@ -272,7 +272,7 @@ void Vector4Impl::MullScalarImpl(float* p_value) m_data[3] *= *p_value; } -// OFFSET: LEGO1 0x100029b0 +// FUNCTION: LEGO1 0x100029b0 void Vector4Impl::DivScalarImpl(float* p_value) { m_data[0] /= *p_value; @@ -281,13 +281,13 @@ void Vector4Impl::DivScalarImpl(float* p_value) m_data[3] /= *p_value; } -// OFFSET: LEGO1 0x100029f0 +// FUNCTION: LEGO1 0x100029f0 float Vector4Impl::DotImpl(float* p_a, float* p_b) const { return p_a[0] * p_b[0] + p_a[2] * p_b[2] + (p_a[1] * p_b[1] + p_a[3] * p_b[3]); } -// OFFSET: LEGO1 0x10002a20 +// FUNCTION: LEGO1 0x10002a20 void Vector4Impl::EqualsImpl(float* p_data) { float* vec = m_data; @@ -297,7 +297,7 @@ void Vector4Impl::EqualsImpl(float* p_data) vec[3] = p_data[3]; } -// OFFSET: LEGO1 0x10002a40 +// FUNCTION: LEGO1 0x10002a40 void Vector4Impl::SetMatrixProductImpl(float* p_vec, float* p_mat) { m_data[0] = p_vec[0] * p_mat[0] + p_vec[1] * p_mat[4] + p_vec[2] * p_mat[8] + p_vec[3] * p_mat[12]; @@ -306,13 +306,13 @@ void Vector4Impl::SetMatrixProductImpl(float* p_vec, float* p_mat) m_data[3] = p_vec[0] * p_mat[3] + p_vec[1] * p_mat[7] + p_vec[2] * p_mat[11] + p_vec[4] * p_mat[15]; } -// OFFSET: LEGO1 0x10002ae0 +// FUNCTION: LEGO1 0x10002ae0 void Vector4Impl::SetMatrixProduct(Vector4Impl* p_a, float* p_b) { SetMatrixProductImpl(p_a->m_data, p_b); } -// OFFSET: LEGO1 0x10002b00 +// FUNCTION: LEGO1 0x10002b00 void Vector4Impl::Clear() { float* vec = m_data; @@ -322,13 +322,13 @@ void Vector4Impl::Clear() vec[3] = 0.0f; } -// OFFSET: LEGO1 0x10002b20 +// FUNCTION: LEGO1 0x10002b20 float Vector4Impl::LenSquared() const { return m_data[1] * m_data[1] + m_data[0] * m_data[0] + m_data[2] * m_data[2] + m_data[3] * m_data[3]; } -// OFFSET: LEGO1 0x10002b40 +// FUNCTION: LEGO1 0x10002b40 void Vector4Impl::EqualsScalar(float* p_value) { m_data[0] = *p_value; @@ -339,7 +339,7 @@ void Vector4Impl::EqualsScalar(float* p_value) // Note close yet, included because I'm at least confident I know what operation // it's trying to do. -// OFFSET: LEGO1 0x10002b70 STUB +// STUB: LEGO1 0x10002b70 int Vector4Impl::NormalizeQuaternion() { float* v = m_data; @@ -357,7 +357,7 @@ int Vector4Impl::NormalizeQuaternion() return -1; } -// OFFSET: LEGO1 0x10002bf0 +// FUNCTION: LEGO1 0x10002bf0 void Vector4Impl::UnknownQuaternionOp(Vector4Impl* p_a, Vector4Impl* p_b) { float* bDat = p_b->m_data; @@ -373,7 +373,7 @@ void Vector4Impl::UnknownQuaternionOp(Vector4Impl* p_a, Vector4Impl* p_b) m_data[2] = p_b->m_data[2] * p_a->m_data[3] + p_a->m_data[2] * p_b->m_data[3] + m_data[2]; } -// OFFSET: LEGO1 0x10003a60 +// FUNCTION: LEGO1 0x10003a60 void Vector3Impl::AddVectorImpl(float* p_value) { m_data[0] += p_value[0]; @@ -381,7 +381,7 @@ void Vector3Impl::AddVectorImpl(float* p_value) m_data[2] += p_value[2]; } -// OFFSET: LEGO1 0x10003a90 +// FUNCTION: LEGO1 0x10003a90 void Vector3Impl::AddScalarImpl(float p_value) { m_data[0] += p_value; @@ -389,7 +389,7 @@ void Vector3Impl::AddScalarImpl(float p_value) m_data[2] += p_value; } -// OFFSET: LEGO1 0x10003ac0 +// FUNCTION: LEGO1 0x10003ac0 void Vector3Impl::SubVectorImpl(float* p_value) { m_data[0] -= p_value[0]; @@ -397,7 +397,7 @@ void Vector3Impl::SubVectorImpl(float* p_value) m_data[2] -= p_value[2]; } -// OFFSET: LEGO1 0x10003af0 +// FUNCTION: LEGO1 0x10003af0 void Vector3Impl::MullVectorImpl(float* p_value) { m_data[0] *= p_value[0]; @@ -405,7 +405,7 @@ void Vector3Impl::MullVectorImpl(float* p_value) m_data[2] *= p_value[2]; } -// OFFSET: LEGO1 0x10003b20 +// FUNCTION: LEGO1 0x10003b20 void Vector3Impl::MullScalarImpl(float* p_value) { m_data[0] *= *p_value; @@ -413,7 +413,7 @@ void Vector3Impl::MullScalarImpl(float* p_value) m_data[2] *= *p_value; } -// OFFSET: LEGO1 0x10003b50 +// FUNCTION: LEGO1 0x10003b50 void Vector3Impl::DivScalarImpl(float* p_value) { m_data[0] /= *p_value; @@ -421,13 +421,13 @@ void Vector3Impl::DivScalarImpl(float* p_value) m_data[2] /= *p_value; } -// OFFSET: LEGO1 0x10003b80 +// FUNCTION: LEGO1 0x10003b80 float Vector3Impl::DotImpl(float* p_a, float* p_b) const { return p_a[0] * p_b[0] + p_a[2] * p_b[2] + p_a[1] * p_b[1]; } -// OFFSET: LEGO1 0x10003ba0 +// FUNCTION: LEGO1 0x10003ba0 void Vector3Impl::EqualsImpl(float* p_data) { float* vec = m_data; @@ -436,7 +436,7 @@ void Vector3Impl::EqualsImpl(float* p_data) vec[2] = p_data[2]; } -// OFFSET: LEGO1 0x10003bc0 +// FUNCTION: LEGO1 0x10003bc0 void Vector3Impl::Clear() { float* vec = m_data; @@ -445,13 +445,13 @@ void Vector3Impl::Clear() vec[2] = 0.0f; } -// OFFSET: LEGO1 0x10003bd0 +// FUNCTION: LEGO1 0x10003bd0 float Vector3Impl::LenSquared() const { return m_data[1] * m_data[1] + m_data[0] * m_data[0] + m_data[2] * m_data[2]; } -// OFFSET: LEGO1 0x10003bf0 +// FUNCTION: LEGO1 0x10003bf0 void Vector3Impl::EqualsScalar(float* p_value) { m_data[0] = *p_value; diff --git a/LEGO1/realtime/vector.h b/LEGO1/realtime/vector.h index a530959c..ded96918 100644 --- a/LEGO1/realtime/vector.h +++ b/LEGO1/realtime/vector.h @@ -4,7 +4,7 @@ #include // TODO: Find proper compilation unit to put this -// OFFSET: LEGO1 0x1000c0f0 TEMPLATE +// FUNCTION: LEGO1 0x1000c0f0 // Vector2Impl::Vector2Impl /* @@ -60,7 +60,7 @@ struct Vector4 { float& operator[](long i) { return elements[i]; } }; -// VTABLE 0x100d4288 +// VTABLE: LEGO1 0x100d4288 // SIZE 0x8 class Vector2Impl { public: @@ -120,7 +120,7 @@ class Vector2Impl { float* m_data; }; -// VTABLE 0x100d4518 +// VTABLE: LEGO1 0x100d4518 // SIZE 0x8 class Vector3Impl : public Vector2Impl { public: @@ -152,7 +152,7 @@ class Vector3Impl : public Vector2Impl { inline void Fill(float p_value) { EqualsScalar(&p_value); } }; -// VTABLE 0x100d45a0 +// VTABLE: LEGO1 0x100d45a0 // SIZE 0x8 class Vector4Impl : public Vector3Impl { public: @@ -183,7 +183,7 @@ class Vector4Impl : public Vector3Impl { virtual void UnknownQuaternionOp(Vector4Impl* p_a, Vector4Impl* p_b); }; -// VTABLE 0x100d4488 +// VTABLE: LEGO1 0x100d4488 // SIZE 0x14 class Vector3Data : public Vector3Impl { public: @@ -204,7 +204,7 @@ class Vector3Data : public Vector3Impl { Vector3 m_vector; }; -// VTABLE 0x100d41e8 +// VTABLE: LEGO1 0x100d41e8 // SIZE 0x18 class Vector4Data : public Vector4Impl { public: diff --git a/LEGO1/registrationbook.cpp b/LEGO1/registrationbook.cpp index a150e74c..fc7cf39b 100644 --- a/LEGO1/registrationbook.cpp +++ b/LEGO1/registrationbook.cpp @@ -1,18 +1,18 @@ #include "registrationbook.h" -// OFFSET: LEGO1 0x10076d20 STUB +// STUB: LEGO1 0x10076d20 RegistrationBook::RegistrationBook() { // TODO } -// OFFSET: LEGO1 0x10076f50 STUB +// STUB: LEGO1 0x10076f50 RegistrationBook::~RegistrationBook() { // TODO } -// OFFSET: LEGO1 0x100770e0 STUB +// STUB: LEGO1 0x100770e0 MxLong RegistrationBook::Notify(MxParam& p) { // TODO diff --git a/LEGO1/registrationbook.h b/LEGO1/registrationbook.h index 28dd7de3..d0eeafa9 100644 --- a/LEGO1/registrationbook.h +++ b/LEGO1/registrationbook.h @@ -3,7 +3,7 @@ #include "legoworld.h" -// VTABLE 0x100d9928 +// VTABLE: LEGO1 0x100d9928 // SIZE 0x2d0 class RegistrationBook : public LegoWorld { public: @@ -12,14 +12,14 @@ class RegistrationBook : public LegoWorld { virtual MxLong Notify(MxParam& p) override; // vtable+0x4 - // OFFSET: LEGO1 0x10076e10 + // FUNCTION: LEGO1 0x10076e10 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f04c8 + // GLOBAL: LEGO1 0x100f04c8 return "RegistrationBook"; } - // OFFSET: LEGO1 0x10076e20 + // FUNCTION: LEGO1 0x10076e20 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, RegistrationBook::ClassName()) || LegoWorld::IsA(name); diff --git a/LEGO1/score.cpp b/LEGO1/score.cpp index 1a171b23..62502e60 100644 --- a/LEGO1/score.cpp +++ b/LEGO1/score.cpp @@ -15,20 +15,20 @@ DECOMP_SIZE_ASSERT(Score, 0x104) -// OFFSET: LEGO1 0x10001000 +// FUNCTION: LEGO1 0x10001000 Score::Score() { m_unkf8 = 0; NotificationManager()->Register(this); } -// OFFSET: LEGO1 0x100010b0 +// FUNCTION: LEGO1 0x100010b0 MxBool Score::VTable0x5c() { return TRUE; } -// OFFSET: LEGO1 0x10001200 +// FUNCTION: LEGO1 0x10001200 Score::~Score() { if (InputManager()->GetWorld() == this) @@ -38,7 +38,7 @@ Score::~Score() NotificationManager()->Unregister(this); } -// OFFSET: LEGO1 0x100012a0 +// FUNCTION: LEGO1 0x100012a0 MxResult Score::Create(MxDSObject& p_dsObject) { MxResult result = SetAsCurrentWorld(p_dsObject); @@ -58,7 +58,7 @@ MxResult Score::Create(MxDSObject& p_dsObject) return result; } -// OFFSET: LEGO1 0x10001340 +// FUNCTION: LEGO1 0x10001340 void Score::DeleteScript() { if (m_state->GetTutorialFlag()) { @@ -71,7 +71,7 @@ void Score::DeleteScript() } } -// OFFSET: LEGO1 0x10001410 +// FUNCTION: LEGO1 0x10001410 MxLong Score::Notify(MxParam& p) { MxLong ret = 0; @@ -106,7 +106,7 @@ MxLong Score::Notify(MxParam& p) return ret; } -// OFFSET: LEGO1 0x10001510 +// FUNCTION: LEGO1 0x10001510 MxLong Score::FUN_10001510(MxEndActionNotificationParam& p) { MxDSAction* action = p.GetAction(); @@ -127,7 +127,7 @@ MxLong Score::FUN_10001510(MxEndActionNotificationParam& p) return 1; } -// OFFSET: LEGO1 0x10001580 +// FUNCTION: LEGO1 0x10001580 void Score::Stop() { LegoWorld::Stop(); @@ -150,7 +150,7 @@ void Score::Stop() FUN_10015820(0, 7); } -// OFFSET: LEGO1 0x100016d0 +// FUNCTION: LEGO1 0x100016d0 MxLong Score::FUN_100016d0(MxType17NotificationParam& p) { MxS16 l = p.GetUnknown28(); @@ -211,7 +211,7 @@ MxLong Score::FUN_100016d0(MxType17NotificationParam& p) return 1; } -// OFFSET: LEGO1 0x10001980 +// FUNCTION: LEGO1 0x10001980 void Score::VTable0x68(MxBool p_add) { LegoWorld::VTable0x68(p_add); @@ -224,7 +224,7 @@ void Score::VTable0x68(MxBool p_add) InputManager()->ClearWorld(); } -// OFFSET: LEGO1 0x100019d0 +// FUNCTION: LEGO1 0x100019d0 void Score::Paint() { GifManager* gm = GetGifManager(); @@ -278,7 +278,7 @@ void Score::Paint() } } -// OFFSET: LEGO1 0x10001d20 +// FUNCTION: LEGO1 0x10001d20 void Score::FillArea(MxU32 p_x, MxU32 p_y, MxS16 p_color) { MxU32 data[24]; @@ -316,7 +316,7 @@ void Score::FillArea(MxU32 p_x, MxU32 p_y, MxS16 p_color) } } -// OFFSET: LEGO1 0x10001e40 +// FUNCTION: LEGO1 0x10001e40 MxBool Score::VTable0x64() { DeleteScript(); diff --git a/LEGO1/score.h b/LEGO1/score.h index 756ba089..3b4e99de 100644 --- a/LEGO1/score.h +++ b/LEGO1/score.h @@ -7,7 +7,7 @@ #include "mxtype17notificationparam.h" #include "scorestate.h" -// VTABLE 0x100d4018 +// VTABLE: LEGO1 0x100d4018 // SIZE 0x104 class Score : public LegoWorld { public: @@ -15,20 +15,20 @@ class Score : public LegoWorld { virtual ~Score() override; // vtable+0x0 virtual MxLong Notify(MxParam& p) override; // vtable+0x4 - // OFFSET: LEGO1 0x100010c0 + // FUNCTION: LEGO1 0x100010c0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0058 + // GLOBAL: LEGO1 0x100f0058 return "Score"; } - // OFFSET: LEGO1 0x100010d0 + // FUNCTION: LEGO1 0x100010d0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, Score::ClassName()) || LegoWorld::IsA(name); } - // OFFSET: LEGO1 0x100011e0 TEMPLATE + // SYNTHETIC: LEGO1 0x100011e0 // Score::`scalar deleting destructor' virtual MxResult Create(MxDSObject& p_dsObject) override; // vtable+18 diff --git a/LEGO1/scorestate.cpp b/LEGO1/scorestate.cpp index 32b1a7d4..669b41e9 100644 --- a/LEGO1/scorestate.cpp +++ b/LEGO1/scorestate.cpp @@ -2,13 +2,13 @@ DECOMP_SIZE_ASSERT(ScoreState, 0x0C); -// OFFSET: LEGO1 0x1000de20 +// FUNCTION: LEGO1 0x1000de20 MxBool ScoreState::VTable0x14() { return FALSE; } -// OFFSET: LEGO1 0x1000de30 +// FUNCTION: LEGO1 0x1000de30 MxBool ScoreState::SetFlag() { m_playCubeTutorial = TRUE; diff --git a/LEGO1/scorestate.h b/LEGO1/scorestate.h index 3452db50..d02f3179 100644 --- a/LEGO1/scorestate.h +++ b/LEGO1/scorestate.h @@ -3,18 +3,18 @@ #include "legostate.h" -// VTABLE 0x100d53f8 +// VTABLE: LEGO1 0x100d53f8 // SIZE 0xc class ScoreState : public LegoState { public: - // OFFSET: LEGO1 0x1000de40 + // FUNCTION: LEGO1 0x1000de40 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f0084 + // GLOBAL: LEGO1 0x100f0084 return "ScoreState"; }; - // OFFSET: LEGO1 0x1000de50 + // FUNCTION: LEGO1 0x1000de50 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, ScoreState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/skateboard.cpp b/LEGO1/skateboard.cpp index 5e48bdf1..19dfd02b 100644 --- a/LEGO1/skateboard.cpp +++ b/LEGO1/skateboard.cpp @@ -6,7 +6,7 @@ DECOMP_SIZE_ASSERT(SkateBoard, 0x168); -// OFFSET: LEGO1 0x1000fd40 +// FUNCTION: LEGO1 0x1000fd40 SkateBoard::SkateBoard() { this->m_unk160 = 0; diff --git a/LEGO1/skateboard.h b/LEGO1/skateboard.h index d9f8f4eb..c02eaed3 100644 --- a/LEGO1/skateboard.h +++ b/LEGO1/skateboard.h @@ -4,20 +4,20 @@ #include "decomp.h" #include "islepathactor.h" -// VTABLE 0x100d55f0 +// VTABLE: LEGO1 0x100d55f0 // SIZE 0x168 class SkateBoard : public IslePathActor { public: SkateBoard(); - // OFFSET: LEGO1 0x1000fdd0 + // FUNCTION: LEGO1 0x1000fdd0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f041c + // GLOBAL: LEGO1 0x100f041c return "SkateBoard"; } - // OFFSET: LEGO1 0x1000fde0 + // FUNCTION: LEGO1 0x1000fde0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, SkateBoard::ClassName()) || IslePathActor::IsA(name); diff --git a/LEGO1/towtrack.cpp b/LEGO1/towtrack.cpp index 83799530..9117d88b 100644 --- a/LEGO1/towtrack.cpp +++ b/LEGO1/towtrack.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(TowTrack, 0x180); -// OFFSET: LEGO1 0x1004c720 +// FUNCTION: LEGO1 0x1004c720 TowTrack::TowTrack() { this->m_unk168 = 0; diff --git a/LEGO1/towtrack.h b/LEGO1/towtrack.h index 8e541aec..07eeeba4 100644 --- a/LEGO1/towtrack.h +++ b/LEGO1/towtrack.h @@ -4,20 +4,20 @@ #include "decomp.h" #include "islepathactor.h" -// VTABLE 0x100d7ee0 +// VTABLE: LEGO1 0x100d7ee0 // SIZE 0x180 class TowTrack : public IslePathActor { public: TowTrack(); - // OFFSET: LEGO1 0x1004c7c0 + // FUNCTION: LEGO1 0x1004c7c0 inline virtual const char* ClassName() const override // vtable+0x0c { - // 0x100f03b8 + // GLOBAL: LEGO1 0x100f03b8 return "TowTrack"; } - // OFFSET: LEGO1 0x1004c7d0 + // FUNCTION: LEGO1 0x1004c7d0 inline virtual MxBool IsA(const char* name) const override // vtable+0x10 { return !strcmp(name, TowTrack::ClassName()) || IslePathActor::IsA(name); diff --git a/LEGO1/towtrackmissionstate.cpp b/LEGO1/towtrackmissionstate.cpp index 64d4a2b1..cdef8a88 100644 --- a/LEGO1/towtrackmissionstate.cpp +++ b/LEGO1/towtrackmissionstate.cpp @@ -2,7 +2,7 @@ DECOMP_SIZE_ASSERT(TowTrackMissionState, 0x28) -// OFFSET: LEGO1 0x1004dd30 STUB +// STUB: LEGO1 0x1004dd30 TowTrackMissionState::TowTrackMissionState() { // TODO diff --git a/LEGO1/towtrackmissionstate.h b/LEGO1/towtrackmissionstate.h index 037d025b..81d3f83d 100644 --- a/LEGO1/towtrackmissionstate.h +++ b/LEGO1/towtrackmissionstate.h @@ -3,20 +3,20 @@ #include "legostate.h" -// VTABLE 0x100d7fd8 +// VTABLE: LEGO1 0x100d7fd8 // SIZE 0x28 class TowTrackMissionState : public LegoState { public: TowTrackMissionState(); - // OFFSET: LEGO1 0x1004dfa0 + // FUNCTION: LEGO1 0x1004dfa0 inline virtual const char* ClassName() const // vtable+0x0c { - // 0x100f00bc + // GLOBAL: LEGO1 0x100f00bc return "TowTrackMissionState"; } - // OFFSET: LEGO1 0x1004dfb0 + // FUNCTION: LEGO1 0x1004dfb0 inline virtual MxBool IsA(const char* name) const // vtable+0x10 { return !strcmp(name, TowTrackMissionState::ClassName()) || LegoState::IsA(name); diff --git a/LEGO1/viewmanager/viewmanager.cpp b/LEGO1/viewmanager/viewmanager.cpp index acd74914..8ec2aad2 100644 --- a/LEGO1/viewmanager/viewmanager.cpp +++ b/LEGO1/viewmanager/viewmanager.cpp @@ -1,6 +1,6 @@ #include "viewmanager.h" -// OFFSET: LEGO1 0x100a64d0 STUB +// STUB: LEGO1 0x100a64d0 void ViewManager::RemoveAll(ViewROI*) { // TODO diff --git a/LEGO1/viewmanager/viewroi.cpp b/LEGO1/viewmanager/viewroi.cpp index 50100444..00af794b 100644 --- a/LEGO1/viewmanager/viewroi.cpp +++ b/LEGO1/viewmanager/viewroi.cpp @@ -4,25 +4,25 @@ DECOMP_SIZE_ASSERT(ViewROI, 0xe0) -// OFFSET: LEGO1 0x100a9eb0 +// FUNCTION: LEGO1 0x100a9eb0 float ViewROI::IntrinsicImportance() const { return .5; } // for now -// OFFSET: LEGO1 0x100a9ec0 +// FUNCTION: LEGO1 0x100a9ec0 const Tgl::Group* ViewROI::GetGeometry() const { return geometry; } -// OFFSET: LEGO1 0x100a9ed0 +// FUNCTION: LEGO1 0x100a9ed0 Tgl::Group* ViewROI::GetGeometry() { return geometry; } -// OFFSET: LEGO1 0x100a9ee0 +// FUNCTION: LEGO1 0x100a9ee0 void ViewROI::UpdateWorldData(const Matrix4Data& parent2world) { OrientableROI::UpdateWorldData(parent2world); @@ -35,7 +35,7 @@ void ViewROI::UpdateWorldData(const Matrix4Data& parent2world) } } -// OFFSET: LEGO1 0x100aa250 TEMPLATE +// SYNTHETIC: LEGO1 0x100aa250 // ViewROI::`scalar deleting destructor' inline ViewROI::~ViewROI() { diff --git a/README.md b/README.md index 91bb4a00..2e2ea906 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # LEGO Island Decompilation -[Development Vlog](https://www.youtube.com/playlist?list=PLbpl-gZkNl2COf_bB6cfgTapD5WduAfPz) | [Contributing](https://github.com/isledecomp/isle/blob/master/CONTRIBUTING.md) | [Matrix](https://matrix.to/#/#isledecomp:matrix.org) | [Forums](https://forum.mattkc.com/viewforum.php?f=1) | [Patreon](https://www.patreon.com/mattkc) +[Development Vlog](https://www.youtube.com/playlist?list=PLbpl-gZkNl2COf_bB6cfgTapD5WduAfPz) | [Contributing](/CONTRIBUTING.md) | [Matrix](https://matrix.to/#/#isledecomp:matrix.org) | [Forums](https://forum.mattkc.com/viewforum.php?f=1) | [Patreon](https://www.patreon.com/mattkc) This is a **work-in-progress** decompilation of LEGO Island version 1.1. It aims to be as accurate as possible, matching the recompiled instructions to the original machine code as much as possible. The goal is to provide a workable codebase that can be modified, improved, and ported to other platforms later on. @@ -51,7 +51,7 @@ Simply place the compiled `ISLE.EXE` into LEGO Island's install folder (usually ## Contributing -If you're interested in helping/contributing to this project, check out the [CONTRIBUTING](https://github.com/isledecomp/isle/blob/master/CONTRIBUTING.md) page. +If you're interested in helping/contributing to this project, check out the [CONTRIBUTING](/CONTRIBUTING.md) page. ## Additional Information diff --git a/tools/README.md b/tools/README.md index 83a8227c..91f61d8b 100644 --- a/tools/README.md +++ b/tools/README.md @@ -1,23 +1,148 @@ # LEGO Island Decompilation Tools -These are a set of Python tools for helping with the decomp project. +Accuracy to the game's original code is the main goal of this project. To facilitate the decompilation effort and maintain overall quality, we have devised a set of annotations, to be embedded in the source code, which allow us to automatically verify the accuracy of re-compiled functions' assembly, virtual tables, variable offsets and more. -## Installing -Use pip to install the required packages: +In order for contributions to be accepted, the annotations must be used in accordance to the rules outlined here. Proper use is enforced by [GitHub Actions](/.github/workflows) which run the Python tools found in this folder. It is recommended to integrate these tools into your local development workflow as well. + +# Overview + +We are continually working on extending the capabilities of our "decompilation language" and the toolset around it. Some of the following annotations have not made it into formal verification and thus are not technically enforced on the source code level yet (marked as **WIP**). Nevertheless, it is recommended to use them since it is highly likely they will eventually be fully integrated. + +## Functions + +All non-inlined functions in the code base with the exception of [3rd party code](/3rdparty) must be annotated with one of the following markers, which include the module name and address of the function as found in the original binaries. This information is then used to compare the recompiled assembly with the original assembly, resulting in an accuracy score. Functions in a given compilation unit must be ordered by their address in ascending order. + +The annotations can be attached to the function implementation, which is the most common case, or use the "comment" syntax (see examples below) for functions that cannot be referred to directly (such as templated, synthetic or non-inlined inline functions). They should appear exclusively in `.cpp` files. + +### `FUNCTION` + +Functions with a reasonably complete implementation which are not templated or synthetic (see below) should be annotated with `FUNCTION`. + +``` +// FUNCTION: LEGO1 0x100b12c0 +MxCore* MxObjectFactory::Create(const char* p_name) +{ + // implementation +} + +// FUNCTION: LEGO1 0x100140d0 +// MxCore::IsA +``` + +### `STUB` + +Functions with no or a very incomplete implementation should be annotated with `STUB`. These will not be compared to the original assembly. + +``` +// STUB: LEGO1 0x10011d50 +LegoCameraController::LegoCameraController() +{ + // TODO +} +``` + +### `TEMPLATE` + +Templated functions should be annotated with `TEMPLATE`. Since the goal is to eventually have a full accounting of all the functions present in the binaries, please make an effort to find and annotate every function of a templated class. + +``` +// TEMPLATE: LEGO1 0x100c0ee0 +// list >::_Buynode + +// TEMPLATE: LEGO1 0x100c0fc0 +// MxStreamListMxDSSubscriber::~MxStreamListMxDSSubscriber + +// TEMPLATE: LEGO1 0x100c1010 +// MxStreamListMxDSAction::~MxStreamListMxDSAction +``` + +### `SYNTHETIC` + +Synthetic functions should be annotated with `SYNTHETIC`. A synthetic function is generated by the compiler; for the time being, the only case is the "scalar deleting destructor" found in virtual tables. Note: `SYNTHETIC` takes precedence over `TEMPLATE`. + +``` +// SYNTHETIC: LEGO1 0x10003210 +// Helicopter::`scalar deleting destructor' + +// SYNTHETIC: LEGO1 0x100c4f50 +// MxCollection::`scalar deleting destructor' + +// SYNTHETIC: LEGO1 0x100c4fc0 +// MxList::`scalar deleting destructor' +``` + +## Virtual tables (**WIP**) + +Classes with a virtual table should be annotated using the `VTABLE` marker, which includes the module name and address of the virtual table. Additionally, virtual function declarations should be annotated with a comment indicating their relative offset. Please use the following example as a reference. + +``` +// VTABLE: LEGO1 0x100dc900 +class MxEventManager : public MxMediaManager { +public: + MxEventManager(); + virtual ~MxEventManager() override; + + virtual void Destroy() override; // vtable+0x18 + virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+0x28 +``` + +## Class size (**WIP**) + +Classes should be annotated using the `SIZE` marker to indicate their size. If you are unsure about the class size in the original binary, please use the currently available information (known member variables) and detail the circumstances in an extra comment if necessary. + +``` +// SIZE 0x1c +class MxCriticalSection { +public: + __declspec(dllexport) MxCriticalSection(); + __declspec(dllexport) ~MxCriticalSection(); + __declspec(dllexport) static void SetDoMutex(); +``` + +## Member variables (**WIP**) + +Member variables should be annotated with their relative offsets. + +``` +class MxDSObject : public MxCore { +private: + MxU32 m_sizeOnDisk; // 0x8 + MxU16 m_type; // 0xc + char* m_sourceName; // 0x10 + undefined4 m_unk14; // 0x14 +``` + +## Global variables (**WIP**) + +Global variables should be annotated using the `GLOBAL` marker, which includes the module name and address of the variable. + +``` +// GLOBAL: LEGO1 0x100f456c +MxAtomId* g_jukeboxScript = NULL; + +// GLOBAL: LEGO1 0x100f4570 +MxAtomId* g_pz5Script = NULL; + +// GLOBAL: LEGO1 0x100f4574 +MxAtomId* g_introScript = NULL; +``` + +# Tooling + +Use `pip` to install the required packages to be able to use the Python tools found in this folder: ``` pip install -r tools/requirements.txt ``` -## Overview - -* `reccmp`: Compares the original EXE or DLL with a recompiled EXE or DLL, provided a PDB file -* `verexp`: Verifies exports by comparing the exports of the original DLL and the recompiled DLL -* `checkorder`: Checks `OFFSET` declarations, ensuring they appear in ascending order within a unit -* `isledecomp`: A library that is used by the above scripts, it has a collection of useful classes and functions +* [`reccmp`](/tools/reccmp): Compares the original EXE or DLL with a recompiled EXE or DLL, provided a PDB file +* [`verexp`](/tools/checkorder): Verifies exports by comparing the exports of the original DLL and the recompiled DLL +* [`checkorder`](/tools/checkorder): Checks function declarations, ensuring they appear in ascending order within a unit +* [`isledecomp`](/tools/isledecomp): A library that implements a parser to identify the "decompilation" annotations (see above) ## Testing -`isledecomp` has a small suite of tests. Install pylint and run it, passing in the directory: + +`isledecomp` has a small suite of tests. Install `pylint` and run it, passing in the directory: ``` pip install pytest @@ -25,20 +150,19 @@ pytest tools/isledecomp/tests/ ``` ## Development + In order to keep the code clean and consistent, we use `pylint` and `black`: -``` -pip install black pylint -``` -### Run pylint (ignores build and virtualenv): -``` -pylint tools/ --ignore=build,bin,lib -``` -### Check code formatting without rewriting files: -``` -black --check tools/ -``` -### Apply code formatting: -``` -black tools/ -``` +`pip install black pylint` + +### Run pylint (ignores build and virtualenv) + +`pylint tools/ --ignore=build,bin,lib` + +### Check code formatting without rewriting files + +`black --check tools/` + +### Apply code formatting + +`black tools/` diff --git a/tools/checkorder/checkorder.py b/tools/checkorder/checkorder.py index 1ac8391f..02636c09 100644 --- a/tools/checkorder/checkorder.py +++ b/tools/checkorder/checkorder.py @@ -2,8 +2,7 @@ import sys import argparse from isledecomp.dir import walk_source_dir, is_file_cpp -from isledecomp.parser import find_code_blocks -from isledecomp.parser.util import is_exact_offset_comment +from isledecomp.parser import DecompParser def sig_truncate(sig: str) -> str: @@ -16,23 +15,21 @@ def check_file(filename: str, verbose: bool = False) -> bool: """Open and read the given file, then check whether the code blocks are in order. If verbose, print each block.""" + parser = DecompParser() with open(filename, "r", encoding="utf-8") as f: - code_blocks = find_code_blocks(f) + parser.read_lines(f) - bad_comments = [ - (block.start_line, block.offset_comment) - for block in code_blocks - if not is_exact_offset_comment(block.offset_comment) - ] - - just_offsets = [block.offset for block in code_blocks] + just_offsets = [block.offset for block in parser.functions] sorted_offsets = sorted(just_offsets) file_out_of_order = just_offsets != sorted_offsets + # TODO: When we add parser error severity, actual errors that obstruct + # parsing should probably be shown here regardless of verbose mode + # If we detect inexact comments, don't print anything unless we are # in verbose mode. If the file is out of order, we always print the # file name. - should_report = (len(bad_comments) > 0 and verbose) or file_out_of_order + should_report = (len(parser.alerts) > 0 and verbose) or file_out_of_order if not should_report and not file_out_of_order: return False @@ -44,22 +41,22 @@ def check_file(filename: str, verbose: bool = False) -> bool: order_lookup = {k: i for i, k in enumerate(sorted_offsets)} prev_offset = 0 - for block in code_blocks: + for fun in parser.functions: msg = " ".join( [ - " " if block.offset > prev_offset else "!", - f"{block.offset:08x}", - f"{block.end_line - block.start_line:4} lines", - f"{order_lookup[block.offset]:3}", + " " if fun.offset > prev_offset else "!", + f"{fun.offset:08x}", + f"{fun.end_line - fun.line_number:4} lines", + f"{order_lookup[fun.offset]:3}", " ", - sig_truncate(block.signature), + sig_truncate(fun.signature), ] ) print(msg) - prev_offset = block.offset + prev_offset = fun.offset - for line_no, line in bad_comments: - print(f"* line {line_no:3} bad offset comment ({line})") + for alert in parser.alerts: + print(f"* line {alert.line_number:4} {alert.code} ({alert.line})") print() diff --git a/tools/isledecomp/isledecomp/parser/__init__.py b/tools/isledecomp/isledecomp/parser/__init__.py index 0d504619..c9394d4a 100644 --- a/tools/isledecomp/isledecomp/parser/__init__.py +++ b/tools/isledecomp/isledecomp/parser/__init__.py @@ -1 +1 @@ -from .parser import find_code_blocks +from .parser import DecompParser diff --git a/tools/isledecomp/isledecomp/parser/error.py b/tools/isledecomp/isledecomp/parser/error.py new file mode 100644 index 00000000..c18e3e29 --- /dev/null +++ b/tools/isledecomp/isledecomp/parser/error.py @@ -0,0 +1,41 @@ +from enum import Enum + + +class ParserError(Enum): + # WARN: Stub function exceeds some line number threshold + UNLIKELY_STUB = 100 + + # WARN: Decomp marker is close enough to be recognized, but does not follow syntax exactly + BAD_DECOMP_MARKER = 101 + + # WARN: Multiple markers in sequence do not have distinct modules + DUPLICATE_MODULE = 102 + + # WARN: Detected a dupcliate module/offset pair in the current file + DUPLICATE_OFFSET = 103 + + # WARN: We read a line that matches the decomp marker pattern, but we are not set up + # to handle it + BOGUS_MARKER = 104 + + # WARN: New function marker appeared while we were inside a function + MISSED_END_OF_FUNCTION = 105 + + # WARN: If we find a curly brace right after the function declaration + # this is wrong but we still have enough to make a match with reccmp + MISSED_START_OF_FUNCTION = 106 + + # WARN: A blank line appeared between the end of FUNCTION markers + # and the start of the function. We can ignore it, but the line shouldn't be there + UNEXPECTED_BLANK_LINE = 107 + + # ERROR: We found a marker unexpectedly + UNEXPECTED_MARKER = 200 + + # ERROR: We found a marker where we expected to find one, but it is incompatible + # with the preceding markers. + # For example, a GLOBAL cannot follow FUNCTION/STUB + INCOMPATIBLE_MARKER = 201 + + # ERROR: The line following a synthetic marker was not a comment + BAD_SYNTHETIC = 202 diff --git a/tools/isledecomp/isledecomp/parser/node.py b/tools/isledecomp/isledecomp/parser/node.py new file mode 100644 index 00000000..0ee87000 --- /dev/null +++ b/tools/isledecomp/isledecomp/parser/node.py @@ -0,0 +1,41 @@ +from dataclasses import dataclass + + +@dataclass +class ParserNode: + line_number: int + + +@dataclass +class ParserAlert(ParserNode): + code: int + line: str + + +@dataclass +class ParserSymbol(ParserNode): + module: str + offset: int + + +@dataclass +class ParserFunction(ParserSymbol): + name: str + lookup_by_name: bool = False + is_stub: bool = False + is_synthetic: bool = False + is_template: bool = False + end_line: int = -1 + + +@dataclass +class ParserVariable(ParserSymbol): + name: str + size: int = -1 + is_static: bool = False + + +@dataclass +class ParserVtable(ParserSymbol): + class_name: str + num_entries: int = -1 diff --git a/tools/isledecomp/isledecomp/parser/parser.py b/tools/isledecomp/isledecomp/parser/parser.py index 1039ac41..89b79928 100644 --- a/tools/isledecomp/isledecomp/parser/parser.py +++ b/tools/isledecomp/isledecomp/parser/parser.py @@ -1,145 +1,394 @@ # C++ file parser -from typing import List, TextIO +from typing import List, Iterable, Iterator from enum import Enum from .util import ( - CodeBlock, - OffsetMatch, + DecompMarker, is_blank_or_comment, - match_offset_comment, - get_template_function_name, + match_marker, + is_marker_exact, + get_class_name, + get_synthetic_name, remove_trailing_comment, - distinct_by_module, ) +from .node import ( + ParserAlert, + ParserFunction, + ParserVariable, + ParserVtable, +) +from .error import ParserError class ReaderState(Enum): - WANT_OFFSET = 0 + SEARCH = 0 WANT_SIG = 1 IN_FUNC = 2 IN_TEMPLATE = 3 WANT_CURLY = 4 - FUNCTION_DONE = 5 + IN_GLOBAL = 5 + IN_FUNC_GLOBAL = 6 + IN_VTABLE = 7 -def find_code_blocks(stream: TextIO) -> List[CodeBlock]: - """Read the IO stream (file) line-by-line and give the following report: - Foreach code block (function) in the file, what are its starting and - ending line numbers, and what is the given offset in the original - binary. We expect the result to be ordered by line number because we - are reading the file from start to finish.""" +def marker_is_stub(marker: DecompMarker) -> bool: + return marker.type.upper() == "STUB" - blocks: List[CodeBlock] = [] - offset_matches: List[OffsetMatch] = [] +def marker_is_variable(marker: DecompMarker) -> bool: + return marker.type.upper() == "GLOBAL" - function_sig = None - start_line = None - end_line = None - state = ReaderState.WANT_OFFSET - # 1-based to match cvdump and your text editor - # I know it says 0, but we will increment before each readline() - line_no = 0 - can_seek = True +def marker_is_synthetic(marker: DecompMarker) -> bool: + return marker.type.upper() in ("SYNTHETIC", "TEMPLATE") - while True: - # Do this before reading again so that an EOF will not - # cause us to miss the last function of the file. - if state == ReaderState.FUNCTION_DONE: - # Our list of offset marks could have duplicates on - # module name, so we'll eliminate those now. - for offset_match in distinct_by_module(offset_matches): - block = CodeBlock( - offset=offset_match.address, - signature=function_sig, - start_line=start_line, + +def marker_is_template(marker: DecompMarker) -> bool: + return marker.type.upper() == "TEMPLATE" + + +def marker_is_function(marker: DecompMarker) -> bool: + return marker.type.upper() in ("FUNCTION", "STUB") + + +def marker_is_vtable(marker: DecompMarker) -> bool: + return marker.type.upper() == "VTABLE" + + +class MarkerDict: + def __init__(self): + self.markers: dict = {} + + def insert(self, marker: DecompMarker) -> bool: + """Return True if this insert would overwrite""" + module = marker.module.upper() + if module in self.markers: + return True + + self.markers[module] = (marker.type, marker.offset) + return False + + def iter(self) -> Iterator[DecompMarker]: + for module, (marker_type, offset) in self.markers.items(): + yield DecompMarker(marker_type, module, offset) + + def empty(self): + self.markers = {} + + +class DecompParser: + # pylint: disable=too-many-instance-attributes + # Could combine output lists into a single list to get under the limit, + # but not right now + def __init__(self): + # The lists to be populated as we parse + self.functions: List[ParserFunction] = [] + self.vtables: List[ParserVtable] = [] + self.variables: List[ParserVariable] = [] + self.alerts: List[ParserAlert] = [] + + self.line_number: int = 0 + self.state: ReaderState = ReaderState.SEARCH + + self.last_line: str = "" + + # To allow for multiple markers where code is shared across different + # modules, save lists of compatible markers that appear in sequence + self.fun_markers = MarkerDict() + self.var_markers = MarkerDict() + self.tbl_markers = MarkerDict() + + # To handle functions that are entirely indented (i.e. those defined + # in class declarations), remember how many whitespace characters + # came before the opening curly brace and match that up at the end. + # This should give us the same or better accuracy for a well-formed file. + # The alternative is counting the curly braces on each line + # but that's probably too cumbersome. + self.curly_indent_stops: int = 0 + + # For non-synthetic functions, save the line number where the function begins + # (i.e. where we see the curly brace) along with the function signature. + # We will need both when we reach the end of the function. + self.function_start: int = 0 + self.function_sig: str = "" + + def reset(self): + self.functions = [] + self.vtables = [] + self.variables = [] + self.alerts = [] + + self.line_number = 0 + self.state = ReaderState.SEARCH + + self.last_line = "" + + self.fun_markers.empty() + self.var_markers.empty() + self.tbl_markers.empty() + + self.curly_indent_stops = 0 + self.function_start = 0 + self.function_sig = "" + + def _recover(self): + """We hit a syntax error and need to reset temp structures""" + self.state = ReaderState.SEARCH + self.fun_markers.empty() + self.var_markers.empty() + self.tbl_markers.empty() + + def _syntax_warning(self, code): + self.alerts.append( + ParserAlert( + line_number=self.line_number, + code=code, + line=self.last_line.strip(), + ) + ) + + def _syntax_error(self, code): + self._syntax_warning(code) + self._recover() + + def _function_starts_here(self): + self.function_start = self.line_number + + def _function_marker(self, marker: DecompMarker): + if self.fun_markers.insert(marker): + self._syntax_warning(ParserError.DUPLICATE_MODULE) + self.state = ReaderState.WANT_SIG + + def _synthetic_marker(self, marker: DecompMarker): + if self.fun_markers.insert(marker): + self._syntax_warning(ParserError.DUPLICATE_MODULE) + self.state = ReaderState.IN_TEMPLATE + + def _function_done(self, lookup_by_name: bool = False, unexpected: bool = False): + end_line = self.line_number + if unexpected: + # If we missed the end of the previous function, assume it ended + # on the previous line and that whatever we are tracking next + # begins on the current line. + end_line -= 1 + + for marker in self.fun_markers.iter(): + self.functions.append( + ParserFunction( + line_number=self.function_start, + module=marker.module, + offset=marker.offset, + lookup_by_name=lookup_by_name, + is_stub=marker_is_stub(marker), + is_synthetic=marker_is_synthetic(marker), + is_template=marker_is_template(marker), + name=self.function_sig, end_line=end_line, - offset_comment=offset_match.comment, - module=offset_match.module, - is_template=offset_match.is_template, - is_stub=offset_match.is_stub, ) - blocks.append(block) - offset_matches = [] - state = ReaderState.WANT_OFFSET + ) - if can_seek: - line_no += 1 - line = stream.readline() - if line == "": - break + self.fun_markers.empty() + self.curly_indent_stops = 0 + self.state = ReaderState.SEARCH - new_match = match_offset_comment(line) - if new_match is not None: - # We will allow multiple offsets if we have just begun - # the code block, but not after we hit the curly brace. - if state in ( - ReaderState.WANT_OFFSET, - ReaderState.IN_TEMPLATE, + def _vtable_marker(self, marker: DecompMarker): + if self.tbl_markers.insert(marker): + self._syntax_warning(ParserError.DUPLICATE_MODULE) + self.state = ReaderState.IN_VTABLE + + def _vtable_done(self, class_name: str = None): + if class_name is None: + # Best we can do + class_name = self.last_line.strip() + + for marker in self.tbl_markers.iter(): + self.vtables.append( + ParserVtable( + line_number=self.line_number, + module=marker.module, + offset=marker.offset, + class_name=class_name, + ) + ) + + self.tbl_markers.empty() + self.state = ReaderState.SEARCH + + def _variable_marker(self, marker: DecompMarker): + if self.var_markers.insert(marker): + self._syntax_warning(ParserError.DUPLICATE_MODULE) + + if self.state in (ReaderState.IN_FUNC, ReaderState.IN_FUNC_GLOBAL): + self.state = ReaderState.IN_FUNC_GLOBAL + else: + self.state = ReaderState.IN_GLOBAL + + def _variable_done(self): + for marker in self.var_markers.iter(): + self.variables.append( + ParserVariable( + line_number=self.line_number, + module=marker.module, + offset=marker.offset, + name=self.last_line.strip(), + ) + ) + + self.var_markers.empty() + if self.state == ReaderState.IN_FUNC_GLOBAL: + self.state = ReaderState.IN_FUNC + else: + self.state = ReaderState.SEARCH + + def _handle_marker(self, marker: DecompMarker): + # Cannot handle any markers between function sig and opening curly brace + if self.state == ReaderState.WANT_CURLY: + self._syntax_error(ParserError.UNEXPECTED_MARKER) + return + + # TODO: How uncertain are we of detecting the end of a function + # in a clang-formatted file? For now we assume we have missed the + # end if we detect a non-GLOBAL marker while state is IN_FUNC. + # Maybe these cases should be syntax errors instead + + if marker_is_function(marker): + if self.state in ( + ReaderState.SEARCH, ReaderState.WANT_SIG, ): - # If we detected an offset marker unexpectedly, - # we are handling it here so we can continue seeking. - can_seek = True - - offset_matches.append(new_match) - - if new_match.is_template: - state = ReaderState.IN_TEMPLATE - else: - state = ReaderState.WANT_SIG - else: + # We will allow multiple offsets if we have just begun + # the code block, but not after we hit the curly brace. + self._function_marker(marker) + elif self.state == ReaderState.IN_FUNC: # We hit another offset unexpectedly. # We can recover easily by just ending the function here. - end_line = line_no - 1 - state = ReaderState.FUNCTION_DONE + self._syntax_warning(ParserError.MISSED_END_OF_FUNCTION) + self._function_done(unexpected=True) - # Pause reading here so we handle the offset marker - # on the next loop iteration - can_seek = False + # Start the next function right after so we can + # read the next line. + self._function_marker(marker) + else: + self._syntax_error(ParserError.INCOMPATIBLE_MARKER) - elif state == ReaderState.IN_TEMPLATE: + elif marker_is_synthetic(marker): + if self.state in (ReaderState.SEARCH, ReaderState.IN_TEMPLATE): + self._synthetic_marker(marker) + elif self.state == ReaderState.IN_FUNC: + self._syntax_warning(ParserError.MISSED_END_OF_FUNCTION) + self._function_done(lookup_by_name=True, unexpected=True) + self._synthetic_marker(marker) + else: + self._syntax_error(ParserError.INCOMPATIBLE_MARKER) + + elif marker_is_variable(marker): + if self.state in ( + ReaderState.SEARCH, + ReaderState.IN_GLOBAL, + ReaderState.IN_FUNC, + ReaderState.IN_FUNC_GLOBAL, + ): + self._variable_marker(marker) + else: + self._syntax_error(ParserError.INCOMPATIBLE_MARKER) + + elif marker_is_vtable(marker): + if self.state in (ReaderState.SEARCH, ReaderState.IN_VTABLE): + self._vtable_marker(marker) + elif self.state == ReaderState.IN_FUNC: + self._syntax_warning(ParserError.MISSED_END_OF_FUNCTION) + self._function_done(unexpected=True) + self._vtable_marker(marker) + else: + self._syntax_error(ParserError.INCOMPATIBLE_MARKER) + + else: + self._syntax_warning(ParserError.BOGUS_MARKER) + + def read_line(self, line: str): + self.last_line = line # TODO: Useful or hack for error reporting? + self.line_number += 1 + + marker = match_marker(line) + if marker is not None: + # TODO: what's the best place for this? + # Does it belong with reading or marker handling? + if not is_marker_exact(self.last_line): + self._syntax_warning(ParserError.BAD_DECOMP_MARKER) + self._handle_marker(marker) + return + + line_strip = line.strip() + if self.state == ReaderState.IN_TEMPLATE: # TEMPLATE functions are a special case. The signature is # given on the next line (in a // comment) - function_sig = get_template_function_name(line) - start_line = line_no - end_line = line_no - state = ReaderState.FUNCTION_DONE + name = get_synthetic_name(line) + if name is None: + self._syntax_error(ParserError.BAD_SYNTHETIC) + else: + self.function_sig = name + self._function_starts_here() + self._function_done(lookup_by_name=True) - elif state == ReaderState.WANT_SIG: - # Skip blank lines or comments that come after the offset - # marker. There is not a formal procedure for this, so just - # assume the next "code line" is the function signature - if not is_blank_or_comment(line): + elif self.state == ReaderState.WANT_SIG: + # Ignore blanks on the way to function start or function name + if len(line_strip) == 0: + self._syntax_warning(ParserError.UNEXPECTED_BLANK_LINE) + + elif line_strip.startswith("//"): + # If we found a comment, assume implicit lookup-by-name + # function and end here. We know this is not a decomp marker + # because it would have been handled already. + self.function_sig = get_synthetic_name(line) + self._function_starts_here() + self._function_done(lookup_by_name=True) + + elif line_strip == "{": + # We missed the function signature but we can recover from this + self.function_sig = "(unknown)" + self._function_starts_here() + self._syntax_warning(ParserError.MISSED_START_OF_FUNCTION) + self.state = ReaderState.IN_FUNC + + else: # Inline functions may end with a comment. Strip that out # to help parsing. - function_sig = remove_trailing_comment(line.strip()) + self.function_sig = remove_trailing_comment(line_strip) # Now check to see if the opening curly bracket is on the # same line. clang-format should prevent this (BraceWrapping) # but it is easy to detect. # If the entire function is on one line, handle that too. - if function_sig.endswith("{"): - start_line = line_no - state = ReaderState.IN_FUNC - elif function_sig.endswith("}") or function_sig.endswith("};"): - start_line = line_no - end_line = line_no - state = ReaderState.FUNCTION_DONE + if self.function_sig.endswith("{"): + self._function_starts_here() + self.state = ReaderState.IN_FUNC + elif self.function_sig.endswith("}") or self.function_sig.endswith( + "};" + ): + self._function_starts_here() + self._function_done() else: - state = ReaderState.WANT_CURLY + self.state = ReaderState.WANT_CURLY - elif state == ReaderState.WANT_CURLY: - if line.strip() == "{": - start_line = line_no - state = ReaderState.IN_FUNC + elif self.state == ReaderState.WANT_CURLY: + if line_strip == "{": + self.curly_indent_stops = line.index("{") + self._function_starts_here() + self.state = ReaderState.IN_FUNC - elif state == ReaderState.IN_FUNC: - # Naive but reasonable assumption that functions will end with - # a curly brace on its own line with no prepended spaces. - if line.startswith("}"): - end_line = line_no - state = ReaderState.FUNCTION_DONE + elif self.state == ReaderState.IN_FUNC: + if line_strip.startswith("}") and line[self.curly_indent_stops] == "}": + self._function_done() - return blocks + elif self.state in (ReaderState.IN_GLOBAL, ReaderState.IN_FUNC_GLOBAL): + if not is_blank_or_comment(line): + self._variable_done() + + elif self.state == ReaderState.IN_VTABLE: + vtable_class = get_class_name(line) + if vtable_class is not None: + self._vtable_done(class_name=vtable_class) + + def read_lines(self, lines: Iterable): + for line in lines: + self.read_line(line) diff --git a/tools/isledecomp/isledecomp/parser/util.py b/tools/isledecomp/isledecomp/parser/util.py index 59fca75b..99ab1c56 100644 --- a/tools/isledecomp/isledecomp/parser/util.py +++ b/tools/isledecomp/isledecomp/parser/util.py @@ -1,44 +1,17 @@ # C++ Parser utility functions and data structures from __future__ import annotations # python <3.10 compatibility import re -from typing import List from collections import namedtuple +DecompMarker = namedtuple("DecompMarker", ["type", "module", "offset"]) -CodeBlock = namedtuple( - "CodeBlock", - [ - "offset", - "signature", - "start_line", - "end_line", - "offset_comment", - "module", - "is_template", - "is_stub", - ], -) -OffsetMatch = namedtuple( - "OffsetMatch", ["module", "address", "is_template", "is_stub", "comment"] -) - -# This has not been formally established, but considering that "STUB" -# is a temporary state for a function, we assume it will appear last, -# after any other modifiers (i.e. TEMPLATE) - -# To match a reasonable variance of formatting for the offset comment -offsetCommentRegex = re.compile( - r"\s*//\s*OFFSET:\s*(\w+)\s+(?:0x)?([a-f0-9]+)(\s+TEMPLATE)?(\s+STUB)?", # nopep8 +markerRegex = re.compile( + r"\s*//\s*(\w+):\s*(\w+)\s+(0x[a-f0-9]+)", flags=re.I, ) -# To match the exact syntax (text upper case, hex lower case, with spaces) -# that is used in most places -offsetCommentExactRegex = re.compile( - r"^// OFFSET: [A-Z0-9]+ (0x[a-f0-9]+)( TEMPLATE)?( STUB)?$" -) # nopep8 - +markerExactRegex = re.compile(r"\s*// ([A-Z]+): ([A-Z0-9]+) (0x[a-f0-9]+)$") # The goal here is to just read whatever is on the next line, so some # flexibility in the formatting seems OK @@ -50,15 +23,15 @@ trailingCommentRegex = re.compile(r"(\s*(?://|/\*).*)$") -def get_template_function_name(line: str) -> str: - """Parse function signature for special TEMPLATE functions""" +def get_synthetic_name(line: str) -> str | None: + """Synthetic names appear on a single line comment on the line after the marker. + If that's not what we have, return None""" template_match = templateCommentRegex.match(line) - # If we don't match, you get whatever is on the line as the signature if template_match is not None: return template_match.group(1) - return line + return None def remove_trailing_comment(line: str) -> str: @@ -78,39 +51,45 @@ def is_blank_or_comment(line: str) -> bool: ) -def is_exact_offset_comment(line: str) -> bool: - """If the offset comment does not match our (unofficial) syntax - we may want to alert the user to fix it for style points.""" - return offsetCommentExactRegex.match(line) is not None - - -def match_offset_comment(line: str) -> OffsetMatch | None: - match = offsetCommentRegex.match(line) +def match_marker(line: str) -> DecompMarker | None: + match = markerRegex.match(line) if match is None: return None - return OffsetMatch( - module=match.group(1), - address=int(match.group(2), 16), - is_template=match.group(3) is not None, - is_stub=match.group(4) is not None, - comment=line.strip(), + return DecompMarker( + type=match.group(1), module=match.group(2), offset=int(match.group(3), 16) ) -def distinct_by_module(offsets: List) -> List: - """Given a list of offset markers, return a list with distinct - module names. If module names (case-insensitive) are repeated, - choose the offset that appears first.""" +def is_marker_exact(line: str) -> bool: + return markerExactRegex.match(line) is not None - if len(offsets) < 2: - return offsets - # Dict maintains insertion order in python >=3.7 - offsets_dict = {} - for offset in offsets: - module_upper = offset.module.upper() - if module_upper not in offsets_dict: - offsets_dict[module_upper] = offset +template_class_decl_regex = re.compile( + r"\s*(?:\/\/)?\s*(?:class|struct) (\w+)<([\w]+)\s*(\*+)?\s*>" +) - return list(offsets_dict.values()) + +class_decl_regex = re.compile(r"\s*(?:\/\/)?\s*(?:class|struct) (\w+)") + + +def get_class_name(line: str) -> str | None: + """For VTABLE markers, extract the class name from the code line or comment + where it appears.""" + + match = template_class_decl_regex.match(line) + if match is not None: + # For template classes, we should reformat the class name so it matches + # the output from cvdump: one space between the template type and any asterisks + # if it is a pointer type. + (class_name, template_type, asterisks) = match.groups() + if asterisks is not None: + return f"{class_name}<{template_type} {asterisks}>" + + return f"{class_name}<{template_type}>" + + match = class_decl_regex.match(line) + if match is not None: + return match.group(1) + + return None diff --git a/tools/isledecomp/tests/samples/basic_class.cpp b/tools/isledecomp/tests/samples/basic_class.cpp index 23ce3c39..4316ad4a 100644 --- a/tools/isledecomp/tests/samples/basic_class.cpp +++ b/tools/isledecomp/tests/samples/basic_class.cpp @@ -3,6 +3,7 @@ // A very simple class +// VTABLE: TEST 0x1001002 class TestClass { public: TestClass(); @@ -10,14 +11,14 @@ class TestClass { virtual MxResult Tickle() override; // vtable+08 - // OFFSET: TEST 0x12345678 + // FUNCTION: TEST 0x12345678 inline const char* ClassName() const // vtable+0c { // 0xabcd1234 return "TestClass"; } - // OFFSET: TEST 0xdeadbeef + // FUNCTION: TEST 0xdeadbeef inline MxBool IsA(const char* name) const override // vtable+10 { return !strcmp(name, TestClass::ClassName()); diff --git a/tools/isledecomp/tests/samples/basic_file.cpp b/tools/isledecomp/tests/samples/basic_file.cpp index 6a4017b5..99930de8 100644 --- a/tools/isledecomp/tests/samples/basic_file.cpp +++ b/tools/isledecomp/tests/samples/basic_file.cpp @@ -3,19 +3,19 @@ // A very simple well-formed code file -// OFFSET: TEST 0x1234 +// FUNCTION: TEST 0x1234 void function01() { // TODO } -// OFFSET: TEST 0x2345 +// FUNCTION: TEST 0x2345 void function02() { // TODO } -// OFFSET: TEST 0x3456 +// FUNCTION: TEST 0x3456 void function03() { // TODO diff --git a/tools/isledecomp/tests/samples/global_variables.cpp b/tools/isledecomp/tests/samples/global_variables.cpp new file mode 100644 index 00000000..3be0316a --- /dev/null +++ b/tools/isledecomp/tests/samples/global_variables.cpp @@ -0,0 +1,14 @@ +// Sample for python unit tests +// Not part of the decomp + +// Global variables inside and outside of functions + +// GLOBAL: TEST 0x1000 +const char *g_message = "test"; + +// FUNCTION: TEST 0x1234 +void function01() +{ + // GLOBAL: TEST 0x5555 + static int g_hello = 123; +} diff --git a/tools/isledecomp/tests/samples/inline.cpp b/tools/isledecomp/tests/samples/inline.cpp index 0bfedf6d..8a36c89a 100644 --- a/tools/isledecomp/tests/samples/inline.cpp +++ b/tools/isledecomp/tests/samples/inline.cpp @@ -1,8 +1,8 @@ // Sample for python unit tests // Not part of the decomp -// OFFSET: TEST 0x10000001 +// FUNCTION: TEST 0x10000001 inline const char* OneLineWithComment() const { return "MxDSObject"; }; // hi there -// OFFSET: TEST 0x10000002 +// FUNCTION: TEST 0x10000002 inline const char* OneLine() const { return "MxDSObject"; }; diff --git a/tools/isledecomp/tests/samples/missing_offset.cpp b/tools/isledecomp/tests/samples/missing_offset.cpp index 332fed2c..3f6b3811 100644 --- a/tools/isledecomp/tests/samples/missing_offset.cpp +++ b/tools/isledecomp/tests/samples/missing_offset.cpp @@ -9,7 +9,7 @@ int no_offset_comment() return -1; } -// OFFSET: TEST 0xdeadbeef +// FUNCTION: TEST 0xdeadbeef void regular_ole_function() { printf("hi there"); diff --git a/tools/isledecomp/tests/samples/multiple_offsets.cpp b/tools/isledecomp/tests/samples/multiple_offsets.cpp index eecdd95b..dc3c5bfa 100644 --- a/tools/isledecomp/tests/samples/multiple_offsets.cpp +++ b/tools/isledecomp/tests/samples/multiple_offsets.cpp @@ -3,22 +3,22 @@ // Handling multiple offset markers -// OFFSET: TEST 0x1234 -// OFFSET: HELLO 0x5555 +// FUNCTION: TEST 0x1234 +// FUNCTION: HELLO 0x5555 void different_modules() { // TODO } -// OFFSET: TEST 0x2345 -// OFFSET: TEST 0x1234 +// FUNCTION: TEST 0x2345 +// FUNCTION: TEST 0x1234 void same_module() { // TODO } -// OFFSET: TEST 0x2002 -// OFFSET: test 0x1001 +// FUNCTION: TEST 0x2002 +// FUNCTION: test 0x1001 void same_case_insensitive() { // TODO diff --git a/tools/isledecomp/tests/samples/oneline_function.cpp b/tools/isledecomp/tests/samples/oneline_function.cpp index 8d7fdc5a..feb82314 100644 --- a/tools/isledecomp/tests/samples/oneline_function.cpp +++ b/tools/isledecomp/tests/samples/oneline_function.cpp @@ -1,10 +1,10 @@ // Sample for python unit tests // Not part of the decomp -// OFFSET: TEST 0x1234 +// FUNCTION: TEST 0x1234 void short_function() { static char* msg = "oneliner"; } -// OFFSET: TEST 0x5555 +// FUNCTION: TEST 0x5555 void function_after_one_liner() { // This function comes after the previous that is on a single line. diff --git a/tools/isledecomp/tests/samples/out_of_order.cpp b/tools/isledecomp/tests/samples/out_of_order.cpp index 749c4f2b..951c99e7 100644 --- a/tools/isledecomp/tests/samples/out_of_order.cpp +++ b/tools/isledecomp/tests/samples/out_of_order.cpp @@ -1,19 +1,19 @@ // Sample for python unit tests // Not part of the decomp -// OFFSET: TEST 0x1001 +// FUNCTION: TEST 0x1001 void function_order01() { // TODO } -// OFFSET: TEST 0x1003 +// FUNCTION: TEST 0x1003 void function_order03() { // TODO } -// OFFSET: TEST 0x1002 +// FUNCTION: TEST 0x1002 void function_order02() { // TODO diff --git a/tools/isledecomp/tests/samples/poorly_formatted.cpp b/tools/isledecomp/tests/samples/poorly_formatted.cpp index 32dd774c..69f365ec 100644 --- a/tools/isledecomp/tests/samples/poorly_formatted.cpp +++ b/tools/isledecomp/tests/samples/poorly_formatted.cpp @@ -4,18 +4,18 @@ // While it's reasonable to expect a well-formed file (and clang-format // will make sure we get one), this will put the parser through its paces. -// OFFSET: TEST 0x1234 +// FUNCTION: TEST 0x1234 void curly_with_spaces() { static char* msg = "hello"; } -// OFFSET: TEST 0x5555 +// FUNCTION: TEST 0x5555 void weird_closing_curly() { int x = 123; } -// OFFSET: HELLO 0x5656 +// FUNCTION: HELLO 0x5656 void bad_indenting() { if (0) { diff --git a/tools/isledecomp/tests/test_parser.py b/tools/isledecomp/tests/test_parser.py index 48bb0e44..30092a97 100644 --- a/tools/isledecomp/tests/test_parser.py +++ b/tools/isledecomp/tests/test_parser.py @@ -1,127 +1,360 @@ -import os -from typing import List, TextIO -from isledecomp.parser import find_code_blocks -from isledecomp.parser.util import CodeBlock - -SAMPLE_DIR = os.path.join(os.path.dirname(__file__), "samples") +import pytest +from isledecomp.parser.parser import ( + ReaderState, + DecompParser, +) +from isledecomp.parser.error import ParserError -def sample_file(filename: str) -> TextIO: - """Wrapper for opening the samples from the directory that does not - depend on the cwd where we run the test""" - full_path = os.path.join(SAMPLE_DIR, filename) - return open(full_path, "r", encoding="utf-8") +@pytest.fixture(name="parser") +def fixture_parser(): + return DecompParser() -def code_blocks_are_sorted(blocks: List[CodeBlock]) -> bool: - """Helper to make this more idiomatic""" - just_offsets = [block.offset for block in blocks] - return just_offsets == sorted(just_offsets) +def test_missing_sig(parser): + """In the hopefully rare scenario that the function signature and marker + are swapped, we still have enough to match witch reccmp""" + parser.read_lines( + [ + "void my_function()", + "// FUNCTION: TEST 0x1234", + "{", + "}", + ] + ) + assert parser.state == ReaderState.SEARCH + assert len(parser.functions) == 1 + assert parser.functions[0].line_number == 3 + + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.MISSED_START_OF_FUNCTION -# Tests are below # +def test_not_exact_syntax(parser): + """Alert to inexact syntax right here in the parser instead of kicking it downstream. + Doing this means we don't have to save the actual text.""" + parser.read_line("// function: test 0x1234") + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.BAD_DECOMP_MARKER -def test_sanity(): - """Read a very basic file""" - with sample_file("basic_file.cpp") as f: - blocks = find_code_blocks(f) +def test_invalid_marker(parser): + """We matched a decomp marker, but it's not one we care about""" + parser.read_line("// BANANA: TEST 0x1234") + assert parser.state == ReaderState.SEARCH - assert len(blocks) == 3 - assert code_blocks_are_sorted(blocks) is True - # n.b. The parser returns line numbers as 1-based - # Function starts when we see the opening curly brace - assert blocks[0].start_line == 8 - assert blocks[0].end_line == 10 + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.BOGUS_MARKER -def test_oneline(): - """(Assuming clang-format permits this) This sample has a function - on a single line. This will test the end-of-function detection""" - with sample_file("oneline_function.cpp") as f: - blocks = find_code_blocks(f) - - assert len(blocks) == 2 - assert blocks[0].start_line == 5 - assert blocks[0].end_line == 5 +def test_incompatible_marker(parser): + """The marker we just read cannot be handled in the current parser state""" + parser.read_lines( + [ + "// FUNCTION: TEST 0x1234", + "// GLOBAL: TEST 0x5000", + ] + ) + assert parser.state == ReaderState.SEARCH + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.INCOMPATIBLE_MARKER -def test_missing_offset(): - """What if the function doesn't have an offset comment?""" - with sample_file("missing_offset.cpp") as f: - blocks = find_code_blocks(f) - - # TODO: For now, the function without the offset will just be ignored. - # Would be the same outcome if the comment was present but mangled and - # we failed to match it. We should detect these cases in the future. - assert len(blocks) == 1 +def test_variable(parser): + """Should identify a global variable""" + parser.read_lines( + [ + "// GLOBAL: HELLO 0x1234", + "int g_value = 5;", + ] + ) + assert len(parser.variables) == 1 -def test_jumbled_case(): - """The parser just reports what it sees. It is the responsibility of - the downstream tools to do something about a jumbled file. - Just verify that we are reading it correctly.""" - with sample_file("out_of_order.cpp") as f: - blocks = find_code_blocks(f) - - assert len(blocks) == 3 - assert code_blocks_are_sorted(blocks) is False +def test_synthetic_plus_marker(parser): + """Marker tracking preempts synthetic name detection. + Should fail with error and not log the synthetic""" + parser.read_lines( + [ + "// SYNTHETIC: HEY 0x555", + "// FUNCTION: HOWDY 0x1234", + ] + ) + assert len(parser.functions) == 0 + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.INCOMPATIBLE_MARKER -def test_bad_file(): - with sample_file("poorly_formatted.cpp") as f: - blocks = find_code_blocks(f) +def test_different_markers_different_module(parser): + """Does it make any sense for a function to be a stub in one module, + but not in another? I don't know. But it's no problem for us.""" + parser.read_lines( + [ + "// FUNCTION: HOWDY 0x1234", + "// STUB: SUP 0x5555", + "void interesting_function() {", + "}", + ] + ) - assert len(blocks) == 3 + assert len(parser.alerts) == 0 + assert len(parser.functions) == 2 -def test_indented(): - """Offsets for functions inside of a class will probably be indented.""" - with sample_file("basic_class.cpp") as f: - blocks = find_code_blocks(f) +def test_different_markers_same_module(parser): + """Now, if something is a regular function but then a stub, + what do we say about that?""" + parser.read_lines( + [ + "// FUNCTION: HOWDY 0x1234", + "// STUB: HOWDY 0x5555", + "void interesting_function() {", + "}", + ] + ) - # TODO: We don't properly detect the end of these functions - # because the closing brace is indented. However... knowing where each - # function ends is less important (for now) than capturing - # all the functions that are there. + # Use first marker declaration, don't replace + assert len(parser.functions) == 1 + assert parser.functions[0].is_stub is False - assert len(blocks) == 2 - assert blocks[0].offset == int("0x12345678", 16) - assert blocks[0].start_line == 15 - # assert blocks[0].end_line == 18 - - assert blocks[1].offset == int("0xdeadbeef", 16) - assert blocks[1].start_line == 22 - # assert blocks[1].end_line == 24 + # Should alert to this + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.DUPLICATE_MODULE -def test_inline(): - with sample_file("inline.cpp") as f: - blocks = find_code_blocks(f) +def test_unexpected_synthetic(parser): + """FUNCTION then SYNTHETIC should fail to report either one""" + parser.read_lines( + [ + "// FUNCTION: HOWDY 0x1234", + "// SYNTHETIC: HOWDY 0x5555", + "void interesting_function() {", + "}", + ] + ) - assert len(blocks) == 2 - for block in blocks: - assert block.start_line is not None - assert block.start_line == block.end_line + assert parser.state == ReaderState.SEARCH + assert len(parser.functions) == 0 + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.INCOMPATIBLE_MARKER -def test_multiple_offsets(): - """If multiple offset marks appear before for a code block, take them - all but ensure module name (case-insensitive) is distinct. - Use first module occurrence in case of duplicates.""" - with sample_file("multiple_offsets.cpp") as f: - blocks = find_code_blocks(f) +@pytest.mark.skip(reason="not implemented yet") +def test_duplicate_offset(parser): + """Repeating the same module/offset in the same file is probably a typo""" + parser.read_lines( + [ + "// GLOBAL: HELLO 0x1234", + "int x = 1;", + "// GLOBAL: HELLO 0x1234", + "int y = 2;", + ] + ) - assert len(blocks) == 4 - assert blocks[0].module == "TEST" - assert blocks[0].start_line == 9 + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.DUPLICATE_OFFSET - assert blocks[1].module == "HELLO" - assert blocks[1].start_line == 9 - # Duplicate modules are ignored - assert blocks[2].start_line == 16 - assert blocks[2].offset == 0x2345 +def test_multiple_variables(parser): + """Theoretically the same global variable can appear in multiple modules""" + parser.read_lines( + [ + "// GLOBAL: HELLO 0x1234", + "// GLOBAL: WUZZUP 0x555", + "const char *g_greeting;", + ] + ) + assert len(parser.alerts) == 0 + assert len(parser.variables) == 2 - assert blocks[3].module == "TEST" - assert blocks[3].offset == 0x2002 + +def test_multiple_variables_same_module(parser): + """Should not overwrite offset""" + parser.read_lines( + [ + "// GLOBAL: HELLO 0x1234", + "// GLOBAL: HELLO 0x555", + "const char *g_greeting;", + ] + ) + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.DUPLICATE_MODULE + assert len(parser.variables) == 1 + assert parser.variables[0].offset == 0x1234 + + +def test_multiple_vtables(parser): + parser.read_lines( + [ + "// VTABLE: HELLO 0x1234", + "// VTABLE: TEST 0x5432", + "class MxString : public MxCore {", + ] + ) + assert len(parser.alerts) == 0 + assert len(parser.vtables) == 2 + assert parser.vtables[0].class_name == "MxString" + + +def test_multiple_vtables_same_module(parser): + """Should not overwrite offset""" + parser.read_lines( + [ + "// VTABLE: HELLO 0x1234", + "// VTABLE: HELLO 0x5432", + "class MxString : public MxCore {", + ] + ) + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.DUPLICATE_MODULE + assert len(parser.vtables) == 1 + assert parser.vtables[0].offset == 0x1234 + + +def test_synthetic(parser): + parser.read_lines( + [ + "// SYNTHETIC: TEST 0x1234", + "// TestClass::TestMethod", + ] + ) + assert len(parser.functions) == 1 + assert parser.functions[0].lookup_by_name is True + assert parser.functions[0].name == "TestClass::TestMethod" + + +def test_synthetic_same_module(parser): + parser.read_lines( + [ + "// SYNTHETIC: TEST 0x1234", + "// SYNTHETIC: TEST 0x555", + "// TestClass::TestMethod", + ] + ) + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.DUPLICATE_MODULE + assert len(parser.functions) == 1 + assert parser.functions[0].offset == 0x1234 + + +def test_synthetic_no_comment(parser): + """Synthetic marker followed by a code line (i.e. non-comment)""" + parser.read_lines( + [ + "// SYNTHETIC: TEST 0x1234", + "int x = 123;", + ] + ) + assert len(parser.functions) == 0 + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.BAD_SYNTHETIC + assert parser.state == ReaderState.SEARCH + + +def test_single_line_function(parser): + parser.read_lines( + [ + "// FUNCTION: TEST 0x1234", + "int hello() { return 1234; }", + ] + ) + assert len(parser.functions) == 1 + assert parser.functions[0].line_number == 2 + assert parser.functions[0].end_line == 2 + + +def test_indented_function(parser): + """Track the number of whitespace characters when we begin the function + and check that against each closing curly brace we read. + Should not report a syntax warning if the function is indented""" + parser.read_lines( + [ + " // FUNCTION: TEST 0x1234", + " void indented()", + " {", + " // TODO", + " }", + " // FUNCTION: NEXT 0x555", + ] + ) + assert len(parser.alerts) == 0 + + +@pytest.mark.xfail(reason="todo") +def test_indented_no_curly_hint(parser): + """Same as above, but opening curly brace is on the same line. + Without the hint of how many whitespace characters to check, can we + still identify the end of the function?""" + parser.read_lines( + [ + " // FUNCTION: TEST 0x1234", + " void indented() {", + " }", + " // FUNCTION: NEXT 0x555", + ] + ) + assert len(parser.alerts) == 0 + + +def test_implicit_lookup_by_name(parser): + """FUNCTION (or STUB) offsets must directly precede the function signature. + If we detect a comment instead, we assume that this is a lookup-by-name + function and end here.""" + parser.read_lines( + [ + "// FUNCTION: TEST 0x1234", + "// TestClass::TestMethod()", + ] + ) + assert parser.state == ReaderState.SEARCH + assert len(parser.functions) == 1 + assert parser.functions[0].lookup_by_name is True + assert parser.functions[0].name == "TestClass::TestMethod()" + + +def test_function_with_spaces(parser): + """There should not be any spaces between the end of FUNCTION markers + and the start or name of the function. If it's a blank line, we can safely + ignore but should alert to this.""" + parser.read_lines( + [ + "// FUNCTION: TEST 0x1234", + " ", + "inline void test_function() { };", + ] + ) + assert len(parser.functions) == 1 + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.UNEXPECTED_BLANK_LINE + + +def test_function_with_spaces_implicit(parser): + """Same as above, but for implicit lookup-by-name""" + parser.read_lines( + [ + "// FUNCTION: TEST 0x1234", + " ", + "// Implicit::Method", + ] + ) + assert len(parser.functions) == 1 + assert len(parser.alerts) == 1 + assert parser.alerts[0].code == ParserError.UNEXPECTED_BLANK_LINE + + +@pytest.mark.xfail(reason="will assume implicit lookup-by-name function") +def test_function_is_commented(parser): + """In an ideal world, we would recognize that there is no code here. + Some editors (or users) might comment the function on each line like this + but hopefully it is rare.""" + parser.read_lines( + [ + "// FUNCTION: TEST 0x1234", + "// int my_function()", + "// {", + "// return 5;", + "// }", + ] + ) + + assert len(parser.functions) == 0 diff --git a/tools/isledecomp/tests/test_parser_samples.py b/tools/isledecomp/tests/test_parser_samples.py new file mode 100644 index 00000000..e74fda0e --- /dev/null +++ b/tools/isledecomp/tests/test_parser_samples.py @@ -0,0 +1,141 @@ +import os +from typing import List, TextIO +import pytest +from isledecomp.parser import DecompParser +from isledecomp.parser.node import ParserSymbol + +SAMPLE_DIR = os.path.join(os.path.dirname(__file__), "samples") + + +def sample_file(filename: str) -> TextIO: + """Wrapper for opening the samples from the directory that does not + depend on the cwd where we run the test""" + full_path = os.path.join(SAMPLE_DIR, filename) + return open(full_path, "r", encoding="utf-8") + + +def code_blocks_are_sorted(blocks: List[ParserSymbol]) -> bool: + """Helper to make this more idiomatic""" + just_offsets = [block.offset for block in blocks] + return just_offsets == sorted(just_offsets) + + +@pytest.fixture(name="parser") +def fixture_parser(): + return DecompParser() + + +# Tests are below # + + +def test_sanity(parser): + """Read a very basic file""" + with sample_file("basic_file.cpp") as f: + parser.read_lines(f) + + assert len(parser.functions) == 3 + assert code_blocks_are_sorted(parser.functions) is True + # n.b. The parser returns line numbers as 1-based + # Function starts when we see the opening curly brace + assert parser.functions[0].line_number == 8 + assert parser.functions[0].end_line == 10 + + +def test_oneline(parser): + """(Assuming clang-format permits this) This sample has a function + on a single line. This will test the end-of-function detection""" + with sample_file("oneline_function.cpp") as f: + parser.read_lines(f) + + assert len(parser.functions) == 2 + assert parser.functions[0].line_number == 5 + assert parser.functions[0].end_line == 5 + + +def test_missing_offset(parser): + """What if the function doesn't have an offset comment?""" + with sample_file("missing_offset.cpp") as f: + parser.read_lines(f) + + # TODO: For now, the function without the offset will just be ignored. + # Would be the same outcome if the comment was present but mangled and + # we failed to match it. We should detect these cases in the future. + assert len(parser.functions) == 1 + + +def test_jumbled_case(parser): + """The parser just reports what it sees. It is the responsibility of + the downstream tools to do something about a jumbled file. + Just verify that we are reading it correctly.""" + with sample_file("out_of_order.cpp") as f: + parser.read_lines(f) + + assert len(parser.functions) == 3 + assert code_blocks_are_sorted(parser.functions) is False + + +def test_bad_file(parser): + with sample_file("poorly_formatted.cpp") as f: + parser.read_lines(f) + + assert len(parser.functions) == 3 + + +def test_indented(parser): + """Offsets for functions inside of a class will probably be indented.""" + with sample_file("basic_class.cpp") as f: + parser.read_lines(f) + + # TODO: We don't properly detect the end of these functions + # because the closing brace is indented. However... knowing where each + # function ends is less important (for now) than capturing + # all the functions that are there. + + assert len(parser.functions) == 2 + assert parser.functions[0].offset == int("0x12345678", 16) + assert parser.functions[0].line_number == 16 + # assert parser.functions[0].end_line == 19 + + assert parser.functions[1].offset == int("0xdeadbeef", 16) + assert parser.functions[1].line_number == 23 + # assert parser.functions[1].end_line == 25 + + +def test_inline(parser): + with sample_file("inline.cpp") as f: + parser.read_lines(f) + + assert len(parser.functions) == 2 + for fun in parser.functions: + assert fun.line_number is not None + assert fun.line_number == fun.end_line + + +def test_multiple_offsets(parser): + """If multiple offset marks appear before for a code block, take them + all but ensure module name (case-insensitive) is distinct. + Use first module occurrence in case of duplicates.""" + with sample_file("multiple_offsets.cpp") as f: + parser.read_lines(f) + + assert len(parser.functions) == 4 + assert parser.functions[0].module == "TEST" + assert parser.functions[0].line_number == 9 + + assert parser.functions[1].module == "HELLO" + assert parser.functions[1].line_number == 9 + + # Duplicate modules are ignored + assert parser.functions[2].line_number == 16 + assert parser.functions[2].offset == 0x2345 + + assert parser.functions[3].module == "TEST" + assert parser.functions[3].offset == 0x2002 + + +def test_variables(parser): + with sample_file("global_variables.cpp") as f: + parser.read_lines(f) + + assert len(parser.functions) == 1 + assert len(parser.variables) == 2 diff --git a/tools/isledecomp/tests/test_parser_statechange.py b/tools/isledecomp/tests/test_parser_statechange.py new file mode 100644 index 00000000..714de579 --- /dev/null +++ b/tools/isledecomp/tests/test_parser_statechange.py @@ -0,0 +1,150 @@ +import pytest +from isledecomp.parser.parser import ( + ReaderState as _rs, + DecompParser, +) +from isledecomp.parser.error import ParserError as _pe + +# fmt: off +state_change_marker_cases = [ + (_rs.SEARCH, "FUNCTION", _rs.WANT_SIG, None), + (_rs.SEARCH, "GLOBAL", _rs.IN_GLOBAL, None), + (_rs.SEARCH, "STUB", _rs.WANT_SIG, None), + (_rs.SEARCH, "SYNTHETIC", _rs.IN_TEMPLATE, None), + (_rs.SEARCH, "TEMPLATE", _rs.IN_TEMPLATE, None), + (_rs.SEARCH, "VTABLE", _rs.IN_VTABLE, None), + + (_rs.WANT_SIG, "FUNCTION", _rs.WANT_SIG, None), + (_rs.WANT_SIG, "GLOBAL", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.WANT_SIG, "STUB", _rs.WANT_SIG, None), + (_rs.WANT_SIG, "SYNTHETIC", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.WANT_SIG, "TEMPLATE", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.WANT_SIG, "VTABLE", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + + (_rs.IN_FUNC, "FUNCTION", _rs.WANT_SIG, _pe.MISSED_END_OF_FUNCTION), + (_rs.IN_FUNC, "GLOBAL", _rs.IN_FUNC_GLOBAL, None), + (_rs.IN_FUNC, "STUB", _rs.WANT_SIG, _pe.MISSED_END_OF_FUNCTION), + (_rs.IN_FUNC, "SYNTHETIC", _rs.IN_TEMPLATE, _pe.MISSED_END_OF_FUNCTION), + (_rs.IN_FUNC, "TEMPLATE", _rs.IN_TEMPLATE, _pe.MISSED_END_OF_FUNCTION), + (_rs.IN_FUNC, "VTABLE", _rs.IN_VTABLE, _pe.MISSED_END_OF_FUNCTION), + + (_rs.IN_TEMPLATE, "FUNCTION", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_TEMPLATE, "GLOBAL", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_TEMPLATE, "STUB", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_TEMPLATE, "SYNTHETIC", _rs.IN_TEMPLATE, None), + (_rs.IN_TEMPLATE, "TEMPLATE", _rs.IN_TEMPLATE, None), + (_rs.IN_TEMPLATE, "VTABLE", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + + (_rs.WANT_CURLY, "FUNCTION", _rs.SEARCH, _pe.UNEXPECTED_MARKER), + (_rs.WANT_CURLY, "GLOBAL", _rs.SEARCH, _pe.UNEXPECTED_MARKER), + (_rs.WANT_CURLY, "STUB", _rs.SEARCH, _pe.UNEXPECTED_MARKER), + (_rs.WANT_CURLY, "SYNTHETIC", _rs.SEARCH, _pe.UNEXPECTED_MARKER), + (_rs.WANT_CURLY, "TEMPLATE", _rs.SEARCH, _pe.UNEXPECTED_MARKER), + (_rs.WANT_CURLY, "VTABLE", _rs.SEARCH, _pe.UNEXPECTED_MARKER), + + (_rs.IN_GLOBAL, "FUNCTION", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_GLOBAL, "GLOBAL", _rs.IN_GLOBAL, None), + (_rs.IN_GLOBAL, "STUB", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_GLOBAL, "SYNTHETIC", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_GLOBAL, "TEMPLATE", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_GLOBAL, "VTABLE", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + + (_rs.IN_FUNC_GLOBAL, "FUNCTION", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_FUNC_GLOBAL, "GLOBAL", _rs.IN_FUNC_GLOBAL, None), + (_rs.IN_FUNC_GLOBAL, "STUB", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_FUNC_GLOBAL, "SYNTHETIC", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_FUNC_GLOBAL, "TEMPLATE", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_FUNC_GLOBAL, "VTABLE", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + + (_rs.IN_VTABLE, "FUNCTION", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_VTABLE, "GLOBAL", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_VTABLE, "STUB", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_VTABLE, "SYNTHETIC", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_VTABLE, "TEMPLATE", _rs.SEARCH, _pe.INCOMPATIBLE_MARKER), + (_rs.IN_VTABLE, "VTABLE", _rs.IN_VTABLE, None), +] +# fmt: on + + +@pytest.mark.parametrize( + "state, marker_type, new_state, expected_error", state_change_marker_cases +) +def test_state_change_by_marker( + state: _rs, marker_type: str, new_state: _rs, expected_error: None | _pe +): + p = DecompParser() + p.state = state + mock_line = f"// {marker_type}: TEST 0x1234" + p.read_line(mock_line) + assert p.state == new_state + + if expected_error is not None: + assert len(p.alerts) > 0 + assert p.alerts[0].code == expected_error + + +# Reading any of these lines should have no effect in ReaderState.SEARCH +search_lines_no_effect = [ + "", + "\t", + " ", + "int x = 0;", + "// Comment", + "/*", + "*/", + "/* Block comment */", + "{", + "}", +] + + +@pytest.mark.parametrize("line", search_lines_no_effect) +def test_state_search_line(line: str): + p = DecompParser() + p.read_line(line) + assert p.state == _rs.SEARCH + assert len(p.alerts) == 0 + + +global_lines = [ + ("// A comment", _rs.IN_GLOBAL), + ("", _rs.IN_GLOBAL), + ("\t", _rs.IN_GLOBAL), + (" ", _rs.IN_GLOBAL), + # TODO: no check for "likely" variable declaration so these all count + ("void function()", _rs.SEARCH), + ("int x = 123;", _rs.SEARCH), + ("just some text", _rs.SEARCH), +] + + +@pytest.mark.parametrize("line, new_state", global_lines) +def test_state_global_line(line: str, new_state: _rs): + p = DecompParser() + p.read_line("// GLOBAL: TEST 0x1234") + assert p.state == _rs.IN_GLOBAL + p.read_line(line) + assert p.state == new_state + + +# mostly same as above +in_func_global_lines = [ + ("// A comment", _rs.IN_FUNC_GLOBAL), + ("", _rs.IN_FUNC_GLOBAL), + ("\t", _rs.IN_FUNC_GLOBAL), + (" ", _rs.IN_FUNC_GLOBAL), + # TODO: no check for "likely" variable declaration so these all count + ("void function()", _rs.IN_FUNC), + ("int x = 123;", _rs.IN_FUNC), + ("just some text", _rs.IN_FUNC), +] + + +@pytest.mark.parametrize("line, new_state", in_func_global_lines) +def test_state_in_func_global_line(line: str, new_state: _rs): + p = DecompParser() + p.state = _rs.IN_FUNC + p.read_line("// GLOBAL: TEST 0x1234") + assert p.state == _rs.IN_FUNC_GLOBAL + p.read_line(line) + assert p.state == new_state diff --git a/tools/isledecomp/tests/test_parser_util.py b/tools/isledecomp/tests/test_parser_util.py index 91fd285b..643abf3e 100644 --- a/tools/isledecomp/tests/test_parser_util.py +++ b/tools/isledecomp/tests/test_parser_util.py @@ -1,11 +1,11 @@ -from collections import namedtuple -from typing import List import pytest +from isledecomp.parser.parser import MarkerDict from isledecomp.parser.util import ( + DecompMarker, is_blank_or_comment, - match_offset_comment, - is_exact_offset_comment, - distinct_by_module, + match_marker, + is_marker_exact, + get_class_name, ) @@ -28,76 +28,106 @@ def test_is_blank_or_comment(line: str, expected: bool): assert is_blank_or_comment(line) is expected -offset_comment_samples = [ +marker_samples = [ # (can_parse: bool, exact_match: bool, line: str) - # Should match both expected modules with optional STUB marker - (True, True, "// OFFSET: LEGO1 0xdeadbeef"), - (True, True, "// OFFSET: LEGO1 0xdeadbeef STUB"), - (True, True, "// OFFSET: ISLE 0x12345678"), - (True, True, "// OFFSET: ISLE 0x12345678 STUB"), + (True, True, "// FUNCTION: LEGO1 0xdeadbeef"), + (True, True, "// FUNCTION: ISLE 0x12345678"), # No trailing spaces allowed - (True, False, "// OFFSET: LEGO1 0xdeadbeef "), - (True, False, "// OFFSET: LEGO1 0xdeadbeef STUB "), + (True, False, "// FUNCTION: LEGO1 0xdeadbeef "), # Must have exactly one space between elements - (True, False, "//OFFSET: ISLE 0xdeadbeef"), - (True, False, "// OFFSET:ISLE 0xdeadbeef"), - (True, False, "// OFFSET: ISLE 0xdeadbeef"), - (True, False, "// OFFSET: ISLE 0xdeadbeef"), - (True, False, "// OFFSET: ISLE 0xdeadbeef"), - (True, False, "// OFFSET: ISLE 0xdeadbeef STUB"), - # Must have 0x prefix for hex number - (True, False, "// OFFSET: ISLE deadbeef"), + (True, False, "//FUNCTION: ISLE 0xdeadbeef"), + (True, False, "// FUNCTION:ISLE 0xdeadbeef"), + (True, False, "// FUNCTION: ISLE 0xdeadbeef"), + (True, False, "// FUNCTION: ISLE 0xdeadbeef"), + (True, False, "// FUNCTION: ISLE 0xdeadbeef"), + # Must have 0x prefix for hex number to match at all + (False, False, "// FUNCTION: ISLE deadbeef"), # Offset, module name, and STUB must be uppercase - (True, False, "// offset: ISLE 0xdeadbeef"), - (True, False, "// offset: isle 0xdeadbeef"), - (True, False, "// OFFSET: LEGO1 0xdeadbeef stub"), + (True, False, "// function: ISLE 0xdeadbeef"), + (True, False, "// function: isle 0xdeadbeef"), # Hex string must be lowercase - (True, False, "// OFFSET: ISLE 0xDEADBEEF"), + (True, False, "// FUNCTION: ISLE 0xDEADBEEF"), # TODO: How flexible should we be with matching the module name? - (True, True, "// OFFSET: OMNI 0x12345678"), - (True, True, "// OFFSET: LEG01 0x12345678"), - (True, False, "// OFFSET: hello 0x12345678"), + (True, True, "// FUNCTION: OMNI 0x12345678"), + (True, True, "// FUNCTION: LEG01 0x12345678"), + (True, False, "// FUNCTION: hello 0x12345678"), # Not close enough to match - (False, False, "// OFFSET: ISLE0x12345678"), - (False, False, "// OFFSET: 0x12345678"), + (False, False, "// FUNCTION: ISLE0x12345678"), + (False, False, "// FUNCTION: 0x12345678"), (False, False, "// LEGO1: 0x12345678"), # Hex string shorter than 8 characters - (True, True, "// OFFSET: LEGO1 0x1234"), + (True, True, "// FUNCTION: LEGO1 0x1234"), # TODO: These match but shouldn't. - # (False, False, '// OFFSET: LEGO1 0'), - # (False, False, '// OFFSET: LEGO1 0x'), + # (False, False, '// FUNCTION: LEGO1 0'), + # (False, False, '// FUNCTION: LEGO1 0x'), ] -@pytest.mark.parametrize("match, _, line", offset_comment_samples) -def test_offset_match(line: str, match: bool, _): - did_match = match_offset_comment(line) is not None +@pytest.mark.parametrize("match, _, line", marker_samples) +def test_marker_match(line: str, match: bool, _): + did_match = match_marker(line) is not None assert did_match is match -@pytest.mark.parametrize("_, exact, line", offset_comment_samples) -def test_exact_offset_comment(line: str, exact: bool, _): - assert is_exact_offset_comment(line) is exact +@pytest.mark.parametrize("_, exact, line", marker_samples) +def test_marker_exact(line: str, exact: bool, _): + assert is_marker_exact(line) is exact -# Helper for the next test: cut down version of OffsetMatch -MiniOfs = namedtuple("MiniOfs", ["module", "value"]) +def test_marker_dict_simple(): + d = MarkerDict() + d.insert(DecompMarker("FUNCTION", "TEST", 0x1234)) + markers = list(d.iter()) + assert len(markers) == 1 -distinct_by_module_samples = [ - # empty set - ([], []), - # same module name - ([MiniOfs("TEST", 123), MiniOfs("TEST", 555)], [MiniOfs("TEST", 123)]), - # same module name, case-insensitive - ([MiniOfs("test", 123), MiniOfs("TEST", 555)], [MiniOfs("test", 123)]), - # duplicates, non-consecutive - ( - [MiniOfs("test", 123), MiniOfs("abc", 111), MiniOfs("TEST", 555)], - [MiniOfs("test", 123), MiniOfs("abc", 111)], - ), + +def test_marker_dict_ofs_replace(): + d = MarkerDict() + d.insert(DecompMarker("FUNCTION", "TEST", 0x1234)) + d.insert(DecompMarker("FUNCTION", "TEST", 0x555)) + markers = list(d.iter()) + assert len(markers) == 1 + assert markers[0].offset == 0x1234 + + +def test_marker_dict_type_replace(): + d = MarkerDict() + d.insert(DecompMarker("FUNCTION", "TEST", 0x1234)) + d.insert(DecompMarker("STUB", "TEST", 0x1234)) + markers = list(d.iter()) + assert len(markers) == 1 + assert markers[0].type == "FUNCTION" + + +class_name_match_cases = [ + ("struct MxString {", "MxString"), + ("class MxString {", "MxString"), + ("// class MxString", "MxString"), + ("class MxString : public MxCore {", "MxString"), + ("class MxPtrList", "MxPtrList"), + # If it is possible to match the symbol MxList::`vftable' + # we should get the correct class name if possible. If the template type is a pointer, + # the asterisk and class name are separated by one space. + ("// class MxList", "MxList"), + ("// class MxList", "MxList"), + ("// class MxList", "MxList"), + # I don't know if this would ever come up, but sure, why not? + ("// class MxList", "MxList"), ] -@pytest.mark.parametrize("sample, expected", distinct_by_module_samples) -def test_distinct_by_module(sample: List[MiniOfs], expected: List[MiniOfs]): - assert distinct_by_module(sample) == expected +@pytest.mark.parametrize("line, class_name", class_name_match_cases) +def test_get_class_name(line: str, class_name: str): + assert get_class_name(line) == class_name + + +class_name_no_match_cases = [ + "MxString { ", + "clas MxString", + "// MxPtrList::`scalar deleting destructor'", +] + + +@pytest.mark.parametrize("line", class_name_no_match_cases) +def test_get_class_name_none(line: str): + assert get_class_name(line) is None diff --git a/tools/reccmp/reccmp.py b/tools/reccmp/reccmp.py index 02c16029..f7659703 100755 --- a/tools/reccmp/reccmp.py +++ b/tools/reccmp/reccmp.py @@ -10,7 +10,7 @@ from isledecomp import ( Bin, - find_code_blocks, + DecompParser, get_file_in_script_dir, OffsetPlaceholderGenerator, print_diff, @@ -313,18 +313,20 @@ def gen_svg(svg_file, name_svg, icon, svg_implemented_funcs, total_funcs, raw_ac # Generate basename of original file, used in locating OFFSET lines basename = os.path.basename(os.path.splitext(original)[0]) + parser = DecompParser() for srcfilename in walk_source_dir(source): + parser.reset() with open(srcfilename, "r", encoding="utf-8") as srcfile: - blocks = find_code_blocks(srcfile) + parser.read_lines(srcfile) - for block in blocks: - if block.is_stub: + for fun in parser.functions: + if fun.is_stub: continue - if block.module != basename: + if fun.module != basename: continue - addr = block.offset + addr = fun.offset # Verbose flag handling if verbose: if addr == verbose: @@ -332,13 +334,13 @@ def gen_svg(svg_file, name_svg, icon, svg_implemented_funcs, total_funcs, raw_ac else: continue - if block.is_template: - recinfo = syminfo.get_recompiled_address_from_name(block.signature) + if fun.lookup_by_name: + recinfo = syminfo.get_recompiled_address_from_name(fun.name) if not recinfo: continue else: recinfo = syminfo.get_recompiled_address( - srcfilename, block.start_line + srcfilename, fun.line_number ) if not recinfo: continue