mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 15:48:09 -05:00
Further clean up Omni/LegoOmni separation (#423)
* Fix inline functions * Whitespace * Try this * Fix MxEntity * Further fixes * Move main out * Replace tickle code
This commit is contained in:
parent
75f7791d6f
commit
516e16faf6
48 changed files with 285 additions and 485 deletions
|
@ -58,6 +58,7 @@ add_library(lego1 SHARED
|
|||
LEGO1/lego/legoomni/src/common/legoutil.cpp
|
||||
LEGO1/lego/legoomni/src/common/mxcompositemediapresenter.cpp
|
||||
LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp
|
||||
LEGO1/lego/legoomni/src/control/mxcontrolpresenter.cpp
|
||||
LEGO1/lego/legoomni/src/entity/legoactor.cpp
|
||||
LEGO1/lego/legoomni/src/entity/legoanimactor.cpp
|
||||
LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp
|
||||
|
@ -139,6 +140,7 @@ add_library(lego1 SHARED
|
|||
LEGO1/lego/sources/3dmanager/legoview1.cpp
|
||||
LEGO1/lego/sources/3dmanager/tglsurface.cpp
|
||||
LEGO1/lego/sources/roi/legoroi.cpp
|
||||
LEGO1/main.cpp
|
||||
LEGO1/mxdirectx/mxdirect3d.cpp
|
||||
LEGO1/mxdirectx/mxdirectdraw.cpp
|
||||
LEGO1/omni/src/action/mxdsaction.cpp
|
||||
|
@ -177,11 +179,9 @@ add_library(lego1 SHARED
|
|||
LEGO1/omni/src/common/mxutil.cpp
|
||||
LEGO1/omni/src/common/mxvariable.cpp
|
||||
LEGO1/omni/src/common/mxvariabletable.cpp
|
||||
LEGO1/omni/src/control/mxcontrolpresenter.cpp
|
||||
LEGO1/omni/src/entity/mxentity.cpp
|
||||
LEGO1/omni/src/event/mxeventmanager.cpp
|
||||
LEGO1/omni/src/event/mxeventpresenter.cpp
|
||||
LEGO1/omni/src/main/mxmain.cpp
|
||||
LEGO1/omni/src/main/mxomni.cpp
|
||||
LEGO1/omni/src/main/mxomnicreateflags.cpp
|
||||
LEGO1/omni/src/main/mxomnicreateparam.cpp
|
||||
|
|
|
@ -148,7 +148,6 @@ __declspec(dllexport) LegoOmni* Lego();
|
|||
__declspec(dllexport) LegoEntity* PickEntity(MxLong, MxLong);
|
||||
__declspec(dllexport) LegoROI* PickROI(MxLong, MxLong);
|
||||
__declspec(dllexport) LegoSoundManager* SoundManager();
|
||||
__declspec(dllexport) MxResult Start(MxDSAction*);
|
||||
__declspec(dllexport) MxTransitionManager* TransitionManager();
|
||||
__declspec(dllexport) LegoVideoManager* VideoManager();
|
||||
|
||||
|
@ -165,6 +164,7 @@ MxDSAction& GetCurrentAction();
|
|||
|
||||
void PlayMusic(MxU32 p_index);
|
||||
void SetIsWorldActive(MxBool p_isWorldActive);
|
||||
void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last);
|
||||
void RegisterScripts();
|
||||
void UnregisterScripts();
|
||||
|
||||
|
|
|
@ -19,8 +19,7 @@ void LegoActionControlPresenter::ReadyTickle()
|
|||
|
||||
if (chunk) {
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
if (m_compositePresenter) {
|
||||
|
@ -47,8 +46,7 @@ void LegoActionControlPresenter::RepeatingTickle()
|
|||
#else
|
||||
InvokeAction(m_unk0x50, MxAtomId(m_unk0x54.GetData(), LookupMode_LowerCase2), m_unk0x64, NULL);
|
||||
#endif
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
ProgressTickleState(TickleState_Done);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,8 +123,7 @@ void MxCompositeMediaPresenter::StartingTickle()
|
|||
}
|
||||
|
||||
if (!m_unk0x4c) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Streaming;
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
MxLong time = Timer()->GetTime();
|
||||
m_action->SetUnknown90(time);
|
||||
}
|
||||
|
@ -138,8 +137,7 @@ MxResult MxCompositeMediaPresenter::Tickle()
|
|||
|
||||
switch (m_currentTickleState) {
|
||||
case TickleState_Ready:
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
case TickleState_Starting:
|
||||
StartingTickle();
|
||||
break;
|
||||
|
|
|
@ -88,9 +88,7 @@ void MxControlPresenter::ReadyTickle()
|
|||
{
|
||||
MxPresenter::ParseExtra();
|
||||
TickleManager()->UnregisterClient(this);
|
||||
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Repeating;
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10044640
|
|
@ -69,8 +69,7 @@ void LegoEntityPresenter::ReadyTickle()
|
|||
m_objectBackend->SetLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp(), TRUE);
|
||||
ParseExtra();
|
||||
}
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,8 +95,7 @@ void LegoWorldPresenter::ReadyTickle()
|
|||
}
|
||||
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10066ac0
|
||||
|
@ -116,8 +115,7 @@ void LegoWorldPresenter::StartingTickle()
|
|||
}
|
||||
}
|
||||
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Streaming;
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10067a70
|
||||
|
|
|
@ -241,6 +241,20 @@ void SetIsWorldActive(MxBool p_isWorldActive)
|
|||
g_isWorldActive = p_isWorldActive;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100159e0
|
||||
void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last)
|
||||
{
|
||||
MxDSAction action;
|
||||
|
||||
action.SetAtomId(*p_id);
|
||||
action.SetUnknown24(-2);
|
||||
|
||||
for (MxS32 first = p_first, last = p_last; first <= last; first++) {
|
||||
action.SetObjectId(first);
|
||||
DeleteObject(action);
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1001a700
|
||||
void FUN_1001a700()
|
||||
{
|
||||
|
@ -685,9 +699,3 @@ void LegoOmni::StopTimer()
|
|||
MxOmni::StopTimer();
|
||||
SetAppCursor(0);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acf50
|
||||
MxResult Start(MxDSAction* p_dsAction)
|
||||
{
|
||||
return MxOmni::GetInstance()->Start(p_dsAction);
|
||||
}
|
||||
|
|
|
@ -76,8 +76,8 @@ void LegoPalettePresenter::ReadyTickle()
|
|||
if (chunk) {
|
||||
if (chunk->GetTime() <= m_action->GetElapsedTime()) {
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
|
||||
chunk = m_subscriber->NextChunk();
|
||||
MxResult result = ParsePalette(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
|
|
|
@ -43,7 +43,11 @@ class MxActionNotificationParam : public MxNotificationParam {
|
|||
delete this->m_action;
|
||||
}
|
||||
|
||||
virtual MxNotificationParam* Clone() override; // vtable+0x4
|
||||
// FUNCTION: LEGO1 0x100510c0
|
||||
virtual MxNotificationParam* Clone() override
|
||||
{
|
||||
return new MxActionNotificationParam(this->m_type, this->m_sender, this->m_action, this->m_realloc);
|
||||
}; // vtable+0x4
|
||||
|
||||
inline MxDSAction* GetAction() { return m_action; }
|
||||
|
||||
|
@ -83,7 +87,16 @@ class MxEndActionNotificationParam : public MxActionNotificationParam {
|
|||
{
|
||||
}
|
||||
|
||||
virtual MxNotificationParam* Clone() override; // vtable+0x4
|
||||
// FUNCTION: LEGO1 0x10051270
|
||||
virtual MxNotificationParam* Clone() override
|
||||
{
|
||||
return new MxEndActionNotificationParam(
|
||||
c_notificationEndAction,
|
||||
this->m_sender,
|
||||
this->m_action,
|
||||
this->m_realloc
|
||||
);
|
||||
}; // vtable+0x4
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100dc208
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "mxmediamanager.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100dc6e0
|
||||
// SIZE 0x30
|
||||
class MxAudioManager : public MxMediaManager {
|
||||
public:
|
||||
MxAudioManager();
|
||||
|
@ -12,8 +13,11 @@ class MxAudioManager : public MxMediaManager {
|
|||
|
||||
virtual MxResult InitPresenters() override; // vtable+14
|
||||
virtual void Destroy() override; // vtable+18
|
||||
virtual MxS32 GetVolume(); // vtable+28
|
||||
virtual void SetVolume(MxS32 p_volume); // vtable+2c
|
||||
|
||||
// FUNCTION: LEGO1 0x10029910
|
||||
virtual MxS32 GetVolume() { return this->m_volume; }; // vtable+28
|
||||
|
||||
virtual void SetVolume(MxS32 p_volume); // vtable+2c
|
||||
|
||||
private:
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
|
|
@ -23,8 +23,11 @@ class MxAudioPresenter : public MxMediaPresenter {
|
|||
return !strcmp(p_name, MxAudioPresenter::ClassName()) || MxMediaPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxS32 GetVolume(); // vtable+0x5c
|
||||
virtual void SetVolume(MxS32 p_volume); // vtable+0x60
|
||||
// FUNCTION: LEGO1 0x1000d260
|
||||
virtual MxS32 GetVolume() { return m_volume; }; // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d270
|
||||
virtual void SetVolume(MxS32 p_volume) { m_volume = p_volume; }; // vtable+0x60
|
||||
|
||||
protected:
|
||||
MxS32 m_volume;
|
||||
|
|
|
@ -42,7 +42,10 @@ class MxBitmap : public MxCore {
|
|||
virtual MxResult SetSize(MxS32 p_width, MxS32 p_height, MxPalette* p_palette, MxBool); // vtable+1c
|
||||
virtual MxResult LoadFile(HANDLE p_handle); // vtable+20
|
||||
__declspec(dllexport) virtual MxLong Read(const char* p_filename); // vtable+24
|
||||
virtual int VTable0x28(int);
|
||||
|
||||
// FUNCTION: LEGO1 0x1004e0d0
|
||||
virtual int VTable0x28(int) { return -1; };
|
||||
|
||||
virtual void VTable0x2c(int, int, int, int, int, int, int);
|
||||
virtual void VTable0x30(int, int, int, int, int, int, int);
|
||||
__declspec(dllexport) virtual MxPalette* CreatePalette(); // vtable+34
|
||||
|
|
|
@ -37,7 +37,14 @@ class MxCompositePresenter : public MxPresenter {
|
|||
virtual void VTable0x58(MxEndActionNotificationParam& p_param); // vtable+0x58
|
||||
virtual void VTable0x5c(MxNotificationParam& p_param); // vtable+0x5c
|
||||
virtual void VTable0x60(MxPresenter* p_presenter); // vtable+0x60
|
||||
virtual MxBool VTable0x64(undefined4 p_undefined); // vtable+0x64
|
||||
|
||||
// FUNCTION: LEGO1 0x1000caf0
|
||||
virtual MxBool VTable0x64(undefined4 p_undefined)
|
||||
{
|
||||
if (m_compositePresenter)
|
||||
return m_compositePresenter->VTable0x64(p_undefined);
|
||||
return TRUE;
|
||||
}; // vtable+0x64
|
||||
|
||||
protected:
|
||||
MxCompositePresenterList m_list; // 0x40
|
||||
|
|
|
@ -15,7 +15,9 @@ class MxCore {
|
|||
__declspec(dllexport) MxCore();
|
||||
__declspec(dllexport) virtual ~MxCore(); // vtable+00
|
||||
__declspec(dllexport) virtual MxLong Notify(MxParam& p_param); // vtable+04
|
||||
virtual MxResult Tickle(); // vtable+08
|
||||
|
||||
// FUNCTION: LEGO1 0x10001f70
|
||||
virtual MxResult Tickle() { return SUCCESS; }; // vtable+08
|
||||
|
||||
// FUNCTION: LEGO1 0x100144c0
|
||||
inline virtual const char* ClassName() const // vtable+0c
|
||||
|
|
|
@ -11,8 +11,11 @@
|
|||
// SIZE 0x10
|
||||
class MxEntity : public MxCore {
|
||||
public:
|
||||
MxEntity();
|
||||
virtual ~MxEntity() override;
|
||||
// FUNCTION: LEGO1 0x1001d190
|
||||
MxEntity() { this->m_mxEntityId = -1; }
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c110
|
||||
virtual ~MxEntity() override{};
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c180
|
||||
inline virtual const char* ClassName() const override // vtable+0xc
|
||||
|
@ -27,7 +30,14 @@ class MxEntity : public MxCore {
|
|||
return !strcmp(p_name, MxEntity::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxResult Create(MxS32 p_id, const MxAtomId& p_atom); // vtable+0x14
|
||||
// FUNCTION: LEGO1 0x10001070
|
||||
virtual MxResult Create(MxS32 p_id, const MxAtomId& p_atom)
|
||||
{
|
||||
this->m_mxEntityId = p_id;
|
||||
this->m_atom = p_atom;
|
||||
return SUCCESS;
|
||||
}; // vtable+0x14
|
||||
|
||||
inline MxResult Create(MxDSObject& p_dsObject)
|
||||
{
|
||||
m_mxEntityId = p_dsObject.GetObjectId();
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
class MxMediaPresenter : public MxPresenter {
|
||||
public:
|
||||
inline MxMediaPresenter() { Init(); }
|
||||
virtual ~MxMediaPresenter() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c550
|
||||
virtual ~MxMediaPresenter() override { Destroy(TRUE); };
|
||||
|
||||
virtual MxResult Tickle() override; // vtable+0x8
|
||||
|
||||
|
@ -28,10 +30,13 @@ class MxMediaPresenter : public MxPresenter {
|
|||
return !strcmp(p_name, MxMediaPresenter::ClassName()) || MxPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void RepeatingTickle() override; // vtable+0x24
|
||||
virtual void DoneTickle() override; // vtable+0x2c
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void RepeatingTickle() override; // vtable+0x24
|
||||
virtual void DoneTickle() override; // vtable+0x2c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c5b0
|
||||
virtual void Destroy() override { Destroy(FALSE); }; // vtable+0x38
|
||||
|
||||
virtual MxResult StartAction(MxStreamController*, MxDSAction*) override; // vtable+0x3c
|
||||
virtual void EndAction() override; // vtable+0x40
|
||||
virtual void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
|
|
|
@ -40,8 +40,10 @@ class MxNotificationParam : public MxParam {
|
|||
{
|
||||
}
|
||||
|
||||
virtual ~MxNotificationParam() override {} // vtable+0x0 (scalar deleting destructor)
|
||||
virtual MxNotificationParam* Clone(); // vtable+0x4
|
||||
virtual ~MxNotificationParam() override {}
|
||||
|
||||
// FUNCTION: LEGO1 0x10010390
|
||||
virtual MxNotificationParam* Clone() { return new MxNotificationParam(m_type, m_sender); }; // vtable+0x4
|
||||
|
||||
inline NotificationId GetNotification() const { return m_type; }
|
||||
inline MxCore* GetSender() const { return m_sender; }
|
||||
|
|
|
@ -52,7 +52,9 @@ class MxOmni : public MxCore {
|
|||
virtual void NotifyCurrentEntity(MxNotificationParam* p_param); // vtable+34
|
||||
virtual void StartTimer(); // vtable+38
|
||||
virtual void StopTimer(); // vtable+3c
|
||||
virtual MxBool IsTimerRunning(); // vtable+40
|
||||
|
||||
// FUNCTION: LEGO1 0x10058a90
|
||||
virtual MxBool IsTimerRunning() { return m_timerRunning; }; // vtable+40
|
||||
|
||||
static void SetInstance(MxOmni* p_instance);
|
||||
static MxBool FUN_100b06b0(MxDSAction* p_action, const char* p_name);
|
||||
|
@ -98,12 +100,12 @@ __declspec(dllexport) MxSoundManager* MSoundManager();
|
|||
__declspec(dllexport) MxVariableTable* VariableTable();
|
||||
__declspec(dllexport) MxMusicManager* MusicManager();
|
||||
__declspec(dllexport) MxEventManager* EventManager();
|
||||
__declspec(dllexport) MxResult Start(MxDSAction*);
|
||||
__declspec(dllexport) MxNotificationManager* NotificationManager();
|
||||
|
||||
MxVideoManager* MVideoManager();
|
||||
MxAtomIdCounterSet* AtomIdCounterSet();
|
||||
MxObjectFactory* ObjectFactory();
|
||||
void DeleteObject(MxDSAction& p_dsAction);
|
||||
void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last);
|
||||
|
||||
#endif // MXOMNI_H
|
||||
|
|
|
@ -28,8 +28,14 @@ class MxPresenter : public MxCore {
|
|||
|
||||
MxPresenter() { Init(); }
|
||||
|
||||
__declspec(dllexport) virtual ~MxPresenter(); // vtable+0x0
|
||||
__declspec(dllexport) virtual MxResult Tickle() override; // vtable+0x8
|
||||
#ifdef COMPAT_MODE
|
||||
__declspec(dllexport) virtual ~MxPresenter() override; // vtable+0x00
|
||||
#else
|
||||
// FUNCTION: LEGO1 0x1000bf00
|
||||
__declspec(dllexport) virtual ~MxPresenter() override{}; // vtable+0x00
|
||||
#endif
|
||||
|
||||
__declspec(dllexport) virtual MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bfe0
|
||||
inline virtual const char* ClassName() const override // vtable+0xc
|
||||
|
@ -44,27 +50,66 @@ class MxPresenter : public MxCore {
|
|||
return !strcmp(p_name, MxPresenter::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void VTable0x14(); // vtable+0x14
|
||||
virtual void ReadyTickle(); // vtable+0x18
|
||||
virtual void StartingTickle(); // vtable+0x1c
|
||||
virtual void StreamingTickle(); // vtable+0x20
|
||||
virtual void RepeatingTickle(); // vtable+0x24
|
||||
virtual void Unk5Tickle(); // vtable+0x28
|
||||
// FUNCTION: LEGO1 0x1000be30
|
||||
virtual void VTable0x14() {} // vtable+0x14
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be40
|
||||
virtual void ReadyTickle()
|
||||
{
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
} // vtable+0x18
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be60
|
||||
virtual void StartingTickle() { ProgressTickleState(TickleState_Streaming); } // vtable+0x1c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be80
|
||||
virtual void StreamingTickle() { ProgressTickleState(TickleState_Repeating); }; // vtable+0x20
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bea0
|
||||
virtual void RepeatingTickle() { ProgressTickleState(TickleState_unk5); }; // vtable+0x24
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bec0
|
||||
virtual void Unk5Tickle() { ProgressTickleState(TickleState_Done); }; // vtable+0x28
|
||||
|
||||
protected:
|
||||
__declspec(dllexport) virtual void DoneTickle(); // vtable+0x2c
|
||||
// FUNCTION: LEGO1 0x1000bee0
|
||||
__declspec(dllexport) virtual void DoneTickle() { ProgressTickleState(TickleState_Idle); }; // vtable+0x2c
|
||||
|
||||
__declspec(dllexport) virtual void ParseExtra(); // vtable+0x30
|
||||
|
||||
inline void ProgressTickleState(TickleState p_tickleState)
|
||||
{
|
||||
m_previousTickleStates |= 1 << (MxU8) m_currentTickleState;
|
||||
m_currentTickleState = p_tickleState;
|
||||
}
|
||||
|
||||
public:
|
||||
virtual MxResult AddToManager(); // vtable+0x34
|
||||
virtual void Destroy(); // vtable+0x38
|
||||
// FUNCTION: LEGO1 0x1000bf70
|
||||
virtual MxResult AddToManager() { return SUCCESS; }; // vtable+0x34
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bf80
|
||||
virtual void Destroy() { Init(); }; // vtable+0x38
|
||||
|
||||
__declspec(dllexport) virtual MxResult StartAction(MxStreamController*, MxDSAction*); // vtable+0x3c
|
||||
__declspec(dllexport) virtual void EndAction(); // vtable+0x40
|
||||
virtual void SetTickleState(TickleState p_tickleState); // vtable+0x44
|
||||
virtual MxBool HasTickleStatePassed(TickleState p_tickleState); // vtable+0x48
|
||||
virtual MxResult PutData(); // vtable+0x4c
|
||||
virtual MxBool IsHit(MxS32 p_x, MxS32 p_y); // vtable+0x50
|
||||
__declspec(dllexport) virtual void Enable(MxBool p_enable); // vtable+0x54
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bf90
|
||||
virtual void SetTickleState(TickleState p_tickleState) { ProgressTickleState(p_tickleState); } // vtable+0x44
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bfb0
|
||||
virtual MxBool HasTickleStatePassed(TickleState p_tickleState)
|
||||
{
|
||||
return m_previousTickleStates & (1 << (MxU8) p_tickleState);
|
||||
}; // vtable+0x48
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bfc0
|
||||
virtual MxResult PutData() { return SUCCESS; }; // vtable+0x4c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bfd0
|
||||
virtual MxBool IsHit(MxS32 p_x, MxS32 p_y) { return FALSE; }; // vtable+0x50
|
||||
|
||||
__declspec(dllexport) virtual void Enable(MxBool p_enable); // vtable+0x54
|
||||
|
||||
MxEntity* CreateEntityBackend(const char* p_name);
|
||||
MxBool IsEnabled();
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
// SIZE 0x54
|
||||
class MxSoundPresenter : public MxAudioPresenter {
|
||||
public:
|
||||
virtual ~MxSoundPresenter() override;
|
||||
// FUNCTION: LEGO1 0x1000d430
|
||||
virtual ~MxSoundPresenter() override { Destroy(TRUE); };
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d4a0
|
||||
inline virtual const char* ClassName() const // vtable+0x0c
|
||||
|
@ -24,7 +25,9 @@ class MxSoundPresenter : public MxAudioPresenter {
|
|||
};
|
||||
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d490
|
||||
virtual void Destroy() override { Destroy(FALSE); }; // vtable+0x38
|
||||
|
||||
protected:
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
|
|
@ -25,11 +25,14 @@ class MxStillPresenter : public MxVideoPresenter {
|
|||
return !strcmp(p_name, MxStillPresenter::ClassName()) || MxVideoPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void StartingTickle() override; // vtable+0x1c
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void RepeatingTickle() override; // vtable+0x24
|
||||
virtual void ParseExtra() override; // vtable+0x30
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void StartingTickle() override; // vtable+0x1c
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void RepeatingTickle() override; // vtable+0x24
|
||||
virtual void ParseExtra() override; // vtable+0x30
|
||||
|
||||
// FUNCTION: LEGO1 0x100435b0
|
||||
virtual void Destroy() override { Destroy(FALSE); }; // vtable+0x38
|
||||
|
||||
virtual void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
virtual void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c
|
||||
virtual void CreateBitmap() override; // vtable+0x60
|
||||
|
|
|
@ -20,9 +20,15 @@ class MxVariable {
|
|||
m_key.ToUpperCase();
|
||||
m_value = p_value;
|
||||
}
|
||||
virtual MxString* GetValue();
|
||||
virtual void SetValue(const char* p_value);
|
||||
virtual void Destroy();
|
||||
|
||||
// FUNCTION: LEGO1 0x1003bea0
|
||||
virtual MxString* GetValue() { return &m_value; };
|
||||
|
||||
// FUNCTION: LEGO1 0x1003beb0
|
||||
virtual void SetValue(const char* p_value) { m_value = p_value; };
|
||||
|
||||
// FUNCTION: LEGO1 0x1003bec0
|
||||
virtual void Destroy() { delete this; };
|
||||
|
||||
inline const MxString* GetKey() const { return &m_key; }
|
||||
|
||||
|
|
|
@ -19,7 +19,9 @@ class MxVideoPresenter : public MxMediaPresenter {
|
|||
};
|
||||
|
||||
MxVideoPresenter() { Init(); }
|
||||
virtual ~MxVideoPresenter() override; // vtable+0x0
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c740
|
||||
virtual ~MxVideoPresenter() override { Destroy(TRUE); }; // vtable+0x0
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c820
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
|
@ -34,27 +36,48 @@ class MxVideoPresenter : public MxMediaPresenter {
|
|||
return !strcmp(p_name, MxVideoPresenter::ClassName()) || MxMediaPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void ReadyTickle() override; // vtable+0x18
|
||||
virtual void StartingTickle() override; // vtable+0x1c
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void RepeatingTickle() override; // vtable+0x24
|
||||
virtual void Unk5Tickle() override; // vtable+0x28
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void ReadyTickle() override; // vtable+0x18
|
||||
virtual void StartingTickle() override; // vtable+0x1c
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void RepeatingTickle() override; // vtable+0x24
|
||||
virtual void Unk5Tickle() override; // vtable+0x28
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c7a0
|
||||
virtual void Destroy() override { Destroy(FALSE); }; // vtable+0x38
|
||||
|
||||
virtual void EndAction() override; // vtable+0x40
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
virtual MxBool IsHit(MxS32 p_x, MxS32 p_y) override; // vtable+0x50
|
||||
virtual void LoadHeader(MxStreamChunk* p_chunk); // vtable+0x5c
|
||||
virtual void CreateBitmap(); // vtable+0x60
|
||||
virtual void NextFrame(); // vtable+0x64
|
||||
virtual void LoadFrame(MxStreamChunk* p_chunk); // vtable+0x68
|
||||
virtual void PutFrame(); // vtable+0x6c
|
||||
virtual void RealizePalette(); // vtable+0x70
|
||||
virtual undefined VTable0x74(); // vtable+0x74
|
||||
virtual LPDIRECTDRAWSURFACE VTable0x78(); // vtable+0x78
|
||||
virtual MxBool VTable0x7c(); // vtable+0x7c
|
||||
virtual MxS32 GetWidth(); // vtable+0x80
|
||||
virtual MxS32 GetHeight(); // vtable+0x84
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c700
|
||||
virtual void LoadHeader(MxStreamChunk* p_chunk){}; // vtable+0x5c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c710
|
||||
virtual void CreateBitmap(){}; // vtable+0x60
|
||||
|
||||
virtual void NextFrame(); // vtable+0x64
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c720
|
||||
virtual void LoadFrame(MxStreamChunk* p_chunk){}; // vtable+0x68
|
||||
|
||||
virtual void PutFrame(); // vtable+0x6c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c730
|
||||
virtual void RealizePalette(){}; // vtable+0x70
|
||||
virtual undefined VTable0x74(); // vtable+0x74
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c7b0
|
||||
virtual LPDIRECTDRAWSURFACE VTable0x78() { return m_unk0x58; }; // vtable+0x78
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c7c0
|
||||
virtual MxBool VTable0x7c() { return (m_bitmap != NULL) || (m_alpha != NULL); }; // vtable+0x7c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c7e0
|
||||
virtual MxS32 GetWidth() { return m_alpha ? m_alpha->m_width : m_bitmap->GetBmiWidth(); }; // vtable+0x80
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c800
|
||||
virtual MxS32 GetHeight() { return m_alpha ? m_alpha->m_height : m_bitmap->GetBmiHeightAbs(); }; // vtable+0x84
|
||||
|
||||
// SIZE 0xc
|
||||
struct AlphaMask {
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
class MxWavePresenter : public MxSoundPresenter {
|
||||
public:
|
||||
MxWavePresenter() { Init(); }
|
||||
virtual ~MxWavePresenter() override; // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d640
|
||||
virtual ~MxWavePresenter() override { Destroy(TRUE); }; // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d6c0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
|
@ -26,13 +28,16 @@ class MxWavePresenter : public MxSoundPresenter {
|
|||
return !strcmp(p_name, MxWavePresenter::ClassName()) || MxSoundPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void ReadyTickle() override; // vtable+0x18
|
||||
virtual void StartingTickle() override; // vtable+0x1c
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void DoneTickle() override; // vtable+0x2c
|
||||
virtual void ParseExtra() override; // vtable+0x30
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void ReadyTickle() override; // vtable+0x18
|
||||
virtual void StartingTickle() override; // vtable+0x1c
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void DoneTickle() override; // vtable+0x2c
|
||||
virtual void ParseExtra() override; // vtable+0x30
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d6a0
|
||||
virtual void Destroy() override { Destroy(FALSE); }; // vtable+0x38
|
||||
|
||||
virtual void EndAction() override; // vtable+0x40
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
virtual void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
|
@ -40,7 +45,9 @@ class MxWavePresenter : public MxSoundPresenter {
|
|||
virtual void SetVolume(MxS32 p_volume) override; // vtable+0x60
|
||||
virtual void Pause(); // vtable+0x64
|
||||
virtual void Resume(); // vtable+0x68
|
||||
virtual MxBool IsPaused(); // vtable+0x6c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d6b0
|
||||
virtual MxBool IsPaused() { return m_paused; }; // vtable+0x6c
|
||||
|
||||
// Reference: https://github.com/itsmattkc/SIEdit/blob/master/lib/othertypes.h
|
||||
// SIZE 0x1c
|
||||
|
|
|
@ -5,12 +5,6 @@ DECOMP_SIZE_ASSERT(MxAudioManager, 0x30);
|
|||
// GLOBAL: LEGO1 0x10102108
|
||||
MxS32 MxAudioManager::g_count = 0;
|
||||
|
||||
// FUNCTION: LEGO1 0x10029910
|
||||
MxS32 MxAudioManager::GetVolume()
|
||||
{
|
||||
return this->m_volume;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b8d00
|
||||
MxAudioManager::MxAudioManager()
|
||||
{
|
||||
|
|
|
@ -3,15 +3,3 @@
|
|||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxAudioPresenter, 0x54);
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d260
|
||||
MxS32 MxAudioPresenter::GetVolume()
|
||||
{
|
||||
return m_volume;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d270
|
||||
void MxAudioPresenter::SetVolume(MxS32 p_volume)
|
||||
{
|
||||
m_volume = p_volume;
|
||||
}
|
||||
|
|
|
@ -20,10 +20,8 @@ void MxLoopingMIDIPresenter::StreamingTickle()
|
|||
return;
|
||||
}
|
||||
|
||||
if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
}
|
||||
if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime())
|
||||
ProgressTickleState(TickleState_Done);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2ae0
|
||||
|
|
|
@ -52,8 +52,7 @@ void MxMIDIPresenter::ReadyTickle()
|
|||
if (chunk) {
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,19 +61,15 @@ void MxMIDIPresenter::StartingTickle()
|
|||
{
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Streaming;
|
||||
}
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime())
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2910
|
||||
void MxMIDIPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_chunk) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
}
|
||||
if (m_chunk)
|
||||
ProgressTickleState(TickleState_Done);
|
||||
else
|
||||
m_chunk = NextChunk();
|
||||
}
|
||||
|
|
|
@ -5,18 +5,6 @@
|
|||
|
||||
DECOMP_SIZE_ASSERT(MxSoundPresenter, 0x54)
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d430
|
||||
MxSoundPresenter::~MxSoundPresenter()
|
||||
{
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d490
|
||||
void MxSoundPresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b1a50
|
||||
void MxSoundPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
|
|
|
@ -11,24 +11,6 @@
|
|||
DECOMP_SIZE_ASSERT(MxWavePresenter, 0x6c);
|
||||
DECOMP_SIZE_ASSERT(MxWavePresenter::WaveFormat, 0x1c);
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d640
|
||||
MxWavePresenter::~MxWavePresenter()
|
||||
{
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d6a0
|
||||
void MxWavePresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d6b0
|
||||
MxBool MxWavePresenter::IsPaused()
|
||||
{
|
||||
return m_paused;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b1ad0
|
||||
void MxWavePresenter::Init()
|
||||
{
|
||||
|
@ -136,8 +118,7 @@ void MxWavePresenter::ReadyTickle()
|
|||
memcpy(m_waveFormat, chunk->GetData(), chunk->GetLength());
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,8 +169,7 @@ void MxWavePresenter::StartingTickle()
|
|||
}
|
||||
else {
|
||||
SetVolume(((MxDSSound*) m_action)->GetVolume());
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Streaming;
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,14 +8,6 @@
|
|||
|
||||
DECOMP_SIZE_ASSERT(MxCompositePresenter, 0x4c);
|
||||
|
||||
// FUNCTION: LEGO1 0x1000caf0
|
||||
MxBool MxCompositePresenter::VTable0x64(undefined4 p_undefined)
|
||||
{
|
||||
if (m_compositePresenter)
|
||||
return m_compositePresenter->VTable0x64(p_undefined);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b60b0
|
||||
MxCompositePresenter::MxCompositePresenter()
|
||||
{
|
||||
|
@ -229,8 +221,7 @@ void MxCompositePresenter::VTable0x60(MxPresenter* p_presenter)
|
|||
// FUNCTION: LEGO1 0x100b6bc0
|
||||
void MxCompositePresenter::SetTickleState(TickleState p_tickleState)
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = p_tickleState;
|
||||
ProgressTickleState(p_tickleState);
|
||||
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
|
||||
MxPresenter* presenter = *it;
|
||||
|
|
|
@ -2,12 +2,6 @@
|
|||
|
||||
#include "define.h"
|
||||
|
||||
// FUNCTION: LEGO1 0x10001f70
|
||||
MxResult MxCore::Tickle()
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100ae1a0
|
||||
MxCore::MxCore()
|
||||
{
|
||||
|
|
|
@ -11,18 +11,6 @@ DECOMP_SIZE_ASSERT(MxMediaPresenter, 0x50);
|
|||
DECOMP_SIZE_ASSERT(MxStreamChunkList, 0x18);
|
||||
DECOMP_SIZE_ASSERT(MxStreamChunkListCursor, 0x10);
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c550
|
||||
MxMediaPresenter::~MxMediaPresenter()
|
||||
{
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c5b0
|
||||
void MxMediaPresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b54e0
|
||||
void MxMediaPresenter::Init()
|
||||
{
|
||||
|
@ -77,8 +65,7 @@ MxStreamChunk* MxMediaPresenter::CurrentChunk()
|
|||
m_subscriber->NextChunk();
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
ProgressTickleState(TickleState_Done);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,8 +84,7 @@ MxStreamChunk* MxMediaPresenter::NextChunk()
|
|||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Bit7);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
ProgressTickleState(TickleState_Done);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -195,8 +181,7 @@ void MxMediaPresenter::StreamingTickle()
|
|||
if (m_currentChunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Repeating;
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
}
|
||||
else if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
LoopChunk(m_currentChunk);
|
||||
|
@ -220,16 +205,12 @@ void MxMediaPresenter::RepeatingTickle()
|
|||
|
||||
if (m_currentChunk) {
|
||||
MxLong time = m_currentChunk->GetTime();
|
||||
if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_unk5;
|
||||
}
|
||||
if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount())
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
}
|
||||
else {
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_unk5;
|
||||
}
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration())
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,96 +18,11 @@
|
|||
|
||||
DECOMP_SIZE_ASSERT(MxPresenter, 0x40);
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be30
|
||||
void MxPresenter::VTable0x14()
|
||||
{
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be40
|
||||
void MxPresenter::ReadyTickle()
|
||||
{
|
||||
ParseExtra();
|
||||
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be60
|
||||
void MxPresenter::StartingTickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Streaming;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be80
|
||||
void MxPresenter::StreamingTickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Repeating;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bea0
|
||||
void MxPresenter::RepeatingTickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_unk5;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bec0
|
||||
void MxPresenter::Unk5Tickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bee0
|
||||
void MxPresenter::DoneTickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Idle;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bf00
|
||||
#ifdef COMPAT_MODE
|
||||
MxPresenter::~MxPresenter()
|
||||
{
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bf70
|
||||
MxResult MxPresenter::AddToManager()
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bf80
|
||||
void MxPresenter::Destroy()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bf90
|
||||
void MxPresenter::SetTickleState(TickleState p_tickleState)
|
||||
{
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = p_tickleState;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bfb0
|
||||
MxBool MxPresenter::HasTickleStatePassed(TickleState p_tickleState)
|
||||
{
|
||||
return m_previousTickleStates & (1 << (unsigned char) p_tickleState);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bfc0
|
||||
MxResult MxPresenter::PutData()
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bfd0
|
||||
MxBool MxPresenter::IsHit(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
// FUNCTION: LEGO1 0x100b4d50
|
||||
void MxPresenter::Init()
|
||||
|
@ -132,8 +47,7 @@ MxResult MxPresenter::StartAction(MxStreamController*, MxDSAction* p_action)
|
|||
|
||||
this->m_location = MxPoint32(this->m_action->GetLocation()[0], this->m_action->GetLocation()[1]);
|
||||
this->m_displayZ = this->m_action->GetLocation()[2];
|
||||
this->m_previousTickleStates |= 1 << (unsigned char) previousTickleState;
|
||||
this->m_currentTickleState = TickleState_Ready;
|
||||
ProgressTickleState(TickleState_Ready);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
|
|
@ -4,21 +4,3 @@
|
|||
#include "mxstring.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxVariable, 0x24)
|
||||
|
||||
// FUNCTION: LEGO1 0x1003bea0
|
||||
MxString* MxVariable::GetValue()
|
||||
{
|
||||
return &m_value;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003beb0
|
||||
void MxVariable::SetValue(const char* p_value)
|
||||
{
|
||||
m_value = p_value;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003bec0
|
||||
void MxVariable::Destroy()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
|
|
@ -1,22 +1,3 @@
|
|||
#include "mxentity.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxEntity, 0x10)
|
||||
|
||||
// FUNCTION: LEGO1 0x10001070
|
||||
MxResult MxEntity::Create(MxS32 p_id, const MxAtomId& p_atom)
|
||||
{
|
||||
this->m_mxEntityId = p_id;
|
||||
this->m_atom = p_atom;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c110
|
||||
MxEntity::~MxEntity()
|
||||
{
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1001d190
|
||||
MxEntity::MxEntity()
|
||||
{
|
||||
this->m_mxEntityId = -1;
|
||||
}
|
||||
|
|
|
@ -71,8 +71,7 @@ void MxEventPresenter::ReadyTickle()
|
|||
CopyData(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,10 +80,8 @@ void MxEventPresenter::StartingTickle()
|
|||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Streaming;
|
||||
}
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime())
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2ef0
|
||||
|
|
|
@ -27,26 +27,6 @@ MxBool g_use3dSound;
|
|||
// GLOBAL: LEGO1 0x101015b0
|
||||
MxOmni* MxOmni::g_instance = NULL;
|
||||
|
||||
// FUNCTION: LEGO1 0x100159e0
|
||||
void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last)
|
||||
{
|
||||
MxDSAction action;
|
||||
|
||||
action.SetAtomId(*p_id);
|
||||
action.SetUnknown24(-2);
|
||||
|
||||
for (MxS32 first = p_first, last = p_last; first <= last; first++) {
|
||||
action.SetObjectId(first);
|
||||
DeleteObject(action);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10058a90
|
||||
MxBool MxOmni::IsTimerRunning()
|
||||
{
|
||||
return m_timerRunning;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acea0
|
||||
MxObjectFactory* ObjectFactory()
|
||||
{
|
||||
|
@ -113,6 +93,12 @@ MxEventManager* EventManager()
|
|||
return MxOmni::GetInstance()->GetEventManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acf50
|
||||
MxResult Start(MxDSAction* p_dsAction)
|
||||
{
|
||||
return MxOmni::GetInstance()->Start(p_dsAction);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100acf70
|
||||
void DeleteObject(MxDSAction& p_dsAction)
|
||||
{
|
||||
|
|
|
@ -3,18 +3,6 @@
|
|||
DECOMP_SIZE_ASSERT(MxActionNotificationParam, 0x14)
|
||||
DECOMP_SIZE_ASSERT(MxEndActionNotificationParam, 0x14)
|
||||
|
||||
// FUNCTION: LEGO1 0x100510c0
|
||||
MxNotificationParam* MxActionNotificationParam::Clone()
|
||||
{
|
||||
return new MxActionNotificationParam(this->m_type, this->m_sender, this->m_action, this->m_realloc);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10051270
|
||||
MxNotificationParam* MxEndActionNotificationParam::Clone()
|
||||
{
|
||||
return new MxEndActionNotificationParam(c_notificationEndAction, this->m_sender, this->m_action, this->m_realloc);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b0300
|
||||
MxNotificationParam* MxStartActionNotificationParam::Clone()
|
||||
{
|
||||
|
|
|
@ -3,9 +3,3 @@
|
|||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxNotificationParam, 0xc);
|
||||
|
||||
// FUNCTION: LEGO1 0x10010390
|
||||
MxNotificationParam* MxNotificationParam::Clone()
|
||||
{
|
||||
return new MxNotificationParam(m_type, m_sender);
|
||||
}
|
||||
|
|
|
@ -10,12 +10,6 @@ DECOMP_SIZE_ASSERT(MxBITMAPINFO, 0x428);
|
|||
// (1998) GLOBAL: LEGO1 0x10102184
|
||||
MxU16 g_bitmapSignature = TWOCC('B', 'M');
|
||||
|
||||
// FUNCTION: LEGO1 0x1004e0d0
|
||||
int MxBitmap::VTable0x28(int)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100bc980
|
||||
MxBitmap::MxBitmap()
|
||||
{
|
||||
|
|
|
@ -40,10 +40,8 @@ void MxLoopingFlcPresenter::NextFrame()
|
|||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Repeating;
|
||||
}
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End)
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
LoopChunk(chunk);
|
||||
|
|
|
@ -51,10 +51,8 @@ void MxLoopingSmkPresenter::NextFrame()
|
|||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Repeating;
|
||||
}
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End)
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
LoopChunk(chunk);
|
||||
|
@ -67,10 +65,8 @@ void MxLoopingSmkPresenter::NextFrame()
|
|||
// FUNCTION: LEGO1 0x100b4a90
|
||||
void MxLoopingSmkPresenter::VTable0x8c()
|
||||
{
|
||||
if (m_action->GetDuration() < m_elapsedDuration) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_unk5;
|
||||
}
|
||||
if (m_action->GetDuration() < m_elapsedDuration)
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
else {
|
||||
MxStreamChunk* chunk;
|
||||
m_loopingChunkCursor->Current(chunk);
|
||||
|
|
|
@ -13,12 +13,6 @@ DECOMP_SIZE_ASSERT(MxStillPresenter, 0x6c);
|
|||
// GLOBAL: LEGO1 0x10101eb0
|
||||
const char* g_strBmpIsmap = "BMP_ISMAP";
|
||||
|
||||
// FUNCTION: LEGO1 0x100435b0
|
||||
void MxStillPresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b9c70
|
||||
void MxStillPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
|
@ -127,8 +121,7 @@ void MxStillPresenter::StreamingTickle()
|
|||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
m_chunkTime = chunk->GetTime();
|
||||
NextFrame();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Repeating;
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
|
||||
if (m_action->GetDuration() == -1 && m_compositePresenter)
|
||||
m_compositePresenter->VTable0x60(this);
|
||||
|
@ -139,10 +132,8 @@ void MxStillPresenter::StreamingTickle()
|
|||
void MxStillPresenter::RepeatingTickle()
|
||||
{
|
||||
if (m_action->GetDuration() != -1) {
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_unk5;
|
||||
}
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration())
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,66 +8,6 @@
|
|||
DECOMP_SIZE_ASSERT(MxVideoPresenter, 0x64);
|
||||
DECOMP_SIZE_ASSERT(MxVideoPresenter::AlphaMask, 0xc);
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c700
|
||||
void MxVideoPresenter::LoadHeader(MxStreamChunk* p_chunk)
|
||||
{
|
||||
// Empty
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c710
|
||||
void MxVideoPresenter::CreateBitmap()
|
||||
{
|
||||
// Empty
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c720
|
||||
void MxVideoPresenter::LoadFrame(MxStreamChunk* p_chunk)
|
||||
{
|
||||
// Empty
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c730
|
||||
void MxVideoPresenter::RealizePalette()
|
||||
{
|
||||
// Empty
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c740
|
||||
MxVideoPresenter::~MxVideoPresenter()
|
||||
{
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c7a0
|
||||
void MxVideoPresenter::Destroy()
|
||||
{
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c7b0
|
||||
LPDIRECTDRAWSURFACE MxVideoPresenter::VTable0x78()
|
||||
{
|
||||
return m_unk0x58;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c7c0
|
||||
MxBool MxVideoPresenter::VTable0x7c()
|
||||
{
|
||||
return (m_bitmap != NULL) || (m_alpha != NULL);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c7e0
|
||||
MxS32 MxVideoPresenter::GetWidth()
|
||||
{
|
||||
return m_alpha ? m_alpha->m_width : m_bitmap->GetBmiWidth();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c800
|
||||
MxS32 MxVideoPresenter::GetHeight()
|
||||
{
|
||||
return m_alpha ? m_alpha->m_height : m_bitmap->GetBmiHeightAbs();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b24f0
|
||||
MxVideoPresenter::AlphaMask::AlphaMask(const MxBitmap& p_bitmap)
|
||||
{
|
||||
|
@ -242,8 +182,7 @@ void MxVideoPresenter::NextFrame()
|
|||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Repeating;
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
}
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
|
@ -460,8 +399,7 @@ void MxVideoPresenter::ReadyTickle()
|
|||
LoadHeader(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Starting;
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -472,8 +410,7 @@ void MxVideoPresenter::StartingTickle()
|
|||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
CreateBitmap();
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Streaming;
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -564,15 +501,11 @@ void MxVideoPresenter::Unk5Tickle()
|
|||
if (m_unk0x60 == -1)
|
||||
m_unk0x60 = m_action->GetElapsedTime();
|
||||
|
||||
if (m_action->GetElapsedTime() >= m_unk0x60 + ((MxDSMediaAction*) m_action)->GetSustainTime()) {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Done;
|
||||
if (m_action->GetElapsedTime() >= m_unk0x60 + ((MxDSMediaAction*) m_action)->GetSustainTime())
|
||||
ProgressTickleState(TickleState_Done);
|
||||
}
|
||||
else
|
||||
ProgressTickleState(TickleState_Done);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue