mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
cmake+ci: run clang-tidy (#512)
* cmake+ci: run clang-tidy
* Remove DESCRIPTION from LEGO1/LegoOmni.mingw.def
* Add initial .clang-tidy and fixes
* fix file perms
* Comment out DESCRIPTION
* Remove LegoEntity::~LegoEntity and MxPresenter::~MxPresenter from mingw's LEGO1.def
* Looks like clang is allergic to the libs in the directx5 SDK
* Update .clang-tidy
* Fix typo in .clang-tidy
* Attempt to generate an action error
* Revert "Attempt to generate an action error"
This reverts commit 96c4c65fed
.
* cmake: test with -Wparentheses + optionally with -Werror
* ci: -k0 is a Ninja argument
* Use -Werror only for msys2 builds
* cmake: only emit warnings for specific warnings
* cmake: and don't do -Werror/-WX anymore
* Fix warnings
* Fix mingw warnings
---------
Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:

committed by
GitHub

parent
97d1ba7c71
commit
9e686e2a87
@@ -21,8 +21,9 @@ public:
|
||||
MxDSAction* oldAction = p_action;
|
||||
this->m_realloc = p_reallocAction;
|
||||
|
||||
if (p_reallocAction)
|
||||
if (p_reallocAction) {
|
||||
this->m_action = new MxDSAction();
|
||||
}
|
||||
else {
|
||||
this->m_action = oldAction;
|
||||
return;
|
||||
@@ -34,17 +35,19 @@ public:
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10051050
|
||||
inline virtual ~MxActionNotificationParam() override
|
||||
inline ~MxActionNotificationParam() override
|
||||
{
|
||||
if (!this->m_realloc)
|
||||
if (!this->m_realloc) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->m_action)
|
||||
if (this->m_action) {
|
||||
delete this->m_action;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100510c0
|
||||
virtual MxNotificationParam* Clone() override
|
||||
MxNotificationParam* Clone() override
|
||||
{
|
||||
return new MxActionNotificationParam(this->m_type, this->m_sender, this->m_action, this->m_realloc);
|
||||
} // vtable+0x04
|
||||
@@ -70,7 +73,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual MxNotificationParam* Clone() override; // vtable+0x04
|
||||
MxNotificationParam* Clone() override; // vtable+0x04
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d8358
|
||||
@@ -88,7 +91,7 @@ public:
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10051270
|
||||
virtual MxNotificationParam* Clone() override
|
||||
MxNotificationParam* Clone() override
|
||||
{
|
||||
return new MxEndActionNotificationParam(
|
||||
c_notificationEndAction,
|
||||
@@ -109,7 +112,7 @@ public:
|
||||
m_unk0x14 = p_unk0x14;
|
||||
}
|
||||
|
||||
virtual MxNotificationParam* Clone() override; // vtable+0x04
|
||||
MxNotificationParam* Clone() override; // vtable+0x04
|
||||
|
||||
private:
|
||||
MxPresenter* m_unk0x14; // 0x14
|
||||
|
@@ -9,10 +9,10 @@
|
||||
class MxAudioManager : public MxMediaManager {
|
||||
public:
|
||||
MxAudioManager();
|
||||
virtual ~MxAudioManager() override;
|
||||
~MxAudioManager() override;
|
||||
|
||||
virtual MxResult InitPresenters() override; // vtable+14
|
||||
virtual void Destroy() override; // vtable+18
|
||||
MxResult InitPresenters() override; // vtable+14
|
||||
void Destroy() override; // vtable+18
|
||||
|
||||
// FUNCTION: LEGO1 0x10029910
|
||||
virtual MxS32 GetVolume() { return this->m_volume; } // vtable+28
|
||||
|
@@ -11,14 +11,14 @@ public:
|
||||
MxAudioPresenter() { m_volume = 100; }
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d280
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f078c
|
||||
return "MxAudioPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d290
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxAudioPresenter::ClassName()) || MxMediaPresenter::IsA(p_name);
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ struct MxBITMAPINFO {
|
||||
class MxBitmap : public MxCore {
|
||||
public:
|
||||
MxBitmap();
|
||||
virtual ~MxBitmap(); // vtable+00
|
||||
~MxBitmap() override; // vtable+00
|
||||
|
||||
virtual MxResult ImportBitmap(MxBitmap* p_bitmap); // vtable+14
|
||||
virtual MxResult ImportBitmapInfo(MxBITMAPINFO* p_info); // vtable+18
|
||||
@@ -102,30 +102,37 @@ public:
|
||||
}
|
||||
inline MxLong GetAdjustedStride()
|
||||
{
|
||||
if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN || m_bmiHeader->biHeight < 0)
|
||||
if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN || m_bmiHeader->biHeight < 0) {
|
||||
return GetBmiStride();
|
||||
else
|
||||
}
|
||||
else {
|
||||
return -GetBmiStride();
|
||||
}
|
||||
}
|
||||
|
||||
inline MxLong GetLine(MxS32 p_top)
|
||||
{
|
||||
MxS32 height;
|
||||
if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN || m_bmiHeader->biHeight < 0)
|
||||
if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN || m_bmiHeader->biHeight < 0) {
|
||||
height = p_top;
|
||||
else
|
||||
}
|
||||
else {
|
||||
height = GetBmiHeightAbs() - p_top - 1;
|
||||
}
|
||||
return GetBmiStride() * height;
|
||||
}
|
||||
|
||||
inline MxU8* GetStart(MxS32 p_left, MxS32 p_top)
|
||||
{
|
||||
if (m_bmiHeader->biCompression == BI_RGB)
|
||||
if (m_bmiHeader->biCompression == BI_RGB) {
|
||||
return GetLine(p_top) + m_data + p_left;
|
||||
else if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN)
|
||||
}
|
||||
else if (m_bmiHeader->biCompression == BI_RGB_TOPDOWN) {
|
||||
return m_data;
|
||||
else
|
||||
}
|
||||
else {
|
||||
return GetLine(0) + m_data;
|
||||
}
|
||||
}
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100bc9f0
|
||||
|
@@ -16,7 +16,7 @@ public:
|
||||
|
||||
void SetDestroy(void (*p_customDestructor)(T)) { this->m_customDestructor = p_customDestructor; }
|
||||
|
||||
virtual ~MxCollection() {}
|
||||
~MxCollection() override {}
|
||||
virtual MxS8 Compare(T, T) { return 0; }
|
||||
|
||||
protected:
|
||||
|
@@ -12,37 +12,38 @@ class MxCompositePresenterList : public list<MxPresenter*> {};
|
||||
class MxCompositePresenter : public MxPresenter {
|
||||
public:
|
||||
MxCompositePresenter();
|
||||
virtual ~MxCompositePresenter() override; // vtable+0x00
|
||||
~MxCompositePresenter() override; // vtable+0x00
|
||||
|
||||
virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x100b6210
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0774
|
||||
return "MxCompositePresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b6220
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxCompositePresenter::ClassName()) || MxPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
|
||||
virtual void EndAction() override; // vtable+0x40
|
||||
virtual void SetTickleState(TickleState p_tickleState) override; // vtable+0x44
|
||||
virtual MxBool HasTickleStatePassed(TickleState p_tickleState) override; // vtable+0x48
|
||||
virtual void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
virtual void VTable0x58(MxEndActionNotificationParam& p_param); // vtable+0x58
|
||||
virtual void VTable0x5c(MxNotificationParam& p_param); // vtable+0x5c
|
||||
virtual void VTable0x60(MxPresenter* p_presenter); // vtable+0x60
|
||||
MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
|
||||
void EndAction() override; // vtable+0x40
|
||||
void SetTickleState(TickleState p_tickleState) override; // vtable+0x44
|
||||
MxBool HasTickleStatePassed(TickleState p_tickleState) override; // vtable+0x48
|
||||
void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
virtual void VTable0x58(MxEndActionNotificationParam& p_param); // vtable+0x58
|
||||
virtual void VTable0x5c(MxNotificationParam& p_param); // vtable+0x5c
|
||||
virtual void VTable0x60(MxPresenter* p_presenter); // vtable+0x60
|
||||
|
||||
// FUNCTION: LEGO1 0x1000caf0
|
||||
virtual MxBool VTable0x64(undefined4 p_undefined)
|
||||
{
|
||||
if (m_compositePresenter)
|
||||
if (m_compositePresenter) {
|
||||
return m_compositePresenter->VTable0x64(p_undefined);
|
||||
}
|
||||
return TRUE;
|
||||
} // vtable+0x64
|
||||
|
||||
|
@@ -15,30 +15,30 @@
|
||||
class MxDiskStreamController : public MxStreamController {
|
||||
public:
|
||||
MxDiskStreamController();
|
||||
virtual ~MxDiskStreamController() override;
|
||||
~MxDiskStreamController() override;
|
||||
|
||||
virtual MxResult Tickle() override; // vtable+0x08
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x100c7360
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10102144
|
||||
return "MxDiskStreamController";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c7370
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDiskStreamController::ClassName()) || MxStreamController::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxResult Open(const char* p_filename) override; // vtable+0x14
|
||||
virtual MxResult VTable0x18(undefined4, undefined4) override; // vtable+0x18
|
||||
virtual MxResult VTable0x20(MxDSAction* p_action) override; // vtable+0x20
|
||||
virtual MxResult VTable0x24(MxDSAction* p_action) override; // vtable+0x24
|
||||
virtual MxDSStreamingAction* VTable0x28() override; // vtable+0x28
|
||||
virtual MxResult VTable0x30(MxDSAction* p_action) override; // vtable+0x30
|
||||
virtual MxResult VTable0x34(undefined4); // vtable+0x34
|
||||
MxResult Open(const char* p_filename) override; // vtable+0x14
|
||||
MxResult VTable0x18(undefined4, undefined4) override; // vtable+0x18
|
||||
MxResult VTable0x20(MxDSAction* p_action) override; // vtable+0x20
|
||||
MxResult VTable0x24(MxDSAction* p_action) override; // vtable+0x24
|
||||
MxDSStreamingAction* VTable0x28() override; // vtable+0x28
|
||||
MxResult VTable0x30(MxDSAction* p_action) override; // vtable+0x30
|
||||
virtual MxResult VTable0x34(undefined4); // vtable+0x34
|
||||
|
||||
inline MxBool GetUnk0xc4() const { return m_unk0xc4; }
|
||||
|
||||
|
@@ -27,17 +27,17 @@ public:
|
||||
class MxDiskStreamProvider : public MxStreamProvider {
|
||||
public:
|
||||
MxDiskStreamProvider();
|
||||
virtual ~MxDiskStreamProvider() override;
|
||||
~MxDiskStreamProvider() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100d1160
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x1010287c
|
||||
return "MxDiskStreamProvider";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100d1170
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDiskStreamProvider::ClassName()) || MxStreamProvider::IsA(p_name);
|
||||
}
|
||||
@@ -48,12 +48,12 @@ public:
|
||||
static MxBool FUN_100d1af0(MxDSStreamingAction* p_action);
|
||||
MxResult FUN_100d1b20(MxDSStreamingAction* p_action);
|
||||
|
||||
virtual MxResult SetResourceToGet(MxStreamController* p_resource) override; // vtable+0x14
|
||||
virtual MxU32 GetFileSize() override; // vtable+0x18
|
||||
virtual MxS32 GetStreamBuffersNum() override; // vtable+0x1c
|
||||
virtual void VTable0x20(MxDSAction* p_action) override; // vtable+0x20
|
||||
virtual MxU32 GetLengthInDWords() override; // vtable+0x24
|
||||
virtual MxU32* GetBufferForDWords() override; // vtable+0x28
|
||||
MxResult SetResourceToGet(MxStreamController* p_resource) override; // vtable+0x14
|
||||
MxU32 GetFileSize() override; // vtable+0x18
|
||||
MxS32 GetStreamBuffersNum() override; // vtable+0x1c
|
||||
void VTable0x20(MxDSAction* p_action) override; // vtable+0x20
|
||||
MxU32 GetLengthInDWords() override; // vtable+0x24
|
||||
MxU32* GetBufferForDWords() override; // vtable+0x28
|
||||
|
||||
private:
|
||||
MxDiskStreamProviderThread m_thread; // 0x10
|
||||
|
@@ -14,7 +14,7 @@
|
||||
class MxDisplaySurface : public MxCore {
|
||||
public:
|
||||
MxDisplaySurface();
|
||||
virtual ~MxDisplaySurface() override;
|
||||
~MxDisplaySurface() override;
|
||||
|
||||
virtual MxResult Init(
|
||||
MxVideoParam& p_videoParam,
|
||||
|
@@ -25,35 +25,35 @@ public:
|
||||
};
|
||||
|
||||
MxDSAction();
|
||||
virtual ~MxDSAction();
|
||||
~MxDSAction() override;
|
||||
|
||||
void CopyFrom(MxDSAction& p_dsAction);
|
||||
MxDSAction& operator=(MxDSAction& p_dsAction);
|
||||
|
||||
// FUNCTION: LEGO1 0x100ad980
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x101013f4
|
||||
return "MxDSAction";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100ad990
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSAction::ClassName()) || MxDSObject::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual undefined4 VTable0x14() override; // vtable+14;
|
||||
virtual MxU32 GetSizeOnDisk() override; // vtable+18;
|
||||
virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
||||
virtual MxLong GetDuration(); // vtable+24;
|
||||
virtual void SetDuration(MxLong p_duration); // vtable+28;
|
||||
virtual MxDSAction* Clone(); // vtable+2c;
|
||||
virtual void MergeFrom(MxDSAction& p_dsAction); // vtable+30;
|
||||
virtual MxBool HasId(MxU32 p_objectId); // vtable+34;
|
||||
virtual void SetUnknown90(MxLong p_unk0x90); // vtable+38;
|
||||
virtual MxLong GetUnknown90(); // vtable+3c;
|
||||
virtual MxLong GetElapsedTime(); // vtable+40;
|
||||
undefined4 VTable0x14() override; // vtable+14;
|
||||
MxU32 GetSizeOnDisk() override; // vtable+18;
|
||||
void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
||||
virtual MxLong GetDuration(); // vtable+24;
|
||||
virtual void SetDuration(MxLong p_duration); // vtable+28;
|
||||
virtual MxDSAction* Clone(); // vtable+2c;
|
||||
virtual void MergeFrom(MxDSAction& p_dsAction); // vtable+30;
|
||||
virtual MxBool HasId(MxU32 p_objectId); // vtable+34;
|
||||
virtual void SetUnknown90(MxLong p_unk0x90); // vtable+38;
|
||||
virtual MxLong GetUnknown90(); // vtable+3c;
|
||||
virtual MxLong GetElapsedTime(); // vtable+40;
|
||||
|
||||
void AppendData(MxU16 p_extraLength, const char* p_extraData);
|
||||
|
||||
@@ -77,10 +77,12 @@ public:
|
||||
|
||||
inline void CopyFlags(MxU32 p_flags)
|
||||
{
|
||||
if (p_flags & MxDSAction::c_looping)
|
||||
if (p_flags & MxDSAction::c_looping) {
|
||||
SetFlags(GetFlags() | MxDSAction::c_looping);
|
||||
else if (p_flags & MxDSAction::c_bit3)
|
||||
}
|
||||
else if (p_flags & MxDSAction::c_bit3) {
|
||||
SetFlags(GetFlags() | MxDSAction::c_bit3);
|
||||
}
|
||||
}
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100ada60
|
||||
|
@@ -19,7 +19,7 @@ public:
|
||||
MxDSActionList() { this->m_unk0x18 = 0; }
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9c90
|
||||
virtual MxS8 Compare(MxDSAction* p_a, MxDSAction* p_b) override
|
||||
MxS8 Compare(MxDSAction* p_a, MxDSAction* p_b) override
|
||||
{
|
||||
return p_a == p_b ? 0 : p_a < p_b ? -1 : 1;
|
||||
} // vtable+0x14
|
||||
|
@@ -8,25 +8,25 @@
|
||||
class MxDSAnim : public MxDSMediaAction {
|
||||
public:
|
||||
MxDSAnim();
|
||||
virtual ~MxDSAnim() override;
|
||||
~MxDSAnim() override;
|
||||
|
||||
void CopyFrom(MxDSAnim& p_dsAnim);
|
||||
MxDSAnim& operator=(MxDSAnim& p_dsAnim);
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9060
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x101025d8
|
||||
return "MxDSAnim";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9070
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSAnim::ClassName()) || MxDSMediaAction::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||
MxDSAction* Clone() override; // vtable+2c;
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100c9180
|
||||
// MxDSAnim::`scalar deleting destructor'
|
||||
|
@@ -22,10 +22,10 @@ public:
|
||||
};
|
||||
|
||||
MxDSBuffer();
|
||||
virtual ~MxDSBuffer() override;
|
||||
~MxDSBuffer() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100c6500
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x101025b8
|
||||
return "MxDSBuffer";
|
||||
|
@@ -18,17 +18,17 @@ public:
|
||||
};
|
||||
|
||||
MxDSChunk();
|
||||
virtual ~MxDSChunk() override;
|
||||
~MxDSChunk() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100be0c0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10101e6c
|
||||
return "MxDSChunk";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100be0d0
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSChunk::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
@@ -53,8 +53,9 @@ public:
|
||||
|
||||
inline void Release()
|
||||
{
|
||||
if (m_data)
|
||||
if (m_data) {
|
||||
delete[] m_data;
|
||||
}
|
||||
}
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100be150
|
||||
|
@@ -7,25 +7,25 @@
|
||||
class MxDSEvent : public MxDSMediaAction {
|
||||
public:
|
||||
MxDSEvent();
|
||||
virtual ~MxDSEvent() override;
|
||||
~MxDSEvent() override;
|
||||
|
||||
void CopyFrom(MxDSEvent& p_dsEvent);
|
||||
MxDSEvent& operator=(MxDSEvent& p_dsEvent);
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9660
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x101025f0
|
||||
return "MxDSEvent";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9670
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSEvent::ClassName()) || MxDSMediaAction::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||
MxDSAction* Clone() override; // vtable+2c;
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100c9780
|
||||
// MxDSEvent::`scalar deleting destructor'
|
||||
|
@@ -12,27 +12,27 @@
|
||||
class MxDSFile : public MxDSSource {
|
||||
public:
|
||||
MxDSFile(const char* p_filename, MxULong p_skipReadingChunks);
|
||||
virtual ~MxDSFile(); // vtable+0x00
|
||||
~MxDSFile() override; // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x100c0120
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10102594
|
||||
return "MxDSFile";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c0130
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSFile::ClassName()) || MxDSSource::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxLong Open(MxULong); // vtable+0x14
|
||||
virtual MxLong Close(); // vtable+0x18
|
||||
virtual MxResult Read(unsigned char*, MxULong); // vtable+0x20
|
||||
virtual MxLong Seek(MxLong, int); // vtable+0x24
|
||||
virtual MxULong GetBufferSize(); // vtable+0x28
|
||||
virtual MxULong GetStreamBuffersNum(); // vtable+0x2c
|
||||
MxLong Open(MxULong) override; // vtable+0x14
|
||||
MxLong Close() override; // vtable+0x18
|
||||
MxResult Read(unsigned char*, MxULong) override; // vtable+0x20
|
||||
MxLong Seek(MxLong, int) override; // vtable+0x24
|
||||
MxULong GetBufferSize() override; // vtable+0x28
|
||||
MxULong GetStreamBuffersNum() override; // vtable+0x2c
|
||||
|
||||
inline void SetFileName(const char* p_filename) { m_filename = p_filename; }
|
||||
|
||||
|
@@ -10,20 +10,20 @@
|
||||
class MxDSMediaAction : public MxDSAction {
|
||||
public:
|
||||
MxDSMediaAction();
|
||||
virtual ~MxDSMediaAction() override;
|
||||
~MxDSMediaAction() override;
|
||||
|
||||
void CopyFrom(MxDSMediaAction& p_dsMediaAction);
|
||||
MxDSMediaAction& operator=(MxDSMediaAction& p_dsMediaAction);
|
||||
|
||||
// FUNCTION: LEGO1 0x100c8be0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f7624
|
||||
return "MxDSMediaAction";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c8bf0
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSMediaAction::ClassName()) || MxDSAction::IsA(p_name);
|
||||
}
|
||||
@@ -31,10 +31,10 @@ public:
|
||||
// SYNTHETIC: LEGO1 0x100c8cd0
|
||||
// MxDSMediaAction::`scalar deleting destructor'
|
||||
|
||||
virtual undefined4 VTable0x14(); // vtable+14;
|
||||
virtual MxU32 GetSizeOnDisk() override; // vtable+18;
|
||||
virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||
undefined4 VTable0x14() override; // vtable+14;
|
||||
MxU32 GetSizeOnDisk() override; // vtable+18;
|
||||
void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
||||
MxDSAction* Clone() override; // vtable+2c;
|
||||
|
||||
void CopyMediaSrcPath(const char* p_mediaSrcPath);
|
||||
|
||||
|
@@ -9,32 +9,32 @@
|
||||
class MxDSMultiAction : public MxDSAction {
|
||||
public:
|
||||
MxDSMultiAction();
|
||||
virtual ~MxDSMultiAction() override;
|
||||
~MxDSMultiAction() override;
|
||||
|
||||
void CopyFrom(MxDSMultiAction& p_dsMultiAction);
|
||||
MxDSMultiAction& operator=(MxDSMultiAction& p_dsMultiAction);
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9f50
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10101dbc
|
||||
return "MxDSMultiAction";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9f60
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSMultiAction::ClassName()) || MxDSAction::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual undefined4 VTable0x14() override; // vtable+14;
|
||||
virtual MxU32 GetSizeOnDisk() override; // vtable+18;
|
||||
virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
||||
virtual void SetAtomId(MxAtomId p_atomId) override; // vtable+20;
|
||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||
virtual void MergeFrom(MxDSAction& p_dsAction) override; // vtable+30;
|
||||
virtual MxBool HasId(MxU32 p_objectId) override; // vtable+34;
|
||||
virtual void SetUnknown90(MxLong p_unk0x90) override; // vtable+38;
|
||||
undefined4 VTable0x14() override; // vtable+14;
|
||||
MxU32 GetSizeOnDisk() override; // vtable+18;
|
||||
void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
||||
void SetAtomId(MxAtomId p_atomId) override; // vtable+20;
|
||||
MxDSAction* Clone() override; // vtable+2c;
|
||||
void MergeFrom(MxDSAction& p_dsAction) override; // vtable+30;
|
||||
MxBool HasId(MxU32 p_objectId) override; // vtable+34;
|
||||
void SetUnknown90(MxLong p_unk0x90) override; // vtable+38;
|
||||
|
||||
inline MxDSActionList* GetActionList() const { return m_actions; }
|
||||
|
||||
|
@@ -27,7 +27,7 @@ public:
|
||||
};
|
||||
|
||||
MxDSObject();
|
||||
virtual ~MxDSObject() override;
|
||||
~MxDSObject() override;
|
||||
|
||||
void CopyFrom(MxDSObject& p_dsObject);
|
||||
MxDSObject& operator=(MxDSObject& p_dsObject);
|
||||
@@ -36,10 +36,10 @@ public:
|
||||
void SetSourceName(const char* p_sourceName);
|
||||
|
||||
// FUNCTION: LEGO1 0x100bf730
|
||||
inline virtual const char* ClassName() const override { return "MxDSObject"; } // vtable+0c
|
||||
inline const char* ClassName() const override { return "MxDSObject"; } // vtable+0c
|
||||
|
||||
// FUNCTION: LEGO1 0x100bf740
|
||||
inline virtual MxBool IsA(const char* p_name) const override
|
||||
inline MxBool IsA(const char* p_name) const override
|
||||
{
|
||||
return !strcmp(p_name, MxDSObject::ClassName()) || MxCore::IsA(p_name);
|
||||
} // vtable+10;
|
||||
|
@@ -8,24 +8,24 @@
|
||||
class MxDSObjectAction : public MxDSMediaAction {
|
||||
public:
|
||||
MxDSObjectAction();
|
||||
virtual ~MxDSObjectAction() override;
|
||||
~MxDSObjectAction() override;
|
||||
|
||||
MxDSObjectAction& operator=(MxDSObjectAction& p_dsObjectAction);
|
||||
|
||||
// FUNCTION: LEGO1 0x100c88e0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x101025c4
|
||||
return "MxDSObjectAction";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c88f0
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSObjectAction::ClassName()) || MxDSMediaAction::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||
MxDSAction* Clone() override; // vtable+2c;
|
||||
virtual void CopyFrom(MxDSObjectAction& p_dsObjectAction); // vtable+44;
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100c8a00
|
||||
|
@@ -8,20 +8,20 @@
|
||||
class MxDSParallelAction : public MxDSMultiAction {
|
||||
public:
|
||||
MxDSParallelAction();
|
||||
virtual ~MxDSParallelAction() override;
|
||||
~MxDSParallelAction() override;
|
||||
|
||||
void CopyFrom(MxDSParallelAction& p_dsParallelAction);
|
||||
MxDSParallelAction& operator=(MxDSParallelAction& p_dsParallelAction);
|
||||
|
||||
// FUNCTION: LEGO1 0x100caf00
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10102608
|
||||
return "MxDSParallelAction";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100caf10
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSParallelAction::ClassName()) || MxDSMultiAction::IsA(p_name);
|
||||
}
|
||||
@@ -29,12 +29,12 @@ public:
|
||||
// SYNTHETIC: LEGO1 0x100cb020
|
||||
// MxDSParallelAction::`scalar deleting destructor'
|
||||
|
||||
virtual MxLong GetDuration() override; // vtable+24;
|
||||
MxLong GetDuration() override; // vtable+24;
|
||||
|
||||
// FUNCTION: LEGO1 0x100caef0
|
||||
virtual void SetDuration(MxLong p_duration) override { m_duration = p_duration; } // vtable+0x28
|
||||
void SetDuration(MxLong p_duration) override { m_duration = p_duration; } // vtable+0x28
|
||||
|
||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||
MxDSAction* Clone() override; // vtable+2c;
|
||||
};
|
||||
|
||||
#endif // MXDSPARALLELACTION_H
|
||||
|
@@ -10,27 +10,27 @@
|
||||
class MxDSSelectAction : public MxDSParallelAction {
|
||||
public:
|
||||
MxDSSelectAction();
|
||||
virtual ~MxDSSelectAction() override;
|
||||
~MxDSSelectAction() override;
|
||||
|
||||
void CopyFrom(MxDSSelectAction& p_dsSelectAction);
|
||||
MxDSSelectAction& operator=(MxDSSelectAction& p_dsSelectAction);
|
||||
|
||||
// FUNCTION: LEGO1 0x100cb6f0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x1010261c
|
||||
return "MxDSSelectAction";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100cb700
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSSelectAction::ClassName()) || MxDSParallelAction::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxU32 GetSizeOnDisk() override; // vtable+18;
|
||||
virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||
MxU32 GetSizeOnDisk() override; // vtable+18;
|
||||
void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
||||
MxDSAction* Clone() override; // vtable+2c;
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100cb840
|
||||
// MxDSSelectAction::`scalar deleting destructor'
|
||||
|
@@ -9,27 +9,27 @@
|
||||
class MxDSSerialAction : public MxDSMultiAction {
|
||||
public:
|
||||
MxDSSerialAction();
|
||||
virtual ~MxDSSerialAction() override;
|
||||
~MxDSSerialAction() override;
|
||||
|
||||
void CopyFrom(MxDSSerialAction& p_dsSerialAction);
|
||||
MxDSSerialAction& operator=(MxDSSerialAction& p_dsSerialAction);
|
||||
|
||||
// FUNCTION: LEGO1 0x100caad0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f75dc
|
||||
return "MxDSSerialAction";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100caae0
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSSerialAction::ClassName()) || MxDSMultiAction::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxLong GetDuration() override; // vtable+24;
|
||||
virtual void SetDuration(MxLong p_duration) override; // vtable+28;
|
||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||
MxLong GetDuration() override; // vtable+24;
|
||||
void SetDuration(MxLong p_duration) override; // vtable+28;
|
||||
MxDSAction* Clone() override; // vtable+2c;
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100cabf0
|
||||
// MxDSSerialAction::`scalar deleting destructor'
|
||||
|
@@ -8,27 +8,27 @@
|
||||
class MxDSSound : public MxDSMediaAction {
|
||||
public:
|
||||
MxDSSound();
|
||||
virtual ~MxDSSound() override;
|
||||
~MxDSSound() override;
|
||||
|
||||
void CopyFrom(MxDSSound& p_dsSound);
|
||||
MxDSSound& operator=(MxDSSound& p_dsSound);
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9330
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x101025e4
|
||||
return "MxDSSound";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9340
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSSound::ClassName()) || MxDSMediaAction::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxU32 GetSizeOnDisk() override; // vtable+18;
|
||||
virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||
MxU32 GetSizeOnDisk() override; // vtable+18;
|
||||
void Deserialize(MxU8** p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
||||
MxDSAction* Clone() override; // vtable+2c;
|
||||
|
||||
inline MxS32 GetVolume() const { return m_volume; }
|
||||
|
||||
|
@@ -12,17 +12,17 @@ public:
|
||||
MxDSSource() : m_lengthInDWords(0), m_pBuffer(NULL), m_position(-1) {}
|
||||
|
||||
// FUNCTION: LEGO1 0x100bff60
|
||||
virtual ~MxDSSource() override { delete[] m_pBuffer; }
|
||||
~MxDSSource() override { delete[] m_pBuffer; }
|
||||
|
||||
// FUNCTION: LEGO1 0x100c0010
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10102588
|
||||
return "MxDSSource";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c0020
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSSource::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
@@ -8,25 +8,25 @@
|
||||
class MxDSStill : public MxDSMediaAction {
|
||||
public:
|
||||
MxDSStill();
|
||||
virtual ~MxDSStill() override;
|
||||
~MxDSStill() override;
|
||||
|
||||
void CopyFrom(MxDSStill& p_dsStill);
|
||||
MxDSStill& operator=(MxDSStill& p_dsStill);
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9930
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x101025fc
|
||||
return "MxDSStill";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9940
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSStill::ClassName()) || MxDSMediaAction::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxDSAction* Clone() override; // vtable+2c;
|
||||
MxDSAction* Clone() override; // vtable+2c;
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100c9a50
|
||||
// MxDSStill::`scalar deleting destructor'
|
||||
|
@@ -11,7 +11,7 @@ class MxDSStreamingAction : public MxDSAction {
|
||||
public:
|
||||
MxDSStreamingAction(MxDSAction& p_dsAction, MxU32 p_offset);
|
||||
MxDSStreamingAction(MxDSStreamingAction& p_dsStreamingAction);
|
||||
virtual ~MxDSStreamingAction();
|
||||
~MxDSStreamingAction() override;
|
||||
|
||||
MxDSStreamingAction* CopyFrom(MxDSStreamingAction& p_dsStreamingAction);
|
||||
MxDSStreamingAction& operator=(MxDSAction& p_dsAction)
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual MxBool HasId(MxU32 p_objectId) override; // vtable+34;
|
||||
MxBool HasId(MxU32 p_objectId) override; // vtable+34;
|
||||
|
||||
MxResult Init();
|
||||
void SetInternalAction(MxDSAction* p_dsAction);
|
||||
|
@@ -14,17 +14,17 @@ class MxStreamController;
|
||||
class MxDSSubscriber : public MxCore {
|
||||
public:
|
||||
MxDSSubscriber();
|
||||
virtual ~MxDSSubscriber() override;
|
||||
~MxDSSubscriber() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100b7d50
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x101020f8
|
||||
return "MxDSSubscriber";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b7d60
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxDSSubscriber::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
@@ -15,17 +15,17 @@ public:
|
||||
MxEntity() { this->m_mxEntityId = -1; }
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c110
|
||||
virtual ~MxEntity() override{};
|
||||
~MxEntity() override{};
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c180
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0070
|
||||
return "MxEntity";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c190
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxEntity::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
@@ -9,9 +9,9 @@
|
||||
class MxEventManager : public MxMediaManager {
|
||||
public:
|
||||
MxEventManager();
|
||||
virtual ~MxEventManager() override;
|
||||
~MxEventManager() override;
|
||||
|
||||
virtual void Destroy() override; // vtable+18
|
||||
void Destroy() override; // vtable+18
|
||||
virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+28
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100c03d0
|
||||
|
@@ -9,26 +9,26 @@
|
||||
class MxEventPresenter : public MxMediaPresenter {
|
||||
public:
|
||||
MxEventPresenter();
|
||||
virtual ~MxEventPresenter() override;
|
||||
~MxEventPresenter() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2c30
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10101dcc
|
||||
return "MxEventPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2c40
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxEventPresenter::ClassName()) || MxMediaPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void ReadyTickle() override; // vtable+0x18
|
||||
virtual void StartingTickle() override; // vtable+0x1c
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
void ReadyTickle() override; // vtable+0x18
|
||||
void StartingTickle() override; // vtable+0x1c
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
void Destroy() override; // vtable+0x38
|
||||
MxResult PutData() override; // vtable+0x4c
|
||||
virtual void CopyData(MxStreamChunk* p_chunk); // vtable+0x5c
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100c2d20
|
||||
|
@@ -11,25 +11,25 @@
|
||||
class MxFlcPresenter : public MxVideoPresenter {
|
||||
public:
|
||||
MxFlcPresenter();
|
||||
virtual ~MxFlcPresenter() override;
|
||||
~MxFlcPresenter() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x1004e200
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxFlcPresenter::ClassName()) || MxVideoPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b33f0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f43c8
|
||||
return "MxFlcPresenter";
|
||||
}
|
||||
|
||||
virtual void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c
|
||||
virtual void CreateBitmap() override; // vtable+0x60
|
||||
virtual void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68
|
||||
virtual void RealizePalette() override; // vtable+0x70
|
||||
void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c
|
||||
void CreateBitmap() override; // vtable+0x60
|
||||
void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68
|
||||
void RealizePalette() override; // vtable+0x70
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100b3400
|
||||
// MxFlcPresenter::`scalar deleting destructor'
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
m_resizeOption = e_noExpand;
|
||||
}
|
||||
|
||||
virtual ~MxHashTable() override;
|
||||
~MxHashTable() override;
|
||||
|
||||
void Resize();
|
||||
void Add(T);
|
||||
@@ -99,8 +99,9 @@ MxBool MxHashTableCursor<T>::Find(T p_obj)
|
||||
MxHashTableNode<T>* t = m_table->m_slots[bucket];
|
||||
|
||||
while (t) {
|
||||
if (t->m_hash == hash && !m_table->Compare(t->m_obj, p_obj))
|
||||
if (t->m_hash == hash && !m_table->Compare(t->m_obj, p_obj)) {
|
||||
m_match = t;
|
||||
}
|
||||
t = t->m_next;
|
||||
}
|
||||
|
||||
@@ -122,8 +123,9 @@ void MxHashTableCursor<T>::DeleteMatch()
|
||||
{
|
||||
// Cut the matching node out of the linked list
|
||||
// by updating pointer references.
|
||||
if (m_match == NULL)
|
||||
if (m_match == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_match->m_prev) {
|
||||
m_match->m_prev->m_next = m_match->m_next;
|
||||
@@ -134,8 +136,9 @@ void MxHashTableCursor<T>::DeleteMatch()
|
||||
m_table->m_slots[bucket] = m_match->m_next;
|
||||
}
|
||||
|
||||
if (m_match->m_next)
|
||||
if (m_match->m_next) {
|
||||
m_match->m_next->m_prev = m_match->m_prev;
|
||||
}
|
||||
|
||||
m_table->m_customDestructor(m_match->m_obj);
|
||||
delete m_match;
|
||||
@@ -210,8 +213,9 @@ inline void MxHashTable<T>::NodeInsert(MxHashTableNode<T>* p_node)
|
||||
|
||||
p_node->m_next = m_slots[bucket];
|
||||
|
||||
if (m_slots[bucket])
|
||||
if (m_slots[bucket]) {
|
||||
m_slots[bucket]->m_prev = p_node;
|
||||
}
|
||||
|
||||
m_slots[bucket] = p_node;
|
||||
this->m_count++;
|
||||
@@ -220,8 +224,9 @@ inline void MxHashTable<T>::NodeInsert(MxHashTableNode<T>* p_node)
|
||||
template <class T>
|
||||
inline void MxHashTable<T>::Add(T p_newobj)
|
||||
{
|
||||
if (m_resizeOption && ((this->m_count + 1) / m_numSlots) > m_autoResizeRatio)
|
||||
if (m_resizeOption && ((this->m_count + 1) / m_numSlots) > m_autoResizeRatio) {
|
||||
MxHashTable<T>::Resize();
|
||||
}
|
||||
|
||||
MxU32 hash = Hash(p_newobj);
|
||||
MxHashTableNode<T>* node = new MxHashTableNode<T>(p_newobj, hash);
|
||||
|
@@ -51,7 +51,7 @@ public:
|
||||
m_first = NULL;
|
||||
}
|
||||
|
||||
virtual ~MxList() override;
|
||||
~MxList() override;
|
||||
|
||||
void Append(T p_obj) { InsertEntry(p_obj, this->m_last, NULL); }
|
||||
void Prepend(T p_obj) { InsertEntry(p_obj, NULL, this->m_first); }
|
||||
@@ -121,8 +121,9 @@ public:
|
||||
// TODO: Probably shouldn't exist
|
||||
void NextFragment()
|
||||
{
|
||||
if (m_match)
|
||||
if (m_match) {
|
||||
m_match = m_match->GetNext();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -147,13 +148,15 @@ template <class T>
|
||||
inline void MxList<T>::DeleteAll(MxBool p_destroy)
|
||||
{
|
||||
for (MxListEntry<T>* t = m_first;;) {
|
||||
if (!t)
|
||||
if (!t) {
|
||||
break;
|
||||
}
|
||||
|
||||
MxListEntry<T>* next = t->GetNext();
|
||||
|
||||
if (p_destroy)
|
||||
if (p_destroy) {
|
||||
this->m_customDestructor(t->GetValue());
|
||||
}
|
||||
|
||||
delete t;
|
||||
t = next;
|
||||
@@ -169,15 +172,19 @@ inline MxListEntry<T>* MxList<T>::InsertEntry(T p_newobj, MxListEntry<T>* p_prev
|
||||
{
|
||||
MxListEntry<T>* newEntry = new MxListEntry<T>(p_newobj, p_prev, p_next);
|
||||
|
||||
if (p_prev)
|
||||
if (p_prev) {
|
||||
p_prev->SetNext(newEntry);
|
||||
else
|
||||
}
|
||||
else {
|
||||
this->m_first = newEntry;
|
||||
}
|
||||
|
||||
if (p_next)
|
||||
if (p_next) {
|
||||
p_next->SetPrev(newEntry);
|
||||
else
|
||||
}
|
||||
else {
|
||||
this->m_last = newEntry;
|
||||
}
|
||||
|
||||
this->m_count++;
|
||||
return newEntry;
|
||||
@@ -186,15 +193,19 @@ inline MxListEntry<T>* MxList<T>::InsertEntry(T p_newobj, MxListEntry<T>* p_prev
|
||||
template <class T>
|
||||
inline void MxList<T>::DeleteEntry(MxListEntry<T>* p_match)
|
||||
{
|
||||
if (p_match->GetPrev())
|
||||
if (p_match->GetPrev()) {
|
||||
p_match->GetPrev()->SetNext(p_match->GetNext());
|
||||
else
|
||||
}
|
||||
else {
|
||||
m_first = p_match->GetNext();
|
||||
}
|
||||
|
||||
if (p_match->GetNext())
|
||||
if (p_match->GetNext()) {
|
||||
p_match->GetNext()->SetPrev(p_match->GetPrev());
|
||||
else
|
||||
}
|
||||
else {
|
||||
m_last = p_match->GetPrev();
|
||||
}
|
||||
|
||||
delete p_match;
|
||||
this->m_count--;
|
||||
@@ -204,8 +215,9 @@ template <class T>
|
||||
inline MxBool MxListCursor<T>::Find(T p_obj)
|
||||
{
|
||||
for (m_match = m_list->m_first; m_match && m_list->Compare(m_match->GetValue(), p_obj);
|
||||
m_match = m_match->GetNext())
|
||||
m_match = m_match->GetNext()) {
|
||||
;
|
||||
}
|
||||
|
||||
return m_match != NULL;
|
||||
}
|
||||
@@ -232,10 +244,12 @@ inline void MxListCursor<T>::Destroy()
|
||||
template <class T>
|
||||
inline MxBool MxListCursor<T>::Next()
|
||||
{
|
||||
if (!m_match)
|
||||
if (!m_match) {
|
||||
m_match = m_list->m_first;
|
||||
else
|
||||
}
|
||||
else {
|
||||
m_match = m_match->GetNext();
|
||||
}
|
||||
|
||||
return m_match != NULL;
|
||||
}
|
||||
@@ -243,13 +257,16 @@ inline MxBool MxListCursor<T>::Next()
|
||||
template <class T>
|
||||
inline MxBool MxListCursor<T>::Next(T& p_obj)
|
||||
{
|
||||
if (!m_match)
|
||||
if (!m_match) {
|
||||
m_match = m_list->m_first;
|
||||
else
|
||||
}
|
||||
else {
|
||||
m_match = m_match->GetNext();
|
||||
}
|
||||
|
||||
if (m_match)
|
||||
if (m_match) {
|
||||
p_obj = m_match->GetValue();
|
||||
}
|
||||
|
||||
return m_match != NULL;
|
||||
}
|
||||
@@ -257,10 +274,12 @@ inline MxBool MxListCursor<T>::Next(T& p_obj)
|
||||
template <class T>
|
||||
inline MxBool MxListCursor<T>::Prev()
|
||||
{
|
||||
if (!m_match)
|
||||
if (!m_match) {
|
||||
m_match = m_list->m_last;
|
||||
else
|
||||
}
|
||||
else {
|
||||
m_match = m_match->GetPrev();
|
||||
}
|
||||
|
||||
return m_match != NULL;
|
||||
}
|
||||
@@ -268,13 +287,16 @@ inline MxBool MxListCursor<T>::Prev()
|
||||
template <class T>
|
||||
inline MxBool MxListCursor<T>::Prev(T& p_obj)
|
||||
{
|
||||
if (!m_match)
|
||||
if (!m_match) {
|
||||
m_match = m_list->m_last;
|
||||
else
|
||||
}
|
||||
else {
|
||||
m_match = m_match->GetPrev();
|
||||
}
|
||||
|
||||
if (m_match)
|
||||
if (m_match) {
|
||||
p_obj = m_match->GetValue();
|
||||
}
|
||||
|
||||
return m_match != NULL;
|
||||
}
|
||||
@@ -282,8 +304,9 @@ inline MxBool MxListCursor<T>::Prev(T& p_obj)
|
||||
template <class T>
|
||||
inline MxBool MxListCursor<T>::Current(T& p_obj)
|
||||
{
|
||||
if (m_match)
|
||||
if (m_match) {
|
||||
p_obj = m_match->GetValue();
|
||||
}
|
||||
|
||||
return m_match != NULL;
|
||||
}
|
||||
@@ -292,8 +315,9 @@ template <class T>
|
||||
inline MxBool MxListCursor<T>::First(T& p_obj)
|
||||
{
|
||||
m_match = m_list->m_first;
|
||||
if (m_match)
|
||||
if (m_match) {
|
||||
p_obj = m_match->GetValue();
|
||||
}
|
||||
|
||||
return m_match != NULL;
|
||||
}
|
||||
@@ -302,8 +326,9 @@ template <class T>
|
||||
inline MxBool MxListCursor<T>::Last(T& p_obj)
|
||||
{
|
||||
m_match = m_list->m_last;
|
||||
if (m_match)
|
||||
if (m_match) {
|
||||
p_obj = m_match->GetValue();
|
||||
}
|
||||
|
||||
return m_match != NULL;
|
||||
}
|
||||
@@ -311,15 +336,17 @@ inline MxBool MxListCursor<T>::Last(T& p_obj)
|
||||
template <class T>
|
||||
inline void MxListCursor<T>::SetValue(T p_obj)
|
||||
{
|
||||
if (m_match)
|
||||
if (m_match) {
|
||||
m_match->SetValue(p_obj);
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void MxListCursor<T>::Prepend(T p_newobj)
|
||||
{
|
||||
if (m_match)
|
||||
if (m_match) {
|
||||
m_list->InsertEntry(p_newobj, m_match->GetPrev(), m_match);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // MXLIST_H
|
||||
|
@@ -9,20 +9,20 @@
|
||||
class MxLoopingFlcPresenter : public MxFlcPresenter {
|
||||
public:
|
||||
MxLoopingFlcPresenter();
|
||||
virtual ~MxLoopingFlcPresenter() override;
|
||||
~MxLoopingFlcPresenter() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100b4380
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10101e20
|
||||
return "MxLoopingFlcPresenter";
|
||||
}
|
||||
|
||||
virtual void RepeatingTickle() override; // vtable+0x24
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void NextFrame() override; // vtable+0x64
|
||||
virtual void VTable0x88(); // vtable+0x88
|
||||
void RepeatingTickle() override; // vtable+0x24
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
void Destroy() override; // vtable+0x38
|
||||
void NextFrame() override; // vtable+0x64
|
||||
virtual void VTable0x88(); // vtable+0x88
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100b4390
|
||||
// MxLoopingFlcPresenter::`scalar deleting destructor'
|
||||
|
@@ -8,21 +8,21 @@
|
||||
class MxLoopingMIDIPresenter : public MxMIDIPresenter {
|
||||
public:
|
||||
// FUNCTION: LEGO1 0x100b1830
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10101de0
|
||||
return "MxLoopingMIDIPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b1840
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxLoopingMIDIPresenter::ClassName()) || MxMIDIPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual void StreamingTickle() override; // vtable+0x20
|
||||
virtual void DoneTickle() override; // vtable+0x2c
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
void DoneTickle() override; // vtable+0x2c
|
||||
MxResult PutData() override; // vtable+0x4c
|
||||
};
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100b19c0
|
||||
|
@@ -9,21 +9,21 @@
|
||||
class MxLoopingSmkPresenter : public MxSmkPresenter {
|
||||
public:
|
||||
MxLoopingSmkPresenter();
|
||||
virtual ~MxLoopingSmkPresenter() override; // vtable+0x00
|
||||
~MxLoopingSmkPresenter() override; // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x100b4920
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10101e08
|
||||
return "MxLoopingSmkPresenter";
|
||||
}
|
||||
|
||||
virtual void RepeatingTickle() override; // vtable+0x24
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void NextFrame() override; // vtable+0x64
|
||||
virtual void VTable0x88() override; // vtable+0x88
|
||||
virtual void VTable0x8c(); // vtable+0x8c
|
||||
void RepeatingTickle() override; // vtable+0x24
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
void Destroy() override; // vtable+0x38
|
||||
void NextFrame() override; // vtable+0x64
|
||||
void VTable0x88() override; // vtable+0x88
|
||||
virtual void VTable0x8c(); // vtable+0x8c
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
@@ -12,9 +12,9 @@
|
||||
class MxMediaManager : public MxCore {
|
||||
public:
|
||||
MxMediaManager();
|
||||
virtual ~MxMediaManager() override;
|
||||
~MxMediaManager() override;
|
||||
|
||||
virtual MxResult Tickle() override; // vtable+08
|
||||
MxResult Tickle() override; // vtable+08
|
||||
virtual MxResult InitPresenters(); // vtable+14
|
||||
virtual void Destroy(); // vtable+18
|
||||
virtual void RegisterPresenter(MxPresenter& p_presenter); // vtable+1c
|
||||
|
@@ -13,34 +13,34 @@ public:
|
||||
inline MxMediaPresenter() { Init(); }
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c550
|
||||
virtual ~MxMediaPresenter() override { Destroy(TRUE); }
|
||||
~MxMediaPresenter() override { Destroy(TRUE); }
|
||||
|
||||
virtual MxResult Tickle() override; // vtable+0x08
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c5c0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f074c
|
||||
return "MxMediaPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c5d0
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
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
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
void RepeatingTickle() override; // vtable+0x24
|
||||
void DoneTickle() override; // vtable+0x2c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c5b0
|
||||
virtual void Destroy() override { Destroy(FALSE); } // vtable+0x38
|
||||
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
|
||||
virtual void LoopChunk(MxStreamChunk* p_chunk); // vtable+0x58
|
||||
MxResult StartAction(MxStreamController*, MxDSAction*) override; // vtable+0x3c
|
||||
void EndAction() override; // vtable+0x40
|
||||
void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
virtual void LoopChunk(MxStreamChunk* p_chunk); // vtable+0x58
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1000c680
|
||||
// MxMediaPresenter::`scalar deleting destructor'
|
||||
|
@@ -9,29 +9,29 @@
|
||||
class MxMIDIPresenter : public MxMusicPresenter {
|
||||
public:
|
||||
MxMIDIPresenter();
|
||||
virtual ~MxMIDIPresenter() override;
|
||||
~MxMIDIPresenter() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2650
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10101df8
|
||||
return "MxMIDIPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2660
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxMIDIPresenter::ClassName()) || MxMusicPresenter::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 Destroy() override; // vtable+0x38
|
||||
virtual void EndAction() override; // vtable+0x40
|
||||
virtual MxResult PutData() override; // vtable+0x4c
|
||||
virtual void SetVolume(MxS32 p_volume) override; // vtable+0x60
|
||||
void ReadyTickle() override; // vtable+0x18
|
||||
void StartingTickle() override; // vtable+0x1c
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
void DoneTickle() override; // vtable+0x2c
|
||||
void Destroy() override; // vtable+0x38
|
||||
void EndAction() override; // vtable+0x40
|
||||
MxResult PutData() override; // vtable+0x4c
|
||||
void SetVolume(MxS32 p_volume) override; // vtable+0x60
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100c27a0
|
||||
// MxMIDIPresenter::`scalar deleting destructor'
|
||||
|
@@ -11,10 +11,10 @@
|
||||
class MxMusicManager : public MxAudioManager {
|
||||
public:
|
||||
MxMusicManager();
|
||||
virtual ~MxMusicManager() override;
|
||||
~MxMusicManager() override;
|
||||
|
||||
virtual void Destroy() override; // vtable+18
|
||||
virtual void SetVolume(MxS32 p_volume) override; // vtable+2c
|
||||
void Destroy() override; // vtable+18
|
||||
void SetVolume(MxS32 p_volume) override; // vtable+2c
|
||||
virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+30
|
||||
|
||||
inline MxBool GetMIDIInitialized() { return m_midiInitialized; }
|
||||
|
@@ -8,23 +8,23 @@
|
||||
class MxMusicPresenter : public MxAudioPresenter {
|
||||
public:
|
||||
MxMusicPresenter();
|
||||
virtual ~MxMusicPresenter() override;
|
||||
~MxMusicPresenter() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100c23a0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10101e48
|
||||
return "MxMusicPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c23b0
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxMusicPresenter::ClassName()) || MxAudioPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
void Destroy() override; // vtable+0x38
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100c24c0
|
||||
// MxMusicPresenter::`scalar deleting destructor'
|
||||
|
@@ -16,14 +16,14 @@ public:
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c1900
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x101025a0
|
||||
return "MxNextActionDataStart";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c1910
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxNextActionDataStart::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
@@ -36,9 +36,9 @@ private:
|
||||
|
||||
public:
|
||||
MxNotificationManager();
|
||||
virtual ~MxNotificationManager(); // vtable+0x00 (scalar deleting destructor)
|
||||
~MxNotificationManager() override; // vtable+0x00 (scalar deleting destructor)
|
||||
|
||||
virtual MxResult Tickle(); // vtable+0x08
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
// TODO: Where does this method come from?
|
||||
virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+0x14
|
||||
void Register(MxCore* p_listener);
|
||||
|
@@ -24,14 +24,14 @@ public:
|
||||
MxObjectFactory();
|
||||
|
||||
// FUNCTION: LEGO1 0x10008f70
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0730
|
||||
return "MxObjectFactory";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10008f80
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxObjectFactory::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
@@ -38,9 +38,9 @@ public:
|
||||
static void SetSound3D(MxBool p_use3dSound);
|
||||
|
||||
MxOmni();
|
||||
virtual ~MxOmni() override;
|
||||
~MxOmni() override;
|
||||
|
||||
virtual MxLong Notify(MxParam& p_param) override; // vtable+04
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+04
|
||||
virtual void Init(); // vtable+14
|
||||
virtual MxResult Create(MxOmniCreateParam& p_param); // vtable+18
|
||||
virtual void Destroy(); // vtable+1c
|
||||
|
@@ -15,7 +15,7 @@ public:
|
||||
|
||||
MxPalette();
|
||||
MxPalette(const RGBQUAD*);
|
||||
virtual ~MxPalette();
|
||||
~MxPalette() override;
|
||||
|
||||
void ApplySystemEntriesToPalette(LPPALETTEENTRY p_entries);
|
||||
MxPalette* Clone();
|
||||
|
@@ -29,19 +29,19 @@ public:
|
||||
MxPresenter() { Init(); }
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bf00
|
||||
virtual ~MxPresenter() override{}; // vtable+0x00
|
||||
~MxPresenter() override{}; // vtable+0x00
|
||||
|
||||
virtual MxResult Tickle() override; // vtable+0x08
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bfe0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0740
|
||||
return "MxPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bff0
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxPresenter::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ public:
|
||||
MxPresenterList(MxBool p_ownership = FALSE) : MxPtrList<MxPresenter>(p_ownership) {}
|
||||
|
||||
// FUNCTION: LEGO1 0x1001cd00
|
||||
virtual MxS8 Compare(MxPresenter* p_a, MxPresenter* p_b) override
|
||||
MxS8 Compare(MxPresenter* p_a, MxPresenter* p_b) override
|
||||
{
|
||||
return p_a == p_b ? 0 : p_a < p_b ? -1 : 1;
|
||||
} // vtable+0x14
|
||||
|
@@ -12,22 +12,22 @@ public:
|
||||
inline MxRAMStreamController() {}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b9430
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10102118
|
||||
return "MxRAMStreamController";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b9440
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxRAMStreamController::ClassName()) ||
|
||||
!strcmp(p_name, MxStreamController::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxResult Open(const char* p_filename) override;
|
||||
virtual MxResult VTable0x20(MxDSAction* p_action) override;
|
||||
virtual MxResult VTable0x24(MxDSAction* p_action) override;
|
||||
MxResult Open(const char* p_filename) override;
|
||||
MxResult VTable0x20(MxDSAction* p_action) override;
|
||||
MxResult VTable0x24(MxDSAction* p_action) override;
|
||||
|
||||
private:
|
||||
MxDSBuffer m_buffer; // 0x64
|
||||
|
@@ -8,26 +8,26 @@
|
||||
class MxRAMStreamProvider : public MxStreamProvider {
|
||||
public:
|
||||
MxRAMStreamProvider();
|
||||
virtual ~MxRAMStreamProvider() override;
|
||||
~MxRAMStreamProvider() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100d0970
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10102864
|
||||
return "MxRAMStreamProvider";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100d0980
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxRAMStreamProvider::ClassName()) || MxStreamProvider::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxResult SetResourceToGet(MxStreamController* p_resource) override; // vtable+0x14
|
||||
virtual MxU32 GetFileSize() override; // vtable+0x18
|
||||
virtual MxS32 GetStreamBuffersNum() override; // vtable+0x1c
|
||||
virtual MxU32 GetLengthInDWords() override; // vtable+0x24
|
||||
virtual MxU32* GetBufferForDWords() override; // vtable+0x28
|
||||
MxResult SetResourceToGet(MxStreamController* p_resource) override; // vtable+0x14
|
||||
MxU32 GetFileSize() override; // vtable+0x18
|
||||
MxS32 GetStreamBuffersNum() override; // vtable+0x1c
|
||||
MxU32 GetLengthInDWords() override; // vtable+0x24
|
||||
MxU32* GetBufferForDWords() override; // vtable+0x28
|
||||
|
||||
inline MxU8* GetBufferOfFileSize() { return m_pBufferOfFileSize; }
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
class MxRegion : public MxCore {
|
||||
public:
|
||||
MxRegion();
|
||||
virtual ~MxRegion() override;
|
||||
~MxRegion() override;
|
||||
|
||||
virtual void Reset(); // vtable+0x14
|
||||
virtual void VTable0x18(MxRect32& p_rect); // vtable+0x18
|
||||
|
@@ -8,7 +8,7 @@
|
||||
class MxRegionCursor : public MxCore {
|
||||
public:
|
||||
MxRegionCursor(MxRegion* p_region);
|
||||
virtual ~MxRegionCursor() override;
|
||||
~MxRegionCursor() override;
|
||||
|
||||
virtual MxRect32* VTable0x14(MxRect32& p_rect); // vtable+0x14
|
||||
virtual MxRect32* VTable0x18(); // vtable+0x18
|
||||
|
@@ -10,28 +10,28 @@
|
||||
class MxSmkPresenter : public MxVideoPresenter {
|
||||
public:
|
||||
MxSmkPresenter();
|
||||
virtual ~MxSmkPresenter() override;
|
||||
~MxSmkPresenter() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100b3730
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10101e38
|
||||
return "MxSmkPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b3740
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxSmkPresenter::ClassName()) || MxVideoPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c
|
||||
virtual void CreateBitmap() override; // vtable+0x60
|
||||
virtual void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68
|
||||
virtual void RealizePalette() override; // vtable+0x70
|
||||
virtual void VTable0x88(); // vtable+0x88
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
void Destroy() override; // vtable+0x38
|
||||
void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c
|
||||
void CreateBitmap() override; // vtable+0x60
|
||||
void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68
|
||||
void RealizePalette() override; // vtable+0x70
|
||||
virtual void VTable0x88(); // vtable+0x88
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100b3850
|
||||
// MxSmkPresenter::`scalar deleting destructor'
|
||||
|
@@ -12,10 +12,10 @@
|
||||
class MxSoundManager : public MxAudioManager {
|
||||
public:
|
||||
MxSoundManager();
|
||||
virtual ~MxSoundManager() override; // vtable+0x00
|
||||
~MxSoundManager() override; // vtable+0x00
|
||||
|
||||
virtual void Destroy() override; // vtable+0x18
|
||||
virtual void SetVolume(MxS32 p_volume) override; // vtable+0x2c
|
||||
void Destroy() override; // vtable+0x18
|
||||
void SetVolume(MxS32 p_volume) override; // vtable+0x2c
|
||||
virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+0x30
|
||||
virtual void Pause(); // vtable+0x34
|
||||
virtual void Resume(); // vtable+0x38
|
||||
|
@@ -9,25 +9,25 @@
|
||||
class MxSoundPresenter : public MxAudioPresenter {
|
||||
public:
|
||||
// FUNCTION: LEGO1 0x1000d430
|
||||
virtual ~MxSoundPresenter() override { Destroy(TRUE); }
|
||||
~MxSoundPresenter() override { Destroy(TRUE); }
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d4a0
|
||||
inline virtual const char* ClassName() const // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f07a0
|
||||
return "MxSoundPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d4b0
|
||||
inline virtual MxBool IsA(const char* p_name) const // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxSoundPresenter::ClassName()) || MxAudioPresenter::IsA(p_name);
|
||||
}
|
||||
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d490
|
||||
virtual void Destroy() override { Destroy(FALSE); } // vtable+0x38
|
||||
void Destroy() override { Destroy(FALSE); } // vtable+0x38
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1000d5c0
|
||||
// MxSoundPresenter::`scalar deleting destructor'
|
||||
|
@@ -11,37 +11,37 @@ public:
|
||||
MxStillPresenter() { m_bitmapInfo = NULL; }
|
||||
|
||||
// FUNCTION: LEGO1 0x10043550
|
||||
virtual ~MxStillPresenter() override { Destroy(TRUE); } // vtable+0x00
|
||||
~MxStillPresenter() override { Destroy(TRUE); } // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x100435c0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0184
|
||||
return "MxStillPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100435d0
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
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
|
||||
void StartingTickle() override; // vtable+0x1c
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
void RepeatingTickle() override; // vtable+0x24
|
||||
void ParseExtra() override; // vtable+0x30
|
||||
|
||||
// FUNCTION: LEGO1 0x100435b0
|
||||
virtual void Destroy() override { Destroy(FALSE); } // vtable+0x38
|
||||
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
|
||||
virtual void NextFrame() override; // vtable+0x64
|
||||
virtual void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68
|
||||
virtual void RealizePalette() override; // vtable+0x70
|
||||
virtual void VTable0x88(MxS32 p_x, MxS32 p_y); // vtable+0x88
|
||||
virtual MxStillPresenter* Clone(); // vtable+0x8c
|
||||
void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
void LoadHeader(MxStreamChunk* p_chunk) override; // vtable+0x5c
|
||||
void CreateBitmap() override; // vtable+0x60
|
||||
void NextFrame() override; // vtable+0x64
|
||||
void LoadFrame(MxStreamChunk* p_chunk) override; // vtable+0x68
|
||||
void RealizePalette() override; // vtable+0x70
|
||||
virtual void VTable0x88(MxS32 p_x, MxS32 p_y); // vtable+0x88
|
||||
virtual MxStillPresenter* Clone(); // vtable+0x8c
|
||||
|
||||
private:
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
@@ -12,17 +12,17 @@ class MxStreamListMxDSSubscriber;
|
||||
class MxStreamChunk : public MxDSChunk {
|
||||
public:
|
||||
inline MxStreamChunk() : m_buffer(NULL) {}
|
||||
virtual ~MxStreamChunk() override;
|
||||
~MxStreamChunk() override;
|
||||
|
||||
// FUNCTION: LEGO1 0x100b1fe0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10101e5c
|
||||
return "MxStreamChunk";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b1ff0
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxStreamChunk::ClassName()) || MxDSChunk::IsA(p_name);
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ public:
|
||||
MxStreamChunkList() { m_customDestructor = Destroy; }
|
||||
|
||||
// FUNCTION: LEGO1 0x100b5900
|
||||
virtual MxS8 Compare(MxStreamChunk* p_a, MxStreamChunk* p_b) override
|
||||
MxS8 Compare(MxStreamChunk* p_a, MxStreamChunk* p_b) override
|
||||
{
|
||||
return p_a == p_b ? 0 : p_a < p_b ? -1 : 1;
|
||||
} // vtable+0x14
|
||||
|
@@ -19,17 +19,17 @@ class MxDSStreamingAction;
|
||||
class MxStreamController : public MxCore {
|
||||
public:
|
||||
MxStreamController();
|
||||
virtual ~MxStreamController() override; // vtable+0x00
|
||||
~MxStreamController() override; // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x100c0f10
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x10102130
|
||||
return "MxStreamController";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c0f20
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxStreamController::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
m_controller = p_ctrlr;
|
||||
}
|
||||
|
||||
virtual MxNotificationParam* Clone() override;
|
||||
MxNotificationParam* Clone() override;
|
||||
|
||||
MxStreamController* GetController() { return m_controller; }
|
||||
|
||||
@@ -76,22 +76,22 @@ public:
|
||||
};
|
||||
|
||||
MxStreamer();
|
||||
virtual ~MxStreamer() override; // vtable+0x00
|
||||
~MxStreamer() override; // vtable+0x00
|
||||
|
||||
MxStreamController* Open(const char* p_name, MxU16 p_openMode);
|
||||
MxLong Close(const char* p_name);
|
||||
|
||||
virtual MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
// FUNCTION: LEGO1 0x100b9000
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x1010210c
|
||||
return "MxStreamer";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b9010
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxStreamer::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
@@ -11,8 +11,9 @@ class MxStreamList : public list<T> {
|
||||
public:
|
||||
MxBool PopFront(T& p_obj)
|
||||
{
|
||||
if (this->empty())
|
||||
if (this->empty()) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
p_obj = this->front();
|
||||
this->pop_front();
|
||||
@@ -29,8 +30,9 @@ public:
|
||||
// instead of MxDSAction. Until then, we use this helper.
|
||||
MxBool PopFrontStreamingAction(MxDSStreamingAction*& p_obj)
|
||||
{
|
||||
if (empty())
|
||||
if (empty()) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
p_obj = (MxDSStreamingAction*) front();
|
||||
pop_front();
|
||||
|
@@ -15,13 +15,13 @@ public:
|
||||
inline MxStreamProvider() : m_pLookup(NULL), m_pFile(NULL) {}
|
||||
|
||||
// FUNCTION: LEGO1 0x100d07e0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
return "MxStreamProvider";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100d07f0
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(p_name, MxStreamProvider::ClassName()) || MxCore::IsA(p_name);
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@
|
||||
class MxString : public MxCore {
|
||||
public:
|
||||
MxString(const MxString& p_str);
|
||||
virtual ~MxString();
|
||||
~MxString() override;
|
||||
const MxString& operator=(const char* p_data);
|
||||
|
||||
MxString();
|
||||
|
@@ -47,7 +47,7 @@ protected:
|
||||
class MxTickleThread : public MxThread {
|
||||
public:
|
||||
MxTickleThread(MxCore* p_target, MxS32 p_frequencyMS);
|
||||
virtual ~MxTickleThread() {}
|
||||
~MxTickleThread() override {}
|
||||
|
||||
MxResult Run() override;
|
||||
|
||||
|
@@ -36,9 +36,9 @@ typedef list<MxTickleClient*> MxTickleClientPtrList;
|
||||
class MxTickleManager : public MxCore {
|
||||
public:
|
||||
inline MxTickleManager() {}
|
||||
virtual ~MxTickleManager(); // vtable+0x00 (scalar deleting destructor)
|
||||
~MxTickleManager() override; // vtable+0x00 (scalar deleting destructor)
|
||||
|
||||
virtual MxResult Tickle(); // vtable+0x08
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
virtual void RegisterClient(MxCore* p_client, MxTime p_interval); // vtable+0x14
|
||||
virtual void UnregisterClient(MxCore* p_client); // vtable+0x18
|
||||
virtual void SetClientTickleInterval(MxCore* p_client, MxTime p_interval); // vtable+0x1c
|
||||
|
@@ -16,10 +16,12 @@ public:
|
||||
|
||||
inline MxLong GetTime()
|
||||
{
|
||||
if (this->m_isRunning)
|
||||
if (this->m_isRunning) {
|
||||
return g_lastTimeTimerStarted;
|
||||
else
|
||||
}
|
||||
else {
|
||||
return g_lastTimeCalculated - this->m_startTime;
|
||||
}
|
||||
}
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100ae0d0
|
||||
|
@@ -16,8 +16,8 @@ public:
|
||||
|
||||
static void Destroy(MxVariable* p_obj) { p_obj->Destroy(); }
|
||||
|
||||
virtual MxS8 Compare(MxVariable*, MxVariable*) override; // vtable+0x14
|
||||
virtual MxU32 Hash(MxVariable*) override; // vtable+0x18
|
||||
MxS8 Compare(MxVariable*, MxVariable*) override; // vtable+0x14
|
||||
MxU32 Hash(MxVariable*) override; // vtable+0x18
|
||||
|
||||
// SYNTHETIC: LEGO1 0x100afdd0
|
||||
// MxVariableTable::`scalar deleting destructor'
|
||||
|
@@ -14,10 +14,10 @@
|
||||
class MxVideoManager : public MxMediaManager {
|
||||
public:
|
||||
MxVideoManager();
|
||||
virtual ~MxVideoManager() override;
|
||||
~MxVideoManager() override;
|
||||
|
||||
virtual MxResult Tickle() override; // vtable+0x08
|
||||
virtual void Destroy() override; // vtable+0x18
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
void Destroy() override; // vtable+0x18
|
||||
virtual MxResult VTable0x28(
|
||||
MxVideoParam& p_videoParam,
|
||||
LPDIRECTDRAW p_pDirectDraw,
|
||||
|
@@ -13,34 +13,34 @@ public:
|
||||
MxVideoPresenter() { Init(); }
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c740
|
||||
virtual ~MxVideoPresenter() override { Destroy(TRUE); } // vtable+0x00
|
||||
~MxVideoPresenter() override { Destroy(TRUE); } // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c820
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f0760
|
||||
return "MxVideoPresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c830
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
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
|
||||
void ReadyTickle() override; // vtable+0x18
|
||||
void StartingTickle() override; // vtable+0x1c
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
void RepeatingTickle() override; // vtable+0x24
|
||||
void Unk5Tickle() override; // vtable+0x28
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c7a0
|
||||
virtual void Destroy() override { Destroy(FALSE); } // vtable+0x38
|
||||
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
|
||||
void EndAction() override; // vtable+0x40
|
||||
MxResult PutData() override; // vtable+0x4c
|
||||
MxBool IsHit(MxS32 p_x, MxS32 p_y) override; // vtable+0x50
|
||||
|
||||
// FUNCTION: LEGO1 0x1000c700
|
||||
virtual void LoadHeader(MxStreamChunk* p_chunk){}; // vtable+0x5c
|
||||
|
@@ -13,38 +13,38 @@ public:
|
||||
MxWavePresenter() { Init(); }
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d640
|
||||
virtual ~MxWavePresenter() override { Destroy(TRUE); } // vtable+0x00
|
||||
~MxWavePresenter() override { Destroy(TRUE); } // vtable+0x00
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d6c0
|
||||
inline virtual const char* ClassName() const override // vtable+0x0c
|
||||
inline const char* ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// STRING: LEGO1 0x100f07b4
|
||||
return "MxWavePresenter";
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d6d0
|
||||
inline virtual MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||
{
|
||||
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
|
||||
void ReadyTickle() override; // vtable+0x18
|
||||
void StartingTickle() override; // vtable+0x1c
|
||||
void StreamingTickle() override; // vtable+0x20
|
||||
void DoneTickle() override; // vtable+0x2c
|
||||
void ParseExtra() override; // vtable+0x30
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d6a0
|
||||
virtual void Destroy() override { Destroy(FALSE); } // vtable+0x38
|
||||
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
|
||||
virtual void LoopChunk(MxStreamChunk* p_chunk) override; // vtable+0x58
|
||||
virtual void SetVolume(MxS32 p_volume) override; // vtable+0x60
|
||||
virtual void Pause(); // vtable+0x64
|
||||
virtual void Resume(); // vtable+0x68
|
||||
void EndAction() override; // vtable+0x40
|
||||
MxResult PutData() override; // vtable+0x4c
|
||||
void Enable(MxBool p_enable) override; // vtable+0x54
|
||||
void LoopChunk(MxStreamChunk* p_chunk) override; // vtable+0x58
|
||||
void SetVolume(MxS32 p_volume) override; // vtable+0x60
|
||||
virtual void Pause(); // vtable+0x64
|
||||
virtual void Resume(); // vtable+0x68
|
||||
|
||||
// FUNCTION: LEGO1 0x1000d6b0
|
||||
virtual MxBool IsPaused() { return m_paused; } // vtable+0x6c
|
||||
|
@@ -108,8 +108,9 @@ MxU32 MxDSAction::GetSizeOnDisk()
|
||||
// FUNCTION: LEGO1 0x100adc10
|
||||
MxDSAction& MxDSAction::operator=(MxDSAction& p_dsAction)
|
||||
{
|
||||
if (this == &p_dsAction)
|
||||
if (this == &p_dsAction) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSObject::operator=(p_dsAction);
|
||||
this->CopyFrom(p_dsAction);
|
||||
@@ -121,8 +122,9 @@ MxDSAction* MxDSAction::Clone()
|
||||
{
|
||||
MxDSAction* clone = new MxDSAction();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
@@ -136,35 +138,47 @@ MxLong MxDSAction::GetElapsedTime()
|
||||
// FUNCTION: LEGO1 0x100add00
|
||||
void MxDSAction::MergeFrom(MxDSAction& p_dsAction)
|
||||
{
|
||||
if (p_dsAction.m_startTime != INT_MIN)
|
||||
if (p_dsAction.m_startTime != INT_MIN) {
|
||||
this->m_startTime = p_dsAction.m_startTime;
|
||||
}
|
||||
|
||||
if (p_dsAction.GetDuration() != INT_MIN)
|
||||
if (p_dsAction.GetDuration() != INT_MIN) {
|
||||
this->m_duration = p_dsAction.GetDuration();
|
||||
}
|
||||
|
||||
if (p_dsAction.m_loopCount != -1)
|
||||
if (p_dsAction.m_loopCount != -1) {
|
||||
this->m_loopCount = p_dsAction.m_loopCount;
|
||||
}
|
||||
|
||||
if (p_dsAction.m_location[0] != FLT_MAX)
|
||||
if (p_dsAction.m_location[0] != FLT_MAX) {
|
||||
this->m_location[0] = p_dsAction.m_location[0];
|
||||
if (p_dsAction.m_location[1] != FLT_MAX)
|
||||
}
|
||||
if (p_dsAction.m_location[1] != FLT_MAX) {
|
||||
this->m_location[1] = p_dsAction.m_location[1];
|
||||
if (p_dsAction.m_location[2] != FLT_MAX)
|
||||
}
|
||||
if (p_dsAction.m_location[2] != FLT_MAX) {
|
||||
this->m_location[2] = p_dsAction.m_location[2];
|
||||
}
|
||||
|
||||
if (p_dsAction.m_direction[0] != FLT_MAX)
|
||||
if (p_dsAction.m_direction[0] != FLT_MAX) {
|
||||
this->m_direction[0] = p_dsAction.m_direction[0];
|
||||
if (p_dsAction.m_direction[1] != FLT_MAX)
|
||||
}
|
||||
if (p_dsAction.m_direction[1] != FLT_MAX) {
|
||||
this->m_direction[1] = p_dsAction.m_direction[1];
|
||||
if (p_dsAction.m_direction[2] != FLT_MAX)
|
||||
}
|
||||
if (p_dsAction.m_direction[2] != FLT_MAX) {
|
||||
this->m_direction[2] = p_dsAction.m_up[2]; // This is correct
|
||||
}
|
||||
|
||||
if (p_dsAction.m_up[0] != FLT_MAX)
|
||||
if (p_dsAction.m_up[0] != FLT_MAX) {
|
||||
this->m_up[0] = p_dsAction.m_up[0];
|
||||
if (p_dsAction.m_up[1] != FLT_MAX)
|
||||
}
|
||||
if (p_dsAction.m_up[1] != FLT_MAX) {
|
||||
this->m_up[1] = p_dsAction.m_up[1];
|
||||
if (p_dsAction.m_up[2] != FLT_MAX)
|
||||
}
|
||||
if (p_dsAction.m_up[2] != FLT_MAX) {
|
||||
this->m_up[2] = p_dsAction.m_up[2];
|
||||
}
|
||||
|
||||
MxU16 extraLength = p_dsAction.m_extraLength;
|
||||
char* extraData = p_dsAction.m_extraData;
|
||||
@@ -185,8 +199,9 @@ void MxDSAction::MergeFrom(MxDSAction& p_dsAction)
|
||||
// FUNCTION: LEGO1 0x100ade60
|
||||
void MxDSAction::AppendData(MxU16 p_extraLength, const char* p_extraData)
|
||||
{
|
||||
if (this->m_extraData == p_extraData || !p_extraData)
|
||||
if (this->m_extraData == p_extraData || !p_extraData) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->m_extraLength) {
|
||||
char* concat = new char[p_extraLength + this->m_extraLength + sizeof(g_sep)];
|
||||
|
@@ -21,8 +21,9 @@ void MxDSAnim::CopyFrom(MxDSAnim& p_dsAnim)
|
||||
// FUNCTION: LEGO1 0x100c9200
|
||||
MxDSAnim& MxDSAnim::operator=(MxDSAnim& p_dsAnim)
|
||||
{
|
||||
if (this == &p_dsAnim)
|
||||
if (this == &p_dsAnim) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSMediaAction::operator=(p_dsAnim);
|
||||
this->CopyFrom(p_dsAnim);
|
||||
@@ -34,8 +35,9 @@ MxDSAction* MxDSAnim::Clone()
|
||||
{
|
||||
MxDSAnim* clone = new MxDSAnim();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
@@ -21,8 +21,9 @@ void MxDSEvent::CopyFrom(MxDSEvent& p_dsEvent)
|
||||
// FUNCTION: LEGO1 0x100c9800
|
||||
MxDSEvent& MxDSEvent::operator=(MxDSEvent& p_dsEvent)
|
||||
{
|
||||
if (this == &p_dsEvent)
|
||||
if (this == &p_dsEvent) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSMediaAction::operator=(p_dsEvent);
|
||||
this->CopyFrom(p_dsEvent);
|
||||
@@ -34,8 +35,9 @@ MxDSAction* MxDSEvent::Clone()
|
||||
{
|
||||
MxDSEvent* clone = new MxDSEvent();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
@@ -39,8 +39,9 @@ void MxDSMediaAction::CopyFrom(MxDSMediaAction& p_dsMediaAction)
|
||||
// FUNCTION: LEGO1 0x100c8dc0
|
||||
MxDSMediaAction& MxDSMediaAction::operator=(MxDSMediaAction& p_dsMediaAction)
|
||||
{
|
||||
if (this == &p_dsMediaAction)
|
||||
if (this == &p_dsMediaAction) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSAction::operator=(p_dsMediaAction);
|
||||
this->CopyFrom(p_dsMediaAction);
|
||||
@@ -52,8 +53,9 @@ MxDSAction* MxDSMediaAction::Clone()
|
||||
{
|
||||
MxDSMediaAction* clone = new MxDSMediaAction();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
@@ -61,18 +63,21 @@ MxDSAction* MxDSMediaAction::Clone()
|
||||
// FUNCTION: LEGO1 0x100c8e80
|
||||
void MxDSMediaAction::CopyMediaSrcPath(const char* p_mediaSrcPath)
|
||||
{
|
||||
if (this->m_mediaSrcPath == p_mediaSrcPath)
|
||||
if (this->m_mediaSrcPath == p_mediaSrcPath) {
|
||||
return;
|
||||
}
|
||||
|
||||
delete[] this->m_mediaSrcPath;
|
||||
|
||||
if (p_mediaSrcPath) {
|
||||
this->m_mediaSrcPath = new char[strlen(p_mediaSrcPath) + 1];
|
||||
if (this->m_mediaSrcPath)
|
||||
if (this->m_mediaSrcPath) {
|
||||
strcpy(this->m_mediaSrcPath, p_mediaSrcPath);
|
||||
}
|
||||
}
|
||||
else
|
||||
else {
|
||||
this->m_mediaSrcPath = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c8f00
|
||||
@@ -86,10 +91,12 @@ MxU32 MxDSMediaAction::GetSizeOnDisk()
|
||||
{
|
||||
MxU32 totalSizeOnDisk = MxDSAction::GetSizeOnDisk();
|
||||
|
||||
if (this->m_mediaSrcPath)
|
||||
if (this->m_mediaSrcPath) {
|
||||
totalSizeOnDisk += strlen(this->m_mediaSrcPath) + 1;
|
||||
else
|
||||
}
|
||||
else {
|
||||
totalSizeOnDisk++;
|
||||
}
|
||||
|
||||
totalSizeOnDisk += 24;
|
||||
this->m_sizeOnDisk = totalSizeOnDisk - MxDSAction::GetSizeOnDisk();
|
||||
|
@@ -15,8 +15,9 @@ MxDSMultiAction::MxDSMultiAction()
|
||||
// FUNCTION: LEGO1 0x100ca060
|
||||
MxDSMultiAction::~MxDSMultiAction()
|
||||
{
|
||||
if (this->m_actions)
|
||||
if (this->m_actions) {
|
||||
delete this->m_actions;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100ca0d0
|
||||
@@ -26,15 +27,17 @@ void MxDSMultiAction::CopyFrom(MxDSMultiAction& p_dsMultiAction)
|
||||
|
||||
MxDSActionListCursor cursor(p_dsMultiAction.m_actions);
|
||||
MxDSAction* action;
|
||||
while (cursor.Next(action))
|
||||
while (cursor.Next(action)) {
|
||||
this->m_actions->Append(action->Clone());
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100ca260
|
||||
MxDSMultiAction& MxDSMultiAction::operator=(MxDSMultiAction& p_dsMultiAction)
|
||||
{
|
||||
if (this == &p_dsMultiAction)
|
||||
if (this == &p_dsMultiAction) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSAction::operator=(p_dsMultiAction);
|
||||
this->CopyFrom(p_dsMultiAction);
|
||||
@@ -48,8 +51,9 @@ void MxDSMultiAction::SetUnknown90(MxLong p_unk0x90)
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction* action;
|
||||
while (cursor.Next(action))
|
||||
while (cursor.Next(action)) {
|
||||
action->SetUnknown90(p_unk0x90);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100ca370
|
||||
@@ -59,21 +63,24 @@ void MxDSMultiAction::MergeFrom(MxDSAction& p_dsMultiAction)
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction* action;
|
||||
while (cursor.Next(action))
|
||||
while (cursor.Next(action)) {
|
||||
action->MergeFrom(p_dsMultiAction);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100ca450
|
||||
MxBool MxDSMultiAction::HasId(MxU32 p_objectId)
|
||||
{
|
||||
if (this->GetObjectId() == p_objectId)
|
||||
if (this->GetObjectId() == p_objectId) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction* action;
|
||||
while (cursor.Next(action)) {
|
||||
if (action->HasId(p_objectId))
|
||||
if (action->HasId(p_objectId)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -84,8 +91,9 @@ MxDSAction* MxDSMultiAction::Clone()
|
||||
{
|
||||
MxDSMultiAction* clone = new MxDSMultiAction();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
@@ -97,8 +105,9 @@ undefined4 MxDSMultiAction::VTable0x14()
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction* action;
|
||||
while (cursor.Next(action))
|
||||
while (cursor.Next(action)) {
|
||||
result += action->VTable0x14();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -110,8 +119,9 @@ MxU32 MxDSMultiAction::GetSizeOnDisk()
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction* action;
|
||||
while (cursor.Next(action))
|
||||
while (cursor.Next(action)) {
|
||||
totalSizeOnDisk += action->GetSizeOnDisk();
|
||||
}
|
||||
|
||||
this->m_sizeOnDisk = totalSizeOnDisk - MxDSAction::GetSizeOnDisk();
|
||||
|
||||
@@ -151,6 +161,7 @@ void MxDSMultiAction::SetAtomId(MxAtomId p_atomId)
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction* action;
|
||||
while (cursor.Next(action))
|
||||
while (cursor.Next(action)) {
|
||||
action->SetAtomId(p_atomId);
|
||||
}
|
||||
}
|
||||
|
@@ -52,8 +52,9 @@ void MxDSObject::CopyFrom(MxDSObject& p_dsObject)
|
||||
// FUNCTION: LEGO1 0x100bf8c0
|
||||
MxDSObject& MxDSObject::operator=(MxDSObject& p_dsObject)
|
||||
{
|
||||
if (this == &p_dsObject)
|
||||
if (this == &p_dsObject) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
this->CopyFrom(p_dsObject);
|
||||
return *this;
|
||||
@@ -108,17 +109,21 @@ MxU32 MxDSObject::GetSizeOnDisk()
|
||||
{
|
||||
MxU32 sizeOnDisk;
|
||||
|
||||
if (this->m_sourceName)
|
||||
if (this->m_sourceName) {
|
||||
sizeOnDisk = strlen(this->m_sourceName) + 3;
|
||||
else
|
||||
}
|
||||
else {
|
||||
sizeOnDisk = 3;
|
||||
}
|
||||
|
||||
sizeOnDisk += 4;
|
||||
|
||||
if (this->m_objectName)
|
||||
if (this->m_objectName) {
|
||||
sizeOnDisk += strlen(this->m_objectName) + 1;
|
||||
else
|
||||
}
|
||||
else {
|
||||
sizeOnDisk++;
|
||||
}
|
||||
|
||||
sizeOnDisk += 4;
|
||||
this->m_sizeOnDisk = sizeOnDisk;
|
||||
|
@@ -21,8 +21,9 @@ void MxDSObjectAction::CopyFrom(MxDSObjectAction& p_dsObjectAction)
|
||||
// FUNCTION: LEGO1 0x100c8a80
|
||||
MxDSObjectAction& MxDSObjectAction::operator=(MxDSObjectAction& p_dsObjectAction)
|
||||
{
|
||||
if (this == &p_dsObjectAction)
|
||||
if (this == &p_dsObjectAction) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSMediaAction::operator=(p_dsObjectAction);
|
||||
this->CopyFrom(p_dsObjectAction);
|
||||
@@ -34,8 +35,9 @@ MxDSAction* MxDSObjectAction::Clone()
|
||||
{
|
||||
MxDSObjectAction* clone = new MxDSObjectAction();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
@@ -23,8 +23,9 @@ void MxDSParallelAction::CopyFrom(MxDSParallelAction& p_dsParallelAction)
|
||||
// FUNCTION: LEGO1 0x100cb0a0
|
||||
MxDSParallelAction& MxDSParallelAction::operator=(MxDSParallelAction& p_dsParallelAction)
|
||||
{
|
||||
if (this == &p_dsParallelAction)
|
||||
if (this == &p_dsParallelAction) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSMultiAction::operator=(p_dsParallelAction);
|
||||
this->CopyFrom(p_dsParallelAction);
|
||||
@@ -36,8 +37,9 @@ MxDSAction* MxDSParallelAction::Clone()
|
||||
{
|
||||
MxDSParallelAction* clone = new MxDSParallelAction();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
@@ -45,15 +47,17 @@ MxDSAction* MxDSParallelAction::Clone()
|
||||
// FUNCTION: LEGO1 0x100cb160
|
||||
MxLong MxDSParallelAction::GetDuration()
|
||||
{
|
||||
if (this->m_duration)
|
||||
if (this->m_duration) {
|
||||
return this->m_duration;
|
||||
}
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction* action;
|
||||
|
||||
while (cursor.Next(action)) {
|
||||
if (!action)
|
||||
if (!action) {
|
||||
continue;
|
||||
}
|
||||
|
||||
MxLong duration = action->GetDuration();
|
||||
if (duration == -1) {
|
||||
@@ -65,10 +69,12 @@ MxLong MxDSParallelAction::GetDuration()
|
||||
if (action->IsA("MxDSMediaAction")) {
|
||||
MxLong sustainTime = ((MxDSMediaAction*) action)->GetSustainTime();
|
||||
|
||||
if (sustainTime == -1)
|
||||
if (sustainTime == -1) {
|
||||
duration = -1;
|
||||
else if (sustainTime)
|
||||
}
|
||||
else if (sustainTime) {
|
||||
duration += sustainTime;
|
||||
}
|
||||
}
|
||||
|
||||
if (duration == -1) {
|
||||
@@ -76,12 +82,14 @@ MxLong MxDSParallelAction::GetDuration()
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->m_duration < duration)
|
||||
if (this->m_duration < duration) {
|
||||
this->m_duration = duration;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->IsBit3())
|
||||
if (this->IsBit3()) {
|
||||
this->m_duration *= this->m_loopCount;
|
||||
}
|
||||
|
||||
return this->m_duration;
|
||||
}
|
||||
|
@@ -19,8 +19,9 @@ MxDSSelectAction::MxDSSelectAction()
|
||||
// FUNCTION: LEGO1 0x100cb8d0
|
||||
MxDSSelectAction::~MxDSSelectAction()
|
||||
{
|
||||
if (this->m_unk0xac)
|
||||
if (this->m_unk0xac) {
|
||||
delete this->m_unk0xac;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100cb950
|
||||
@@ -32,8 +33,9 @@ void MxDSSelectAction::CopyFrom(MxDSSelectAction& p_dsSelectAction)
|
||||
|
||||
MxStringListCursor cursor(p_dsSelectAction.m_unk0xac);
|
||||
MxString string;
|
||||
while (cursor.Next(string))
|
||||
while (cursor.Next(string)) {
|
||||
this->m_unk0xac->Append(string);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100cbd50
|
||||
@@ -51,8 +53,9 @@ MxDSAction* MxDSSelectAction::Clone()
|
||||
{
|
||||
MxDSSelectAction* clone = new MxDSSelectAction();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
@@ -66,8 +69,9 @@ MxU32 MxDSSelectAction::GetSizeOnDisk()
|
||||
|
||||
MxStringListCursor cursor(this->m_unk0xac);
|
||||
MxString string;
|
||||
while (cursor.Next(string))
|
||||
while (cursor.Next(string)) {
|
||||
totalSizeOnDisk += strlen(string.GetData()) + 1;
|
||||
}
|
||||
|
||||
// Note: unlike the other classes, MxDSSelectAction does not have its own
|
||||
// sizeOnDisk member. Instead, it overrides the one from MxDSMultiAction.
|
||||
@@ -95,8 +99,9 @@ void MxDSSelectAction::Deserialize(MxU8** p_source, MxS16 p_unk0x24)
|
||||
MxS32 random = rand() % value;
|
||||
string = itoa((MxS16) random, buffer, 10);
|
||||
}
|
||||
else
|
||||
else {
|
||||
string = VariableTable()->GetVariable((char*) *p_source);
|
||||
}
|
||||
|
||||
*p_source += strlen((char*) *p_source) + 1;
|
||||
|
||||
@@ -109,8 +114,9 @@ void MxDSSelectAction::Deserialize(MxU8** p_source, MxS16 p_unk0x24)
|
||||
|
||||
MxU32 i;
|
||||
for (i = 0; i < count; i++) {
|
||||
if (!strcmp(string.GetData(), (char*) *p_source))
|
||||
if (!strcmp(string.GetData(), (char*) *p_source)) {
|
||||
index = i;
|
||||
}
|
||||
|
||||
this->m_unk0xac->Append((char*) *p_source);
|
||||
*p_source += strlen((char*) *p_source) + 1;
|
||||
@@ -122,10 +128,12 @@ void MxDSSelectAction::Deserialize(MxU8** p_source, MxS16 p_unk0x24)
|
||||
|
||||
MxDSAction* action = (MxDSAction*) DeserializeDSObjectDispatch(p_source, p_unk0x24);
|
||||
|
||||
if (index == i)
|
||||
if (index == i) {
|
||||
this->m_actions->Append(action);
|
||||
else
|
||||
}
|
||||
else {
|
||||
delete action;
|
||||
}
|
||||
|
||||
*p_source += extraFlag;
|
||||
}
|
||||
|
@@ -21,8 +21,9 @@ void MxDSSerialAction::SetDuration(MxLong p_duration)
|
||||
// FUNCTION: LEGO1 0x100cac10
|
||||
MxDSSerialAction::~MxDSSerialAction()
|
||||
{
|
||||
if (this->m_cursor)
|
||||
if (this->m_cursor) {
|
||||
delete this->m_cursor;
|
||||
}
|
||||
|
||||
this->m_cursor = NULL;
|
||||
}
|
||||
@@ -35,8 +36,9 @@ void MxDSSerialAction::CopyFrom(MxDSSerialAction& p_dsSerialAction)
|
||||
// FUNCTION: LEGO1 0x100caca0
|
||||
MxDSSerialAction& MxDSSerialAction::operator=(MxDSSerialAction& p_dsSerialAction)
|
||||
{
|
||||
if (this == &p_dsSerialAction)
|
||||
if (this == &p_dsSerialAction) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSMultiAction::operator=(p_dsSerialAction);
|
||||
this->CopyFrom(p_dsSerialAction);
|
||||
@@ -48,8 +50,9 @@ MxDSAction* MxDSSerialAction::Clone()
|
||||
{
|
||||
MxDSSerialAction* clone = new MxDSSerialAction();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
@@ -57,23 +60,26 @@ MxDSAction* MxDSSerialAction::Clone()
|
||||
// FUNCTION: LEGO1 0x100cad60
|
||||
MxLong MxDSSerialAction::GetDuration()
|
||||
{
|
||||
if (this->m_duration)
|
||||
if (this->m_duration) {
|
||||
return this->m_duration;
|
||||
}
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction* action;
|
||||
|
||||
while (cursor.Next(action)) {
|
||||
if (!action)
|
||||
if (!action) {
|
||||
continue;
|
||||
}
|
||||
|
||||
this->m_duration += action->GetDuration() + action->GetStartTime();
|
||||
|
||||
if (action->IsA("MxDSMediaAction")) {
|
||||
MxLong sustainTime = ((MxDSMediaAction*) action)->GetSustainTime();
|
||||
|
||||
if (sustainTime && sustainTime != -1)
|
||||
if (sustainTime && sustainTime != -1) {
|
||||
this->m_duration += sustainTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -26,8 +26,9 @@ void MxDSSound::CopyFrom(MxDSSound& p_dsSound)
|
||||
// FUNCTION: LEGO1 0x100c94e0
|
||||
MxDSSound& MxDSSound::operator=(MxDSSound& p_dsSound)
|
||||
{
|
||||
if (this == &p_dsSound)
|
||||
if (this == &p_dsSound) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSMediaAction::operator=(p_dsSound);
|
||||
this->CopyFrom(p_dsSound);
|
||||
@@ -39,8 +40,9 @@ MxDSAction* MxDSSound::Clone()
|
||||
{
|
||||
MxDSSound* clone = new MxDSSound();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
@@ -21,8 +21,9 @@ void MxDSStill::CopyFrom(MxDSStill& p_dsStill)
|
||||
// FUNCTION: LEGO1 0x100c9ad0
|
||||
MxDSStill& MxDSStill::operator=(MxDSStill& p_dsStill)
|
||||
{
|
||||
if (this == &p_dsStill)
|
||||
if (this == &p_dsStill) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSMediaAction::operator=(p_dsStill);
|
||||
this->CopyFrom(p_dsStill);
|
||||
@@ -34,8 +35,9 @@ MxDSAction* MxDSStill::Clone()
|
||||
{
|
||||
MxDSStill* clone = new MxDSStill();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
@@ -17,8 +17,9 @@ MxDSStreamingAction::MxDSStreamingAction(MxDSAction& p_dsAction, MxU32 p_offset)
|
||||
// FUNCTION: LEGO1 0x100cd090
|
||||
MxBool MxDSStreamingAction::HasId(MxU32 p_objectId)
|
||||
{
|
||||
if (this->m_internalAction)
|
||||
if (this->m_internalAction) {
|
||||
return this->m_internalAction->HasId(p_objectId);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -32,12 +33,15 @@ MxDSStreamingAction::MxDSStreamingAction(MxDSStreamingAction& p_dsStreamingActio
|
||||
// FUNCTION: LEGO1 0x100cd150
|
||||
MxDSStreamingAction::~MxDSStreamingAction()
|
||||
{
|
||||
if (this->m_unk0xa0)
|
||||
if (this->m_unk0xa0) {
|
||||
delete this->m_unk0xa0;
|
||||
if (this->m_unk0xa4)
|
||||
}
|
||||
if (this->m_unk0xa4) {
|
||||
delete this->m_unk0xa4;
|
||||
if (this->m_internalAction)
|
||||
}
|
||||
if (this->m_internalAction) {
|
||||
delete this->m_internalAction;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100cd1e0
|
||||
@@ -73,16 +77,18 @@ MxDSStreamingAction* MxDSStreamingAction::CopyFrom(MxDSStreamingAction& p_dsStre
|
||||
// FUNCTION: LEGO1 0x100cd2a0
|
||||
void MxDSStreamingAction::SetInternalAction(MxDSAction* p_dsAction)
|
||||
{
|
||||
if (this->m_internalAction)
|
||||
if (this->m_internalAction) {
|
||||
delete this->m_internalAction;
|
||||
}
|
||||
this->m_internalAction = p_dsAction;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100cd2d0
|
||||
void MxDSStreamingAction::FUN_100cd2d0()
|
||||
{
|
||||
if (this->m_duration == -1)
|
||||
if (this->m_duration == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
MxLong duration = this->m_duration / this->m_loopCount;
|
||||
this->m_loopCount--;
|
||||
|
@@ -31,8 +31,9 @@ void MxAudioManager::Destroy(MxBool p_fromDestructor)
|
||||
Init();
|
||||
this->m_criticalSection.Leave();
|
||||
|
||||
if (!p_fromDestructor)
|
||||
if (!p_fromDestructor) {
|
||||
MxMediaManager::Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b8e40
|
||||
@@ -48,11 +49,13 @@ MxResult MxAudioManager::InitPresenters()
|
||||
g_count++;
|
||||
}
|
||||
|
||||
if (result)
|
||||
if (result) {
|
||||
Destroy();
|
||||
}
|
||||
|
||||
if (success)
|
||||
if (success) {
|
||||
this->m_criticalSection.Leave();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@@ -20,17 +20,20 @@ void MxLoopingMIDIPresenter::StreamingTickle()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime())
|
||||
if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime()) {
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2ae0
|
||||
void MxLoopingMIDIPresenter::DoneTickle()
|
||||
{
|
||||
if (m_action->GetLoopCount())
|
||||
if (m_action->GetLoopCount()) {
|
||||
MxMIDIPresenter::DoneTickle();
|
||||
else
|
||||
}
|
||||
else {
|
||||
EndAction();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2b00
|
||||
|
@@ -34,14 +34,16 @@ void MxMIDIPresenter::Destroy(MxBool p_fromDestructor)
|
||||
|
||||
m_criticalSection.Enter();
|
||||
|
||||
if (m_subscriber && m_chunk)
|
||||
if (m_subscriber && m_chunk) {
|
||||
m_subscriber->DestroyChunk(m_chunk);
|
||||
}
|
||||
Init();
|
||||
|
||||
m_criticalSection.Leave();
|
||||
|
||||
if (!p_fromDestructor)
|
||||
if (!p_fromDestructor) {
|
||||
MxMusicPresenter::Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2890
|
||||
@@ -61,24 +63,28 @@ void MxMIDIPresenter::StartingTickle()
|
||||
{
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime())
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2910
|
||||
void MxMIDIPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_chunk)
|
||||
if (m_chunk) {
|
||||
ProgressTickleState(e_done);
|
||||
else
|
||||
}
|
||||
else {
|
||||
m_chunk = NextChunk();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2940
|
||||
void MxMIDIPresenter::DoneTickle()
|
||||
{
|
||||
if (!MusicManager()->GetMIDIInitialized())
|
||||
if (!MusicManager()->GetMIDIInitialized()) {
|
||||
EndAction();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2960
|
||||
@@ -95,8 +101,9 @@ MxResult MxMIDIPresenter::PutData()
|
||||
if (m_currentTickleState == e_streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
|
||||
SetVolume(((MxDSSound*) m_action)->GetVolume());
|
||||
|
||||
if (MusicManager()->InitializeMIDI(m_chunk->GetData(), 1) != SUCCESS)
|
||||
if (MusicManager()->InitializeMIDI(m_chunk->GetData(), 1) != SUCCESS) {
|
||||
EndAction();
|
||||
}
|
||||
}
|
||||
|
||||
m_criticalSection.Leave();
|
||||
|
@@ -82,8 +82,9 @@ MxResult MxMusicManager::ResetStream()
|
||||
}
|
||||
|
||||
if (m_midiHdrP->dwFlags & MHDR_DONE || m_midiHdrP->dwFlags & MHDR_PREPARED) {
|
||||
if (midiOutUnprepareHeader((HMIDIOUT) m_midiStreamH, m_midiHdrP, sizeof(MIDIHDR)) != MMSYSERR_NOERROR)
|
||||
if (midiOutUnprepareHeader((HMIDIOUT) m_midiStreamH, m_midiHdrP, sizeof(MIDIHDR)) != MMSYSERR_NOERROR) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
memset(m_midiHdrP, 0, sizeof(MIDIHDR));
|
||||
}
|
||||
@@ -131,8 +132,9 @@ void MxMusicManager::SetMIDIVolume()
|
||||
// FUNCTION: LEGO1 0x100c0820
|
||||
void CALLBACK MxMusicManager::MidiCallbackProc(HDRVR p_hdrvr, UINT p_uMsg, DWORD p_dwUser, DWORD p_dw1, DWORD p_dw2)
|
||||
{
|
||||
if (p_uMsg == MOM_DONE)
|
||||
if (p_uMsg == MOM_DONE) {
|
||||
((MxMusicManager*) p_dwUser)->ResetStream();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c0840
|
||||
@@ -147,21 +149,25 @@ MxResult MxMusicManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
||||
locked = TRUE;
|
||||
m_thread = new MxTickleThread(this, p_frequencyMS);
|
||||
|
||||
if (!m_thread || m_thread->Start(0, 0) != SUCCESS)
|
||||
if (!m_thread || m_thread->Start(0, 0) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
else
|
||||
else {
|
||||
TickleManager()->RegisterClient(this, p_frequencyMS);
|
||||
}
|
||||
|
||||
status = SUCCESS;
|
||||
}
|
||||
|
||||
done:
|
||||
if (status != SUCCESS)
|
||||
if (status != SUCCESS) {
|
||||
Destroy();
|
||||
}
|
||||
|
||||
if (locked)
|
||||
if (locked) {
|
||||
m_criticalSection.Leave();
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -211,22 +217,26 @@ MxResult MxMusicManager::InitializeMIDI(MxU8* p_data, MxS32 p_loopCount)
|
||||
for (; device < total; device++) {
|
||||
MIDIOUTCAPSA caps;
|
||||
midiOutGetDevCapsA(device, &caps, sizeof(MIDIOUTCAPSA));
|
||||
if (caps.wTechnology == MOD_FMSYNTH)
|
||||
if (caps.wTechnology == MOD_FMSYNTH) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (device >= total)
|
||||
if (device >= total) {
|
||||
device = -1;
|
||||
}
|
||||
|
||||
if (midiStreamOpen(&m_midiStreamH, &device, 1, (DWORD) MidiCallbackProc, (DWORD) this, CALLBACK_FUNCTION) !=
|
||||
MMSYSERR_NOERROR)
|
||||
MMSYSERR_NOERROR) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
GetMIDIVolume(m_midiVolume);
|
||||
|
||||
m_midiHdrP = new MIDIHDR();
|
||||
if (!m_midiHdrP)
|
||||
if (!m_midiHdrP) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
memset(m_midiHdrP, 0, sizeof(MIDIHDR));
|
||||
|
||||
@@ -236,8 +246,9 @@ MxResult MxMusicManager::InitializeMIDI(MxU8* p_data, MxS32 p_loopCount)
|
||||
m_bufferOffset += 0x14;
|
||||
timediv.dwTimeDiv = *((DWORD*) m_bufferOffset);
|
||||
|
||||
if (midiStreamProperty(m_midiStreamH, (LPBYTE) &timediv, MIDIPROP_SET | MIDIPROP_TIMEDIV) != MMSYSERR_NOERROR)
|
||||
if (midiStreamProperty(m_midiStreamH, (LPBYTE) &timediv, MIDIPROP_SET | MIDIPROP_TIMEDIV) != MMSYSERR_NOERROR) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
m_bufferOffset += 0x14;
|
||||
m_bufferSize = *((MxU32*) m_bufferOffset);
|
||||
@@ -246,12 +257,14 @@ MxResult MxMusicManager::InitializeMIDI(MxU8* p_data, MxS32 p_loopCount)
|
||||
m_midiInitialized = TRUE;
|
||||
|
||||
ResetBuffer();
|
||||
if (ResetStream() != SUCCESS)
|
||||
if (ResetStream() != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
SetMIDIVolume();
|
||||
if (midiStreamRestart(m_midiStreamH) != MMSYSERR_NOERROR)
|
||||
if (midiStreamRestart(m_midiStreamH) != MMSYSERR_NOERROR) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
result = SUCCESS;
|
||||
}
|
||||
|
@@ -59,46 +59,55 @@ MxResult MxSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
||||
MxResult status = FAILURE;
|
||||
MxBool locked = FALSE;
|
||||
|
||||
if (MxAudioManager::InitPresenters() != SUCCESS)
|
||||
if (MxAudioManager::InitPresenters() != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
m_criticalSection.Enter();
|
||||
locked = TRUE;
|
||||
|
||||
if (DirectSoundCreate(NULL, &m_directSound, NULL) != DS_OK)
|
||||
if (DirectSoundCreate(NULL, &m_directSound, NULL) != DS_OK) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (m_directSound->SetCooperativeLevel(MxOmni::GetInstance()->GetWindowHandle(), DSSCL_PRIORITY) != DS_OK)
|
||||
if (m_directSound->SetCooperativeLevel(MxOmni::GetInstance()->GetWindowHandle(), DSSCL_PRIORITY) != DS_OK) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
DSBUFFERDESC desc;
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
desc.dwSize = sizeof(desc);
|
||||
|
||||
if (MxOmni::IsSound3D())
|
||||
if (MxOmni::IsSound3D()) {
|
||||
desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRL3D;
|
||||
else
|
||||
}
|
||||
else {
|
||||
desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRLVOLUME;
|
||||
}
|
||||
|
||||
if (m_directSound->CreateSoundBuffer(&desc, &m_dsBuffer, NULL) != DS_OK) {
|
||||
if (!MxOmni::IsSound3D())
|
||||
if (!MxOmni::IsSound3D()) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
MxOmni::SetSound3D(FALSE);
|
||||
desc.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_CTRLVOLUME;
|
||||
|
||||
if (m_directSound->CreateSoundBuffer(&desc, &m_dsBuffer, NULL) != DS_OK)
|
||||
if (m_directSound->CreateSoundBuffer(&desc, &m_dsBuffer, NULL) != DS_OK) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
WAVEFORMATEX format;
|
||||
|
||||
format.wFormatTag = WAVE_FORMAT_PCM;
|
||||
|
||||
if (MxOmni::IsSound3D())
|
||||
if (MxOmni::IsSound3D()) {
|
||||
format.nChannels = 2;
|
||||
else
|
||||
}
|
||||
else {
|
||||
format.nChannels = 1;
|
||||
}
|
||||
|
||||
format.nSamplesPerSec = 11025; // KHz
|
||||
format.wBitsPerSample = 16;
|
||||
@@ -111,20 +120,24 @@ MxResult MxSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
||||
if (p_createThread) {
|
||||
m_thread = new MxTickleThread(this, p_frequencyMS);
|
||||
|
||||
if (!m_thread || m_thread->Start(0, 0) != SUCCESS)
|
||||
if (!m_thread || m_thread->Start(0, 0) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
else
|
||||
else {
|
||||
TickleManager()->RegisterClient(this, p_frequencyMS);
|
||||
}
|
||||
|
||||
status = SUCCESS;
|
||||
|
||||
done:
|
||||
if (status != SUCCESS)
|
||||
if (status != SUCCESS) {
|
||||
Destroy();
|
||||
}
|
||||
|
||||
if (locked)
|
||||
if (locked) {
|
||||
m_criticalSection.Leave();
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -144,8 +157,9 @@ void MxSoundManager::SetVolume(MxS32 p_volume)
|
||||
MxPresenter* presenter;
|
||||
MxPresenterListCursor cursor(m_presenters);
|
||||
|
||||
while (cursor.Next(presenter))
|
||||
while (cursor.Next(presenter)) {
|
||||
((MxAudioPresenter*) presenter)->SetVolume(((MxAudioPresenter*) presenter)->GetVolume());
|
||||
}
|
||||
|
||||
m_criticalSection.Leave();
|
||||
}
|
||||
@@ -160,8 +174,9 @@ MxPresenter* MxSoundManager::FUN_100aebd0(const MxAtomId& p_atomId, MxU32 p_obje
|
||||
|
||||
while (cursor.Next(presenter)) {
|
||||
if (presenter->GetAction()->GetAtomId().GetInternal() == p_atomId.GetInternal() &&
|
||||
presenter->GetAction()->GetObjectId() == p_objectId)
|
||||
presenter->GetAction()->GetObjectId() == p_objectId) {
|
||||
return presenter;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -170,8 +185,9 @@ MxPresenter* MxSoundManager::FUN_100aebd0(const MxAtomId& p_atomId, MxU32 p_obje
|
||||
// FUNCTION: LEGO1 0x100aecf0
|
||||
MxS32 MxSoundManager::FUN_100aecf0(MxU32 p_undefined)
|
||||
{
|
||||
if (!p_undefined)
|
||||
if (!p_undefined) {
|
||||
return -10000;
|
||||
}
|
||||
return g_mxcoreCount[p_undefined];
|
||||
}
|
||||
|
||||
@@ -183,9 +199,11 @@ void MxSoundManager::Pause()
|
||||
MxPresenter* presenter;
|
||||
MxPresenterListCursor cursor(m_presenters);
|
||||
|
||||
while (cursor.Next(presenter))
|
||||
if (presenter->IsA("MxWavePresenter"))
|
||||
while (cursor.Next(presenter)) {
|
||||
if (presenter->IsA("MxWavePresenter")) {
|
||||
((MxWavePresenter*) presenter)->Pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100aee10
|
||||
@@ -196,7 +214,9 @@ void MxSoundManager::Resume()
|
||||
MxPresenter* presenter;
|
||||
MxPresenterListCursor cursor(m_presenters);
|
||||
|
||||
while (cursor.Next(presenter))
|
||||
if (presenter->IsA("MxWavePresenter"))
|
||||
while (cursor.Next(presenter)) {
|
||||
if (presenter->IsA("MxWavePresenter")) {
|
||||
((MxWavePresenter*) presenter)->Resume();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -8,15 +8,17 @@ DECOMP_SIZE_ASSERT(MxSoundPresenter, 0x54)
|
||||
// FUNCTION: LEGO1 0x100b1a50
|
||||
void MxSoundPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
if (MSoundManager())
|
||||
if (MSoundManager()) {
|
||||
MSoundManager()->UnregisterPresenter(*this);
|
||||
}
|
||||
|
||||
this->m_criticalSection.Enter();
|
||||
MxMediaPresenter::Init();
|
||||
this->m_criticalSection.Leave();
|
||||
|
||||
if (!p_fromDestructor)
|
||||
if (!p_fromDestructor) {
|
||||
MxMediaPresenter::Destroy(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b1aa0
|
||||
|
@@ -40,13 +40,15 @@ void MxWavePresenter::Destroy(MxBool p_fromDestructor)
|
||||
m_dsBuffer->Release();
|
||||
}
|
||||
|
||||
if (m_waveFormat)
|
||||
if (m_waveFormat) {
|
||||
delete[] ((MxU8*) m_waveFormat);
|
||||
}
|
||||
|
||||
Init();
|
||||
|
||||
if (!p_fromDestructor)
|
||||
if (!p_fromDestructor) {
|
||||
MxSoundPresenter::Destroy(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b1b60
|
||||
@@ -55,8 +57,9 @@ MxS8 MxWavePresenter::GetPlayedChunks()
|
||||
DWORD dwCurrentPlayCursor, dwCurrentWriteCursor;
|
||||
MxS8 playedChunks = -1;
|
||||
|
||||
if (m_dsBuffer->GetCurrentPosition(&dwCurrentPlayCursor, &dwCurrentWriteCursor) == DS_OK)
|
||||
if (m_dsBuffer->GetCurrentPosition(&dwCurrentPlayCursor, &dwCurrentWriteCursor) == DS_OK) {
|
||||
playedChunks = dwCurrentPlayCursor / m_chunkLength;
|
||||
}
|
||||
|
||||
return playedChunks;
|
||||
}
|
||||
@@ -141,26 +144,32 @@ void MxWavePresenter::StartingTickle()
|
||||
waveFormatEx.nBlockAlign = m_waveFormat->m_pcmWaveFormat.wf.nBlockAlign;
|
||||
waveFormatEx.wBitsPerSample = m_waveFormat->m_pcmWaveFormat.wBitsPerSample;
|
||||
|
||||
if (waveFormatEx.wBitsPerSample == 8)
|
||||
if (waveFormatEx.wBitsPerSample == 8) {
|
||||
m_silenceData = 0x7F;
|
||||
}
|
||||
|
||||
if (waveFormatEx.wBitsPerSample == 16)
|
||||
if (waveFormatEx.wBitsPerSample == 16) {
|
||||
m_silenceData = 0;
|
||||
}
|
||||
|
||||
DSBUFFERDESC desc;
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
desc.dwSize = sizeof(desc);
|
||||
|
||||
if (m_unk0x66)
|
||||
if (m_unk0x66) {
|
||||
desc.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRL3D | DSBCAPS_CTRLVOLUME;
|
||||
else
|
||||
}
|
||||
else {
|
||||
desc.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME;
|
||||
}
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::c_looping)
|
||||
if (m_action->GetFlags() & MxDSAction::c_looping) {
|
||||
desc.dwBufferBytes = m_waveFormat->m_pcmWaveFormat.wf.nAvgBytesPerSec *
|
||||
(m_action->GetDuration() / m_action->GetLoopCount()) / 1000;
|
||||
else
|
||||
}
|
||||
else {
|
||||
desc.dwBufferBytes = 2 * length;
|
||||
}
|
||||
|
||||
desc.lpwfxFormat = &waveFormatEx;
|
||||
|
||||
@@ -209,19 +218,22 @@ void MxWavePresenter::DoneTickle()
|
||||
|
||||
MxS8 playedChunks = dwCurrentPlayCursor / m_chunkLength;
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit7 || m_action->GetFlags() & MxDSAction::c_looping ||
|
||||
m_writtenChunks != playedChunks || m_lockSize + (m_chunkLength * playedChunks) <= dwCurrentPlayCursor)
|
||||
m_writtenChunks != playedChunks || m_lockSize + (m_chunkLength * playedChunks) <= dwCurrentPlayCursor) {
|
||||
MxMediaPresenter::DoneTickle();
|
||||
}
|
||||
}
|
||||
else
|
||||
else {
|
||||
MxMediaPresenter::DoneTickle();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b2130
|
||||
void MxWavePresenter::LoopChunk(MxStreamChunk* p_chunk)
|
||||
{
|
||||
WriteToSoundBuffer(p_chunk->GetData(), p_chunk->GetLength());
|
||||
if (IsEnabled())
|
||||
if (IsEnabled()) {
|
||||
m_subscriber->DestroyChunk(p_chunk);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b2160
|
||||
@@ -241,18 +253,21 @@ MxResult MxWavePresenter::PutData()
|
||||
if (!m_started) {
|
||||
m_dsBuffer->SetCurrentPosition(0);
|
||||
|
||||
if (m_dsBuffer->Play(0, 0, DSBPLAY_LOOPING) == DS_OK)
|
||||
if (m_dsBuffer->Play(0, 0, DSBPLAY_LOOPING) == DS_OK) {
|
||||
m_started = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case e_repeating:
|
||||
if (m_started)
|
||||
if (m_started) {
|
||||
break;
|
||||
}
|
||||
|
||||
m_dsBuffer->SetCurrentPosition(0);
|
||||
|
||||
if (m_dsBuffer->Play(0, 0, m_action->GetLoopCount() > 1) == DS_OK)
|
||||
if (m_dsBuffer->Play(0, 0, m_action->GetLoopCount() > 1) == DS_OK) {
|
||||
m_started = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,8 +281,9 @@ void MxWavePresenter::EndAction()
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
MxMediaPresenter::EndAction();
|
||||
|
||||
if (m_dsBuffer)
|
||||
if (m_dsBuffer) {
|
||||
m_dsBuffer->Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,8 +312,9 @@ void MxWavePresenter::Enable(MxBool p_enable)
|
||||
m_writtenChunks = 0;
|
||||
m_started = FALSE;
|
||||
}
|
||||
else if (m_dsBuffer)
|
||||
else if (m_dsBuffer) {
|
||||
m_dsBuffer->Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,8 +334,9 @@ void MxWavePresenter::ParseExtra()
|
||||
|
||||
char soundValue[512];
|
||||
if (KeyValueStringParse(soundValue, g_strSOUND, extraCopy)) {
|
||||
if (!strcmpi(soundValue, "FALSE"))
|
||||
if (!strcmpi(soundValue, "FALSE")) {
|
||||
Enable(FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -327,8 +345,9 @@ void MxWavePresenter::ParseExtra()
|
||||
void MxWavePresenter::Pause()
|
||||
{
|
||||
if (!m_paused && m_started) {
|
||||
if (m_dsBuffer)
|
||||
if (m_dsBuffer) {
|
||||
m_dsBuffer->Stop();
|
||||
}
|
||||
m_paused = TRUE;
|
||||
}
|
||||
}
|
||||
|
@@ -5,11 +5,13 @@
|
||||
// FUNCTION: LEGO1 0x100acf90
|
||||
MxAtomId::MxAtomId(const char* p_str, LookupMode p_mode)
|
||||
{
|
||||
if (!MxOmni::GetInstance())
|
||||
if (!MxOmni::GetInstance()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!AtomIdCounterSet())
|
||||
if (!AtomIdCounterSet()) {
|
||||
return;
|
||||
}
|
||||
|
||||
MxAtomIdCounter* counter = GetCounter(p_str, p_mode);
|
||||
m_internal = counter->GetKey()->GetData();
|
||||
@@ -25,14 +27,17 @@ MxAtomId::~MxAtomId()
|
||||
// FUNCTION: LEGO1 0x100acfe0
|
||||
void MxAtomId::Destroy()
|
||||
{
|
||||
if (!m_internal)
|
||||
if (!m_internal) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!MxOmni::GetInstance())
|
||||
if (!MxOmni::GetInstance()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!AtomIdCounterSet())
|
||||
if (!AtomIdCounterSet()) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef COMPAT_MODE
|
||||
MxAtomIdCounterSet::iterator it;
|
||||
@@ -51,8 +56,9 @@ void MxAtomId::Destroy()
|
||||
// FUNCTION: LEGO1 0x100ad1c0
|
||||
MxAtomId& MxAtomId::operator=(const MxAtomId& p_atomId)
|
||||
{
|
||||
if (m_internal)
|
||||
if (m_internal) {
|
||||
Destroy();
|
||||
}
|
||||
|
||||
if (p_atomId.m_internal && MxOmni::GetInstance() && AtomIdCounterSet()) {
|
||||
MxAtomIdCounter* counter = GetCounter(p_atomId.m_internal, e_exact);
|
||||
|
@@ -14,6 +14,7 @@ void MxAtomIdCounter::Inc()
|
||||
// FUNCTION: LEGO1 0x100ad800
|
||||
void MxAtomIdCounter::Dec()
|
||||
{
|
||||
if (m_value)
|
||||
if (m_value) {
|
||||
m_value--;
|
||||
}
|
||||
}
|
||||
|
@@ -50,16 +50,18 @@ MxResult MxCompositePresenter::StartAction(MxStreamController* p_controller, MxD
|
||||
|
||||
if (presenter && presenter->AddToManager() == SUCCESS) {
|
||||
presenter->SetCompositePresenter(this);
|
||||
if (presenter->StartAction(p_controller, action) == SUCCESS)
|
||||
if (presenter->StartAction(p_controller, action) == SUCCESS) {
|
||||
success = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (success) {
|
||||
action->SetOrigin(this);
|
||||
m_list.push_back(presenter);
|
||||
}
|
||||
else if (presenter)
|
||||
else if (presenter) {
|
||||
delete presenter;
|
||||
}
|
||||
}
|
||||
|
||||
result = SUCCESS;
|
||||
@@ -73,8 +75,9 @@ void MxCompositePresenter::EndAction()
|
||||
{
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (!m_action)
|
||||
if (!m_action) {
|
||||
return;
|
||||
}
|
||||
|
||||
((MxDSMultiAction*) m_action)->GetActionList()->DeleteAll(FALSE);
|
||||
|
||||
@@ -139,15 +142,18 @@ void MxCompositePresenter::VTable0x58(MxEndActionNotificationParam& p_param)
|
||||
MxDSActionList* actions = ((MxDSMultiAction*) m_action)->GetActionList();
|
||||
MxDSActionListCursor cursor(actions);
|
||||
|
||||
if (cursor.Find(action))
|
||||
if (cursor.Find(action)) {
|
||||
cursor.Detach();
|
||||
}
|
||||
}
|
||||
|
||||
if (presenter)
|
||||
if (presenter) {
|
||||
delete presenter;
|
||||
}
|
||||
|
||||
if (action)
|
||||
if (action) {
|
||||
delete action;
|
||||
}
|
||||
|
||||
if (m_list.empty()) {
|
||||
EndAction();
|
||||
@@ -155,8 +161,9 @@ void MxCompositePresenter::VTable0x58(MxEndActionNotificationParam& p_param)
|
||||
else {
|
||||
if (m_action->IsA("MxDSSerialAction") && it != m_list.end()) {
|
||||
MxPresenter* presenter = *it;
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
if (presenter->GetCurrentTickleState() == e_idle) {
|
||||
presenter->SetTickleState(e_ready);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,14 +178,16 @@ void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param)
|
||||
if (*it == presenter) {
|
||||
m_list.erase(it++);
|
||||
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
if (presenter->GetCurrentTickleState() == e_idle) {
|
||||
presenter->SetTickleState(e_ready);
|
||||
}
|
||||
|
||||
MxDSActionList* actions = ((MxDSMultiAction*) m_action)->GetActionList();
|
||||
MxDSActionListCursor cursor(actions);
|
||||
|
||||
if (cursor.Find(presenter->GetAction()))
|
||||
if (cursor.Find(presenter->GetAction())) {
|
||||
cursor.Detach();
|
||||
}
|
||||
|
||||
if (m_list.empty()) {
|
||||
EndAction();
|
||||
@@ -186,8 +195,9 @@ void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param)
|
||||
else {
|
||||
if (m_action->IsA("MxDSSerialAction")) {
|
||||
MxPresenter* presenter = *it;
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
if (presenter->GetCurrentTickleState() == e_idle) {
|
||||
presenter->SetTickleState(e_ready);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,13 +215,15 @@ void MxCompositePresenter::VTable0x60(MxPresenter* p_presenter)
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
|
||||
if (*it == p_presenter) {
|
||||
if (++it == m_list.end()) {
|
||||
if (m_compositePresenter)
|
||||
if (m_compositePresenter) {
|
||||
m_compositePresenter->VTable0x60(this);
|
||||
}
|
||||
}
|
||||
else if (m_action->IsA("MxDSSerialAction")) {
|
||||
MxPresenter* presenter = *it;
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
if (presenter->GetCurrentTickleState() == e_idle) {
|
||||
presenter->SetTickleState(e_ready);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -227,8 +239,9 @@ void MxCompositePresenter::SetTickleState(TickleState p_tickleState)
|
||||
MxPresenter* presenter = *it;
|
||||
presenter->SetTickleState(p_tickleState);
|
||||
|
||||
if (m_action->IsA("MxDSSerialAction") && p_tickleState == e_ready)
|
||||
if (m_action->IsA("MxDSSerialAction") && p_tickleState == e_ready) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,8 +261,9 @@ MxBool MxCompositePresenter::HasTickleStatePassed(TickleState p_tickleState)
|
||||
{
|
||||
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
|
||||
MxPresenter* presenter = *it;
|
||||
if (!presenter->HasTickleStatePassed(p_tickleState))
|
||||
if (!presenter->HasTickleStatePassed(p_tickleState)) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@@ -50,8 +50,9 @@ void MxMediaManager::Destroy()
|
||||
{
|
||||
MxAutoLocker lock(&this->m_criticalSection);
|
||||
|
||||
if (this->m_presenters)
|
||||
if (this->m_presenters) {
|
||||
delete this->m_presenters;
|
||||
}
|
||||
|
||||
Init();
|
||||
}
|
||||
@@ -63,13 +64,15 @@ MxResult MxMediaManager::Tickle()
|
||||
MxPresenter* presenter;
|
||||
MxPresenterListCursor cursor(this->m_presenters);
|
||||
|
||||
while (cursor.Next(presenter))
|
||||
while (cursor.Next(presenter)) {
|
||||
presenter->Tickle();
|
||||
}
|
||||
|
||||
cursor.Reset();
|
||||
|
||||
while (cursor.Next(presenter))
|
||||
while (cursor.Next(presenter)) {
|
||||
presenter->PutData();
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -88,8 +91,9 @@ void MxMediaManager::UnregisterPresenter(MxPresenter& p_presenter)
|
||||
MxAutoLocker lock(&this->m_criticalSection);
|
||||
MxPresenterListCursor cursor(this->m_presenters);
|
||||
|
||||
if (cursor.Find(&p_presenter))
|
||||
if (cursor.Find(&p_presenter)) {
|
||||
cursor.Detach();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b8ac0
|
||||
@@ -99,6 +103,7 @@ void MxMediaManager::StopPresenters()
|
||||
MxPresenter* presenter;
|
||||
MxPresenterListCursor cursor(this->m_presenters);
|
||||
|
||||
while (cursor.Next(presenter))
|
||||
while (cursor.Next(presenter)) {
|
||||
presenter->EndAction();
|
||||
}
|
||||
}
|
||||
|
@@ -26,21 +26,25 @@ void MxMediaPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (m_currentChunk && m_subscriber)
|
||||
if (m_currentChunk && m_subscriber) {
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
}
|
||||
|
||||
if (m_subscriber)
|
||||
if (m_subscriber) {
|
||||
delete m_subscriber;
|
||||
}
|
||||
|
||||
if (m_loopingChunkCursor)
|
||||
if (m_loopingChunkCursor) {
|
||||
delete m_loopingChunkCursor;
|
||||
}
|
||||
|
||||
if (m_loopingChunks) {
|
||||
MxStreamChunkListCursor cursor(m_loopingChunks);
|
||||
MxStreamChunk* chunk;
|
||||
|
||||
while (cursor.Next(chunk))
|
||||
while (cursor.Next(chunk)) {
|
||||
chunk->Release();
|
||||
}
|
||||
|
||||
delete m_loopingChunks;
|
||||
}
|
||||
@@ -48,8 +52,9 @@ void MxMediaPresenter::Destroy(MxBool p_fromDestructor)
|
||||
Init();
|
||||
}
|
||||
|
||||
if (!p_fromDestructor)
|
||||
if (!p_fromDestructor) {
|
||||
MxPresenter::Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b5650
|
||||
@@ -102,16 +107,18 @@ MxResult MxMediaPresenter::StartAction(MxStreamController* p_controller, MxDSAct
|
||||
m_loopingChunks = new MxStreamChunkList;
|
||||
m_loopingChunkCursor = new MxStreamChunkListCursor(m_loopingChunks);
|
||||
|
||||
if (!m_loopingChunks && !m_loopingChunkCursor)
|
||||
if (!m_loopingChunks && !m_loopingChunkCursor) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (p_controller) {
|
||||
m_subscriber = new MxDSSubscriber;
|
||||
|
||||
if (!m_subscriber ||
|
||||
m_subscriber->Create(p_controller, p_action->GetObjectId(), p_action->GetUnknown24()) != SUCCESS)
|
||||
m_subscriber->Create(p_controller, p_action->GetObjectId(), p_action->GetUnknown24()) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
result = SUCCESS;
|
||||
@@ -126,8 +133,9 @@ void MxMediaPresenter::EndAction()
|
||||
{
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (!m_action)
|
||||
if (!m_action) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_currentChunk = NULL;
|
||||
|
||||
@@ -198,18 +206,22 @@ void MxMediaPresenter::StreamingTickle()
|
||||
void MxMediaPresenter::RepeatingTickle()
|
||||
{
|
||||
if (IsEnabled() && !m_currentChunk) {
|
||||
if (m_loopingChunkCursor)
|
||||
if (!m_loopingChunkCursor->Next(m_currentChunk))
|
||||
if (m_loopingChunkCursor) {
|
||||
if (!m_loopingChunkCursor->Next(m_currentChunk)) {
|
||||
m_loopingChunkCursor->Next(m_currentChunk);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_currentChunk) {
|
||||
MxLong time = m_currentChunk->GetTime();
|
||||
if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount())
|
||||
if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount()) {
|
||||
ProgressTickleState(e_unk5);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration())
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration()) {
|
||||
ProgressTickleState(e_unk5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -248,8 +260,9 @@ void MxMediaPresenter::Enable(MxBool p_enable)
|
||||
SetTickleState(e_repeating);
|
||||
}
|
||||
else {
|
||||
if (m_loopingChunkCursor)
|
||||
if (m_loopingChunkCursor) {
|
||||
m_loopingChunkCursor->Reset();
|
||||
}
|
||||
m_currentChunk = NULL;
|
||||
SetTickleState(e_done);
|
||||
}
|
||||
|
@@ -49,8 +49,9 @@ MxResult MxPresenter::StartAction(MxStreamController*, MxDSAction* p_action)
|
||||
// FUNCTION: LEGO1 0x100b4e40
|
||||
void MxPresenter::EndAction()
|
||||
{
|
||||
if (this->m_action == NULL)
|
||||
if (this->m_action == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
MxAutoLocker lock(&this->m_criticalSection);
|
||||
|
||||
@@ -98,8 +99,9 @@ void MxPresenter::ParseExtra()
|
||||
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_world);
|
||||
|
||||
if (result)
|
||||
if (result) {
|
||||
SendToCompositePresenter(MxOmni::GetInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,28 +135,33 @@ MxResult MxPresenter::Tickle()
|
||||
case e_ready:
|
||||
this->ReadyTickle();
|
||||
|
||||
if (m_currentTickleState != e_starting)
|
||||
if (m_currentTickleState != e_starting) {
|
||||
break;
|
||||
}
|
||||
case e_starting:
|
||||
this->StartingTickle();
|
||||
|
||||
if (m_currentTickleState != e_streaming)
|
||||
if (m_currentTickleState != e_streaming) {
|
||||
break;
|
||||
}
|
||||
case e_streaming:
|
||||
this->StreamingTickle();
|
||||
|
||||
if (m_currentTickleState != e_repeating)
|
||||
if (m_currentTickleState != e_repeating) {
|
||||
break;
|
||||
}
|
||||
case e_repeating:
|
||||
this->RepeatingTickle();
|
||||
|
||||
if (m_currentTickleState != e_unk5)
|
||||
if (m_currentTickleState != e_unk5) {
|
||||
break;
|
||||
}
|
||||
case e_unk5:
|
||||
this->Unk5Tickle();
|
||||
|
||||
if (m_currentTickleState != e_done)
|
||||
if (m_currentTickleState != e_done) {
|
||||
break;
|
||||
}
|
||||
case e_done:
|
||||
this->DoneTickle();
|
||||
default:
|
||||
@@ -170,10 +177,12 @@ void MxPresenter::Enable(MxBool p_enable)
|
||||
if (this->m_action && this->IsEnabled() != p_enable) {
|
||||
MxU32 flags = this->m_action->GetFlags();
|
||||
|
||||
if (p_enable)
|
||||
if (p_enable) {
|
||||
this->m_action->SetFlags(flags | MxDSAction::c_enabled);
|
||||
else
|
||||
}
|
||||
else {
|
||||
this->m_action->SetFlags(flags & ~MxDSAction::c_enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -45,8 +45,9 @@ MxResult MxTickleManager::Tickle()
|
||||
else {
|
||||
it++;
|
||||
|
||||
if (client->GetLastUpdateTime() > time)
|
||||
if (client->GetLastUpdateTime() > time) {
|
||||
client->SetLastUpdateTime(-client->GetTickleInterval());
|
||||
}
|
||||
|
||||
if ((client->GetTickleInterval() + client->GetLastUpdateTime()) < time) {
|
||||
client->GetClient()->Tickle();
|
||||
@@ -64,8 +65,9 @@ void MxTickleManager::RegisterClient(MxCore* p_client, MxTime p_interval)
|
||||
MxTime interval = GetClientTickleInterval(p_client);
|
||||
if (interval == TICKLE_MANAGER_NOT_FOUND) {
|
||||
MxTickleClient* client = new MxTickleClient(p_client, p_interval);
|
||||
if (client != NULL)
|
||||
if (client != NULL) {
|
||||
m_clients.push_back(client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,8 +104,9 @@ MxTime MxTickleManager::GetClientTickleInterval(MxCore* p_client)
|
||||
MxTickleClientPtrList::iterator it = m_clients.begin();
|
||||
while (it != m_clients.end()) {
|
||||
MxTickleClient* client = *it;
|
||||
if ((client->GetClient() == p_client) && ((client->GetFlags() & TICKLE_MANAGER_FLAG_DESTROY) == 0))
|
||||
if ((client->GetClient() == p_client) && ((client->GetFlags() & TICKLE_MANAGER_FLAG_DESTROY) == 0)) {
|
||||
return client->GetTickleInterval();
|
||||
}
|
||||
|
||||
it++;
|
||||
}
|
||||
|
@@ -35,15 +35,17 @@ MxBool GetRectIntersection(
|
||||
MxRect32 rect(0, 0, *p_width, *p_height);
|
||||
rect.AddPoint(rect1Origin);
|
||||
|
||||
if (!rect.IntersectsWith(rect1))
|
||||
if (!rect.IntersectsWith(rect1)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rect.Intersect(rect1);
|
||||
rect.SubtractPoint(rect1Origin);
|
||||
rect.AddPoint(rect2Origin);
|
||||
|
||||
if (!rect.IntersectsWith(rect2))
|
||||
if (!rect.IntersectsWith(rect2)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rect.Intersect(rect2);
|
||||
rect.SubtractPoint(rect2Origin);
|
||||
@@ -93,8 +95,9 @@ MxBool KeyValueStringParse(char* p_outputValue, const char* p_key, const char* p
|
||||
char* cur = &token[strlen(p_key)];
|
||||
cur++;
|
||||
while (*cur != ',') {
|
||||
if (*cur == ' ' || *cur == '\0' || *cur == '\t' || *cur == '\n' || *cur == '\r')
|
||||
if (*cur == ' ' || *cur == '\0' || *cur == '\t' || *cur == '\n' || *cur == '\r') {
|
||||
break;
|
||||
}
|
||||
*p_outputValue++ = *cur++;
|
||||
}
|
||||
*p_outputValue = '\0';
|
||||
@@ -115,8 +118,8 @@ MxBool KeyValueStringParse(char* p_outputValue, const char* p_key, const char* p
|
||||
MxBool ContainsPresenter(MxCompositePresenterList& p_presenterList, MxPresenter* p_presenter)
|
||||
{
|
||||
for (MxCompositePresenterList::iterator it = p_presenterList.begin(); it != p_presenterList.end(); it++) {
|
||||
if (p_presenter == *it || (*it)->IsA("MxCompositePresenter") &&
|
||||
ContainsPresenter(((MxCompositePresenter*) *it)->GetList(), p_presenter)) {
|
||||
if (p_presenter == *it || ((*it)->IsA("MxCompositePresenter") &&
|
||||
ContainsPresenter(((MxCompositePresenter*) *it)->GetList(), p_presenter))) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@@ -41,8 +41,9 @@ void MxVariableTable::SetVariable(MxVariable* p_var)
|
||||
MxHashTableCursor<MxVariable*> cursor(this);
|
||||
MxBool found = cursor.Find(p_var);
|
||||
|
||||
if (found)
|
||||
if (found) {
|
||||
cursor.DeleteMatch();
|
||||
}
|
||||
|
||||
MxHashTable<MxVariable*>::Add(p_var);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user