Merge branch 'master' into mxdsselectaction

This commit is contained in:
Christian Semmler 2023-10-07 11:31:29 -04:00
commit 6510ff62e0
32 changed files with 249 additions and 121 deletions

View File

@ -140,8 +140,8 @@ add_library(lego1 SHARED
LEGO1/mxmatrix.cpp LEGO1/mxmatrix.cpp
LEGO1/mxmediamanager.cpp LEGO1/mxmediamanager.cpp
LEGO1/mxmediapresenter.cpp LEGO1/mxmediapresenter.cpp
LEGO1/mxmidimanager.cpp
LEGO1/mxmidipresenter.cpp LEGO1/mxmidipresenter.cpp
LEGO1/mxmusicmanager.cpp
LEGO1/mxmusicpresenter.cpp LEGO1/mxmusicpresenter.cpp
LEGO1/mxnotificationmanager.cpp LEGO1/mxnotificationmanager.cpp
LEGO1/mxobjectfactory.cpp LEGO1/mxobjectfactory.cpp

View File

@ -3,14 +3,25 @@
#include <dsound.h> #include <dsound.h>
#include "legoomni.h"
#include "legoanimationmanager.h" #include "legoanimationmanager.h"
#include "legobuildingmanager.h" #include "legobuildingmanager.h"
#include "legogamestate.h"
#include "legoinputmanager.h"
#include "legomodelpresenter.h" #include "legomodelpresenter.h"
#include "legoomni.h"
#include "legopartpresenter.h" #include "legopartpresenter.h"
#include "legoroi.h"
#include "legovideomanager.h"
#include "legoworldpresenter.h" #include "legoworldpresenter.h"
#include "mxbackgroundaudiomanager.h"
#include "mxdirectdraw.h" #include "mxdirectdraw.h"
#include "mxdsaction.h" #include "mxdsaction.h"
#include "mxomnicreateflags.h"
#include "mxomnicreateparam.h"
#include "mxstreamer.h"
#include "mxticklemanager.h"
#include "mxtimer.h"
#include "mxtransitionmanager.h"
#include "res/resource.h" #include "res/resource.h"

View File

@ -1,6 +1,8 @@
#include "legofullscreenmovie.h" #include "legofullscreenmovie.h"
#include "mxtypes.h"
#include "legoomni.h" #include "legoomni.h"
#include "legovideomanager.h"
#include "mxtypes.h"
#include "decomp.h" #include "decomp.h"
DECOMP_SIZE_ASSERT(LegoFullScreenMovie, 0x24) DECOMP_SIZE_ASSERT(LegoFullScreenMovie, 0x24)

View File

@ -1,5 +1,7 @@
#include "legogamestate.h" #include "legogamestate.h"
#include "legoomni.h" #include "legoomni.h"
#include "mxvariabletable.h"
#include "decomp.h" #include "decomp.h"
// Based on the highest dword offset (0x42c) referenced in the constructor. // Based on the highest dword offset (0x42c) referenced in the constructor.

View File

@ -1,6 +1,7 @@
#include "legonavcontroller.h" #include "legonavcontroller.h"
#include "legoomni.h" #include "legoomni.h"
#include "legovideomanager.h"
#include "legoutil.h" #include "legoutil.h"
// 0x100f4c28 // 0x100f4c28

View File

@ -1,6 +1,8 @@
#include "legoomni.h" #include "legoomni.h"
#include "mxdsobject.h" #include "mxbackgroundaudiomanager.h"
#include "mxdsfile.h"
#include "legogamestate.h"
// 0x100f4588 // 0x100f4588
char *g_nocdSourceName = NULL; char *g_nocdSourceName = NULL;
@ -99,11 +101,10 @@ void SetOmniUserMessage(void (*p_userMsg)(const char *,int))
g_omniUserMessage = p_userMsg; g_omniUserMessage = p_userMsg;
} }
// OFFSET: LEGO1 0x100acf50 STUB // OFFSET: LEGO1 0x100acf50
MxLong Start(MxDSAction *) MxResult Start(MxDSAction* p_dsAction)
{ {
// TODO return MxOmni::GetInstance()->Start(p_dsAction);
return 0;
} }
// OFFSET: LEGO1 0x1005ad10 // OFFSET: LEGO1 0x1005ad10
@ -257,6 +258,10 @@ void LegoOmni::Init()
MxResult LegoOmni::Create(COMPAT_CONST MxOmniCreateParam &p) MxResult LegoOmni::Create(COMPAT_CONST MxOmniCreateParam &p)
{ {
// FIXME: Stub // FIXME: Stub
MxOmni::Create(p);
m_gameState = new LegoGameState();
m_bkgAudioManager = new MxBackgroundAudioManager();
return SUCCESS; return SUCCESS;
} }
@ -265,9 +270,14 @@ void LegoOmni::Destroy()
// FIXME: Stub // FIXME: Stub
} }
void LegoOmni::vtable0x20() // OFFSET: LEGO1 0x1005b580
MxResult LegoOmni::Start(MxDSAction* action)
{ {
// FIXME: Stub MxResult result = MxOmni::Start(action);
this->m_action.SetAtomId(action->GetAtomId());
this->m_action.SetObjectId(action->GetObjectId());
this->m_action.SetUnknown24(action->GetUnknown24());
return result;
} }
void LegoOmni::DeleteObject(MxDSAction &ds) void LegoOmni::DeleteObject(MxDSAction &ds)

View File

@ -2,25 +2,24 @@
#define LEGOOMNI_H #define LEGOOMNI_H
#include "compat.h" #include "compat.h"
#include "legoentity.h"
#include "legoinputmanager.h"
#include "legogamestate.h"
#include "legonavcontroller.h"
#include "legopathboundary.h"
#include "legoroi.h"
#include "legovideomanager.h"
#include "mxatomid.h"
#include "mxbackgroundaudiomanager.h"
#include "mxdsaction.h"
#include "mxdsfile.h"
#include "mxdsobject.h"
#include "mxomni.h" #include "mxomni.h"
#include "mxtransitionmanager.h" #include "mxdsaction.h"
#include "isle.h"
#include "legobuildingmanager.h"
#include "legoplantmanager.h"
class Isle;
class LegoBuildingManager;
class LegoEntity;
class LegoGameState;
class LegoInputManager;
class LegoNavController;
class LegoPathBoundary;
class LegoPlantManager;
class LegoROI;
class LegoSoundManager; class LegoSoundManager;
class LegoVideoManager;
class LegoWorld;
class MxAtomId;
class MxBackgroundAudioManager;
class MxDSFile;
class MxTransitionManager; class MxTransitionManager;
// VTABLE 0x100d8638 // VTABLE 0x100d8638
@ -55,7 +54,7 @@ class LegoOmni : public MxOmni
virtual void Init() override; // vtable+14 virtual void Init() override; // vtable+14
virtual MxResult Create(COMPAT_CONST MxOmniCreateParam &p) override; // vtable+18 virtual MxResult Create(COMPAT_CONST MxOmniCreateParam &p) override; // vtable+18
virtual void Destroy() override; // vtable+1c virtual void Destroy() override; // vtable+1c
virtual void vtable0x20() override; virtual MxResult Start(MxDSAction* action) override;
virtual void DeleteObject(MxDSAction &ds) override; virtual void DeleteObject(MxDSAction &ds) override;
virtual MxBool DoesEntityExist(MxDSAction &ds) override; virtual MxBool DoesEntityExist(MxDSAction &ds) override;
virtual void vtable0x2c() override; virtual void vtable0x2c() override;
@ -110,10 +109,9 @@ __declspec(dllexport) LegoEntity * PickEntity(MxLong,MxLong);
__declspec(dllexport) LegoROI * PickROI(MxLong,MxLong); __declspec(dllexport) LegoROI * PickROI(MxLong,MxLong);
__declspec(dllexport) void SetOmniUserMessage(void (*)(const char *,int)); __declspec(dllexport) void SetOmniUserMessage(void (*)(const char *,int));
__declspec(dllexport) LegoSoundManager * SoundManager(); __declspec(dllexport) LegoSoundManager * SoundManager();
__declspec(dllexport) MxLong Start(MxDSAction *); __declspec(dllexport) MxResult Start(MxDSAction*);
__declspec(dllexport) MxTransitionManager * TransitionManager(); __declspec(dllexport) MxTransitionManager * TransitionManager();
__declspec(dllexport) LegoVideoManager * VideoManager(); __declspec(dllexport) LegoVideoManager * VideoManager();
__declspec(dllexport) MxLong Start(MxDSAction *a);
LegoBuildingManager* BuildingManager(); LegoBuildingManager* BuildingManager();
Isle* GetIsle(); Isle* GetIsle();

View File

@ -3,3 +3,15 @@
#include "decomp.h" #include "decomp.h"
DECOMP_SIZE_ASSERT(MxAudioPresenter, 0x54); DECOMP_SIZE_ASSERT(MxAudioPresenter, 0x54);
// OFFSET: LEGO1 0x1000d260
undefined4 MxAudioPresenter::vtable5c()
{
return this->m_unk50;
}
// OFFSET: LEGO1 0x1000d270
void MxAudioPresenter::vtable60(undefined4 p_unk50)
{
this->m_unk50 = p_unk50;
}

View File

@ -1,6 +1,7 @@
#ifndef MXAUDIOPRESENTER_H #ifndef MXAUDIOPRESENTER_H
#define MXAUDIOPRESENTER_H #define MXAUDIOPRESENTER_H
#include "decomp.h"
#include "mxmediapresenter.h" #include "mxmediapresenter.h"
// VTABLE 0x100d4c70 // VTABLE 0x100d4c70
@ -24,7 +25,10 @@ class MxAudioPresenter : public MxMediaPresenter
return !strcmp(name, MxAudioPresenter::ClassName()) || MxMediaPresenter::IsA(name); return !strcmp(name, MxAudioPresenter::ClassName()) || MxMediaPresenter::IsA(name);
} }
int m_unk50; virtual undefined4 vtable5c();
virtual void vtable60(undefined4);
undefined4 m_unk50;
}; };
#endif // MXAUDIOPRESENTER_H #endif // MXAUDIOPRESENTER_H

View File

@ -1,5 +1,7 @@
#include "mxdisplaysurface.h" #include "mxdisplaysurface.h"
#include "mxomni.h" #include "mxomni.h"
#include "mxvideomanager.h"
DECOMP_SIZE_ASSERT(MxDisplaySurface, 0xac); DECOMP_SIZE_ASSERT(MxDisplaySurface, 0xac);

View File

@ -1,10 +1,11 @@
#include "mxdsaction.h" #include "mxdsaction.h"
#include "mxomni.h"
#include "mxtimer.h"
#include <float.h> #include <float.h>
#include <limits.h> #include <limits.h>
#include "mxomni.h"
DECOMP_SIZE_ASSERT(MxDSAction, 0x94) DECOMP_SIZE_ASSERT(MxDSAction, 0x94)
// GLOBAL OFFSET: LEGO1 0x10101410 // GLOBAL OFFSET: LEGO1 0x10101410

View File

@ -36,6 +36,7 @@ class MxDSObject : public MxCore
inline const MxAtomId& GetAtomId() { return this->m_atomId; } inline const MxAtomId& GetAtomId() { return this->m_atomId; }
inline MxU32 GetObjectId() { return this->m_objectId; } inline MxU32 GetObjectId() { return this->m_objectId; }
inline MxS16 GetUnknown24() { return this->m_unk24; }
inline void SetObjectId(MxU32 p_objectId) { this->m_objectId = p_objectId; } inline void SetObjectId(MxU32 p_objectId) { this->m_objectId = p_objectId; }
inline void SetUnknown24(MxS16 p_unk24) { this->m_unk24 = p_unk24; } inline void SetUnknown24(MxS16 p_unk24) { this->m_unk24 = p_unk24; }

View File

@ -10,7 +10,7 @@ MxLoopingFlcPresenter::MxLoopingFlcPresenter()
Init(); Init();
} }
// OFFSET: LEGO1 0x100b43b0 STUB // OFFSET: LEGO1 0x100b43b0
MxLoopingFlcPresenter::~MxLoopingFlcPresenter() MxLoopingFlcPresenter::~MxLoopingFlcPresenter()
{ {
Destroy(TRUE); Destroy(TRUE);

View File

@ -1,42 +0,0 @@
#ifndef MXMIDIMANAGER_H
#define MXMIDIMANAGER_H
#include "decomp.h"
#include "mxaudiomanager.h"
// VTABLE 0x100dc930
// SIZE 0x58
class MxMIDIManager : public MxAudioManager
{
public:
MxMIDIManager();
virtual ~MxMIDIManager() override;
virtual void Destroy() override; // vtable+18
virtual void SetVolume(MxS32 p_volume) override; // vtable+2c
virtual MxResult StartMIDIThread(MxU32 p_frequencyMS, MxU8 p_noRegister); // vtable+30
private:
void LockedReinitialize(MxBool p_skipDestroy);
void DeinitializeMIDI();
MxS32 CalculateVolume(MxS32 p_volume);
void SetMIDIVolume();
HMIDISTRM m_MIDIStreamH; // 0x30
MxBool m_MIDIInitialized; // 0x34
undefined4 m_unk38; // 0x38
undefined4 m_unk3c; // 0x3c
undefined4 m_unk40; // 0x40
undefined4 m_unk44; // 0x44
undefined4 m_unk48; // 0x48
MIDIHDR *m_MIDIHdrP; // 0x4c
MxS32 m_multiplier; // 0x50
DWORD m_MIDIVolume; // 0x54
protected:
void Init();
void InitData();
};
#endif // MXMIDIMANAGER_H

View File

@ -1,23 +1,25 @@
#include "mxmidimanager.h" #include "mxmusicmanager.h"
#include "mxticklemanager.h"
#include "mxomni.h" #include "mxomni.h"
#include <windows.h> #include <windows.h>
DECOMP_SIZE_ASSERT(MxMIDIManager, 0x58); DECOMP_SIZE_ASSERT(MxMusicManager, 0x58);
// OFFSET: LEGO1 0x100c05a0 // OFFSET: LEGO1 0x100c05a0
MxMIDIManager::MxMIDIManager() MxMusicManager::MxMusicManager()
{ {
Init(); Init();
} }
// OFFSET: LEGO1 0x100c0630 // OFFSET: LEGO1 0x100c0630
MxMIDIManager::~MxMIDIManager() MxMusicManager::~MxMusicManager()
{ {
LockedReinitialize(TRUE); LockedReinitialize(TRUE);
} }
// OFFSET: LEGO1 0x100c0b20 // OFFSET: LEGO1 0x100c0b20
void MxMIDIManager::DeinitializeMIDI() void MxMusicManager::DeinitializeMIDI()
{ {
m_criticalSection.Enter(); m_criticalSection.Enter();
@ -36,14 +38,14 @@ void MxMIDIManager::DeinitializeMIDI()
} }
// OFFSET: LEGO1 0x100c0690 // OFFSET: LEGO1 0x100c0690
void MxMIDIManager::Init() void MxMusicManager::Init()
{ {
this->m_multiplier = 100; this->m_multiplier = 100;
InitData(); InitData();
} }
// OFFSET: LEGO1 0x100c06a0 // OFFSET: LEGO1 0x100c06a0
void MxMIDIManager::InitData() void MxMusicManager::InitData()
{ {
this->m_MIDIStreamH = 0; this->m_MIDIStreamH = 0;
this->m_MIDIInitialized = FALSE; this->m_MIDIInitialized = FALSE;
@ -56,7 +58,7 @@ void MxMIDIManager::InitData()
} }
// OFFSET: LEGO1 0x100c06c0 // OFFSET: LEGO1 0x100c06c0
void MxMIDIManager::LockedReinitialize(MxBool p_skipDestroy) void MxMusicManager::LockedReinitialize(MxBool p_skipDestroy)
{ {
if (this->m_thread) if (this->m_thread)
{ {
@ -83,20 +85,20 @@ void MxMIDIManager::LockedReinitialize(MxBool p_skipDestroy)
} }
// OFFSET: LEGO1 0x100c0930 // OFFSET: LEGO1 0x100c0930
void MxMIDIManager::Destroy() void MxMusicManager::Destroy()
{ {
LockedReinitialize(FALSE); LockedReinitialize(FALSE);
} }
// OFFSET: LEGO1 0x100c09a0 // OFFSET: LEGO1 0x100c09a0
MxS32 MxMIDIManager::CalculateVolume(MxS32 p_volume) MxS32 MxMusicManager::CalculateVolume(MxS32 p_volume)
{ {
MxS32 result = (p_volume * 0xffff) / 100; MxS32 result = (p_volume * 0xffff) / 100;
return (result << 0x10) | result; return (result << 0x10) | result;
} }
// OFFSET: LEGO1 0x100c07f0 // OFFSET: LEGO1 0x100c07f0
void MxMIDIManager::SetMIDIVolume() void MxMusicManager::SetMIDIVolume()
{ {
MxS32 result = (this->m_volume * this->m_multiplier) / 0x64; MxS32 result = (this->m_volume * this->m_multiplier) / 0x64;
HMIDISTRM streamHandle = this->m_MIDIStreamH; HMIDISTRM streamHandle = this->m_MIDIStreamH;
@ -109,7 +111,7 @@ void MxMIDIManager::SetMIDIVolume()
} }
// OFFSET: LEGO1 0x100c0940 // OFFSET: LEGO1 0x100c0940
void MxMIDIManager::SetVolume(MxS32 p_volume) void MxMusicManager::SetVolume(MxS32 p_volume)
{ {
MxAudioManager::SetVolume(p_volume); MxAudioManager::SetVolume(p_volume);
this->m_criticalSection.Enter(); this->m_criticalSection.Enter();
@ -118,7 +120,7 @@ void MxMIDIManager::SetVolume(MxS32 p_volume)
} }
// OFFSET: LEGO1 0x100c0840 // OFFSET: LEGO1 0x100c0840
MxResult MxMIDIManager::StartMIDIThread(MxU32 p_frequencyMS, MxBool p_noRegister) MxResult MxMusicManager::StartMIDIThread(MxU32 p_frequencyMS, MxBool p_noRegister)
{ {
MxResult status = FAILURE; MxResult status = FAILURE;
MxBool locked = FALSE; MxBool locked = FALSE;

View File

@ -1,11 +1,42 @@
#ifndef MXMUSICMANAGER_H #ifndef MXMUSICMANAGER_H
#define MXMUSICMANAGER_H #define MXMUSICMANAGER_H
#include "mxcore.h" #include "decomp.h"
#include "mxaudiomanager.h"
// VTABLE 0x100dc930 // VTABLE 0x100dc930
class MxMusicManager : public MxCore // SIZE 0x58
class MxMusicManager : public MxAudioManager
{ {
public:
MxMusicManager();
virtual ~MxMusicManager() override;
virtual void Destroy() override; // vtable+18
virtual void SetVolume(MxS32 p_volume) override; // vtable+2c
virtual MxResult StartMIDIThread(MxU32 p_frequencyMS, MxU8 p_noRegister); // vtable+30
private:
void LockedReinitialize(MxBool p_skipDestroy);
void DeinitializeMIDI();
MxS32 CalculateVolume(MxS32 p_volume);
void SetMIDIVolume();
HMIDISTRM m_MIDIStreamH; // 0x30
MxBool m_MIDIInitialized; // 0x34
undefined4 m_unk38; // 0x38
undefined4 m_unk3c; // 0x3c
undefined4 m_unk40; // 0x40
undefined4 m_unk44; // 0x44
undefined4 m_unk48; // 0x48
MIDIHDR *m_MIDIHdrP; // 0x4c
MxS32 m_multiplier; // 0x50
DWORD m_MIDIVolume; // 0x54
protected:
void Init();
void InitData();
}; };
#endif // MXMUSICMANAGER_H #endif // MXMUSICMANAGER_H

View File

@ -6,7 +6,19 @@ MxMusicPresenter::MxMusicPresenter()
Init(); Init();
} }
// OFFSET: LEGO1 0x100c24e0
MxMusicPresenter::~MxMusicPresenter()
{
Destroy(TRUE);
}
// OFFSET: LEGO1 0x100c2540 // OFFSET: LEGO1 0x100c2540
void MxMusicPresenter::Init() void MxMusicPresenter::Init()
{ {
} }
// OFFSET: LEGO1 0x100c2550 STUB
void MxMusicPresenter::Destroy(MxBool)
{
// TODO
}

View File

@ -21,9 +21,11 @@ class MxMusicPresenter : public MxAudioPresenter
} }
MxMusicPresenter(); MxMusicPresenter();
virtual ~MxMusicPresenter() override;
private: private:
void Init(); void Init();
void Destroy(MxBool);
}; };
#endif // MXMUSICPRESENTER_H #endif // MXMUSICPRESENTER_H

View File

@ -1,7 +1,8 @@
#include "mxnotificationmanager.h"
#include "legoomni.h" #include "legoomni.h"
#include "mxautolocker.h" #include "mxautolocker.h"
#include "mxcore.h" #include "mxticklemanager.h"
#include "mxnotificationmanager.h"
#include "mxparam.h" #include "mxparam.h"
#include "mxtypes.h" #include "mxtypes.h"

View File

@ -1,5 +1,17 @@
#include "mxomni.h" #include "mxomni.h"
#include "mxatomidcounter.h"
#include "mxeventmanager.h"
#include "mxmusicmanager.h"
#include "mxnotificationmanager.h"
#include "mxobjectfactory.h"
#include "mxomnicreateparam.h"
#include "mxsoundmanager.h"
#include "mxstreamer.h"
#include "mxticklemanager.h"
#include "mxtimer.h"
#include "mxvideomanager.h"
// 0x101015b8 // 0x101015b8
char g_hdPath[1024]; char g_hdPath[1024];
@ -42,10 +54,16 @@ void MxOmni::Init()
m_unk64 = NULL; m_unk64 = NULL;
} }
// OFFSET: LEGO1 0x100b0090 STUB // OFFSET: LEGO1 0x100b0090
void MxOmni::vtable0x20() MxResult MxOmni::Start(MxDSAction* p_dsAction)
{ {
// TODO MxResult result = FAILURE;
if(p_dsAction->GetAtomId().GetInternal() != NULL && p_dsAction->GetObjectId() != -1 && m_streamer != NULL)
{
result = m_streamer->Unknown100b99b0(p_dsAction);
}
return result;
} }
// OFFSET: LEGO1 0x100b00c0 STUB // OFFSET: LEGO1 0x100b00c0 STUB

View File

@ -1,21 +1,23 @@
#ifndef MXOMNI_H #ifndef MXOMNI_H
#define MXOMNI_H #define MXOMNI_H
#include "mxcore.h"
#include "mxstring.h"
#include "mxcriticalsection.h" #include "mxcriticalsection.h"
#include "mxdsaction.h"
#include "mxeventmanager.h" class MxAtomIdCounterSet;
#include "mxmusicmanager.h" class MxDSAction;
#include "mxnotificationmanager.h" class MxEventManager;
#include "mxobjectfactory.h" class MxMusicManager;
#include "mxomnicreateflags.h" class MxNotificationManager;
#include "mxomnicreateparam.h" class MxObjectFactory;
#include "mxsoundmanager.h" class MxOmniCreateParam;
#include "mxstreamer.h" class MxSoundManager;
#include "mxticklemanager.h" class MxStreamer;
#include "mxtimer.h" class MxTickleManager;
#include "mxvariabletable.h" class MxTimer;
#include "mxvideomanager.h" class MxVariableTable;
#include "mxatomidcounter.h" class MxVideoManager;
// VTABLE 0x100dc168 // VTABLE 0x100dc168
// SIZE 0x68 // SIZE 0x68
@ -38,7 +40,7 @@ class MxOmni : public MxCore
virtual void Init(); // vtable+14 virtual void Init(); // vtable+14
virtual MxResult Create(COMPAT_CONST MxOmniCreateParam &p); // vtable+18 virtual MxResult Create(COMPAT_CONST MxOmniCreateParam &p); // vtable+18
virtual void Destroy(); // vtable+1c virtual void Destroy(); // vtable+1c
virtual void vtable0x20(); // vtable+20 virtual MxResult Start(MxDSAction* p_dsAction); // vtable+20
virtual void DeleteObject(MxDSAction &ds); // vtable+24 virtual void DeleteObject(MxDSAction &ds); // vtable+24
virtual MxBool DoesEntityExist(MxDSAction &ds); // vtable+28 virtual MxBool DoesEntityExist(MxDSAction &ds); // vtable+28
virtual void vtable0x2c(); // vtable+2c virtual void vtable0x2c(); // vtable+2c

View File

@ -1,5 +1,7 @@
#include "mxpalette.h" #include "mxpalette.h"
#include "mxomni.h" #include "mxomni.h"
#include "mxvideomanager.h"
// GLOBAL: LEGO1 0x10102188 0x400 // GLOBAL: LEGO1 0x10102188 0x400
PALETTEENTRY g_defaultPaletteEntries[256] = PALETTEENTRY g_defaultPaletteEntries[256] =

View File

@ -1,14 +1,17 @@
#include "mxpresenter.h" #include "mxpresenter.h"
#include "legoomni.h"
#include "mxautolocker.h" #include "mxautolocker.h"
#include "mxparam.h" #include "mxparam.h"
#include "legoomni.h"
#include "mxdsanim.h" #include "mxdsanim.h"
#include "mxdssound.h" #include "mxdssound.h"
#include <string.h> #include "mxnotificationmanager.h"
#include "decomp.h" #include "decomp.h"
#include "define.h" #include "define.h"
#include <string.h>
DECOMP_SIZE_ASSERT(MxPresenter, 0x40); DECOMP_SIZE_ASSERT(MxPresenter, 0x40);
// OFFSET: LEGO1 0x100b4d50 // OFFSET: LEGO1 0x100b4d50

View File

@ -1,5 +1,5 @@
#include "mxsoundmanager.h" #include "mxsoundmanager.h"
#include "mxticklemanager.h"
#include "mxomni.h" #include "mxomni.h"
DECOMP_SIZE_ASSERT(MxSoundManager, 0x3c); DECOMP_SIZE_ASSERT(MxSoundManager, 0x3c);

View File

@ -30,3 +30,22 @@ MxResult MxStreamController::Open(const char *p_filename)
return SUCCESS; return SUCCESS;
} }
// OFFSET: LEGO1 0x100b9400
MxResult MxStreamController::vtable0x18(undefined4 p_unknown, undefined4 p_unknown2)
{
return FAILURE;
}
// OFFSET: LEGO1 0x100b9410
MxResult MxStreamController::vtable0x1C(undefined4 p_unknown, undefined4 p_unknown2)
{
return FAILURE;
}
// OFFSET: LEGO1 0x100c1690 STUB
MxResult MxStreamController::vtable0x20(MxDSAction* action)
{
// TODO STUB
return FAILURE;
}

View File

@ -6,6 +6,7 @@
#include "mxcriticalsection.h" #include "mxcriticalsection.h"
#include "mxcore.h" #include "mxcore.h"
#include "mxdsobject.h" #include "mxdsobject.h"
#include "mxdsaction.h"
// VTABLE 0x100dc968 // VTABLE 0x100dc968
// SIZE 0x64 // SIZE 0x64
@ -30,6 +31,9 @@ class MxStreamController : public MxCore
} }
virtual MxResult Open(const char *p_filename); // vtable+0x14 virtual MxResult Open(const char *p_filename); // vtable+0x14
virtual MxResult vtable0x18(undefined4 p_unknown, undefined4 p_unknown2); //vtable+0x18
virtual MxResult vtable0x1C(undefined4 p_unknown, undefined4 p_unknown2); //vtable+0x1c
virtual MxResult vtable0x20(MxDSAction* action); //vtable+0x20
MxBool FUN_100c20d0(MxDSObject &p_obj); MxBool FUN_100c20d0(MxDSObject &p_obj);

View File

@ -1,10 +1,11 @@
#include "mxstreamer.h" #include "mxstreamer.h"
#include <algorithm>
#include "legoomni.h" #include "legoomni.h"
#include "mxdiskstreamcontroller.h" #include "mxdiskstreamcontroller.h"
#include "mxramstreamcontroller.h" #include "mxramstreamcontroller.h"
#include "mxnotificationmanager.h"
#include <algorithm>
DECOMP_SIZE_ASSERT(MxStreamer, 0x2c); DECOMP_SIZE_ASSERT(MxStreamer, 0x2c);
@ -133,6 +134,22 @@ MxResult MxStreamer::AddStreamControllerToOpenList(MxStreamController *stream)
return FAILURE; return FAILURE;
} }
// OFFSET: LEGO1 0x100b99b0
MxResult MxStreamer::Unknown100b99b0(MxDSAction* p_action)
{
MxStreamController* controller;
if (p_action != NULL && p_action->GetAtomId().GetInternal() != NULL && p_action->GetObjectId() != -1)
{
controller = GetOpenStream(p_action->GetAtomId().GetInternal());
if (controller == NULL)
{
return FAILURE;
}
return controller->vtable0x20(p_action);
}
return FAILURE;
}
// OFFSET: LEGO1 0x100b9b60 // OFFSET: LEGO1 0x100b9b60
MxLong MxStreamer::Notify(MxParam &p) MxLong MxStreamer::Notify(MxParam &p)
{ {

View File

@ -96,6 +96,8 @@ class MxStreamer : public MxCore
MxResult AddStreamControllerToOpenList(MxStreamController *p_stream); MxResult AddStreamControllerToOpenList(MxStreamController *p_stream);
MxResult MxStreamer::Unknown100b99b0(MxDSAction* p_action);
private: private:
list<MxStreamController *> m_openStreams; // 0x8 list<MxStreamController *> m_openStreams; // 0x8
MxStreamerSubClass2 m_subclass1; // 0x14 MxStreamerSubClass2 m_subclass1; // 0x14

View File

@ -1,9 +1,10 @@
#include "mxthread.h" #include "mxthread.h"
#include <process.h>
#include "mxomni.h" #include "mxomni.h"
#include "mxtimer.h"
#include <process.h>
// OFFSET: LEGO1 0x100bf690 // OFFSET: LEGO1 0x100bf690
MxResult MxThread::Run() MxResult MxThread::Run()

View File

@ -1,6 +1,12 @@
#include "mxtransitionmanager.h" #include "mxtransitionmanager.h"
#include "legoutil.h"
#include "legovideomanager.h" #include "legovideomanager.h"
#include "legoinputmanager.h"
#include "legoutil.h"
#include "legoworld.h"
#include "mxbackgroundaudiomanager.h"
#include "mxparam.h"
#include "mxticklemanager.h"
DECOMP_SIZE_ASSERT(MxTransitionManager, 0x900); DECOMP_SIZE_ASSERT(MxTransitionManager, 0x900);

View File

@ -5,6 +5,8 @@
#include "mxvideopresenter.h" #include "mxvideopresenter.h"
#include "legoomni.h" #include "legoomni.h"
#include <ddraw.h>
// VTABLE 0x100d7ea0 // VTABLE 0x100d7ea0
class MxTransitionManager : public MxCore class MxTransitionManager : public MxCore
{ {

View File

@ -1,5 +1,7 @@
#include "skateboard.h" #include "skateboard.h"
#include "mxomni.h" #include "mxomni.h"
#include "mxnotificationmanager.h"
#include "decomp.h" #include "decomp.h"