mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
Implement Start() (#176)
* Implement Start() * Undo isleapp changes * Implement LegoOmni::Start * fix vtable0x20 * Address review * fix build
This commit is contained in:
parent
85fe4ad07a
commit
50b9a6dea5
9 changed files with 70 additions and 15 deletions
|
@ -99,11 +99,10 @@ void SetOmniUserMessage(void (*p_userMsg)(const char *,int))
|
|||
g_omniUserMessage = p_userMsg;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100acf50 STUB
|
||||
MxLong Start(MxDSAction *)
|
||||
// OFFSET: LEGO1 0x100acf50
|
||||
MxResult Start(MxDSAction* p_dsAction)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
return MxOmni::GetInstance()->Start(p_dsAction);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005ad10
|
||||
|
@ -257,6 +256,10 @@ void LegoOmni::Init()
|
|||
MxResult LegoOmni::Create(COMPAT_CONST MxOmniCreateParam &p)
|
||||
{
|
||||
// FIXME: Stub
|
||||
MxOmni::Create(p);
|
||||
m_gameState = new LegoGameState();
|
||||
m_bkgAudioManager = new MxBackgroundAudioManager();
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -265,9 +268,14 @@ void LegoOmni::Destroy()
|
|||
// 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)
|
||||
|
|
|
@ -55,7 +55,7 @@ class LegoOmni : public MxOmni
|
|||
virtual void Init() override; // vtable+14
|
||||
virtual MxResult Create(COMPAT_CONST MxOmniCreateParam &p) override; // vtable+18
|
||||
virtual void Destroy() override; // vtable+1c
|
||||
virtual void vtable0x20() override;
|
||||
virtual MxResult Start(MxDSAction* action) override;
|
||||
virtual void DeleteObject(MxDSAction &ds) override;
|
||||
virtual MxBool DoesEntityExist(MxDSAction &ds) override;
|
||||
virtual void vtable0x2c() override;
|
||||
|
@ -110,10 +110,9 @@ __declspec(dllexport) LegoEntity * PickEntity(MxLong,MxLong);
|
|||
__declspec(dllexport) LegoROI * PickROI(MxLong,MxLong);
|
||||
__declspec(dllexport) void SetOmniUserMessage(void (*)(const char *,int));
|
||||
__declspec(dllexport) LegoSoundManager * SoundManager();
|
||||
__declspec(dllexport) MxLong Start(MxDSAction *);
|
||||
__declspec(dllexport) MxResult Start(MxDSAction*);
|
||||
__declspec(dllexport) MxTransitionManager * TransitionManager();
|
||||
__declspec(dllexport) LegoVideoManager * VideoManager();
|
||||
__declspec(dllexport) MxLong Start(MxDSAction *a);
|
||||
|
||||
LegoBuildingManager* BuildingManager();
|
||||
Isle* GetIsle();
|
||||
|
|
|
@ -36,6 +36,7 @@ class MxDSObject : public MxCore
|
|||
|
||||
inline const MxAtomId& GetAtomId() { return this->m_atomId; }
|
||||
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 SetUnknown24(MxS16 p_unk24) { this->m_unk24 = p_unk24; }
|
||||
|
|
|
@ -42,10 +42,16 @@ void MxOmni::Init()
|
|||
m_unk64 = NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b0090 STUB
|
||||
void MxOmni::vtable0x20()
|
||||
// OFFSET: LEGO1 0x100b0090
|
||||
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
|
||||
|
@ -258,7 +264,7 @@ MxAtomIdCounterSet *AtomIdCounterSet()
|
|||
MxStreamer* Streamer()
|
||||
{
|
||||
return MxOmni::GetInstance()->GetStreamer();
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100acf00
|
||||
MxSoundManager* MSoundManager()
|
||||
|
@ -288,4 +294,4 @@ MxMusicManager* MusicManager()
|
|||
MxEventManager* EventManager()
|
||||
{
|
||||
return MxOmni::GetInstance()->GetEventManager();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class MxOmni : public MxCore
|
|||
virtual void Init(); // vtable+14
|
||||
virtual MxResult Create(COMPAT_CONST MxOmniCreateParam &p); // vtable+18
|
||||
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 MxBool DoesEntityExist(MxDSAction &ds); // vtable+28
|
||||
virtual void vtable0x2c(); // vtable+2c
|
||||
|
|
|
@ -30,3 +30,22 @@ MxResult MxStreamController::Open(const char *p_filename)
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "mxcriticalsection.h"
|
||||
#include "mxcore.h"
|
||||
#include "mxdsobject.h"
|
||||
#include "mxdsaction.h"
|
||||
|
||||
// VTABLE 0x100dc968
|
||||
// SIZE 0x64
|
||||
|
@ -30,6 +31,9 @@ class MxStreamController : public MxCore
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
|
|
|
@ -133,6 +133,22 @@ MxResult MxStreamer::AddStreamControllerToOpenList(MxStreamController *stream)
|
|||
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
|
||||
MxLong MxStreamer::Notify(MxParam &p)
|
||||
{
|
||||
|
|
|
@ -96,6 +96,8 @@ class MxStreamer : public MxCore
|
|||
|
||||
MxResult AddStreamControllerToOpenList(MxStreamController *p_stream);
|
||||
|
||||
MxResult MxStreamer::Unknown100b99b0(MxDSAction* p_action);
|
||||
|
||||
private:
|
||||
list<MxStreamController *> m_openStreams; // 0x8
|
||||
MxStreamerSubClass2 m_subclass1; // 0x14
|
||||
|
|
Loading…
Reference in a new issue