diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d4976fa..cdfebd05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,10 +121,13 @@ add_library(lego1 SHARED LEGO1/mxflcpresenter.cpp LEGO1/mxioinfo.cpp LEGO1/mxloopingflcpresenter.cpp + LEGO1/mxloopingmidipresenter.cpp LEGO1/mxloopingsmkpresenter.cpp LEGO1/mxmediapresenter.cpp + LEGO1/mxmidipresenter.cpp LEGO1/mxmusicpresenter.cpp LEGO1/mxnotificationmanager.cpp + LEGO1/mxobjectfactory.cpp LEGO1/mxomni.cpp LEGO1/mxomnicreateflags.cpp LEGO1/mxomnicreateparam.cpp diff --git a/LEGO1/decomp.h b/LEGO1/decomp.h new file mode 100644 index 00000000..5466e6d8 --- /dev/null +++ b/LEGO1/decomp.h @@ -0,0 +1,11 @@ +#ifndef DECOMP_H +#define DECOMP_H + +#define DECOMP_STATIC_ASSERT(V) namespace { typedef int foo[(V)?1:-1]; } +#define DECOMP_SIZE_ASSERT(T, S) DECOMP_STATIC_ASSERT(sizeof(T) == S) + +typedef unsigned char undefined; +typedef unsigned short undefined2; +typedef unsigned int undefined4; + +#endif // DECOMP_H diff --git a/LEGO1/legoinputmanager.cpp b/LEGO1/legoinputmanager.cpp index 792da404..6c0bd709 100644 --- a/LEGO1/legoinputmanager.cpp +++ b/LEGO1/legoinputmanager.cpp @@ -1,5 +1,9 @@ #include "legoinputmanager.h" +#include "decomp.h" + +DECOMP_SIZE_ASSERT(LegoInputManager, 0x338); // 0x10059085 + // OFFSET: LEGO1 0x1005b790 STUB LegoInputManager::LegoInputManager() { diff --git a/LEGO1/legoinputmanager.h b/LEGO1/legoinputmanager.h index c629134e..74a2a8fa 100644 --- a/LEGO1/legoinputmanager.h +++ b/LEGO1/legoinputmanager.h @@ -1,6 +1,7 @@ #ifndef LEGOINPUTMANAGER_H #define LEGOINPUTMANAGER_H +#include "decomp.h" #include "mxpresenter.h" enum NotificationId @@ -27,9 +28,9 @@ class LegoInputManager : public MxPresenter virtual long Tickle() override; // vtable+0x8 - char m_pad00[0x15c]; + undefined m_pad40[0x15c]; int m_joystickIndex; - char m_pad200[0x194]; + undefined m_pad200[0x194]; MxBool m_useJoystick; }; diff --git a/LEGO1/mxatomid.h b/LEGO1/mxatomid.h index 9a218a1b..6b7dddbb 100644 --- a/LEGO1/mxatomid.h +++ b/LEGO1/mxatomid.h @@ -1,8 +1,14 @@ #ifndef MXATOMID_H #define MXATOMID_H +#include "mxtypes.h" + enum LookupMode { + LookupMode_Exact = 0, + LookupMode_LowerCase = 1, + LookupMode_UpperCase = 2, + LookupMode_LowerCase2 = 3 }; class MxAtomId @@ -17,6 +23,11 @@ class MxAtomId this->m_internal = 0; } + inline MxBool operator ==(const MxAtomId &other) const + { + return this->m_internal == other.m_internal; + } + private: char *m_internal; }; diff --git a/LEGO1/mxaudiopresenter.cpp b/LEGO1/mxaudiopresenter.cpp index b15c2556..ac634362 100644 --- a/LEGO1/mxaudiopresenter.cpp +++ b/LEGO1/mxaudiopresenter.cpp @@ -1 +1,5 @@ #include "mxaudiopresenter.h" + +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxAudioPresenter, 0x54); diff --git a/LEGO1/mxaudiopresenter.h b/LEGO1/mxaudiopresenter.h index b23eefe9..c1001a13 100644 --- a/LEGO1/mxaudiopresenter.h +++ b/LEGO1/mxaudiopresenter.h @@ -7,9 +7,13 @@ class MxAudioPresenter : public MxMediaPresenter { public: + MxAudioPresenter() { + m_unk50 = 100; + } + // OFFSET: LEGO1 0x1000d280 inline virtual const char *ClassName() const override // vtable+0x0c - { + { // 0x100f078c return "MxAudioPresenter"; } @@ -19,6 +23,8 @@ class MxAudioPresenter : public MxMediaPresenter { return !strcmp(name, MxAudioPresenter::ClassName()) || MxMediaPresenter::IsA(name); } + + int m_unk50; }; #endif // MXAUDIOPRESENTER_H diff --git a/LEGO1/mxcompositepresenter.cpp b/LEGO1/mxcompositepresenter.cpp index e42dbadb..342f3d96 100644 --- a/LEGO1/mxcompositepresenter.cpp +++ b/LEGO1/mxcompositepresenter.cpp @@ -1,5 +1,9 @@ #include "mxcompositepresenter.h" +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxCompositePresenter, 0x4c); + // OFFSET: LEGO1 0x100b60b0 STUB MxCompositePresenter::MxCompositePresenter() { diff --git a/LEGO1/mxcompositepresenter.h b/LEGO1/mxcompositepresenter.h index 471f3087..9f517652 100644 --- a/LEGO1/mxcompositepresenter.h +++ b/LEGO1/mxcompositepresenter.h @@ -13,7 +13,7 @@ class MxCompositePresenter : public MxPresenter // OFFSET: LEGO1 0x100b6210 inline virtual const char *ClassName() const override // vtable+0x0c - { + { // 0x100f0774 return "MxCompositePresenter"; } @@ -24,6 +24,9 @@ class MxCompositePresenter : public MxPresenter return !strcmp(name, MxCompositePresenter::ClassName()) || MxPresenter::IsA(name); } + undefined m_unk40; + undefined4 *m_unk44; + undefined4 m_unk48; }; #endif // MXCOMPOSITEPRESENTER_H diff --git a/LEGO1/mxeventpresenter.cpp b/LEGO1/mxeventpresenter.cpp index ba78203f..88c20ce3 100644 --- a/LEGO1/mxeventpresenter.cpp +++ b/LEGO1/mxeventpresenter.cpp @@ -1,5 +1,9 @@ #include "mxeventpresenter.h" +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxEventPresenter, 0x54); + // OFFSET: LEGO1 0x100c2b70 MxEventPresenter::MxEventPresenter() { @@ -12,8 +16,8 @@ MxEventPresenter::~MxEventPresenter() // TODO } -// OFFSET: LEGO1 0x100c2da0 STUB +// OFFSET: LEGO1 0x100c2da0 void MxEventPresenter::Init() { - // TODO + m_unk50 = 0; } diff --git a/LEGO1/mxeventpresenter.h b/LEGO1/mxeventpresenter.h index 2adb8cfa..256d0c7f 100644 --- a/LEGO1/mxeventpresenter.h +++ b/LEGO1/mxeventpresenter.h @@ -3,6 +3,8 @@ #include "mxmediapresenter.h" +#include "decomp.h" + // VTABLE 0x100dca88 // SIZE 0x54 class MxEventPresenter : public MxMediaPresenter @@ -23,9 +25,10 @@ class MxEventPresenter : public MxMediaPresenter { return !strcmp(name, MxEventPresenter::ClassName()) || MxMediaPresenter::IsA(name); } - + private: void Init(); + undefined4 m_unk50; }; diff --git a/LEGO1/mxflcpresenter.cpp b/LEGO1/mxflcpresenter.cpp index 1e6ee289..8bd23d22 100644 --- a/LEGO1/mxflcpresenter.cpp +++ b/LEGO1/mxflcpresenter.cpp @@ -1,5 +1,9 @@ #include "mxflcpresenter.h" +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxFlcPresenter, 0x68); + // OFFSET: LEGO1 0x100b3310 STUB MxFlcPresenter::MxFlcPresenter() { diff --git a/LEGO1/mxflcpresenter.h b/LEGO1/mxflcpresenter.h index 5d63c41c..bc34ff12 100644 --- a/LEGO1/mxflcpresenter.h +++ b/LEGO1/mxflcpresenter.h @@ -3,6 +3,8 @@ #include "mxvideopresenter.h" +#include "decomp.h" + // VTABLE 0x100dc2c0 // SIZE 0x68 class MxFlcPresenter : public MxVideoPresenter @@ -23,6 +25,8 @@ class MxFlcPresenter : public MxVideoPresenter { return !strcmp(name, MxFlcPresenter::ClassName()) || MxVideoPresenter::IsA(name); } + + undefined4 m_unk64; }; #endif // MXFLCPRESENTER_H diff --git a/LEGO1/mxloopingflcpresenter.cpp b/LEGO1/mxloopingflcpresenter.cpp index f4602f3c..041ae6a5 100644 --- a/LEGO1/mxloopingflcpresenter.cpp +++ b/LEGO1/mxloopingflcpresenter.cpp @@ -1,5 +1,9 @@ #include "mxloopingflcpresenter.h" +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxLoopingFlcPresenter, 0x6c); + // OFFSET: LEGO1 0x100b4310 STUB MxLoopingFlcPresenter::MxLoopingFlcPresenter() { diff --git a/LEGO1/mxloopingflcpresenter.h b/LEGO1/mxloopingflcpresenter.h index 5152e4d9..1973c28e 100644 --- a/LEGO1/mxloopingflcpresenter.h +++ b/LEGO1/mxloopingflcpresenter.h @@ -3,6 +3,8 @@ #include "mxflcpresenter.h" +#include "decomp.h" + // VTABLE 0x100dc480 // SIZE 0x6c class MxLoopingFlcPresenter : public MxFlcPresenter @@ -17,9 +19,10 @@ class MxLoopingFlcPresenter : public MxFlcPresenter // 0x10101e20 return "MxLoopingFlcPresenter"; } - + private: void Init(); + undefined4 m_unk68; }; #endif // MXLOOPINGFLCPRESENTER_H diff --git a/LEGO1/mxloopingmidipresenter.cpp b/LEGO1/mxloopingmidipresenter.cpp new file mode 100644 index 00000000..ebeed4b4 --- /dev/null +++ b/LEGO1/mxloopingmidipresenter.cpp @@ -0,0 +1,5 @@ +#include "mxloopingmidipresenter.h" + +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxLoopingMIDIPresenter, 0x58); diff --git a/LEGO1/mxloopingsmkpresenter.cpp b/LEGO1/mxloopingsmkpresenter.cpp index cb038462..da9223df 100644 --- a/LEGO1/mxloopingsmkpresenter.cpp +++ b/LEGO1/mxloopingsmkpresenter.cpp @@ -1,5 +1,9 @@ #include "mxloopingsmkpresenter.h" +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxLoopingSmkPresenter, 0x724); + // OFFSET: LEGO1 0x100b48b0 MxLoopingSmkPresenter::MxLoopingSmkPresenter() { diff --git a/LEGO1/mxloopingsmkpresenter.h b/LEGO1/mxloopingsmkpresenter.h index 129d98b9..8ca18d20 100644 --- a/LEGO1/mxloopingsmkpresenter.h +++ b/LEGO1/mxloopingsmkpresenter.h @@ -3,6 +3,8 @@ #include "mxsmkpresenter.h" +#include "decomp.h" + // VTABLE 0x100dc540 // SIZE 0x724 class MxLoopingSmkPresenter : public MxSmkPresenter @@ -17,9 +19,10 @@ class MxLoopingSmkPresenter : public MxSmkPresenter // 0x10101e08 return "MxLoopingSmkPresenter"; } - + private: void Init(); + undefined4 m_unk720; }; #endif // MXLOOPINGSMKPRESENTER_H diff --git a/LEGO1/mxmediapresenter.cpp b/LEGO1/mxmediapresenter.cpp index 793b3ea8..9df33285 100644 --- a/LEGO1/mxmediapresenter.cpp +++ b/LEGO1/mxmediapresenter.cpp @@ -1,5 +1,7 @@ #include "mxmediapresenter.h" +DECOMP_SIZE_ASSERT(MxMediaPresenter, 0x50); + // OFFSET: LEGO1 0x100b5d10 STUB long MxMediaPresenter::Tickle() { diff --git a/LEGO1/mxmediapresenter.h b/LEGO1/mxmediapresenter.h index 647150c4..b3a1b38a 100644 --- a/LEGO1/mxmediapresenter.h +++ b/LEGO1/mxmediapresenter.h @@ -3,6 +3,8 @@ #include "mxpresenter.h" +#include "decomp.h" + // VTABLE 0x100d4cd8 class MxMediaPresenter : public MxPresenter { @@ -27,6 +29,10 @@ class MxMediaPresenter : public MxPresenter return !strcmp(name, MxMediaPresenter::ClassName()) || MxPresenter::IsA(name); } + undefined4 m_unk40; + undefined4 m_unk44; + undefined4 m_unk48; + undefined4 m_unk4c; private: void Init(); diff --git a/LEGO1/mxmidipresenter.cpp b/LEGO1/mxmidipresenter.cpp new file mode 100644 index 00000000..98868f8a --- /dev/null +++ b/LEGO1/mxmidipresenter.cpp @@ -0,0 +1,16 @@ +#include "mxmidipresenter.h" + +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxMIDIPresenter, 0x58); + +// OFFSET: LEGO1 0x100c25e0 +MxMIDIPresenter::MxMIDIPresenter() { + Init(); +} + +// OFFSET: LEGO1 0x100c2820 +void MxMIDIPresenter::Init() +{ + m_unk54 = 0; +} diff --git a/LEGO1/mxmidipresenter.h b/LEGO1/mxmidipresenter.h index 8a46d12a..1cd65c4a 100644 --- a/LEGO1/mxmidipresenter.h +++ b/LEGO1/mxmidipresenter.h @@ -6,6 +6,11 @@ // VTABLE 0x100dca20 class MxMIDIPresenter : public MxMusicPresenter { +public: + MxMIDIPresenter(); +private: + void Init(); + undefined4 m_unk54; }; #endif // MXMIDIPRESENTER_H diff --git a/LEGO1/mxobjectfactory.cpp b/LEGO1/mxobjectfactory.cpp new file mode 100644 index 00000000..d52e4dac --- /dev/null +++ b/LEGO1/mxobjectfactory.cpp @@ -0,0 +1,45 @@ +#include "mxobjectfactory.h" + +#include "mxpresenter.h" +#include "mxcompositepresenter.h" +#include "mxvideopresenter.h" +#include "mxflcpresenter.h" +#include "mxsmkpresenter.h" +#include "mxstillpresenter.h" +#include "mxwavepresenter.h" +#include "mxmidipresenter.h" +#include "mxeventpresenter.h" +#include "mxloopingflcpresenter.h" +#include "mxloopingsmkpresenter.h" +#include "mxloopingmidipresenter.h" + +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxObjectFactory, 0x38); // 100af1db + +// OFFSET: LEGO1 0x100b0d80 +MxObjectFactory::MxObjectFactory() +{ +#define X(V) this->m_id##V = MxAtomId(#V, LookupMode_Exact); + FOR_MXOBJECTFACTORY_OBJECTS(X) +#undef X +} + +// OFFSET: LEGO1 0x100b12c0 +MxCore *MxObjectFactory::Create(const char *name) +{ + MxAtomId atom(name, LookupMode_Exact); + + if (0) { +#define X(V) } else if (this->m_id##V == atom) { return new V; + FOR_MXOBJECTFACTORY_OBJECTS(X) +#undef X + } else { + return NULL; + } +} + +// OFFSET: LEGO1 0x100b1a30 STUB +void MxObjectFactory::vtable18(void *) { + // FIXME +} diff --git a/LEGO1/mxobjectfactory.h b/LEGO1/mxobjectfactory.h index bdd172a8..53aee2cb 100644 --- a/LEGO1/mxobjectfactory.h +++ b/LEGO1/mxobjectfactory.h @@ -2,11 +2,33 @@ #define MXOBJECTFACTORY_H #include "mxcore.h" +#include "mxatomid.h" + +#define FOR_MXOBJECTFACTORY_OBJECTS(X) \ + X(MxPresenter) \ + X(MxCompositePresenter) \ + X(MxVideoPresenter) \ + X(MxFlcPresenter) \ + X(MxSmkPresenter) \ + X(MxStillPresenter) \ + X(MxWavePresenter) \ + X(MxMIDIPresenter) \ + X(MxEventPresenter) \ + X(MxLoopingFlcPresenter) \ + X(MxLoopingSmkPresenter) \ + X(MxLoopingMIDIPresenter) // VTABLE 0x100dc220 class MxObjectFactory : public MxCore { - +public: + MxObjectFactory(); + virtual MxCore *Create(const char *name); // vtable 0x14 + virtual void vtable18(void *); // vtable 0x18 +private: +#define X(V) MxAtomId m_id##V; + FOR_MXOBJECTFACTORY_OBJECTS(X) +#undef X }; #endif // MXOBJECTFACTORY_H diff --git a/LEGO1/mxpresenter.cpp b/LEGO1/mxpresenter.cpp index 893de60d..5ef01c64 100644 --- a/LEGO1/mxpresenter.cpp +++ b/LEGO1/mxpresenter.cpp @@ -1,5 +1,9 @@ #include "mxpresenter.h" +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxPresenter, 0x40); + // OFFSET: LEGO1 0x1000bee0 STUB void MxPresenter::DoneTickle() { @@ -24,10 +28,9 @@ void MxPresenter::ParseExtra() // TODO } -// OFFSET: LEGO1 0x1000c070 STUB +// OFFSET: LEGO1 0x1000bf00 MxPresenter::~MxPresenter() { - // TODO } // OFFSET: LEGO1 0x100b5200 STUB @@ -46,52 +49,57 @@ long MxPresenter::StartAction(MxStreamController *, MxDSAction *) return 0; } -// OFFSET: LEGO1 0x100d4d74 STUB +// OFFSET: LEGO1 0x100b4e40 STUB void MxPresenter::EndAction() { // TODO } -// OFFSET: LEGO1 0x100d4d8c STUB +// OFFSET: LEGO1 0x100b52d0 STUB void MxPresenter::Enable(unsigned char) { // TODO } -// OFFSET: LEGO1 0x1000be30 STUB +// OFFSET: LEGO1 0x1000be30 void MxPresenter::VTable0x14() { - // TODO } -// OFFSET: LEGO1 0x1000be40 STUB +// OFFSET: LEGO1 0x1000be40 void MxPresenter::VTable0x18() { - // TODO + ParseExtra(); + m_unk0xc |= 1 << (unsigned char)m_unk0x8; + m_unk0x8 = 2; } -// OFFSET: LEGO1 0x1000be60 STUB +// OFFSET: LEGO1 0x1000be60 void MxPresenter::VTable0x1c() { - // TODO + m_unk0xc |= 1 << (unsigned char)m_unk0x8; + m_unk0x8 = 3; } -// OFFSET: LEGO1 0x1000be80 STUB +// OFFSET: LEGO1 0x1000be80 void MxPresenter::VTable0x20() { - // TODO + m_unk0xc |= 1 << (unsigned char)m_unk0x8; + m_unk0x8 = 4; } -// OFFSET: LEGO1 0x1000bea0 STUB +// OFFSET: LEGO1 0x1000bea0 void MxPresenter::VTable0x24() { - // TODO + m_unk0xc |= 1 << (unsigned char)m_unk0x8; + m_unk0x8 = 5; } -// OFFSET: LEGO1 0x1000bec0 STUB +// OFFSET: LEGO1 0x1000bec0 void MxPresenter::VTable0x28() { - // TODO + m_unk0xc |= 1 << (unsigned char)m_unk0x8; + m_unk0x8 = 6; } // OFFSET: LEGO1 0x1000bf70 @@ -105,18 +113,17 @@ void MxPresenter::InitVirtual() { Init(); } -// OFFSET: LEGO1 0x1000bf90 STUB +// OFFSET: LEGO1 0x1000bf90 void MxPresenter::VTable0x44(undefined4 param) { - // TODO + m_unk0xc |= 1 << (unsigned char)m_unk0x8; + m_unk0x8 = param; } -// OFFSET: LEGO1 0x1000bfb0 STUB -undefined4 MxPresenter::VTable0x48(undefined4 param) +// OFFSET: LEGO1 0x1000bfb0 +unsigned char MxPresenter::VTable0x48(unsigned char param) { - // TODO - - return undefined4(); + return m_unk0xc & (1 << param); } // OFFSET: LEGO1 0x1000bfc0 @@ -125,10 +132,8 @@ undefined4 MxPresenter::VTable0x4c() return 0; } -// OFFSET: LEGO1 0x1000bfd0 STUB -undefined MxPresenter::VTable0x50() +// OFFSET: LEGO1 0x1000bfd0 +undefined MxPresenter::VTable0x50(undefined4, undefined4) { - // TODO - return 0; } diff --git a/LEGO1/mxpresenter.h b/LEGO1/mxpresenter.h index 6ea022da..a6616bd8 100644 --- a/LEGO1/mxpresenter.h +++ b/LEGO1/mxpresenter.h @@ -5,65 +5,64 @@ #include "mxcriticalsection.h" +#include "decomp.h" + class MxStreamController; class MxDSAction; -#ifndef undefined4 -#define undefined4 int -#endif - -#ifndef undefined -#define undefined int -#endif - class MxPresenter : public MxCore { public: + MxPresenter() { + Init(); + } __declspec(dllexport) virtual ~MxPresenter(); // vtable+0x0 // OFFSET: LEGO1 0x1000bfe0 - inline virtual const char *ClassName() const // vtable+0xc + inline virtual const char *ClassName() const override// vtable+0xc { // 0x100f0740 return "MxPresenter"; } // OFFSET: LEGO1 0x1000bff0 - inline virtual MxBool IsA(const char *name) const // vtable+0x10 + inline virtual MxBool IsA(const char *name) const override// vtable+0x10 { return !strcmp(name, MxPresenter::ClassName()) || MxCore::IsA(name); } - __declspec(dllexport) virtual long Tickle(); // vtable+0x8 + __declspec(dllexport) virtual long Tickle() override; // vtable+0x8 virtual void VTable0x14(); // vtable+0x14 virtual void VTable0x18(); // vtable+0x18 virtual void VTable0x1c(); // vtable+0x1c virtual void VTable0x20(); // vtable+0x20 virtual void VTable0x24(); // vtable+0x24 virtual void VTable0x28(); // vtable+0x28 - virtual undefined4 VTable0x34(); // vtable+0x34 - virtual void InitVirtual(); // vtable+0x38 - virtual void VTable0x44(undefined4 param); // vtable+0x44 - virtual undefined4 VTable0x48(undefined4 param); // vtable+0x48 - virtual undefined4 VTable0x4c(); // vtable+0x4c - virtual undefined VTable0x50(); // vtable+0x50 protected: __declspec(dllexport) virtual void DoneTickle(); // vtable+0x2c - __declspec(dllexport) void Init(); __declspec(dllexport) virtual void ParseExtra(); // vtable+0x30 public: + virtual undefined4 VTable0x34(); // vtable+0x34 + virtual void InitVirtual(); // vtable+0x38 __declspec(dllexport) virtual long StartAction(MxStreamController *, MxDSAction *); // vtable+0x3c __declspec(dllexport) virtual void EndAction(); // vtable+0x40 + virtual void VTable0x44(undefined4 param); // vtable+0x44 + virtual unsigned char VTable0x48(unsigned char param); // vtable+0x48 + virtual undefined4 VTable0x4c(); // vtable+0x4c + virtual undefined VTable0x50(undefined4, undefined4); // vtable+0x50 __declspec(dllexport) virtual void Enable(unsigned char); // vtable+0x54 +protected: + __declspec(dllexport) void Init(); +public: - int m_unk0x8; - int m_unk0xc; - int m_unk0x10; - int m_unk0x14; - int m_unk0x18; + undefined4 m_unk0x8; + undefined4 m_unk0xc; + undefined4 m_unk0x10; + undefined4 m_unk0x14; + undefined4 m_unk0x18; MxDSAction* m_action; // 0 MxCriticalSection m_criticalSection; - int m_unk0x3c; + undefined4 m_unk0x3c; // VTABLE 0x100d4d38 }; diff --git a/LEGO1/mxsmkpresenter.cpp b/LEGO1/mxsmkpresenter.cpp index 9f160a99..cc7efec1 100644 --- a/LEGO1/mxsmkpresenter.cpp +++ b/LEGO1/mxsmkpresenter.cpp @@ -1,5 +1,9 @@ #include "mxsmkpresenter.h" +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxSmkPresenter, 0x720); + // OFFSET: LEGO1 0x100b3650 STUB MxSmkPresenter::MxSmkPresenter() { diff --git a/LEGO1/mxsmkpresenter.h b/LEGO1/mxsmkpresenter.h index b439bc2a..325091bb 100644 --- a/LEGO1/mxsmkpresenter.h +++ b/LEGO1/mxsmkpresenter.h @@ -3,16 +3,19 @@ #include "mxvideopresenter.h" +#include "decomp.h" + // VTABLE 0x100dc348 // SIZE 0x720 class MxSmkPresenter : public MxVideoPresenter { public: MxSmkPresenter(); - + + undefined4 m_unk64[430]; + undefined4 m_unk71c; private: void Init(); - }; #endif // MXSMKPRESENTER_H diff --git a/LEGO1/mxstillpresenter.cpp b/LEGO1/mxstillpresenter.cpp index bc2b03b5..351971f0 100644 --- a/LEGO1/mxstillpresenter.cpp +++ b/LEGO1/mxstillpresenter.cpp @@ -1 +1,5 @@ #include "mxstillpresenter.h" + +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxStillPresenter, 0x6c); diff --git a/LEGO1/mxstillpresenter.h b/LEGO1/mxstillpresenter.h index d9376b8e..9b7c5810 100644 --- a/LEGO1/mxstillpresenter.h +++ b/LEGO1/mxstillpresenter.h @@ -3,11 +3,18 @@ #include "mxvideopresenter.h" +#include "decomp.h" + // VTABLE 0x100d7a38 // SIZE 0x6c class MxStillPresenter : public MxVideoPresenter { public: + MxStillPresenter() { + m_unk68 = 0; + } + undefined4 m_unk64; + undefined4 m_unk68; }; #endif // MXSTILLPRESENTER_H diff --git a/LEGO1/mxvideopresenter.cpp b/LEGO1/mxvideopresenter.cpp index 894b1e9c..ee12968a 100644 --- a/LEGO1/mxvideopresenter.cpp +++ b/LEGO1/mxvideopresenter.cpp @@ -1 +1,8 @@ #include "mxvideopresenter.h" + +DECOMP_SIZE_ASSERT(MxVideoPresenter, 0x64); + +// OFFSET: LEGO1 0x100b2760 STUB +void MxVideoPresenter::Init() { + // TODO +} diff --git a/LEGO1/mxvideopresenter.h b/LEGO1/mxvideopresenter.h index eba5040c..e9634427 100644 --- a/LEGO1/mxvideopresenter.h +++ b/LEGO1/mxvideopresenter.h @@ -3,12 +3,17 @@ #include "mxmediapresenter.h" +#include "decomp.h" + class MxVideoPresenter : public MxMediaPresenter { public: + MxVideoPresenter() { + Init(); + } // OFFSET: LEGO1 0x1000c820 inline virtual const char *ClassName() const override // vtable+0x0c - { + { // 0x100f0760 return "MxVideoPresenter"; } @@ -18,6 +23,15 @@ class MxVideoPresenter : public MxMediaPresenter { return !strcmp(name, MxVideoPresenter::ClassName()) || MxMediaPresenter::IsA(name); } + + void Init(); + + undefined4 m_unk50; + undefined4 m_unk54; + undefined4 m_unk58; + short m_unk5c; + unsigned char m_flags; + int m_unk60; }; #endif // MXVIDEOPRESENTER_H diff --git a/LEGO1/mxwavepresenter.cpp b/LEGO1/mxwavepresenter.cpp index bfd69c5f..cba9106e 100644 --- a/LEGO1/mxwavepresenter.cpp +++ b/LEGO1/mxwavepresenter.cpp @@ -1,7 +1,18 @@ #include "mxwavepresenter.h" -// OFFSET: LEGO1 0x100b1ad0 STUB +#include "decomp.h" + +DECOMP_SIZE_ASSERT(MxWavePresenter, 0x6c); + +// OFFSET: LEGO1 0x100b1ad0 void MxWavePresenter::Init() { - // TODO + m_unk54 = 0; + m_unk58 = 0; + m_unk5c = 0; + m_unk60 = 0; + m_unk64 = 0; + m_unk65 = 0; + m_unk66 = 0; + m_unk68 = 0; } diff --git a/LEGO1/mxwavepresenter.h b/LEGO1/mxwavepresenter.h index c00d978d..a8a1de45 100644 --- a/LEGO1/mxwavepresenter.h +++ b/LEGO1/mxwavepresenter.h @@ -3,14 +3,28 @@ #include "mxsoundpresenter.h" +#include "decomp.h" + // VTABLE 0x100d49a8 // SIZE 0x6c class MxWavePresenter : public MxSoundPresenter { private: void Init(); - + public: + MxWavePresenter() { + Init(); + } + undefined4 m_unk54; + undefined4 m_unk58; + undefined4 m_unk5c; + undefined4 m_unk60; + undefined m_unk64; + undefined m_unk65; + undefined m_unk66; + undefined m_unk67; + undefined m_unk68; }; #endif // MXWAVEPRESENTER_H