mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
begin implementation of InfoCenter class (#444)
* Push changes * fixes * Implement Infocenter::HandleEndAction * match Infocenter::StopCutScene * implement Infocenter::HandleKeyPress * fixes * Update infocenter.cpp * Update legoworld.cpp * use enums * WIP Fixes * Fix * Fix * Fix * Rename function * Change enum * Update enums * Refactor another enum * Refactor MxDSType * Refactor HashTableOpt * Fixes * Refactor tickle enum * Update other enums * Add EnumConstantName to ncc * Move enum to global namespace * Rename enum --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -104,7 +104,7 @@ public:
|
||||
class MxType4NotificationParam : public MxActionNotificationParam {
|
||||
public:
|
||||
inline MxType4NotificationParam(MxCore* p_sender, MxDSAction* p_action, MxPresenter* p_unk0x14)
|
||||
: MxActionNotificationParam(TYPE4, p_sender, p_action, FALSE)
|
||||
: MxActionNotificationParam(c_notificationType4, p_sender, p_action, FALSE)
|
||||
{
|
||||
m_unk0x14 = p_unk0x14;
|
||||
}
|
||||
|
@@ -5,10 +5,10 @@
|
||||
#include "mxtypes.h"
|
||||
|
||||
enum LookupMode {
|
||||
LookupMode_Exact = 0,
|
||||
LookupMode_LowerCase = 1,
|
||||
LookupMode_UpperCase = 2,
|
||||
LookupMode_LowerCase2 = 3
|
||||
e_exact = 0,
|
||||
e_lowerCase,
|
||||
e_upperCase,
|
||||
e_lowerCase2,
|
||||
};
|
||||
|
||||
// SIZE 0x04
|
||||
|
@@ -85,7 +85,7 @@ public:
|
||||
virtual void ReleaseDC(HDC p_hdc); // vtable+0x40
|
||||
virtual LPDIRECTDRAWSURFACE VTable0x44(MxBitmap*, undefined4*, undefined4, undefined4); // vtable+0x44
|
||||
|
||||
void FUN_100ba640();
|
||||
void ClearScreen();
|
||||
static LPDIRECTDRAWSURFACE FUN_100bc070();
|
||||
|
||||
inline LPDIRECTDRAWSURFACE GetDirectDrawSurface1() { return this->m_ddSurface1; }
|
||||
|
@@ -12,16 +12,16 @@ class MxOmni;
|
||||
class MxDSAction : public MxDSObject {
|
||||
public:
|
||||
enum {
|
||||
Flag_Looping = 0x01,
|
||||
Flag_Bit3 = 0x04,
|
||||
Flag_Bit4 = 0x08,
|
||||
Flag_Bit5 = 0x10,
|
||||
Flag_Enabled = 0x20,
|
||||
Flag_Bit7 = 0x40,
|
||||
Flag_World = 0x80,
|
||||
Flag_Bit9 = 0x100,
|
||||
Flag_Bit10 = 0x200,
|
||||
Flag_Bit11 = 0x400,
|
||||
c_looping = 0x01,
|
||||
c_bit3 = 0x04,
|
||||
c_bit4 = 0x08,
|
||||
c_bit5 = 0x10,
|
||||
c_enabled = 0x20,
|
||||
c_bit7 = 0x40,
|
||||
c_world = 0x80,
|
||||
c_bit9 = 0x100,
|
||||
c_bit10 = 0x200,
|
||||
c_bit11 = 0x400,
|
||||
};
|
||||
|
||||
__declspec(dllexport) MxDSAction();
|
||||
@@ -72,15 +72,15 @@ public:
|
||||
inline MxCore* GetOrigin() { return m_origin; }
|
||||
inline void SetOrigin(MxCore* p_origin) { m_origin = p_origin; }
|
||||
|
||||
inline MxBool IsLooping() const { return m_flags & Flag_Looping; }
|
||||
inline MxBool IsBit3() const { return m_flags & Flag_Bit3; }
|
||||
inline MxBool IsLooping() const { return m_flags & c_looping; }
|
||||
inline MxBool IsBit3() const { return m_flags & c_bit3; }
|
||||
|
||||
inline void CopyFlags(MxU32 p_flags)
|
||||
{
|
||||
if (p_flags & MxDSAction::Flag_Looping)
|
||||
SetFlags(GetFlags() | MxDSAction::Flag_Looping);
|
||||
else if (p_flags & MxDSAction::Flag_Bit3)
|
||||
SetFlags(GetFlags() | MxDSAction::Flag_Bit3);
|
||||
if (p_flags & MxDSAction::c_looping)
|
||||
SetFlags(GetFlags() | MxDSAction::c_looping);
|
||||
else if (p_flags & MxDSAction::c_bit3)
|
||||
SetFlags(GetFlags() | MxDSAction::c_bit3);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@@ -10,17 +10,17 @@ class MxDSStreamingAction;
|
||||
class MxStreamChunk;
|
||||
class MxDSChunk;
|
||||
|
||||
enum MxDSBufferType {
|
||||
MxDSBufferType_Chunk = 0,
|
||||
MxDSBufferType_Allocate = 1,
|
||||
MxDSBufferType_Preallocated = 2,
|
||||
MxDSBufferType_Unknown = 3,
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100dcca0
|
||||
// SIZE 0x34
|
||||
class MxDSBuffer : public MxCore {
|
||||
public:
|
||||
enum Type {
|
||||
e_chunk = 0,
|
||||
e_allocate = 1,
|
||||
e_preallocated = 2,
|
||||
e_unknown = 3,
|
||||
};
|
||||
|
||||
MxDSBuffer();
|
||||
virtual ~MxDSBuffer() override;
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
return "MxDSBuffer";
|
||||
}
|
||||
|
||||
MxResult AllocateBuffer(MxU32 p_bufferSize, MxDSBufferType p_mode);
|
||||
MxResult AllocateBuffer(MxU32 p_bufferSize, Type p_mode);
|
||||
MxResult SetBufferPointer(MxU8* p_buffer, MxU32 p_size);
|
||||
MxResult FUN_100c67b0(
|
||||
MxStreamController* p_controller,
|
||||
@@ -67,12 +67,12 @@ public:
|
||||
inline MxU8** GetBufferRef() { return &m_pBuffer; }
|
||||
inline undefined4 GetUnknown14() { return m_unk0x14; }
|
||||
inline MxU16 GetRefCount() { return m_refcount; }
|
||||
inline MxDSBufferType GetMode() { return m_mode; }
|
||||
inline Type GetMode() { return m_mode; }
|
||||
inline MxU32 GetWriteOffset() { return m_writeOffset; }
|
||||
inline MxU32 GetBytesRemaining() { return m_bytesRemaining; }
|
||||
inline void SetUnknown14(undefined4 p_unk0x14) { m_unk0x14 = p_unk0x14; }
|
||||
inline void SetUnknown1c(undefined4 p_unk0x1c) { m_unk0x1c = p_unk0x1c; }
|
||||
inline void SetMode(MxDSBufferType p_mode) { m_mode = p_mode; }
|
||||
inline void SetMode(Type p_mode) { m_mode = p_mode; }
|
||||
inline void SetUnk30(MxDSStreamingAction* p_unk0x30) { m_unk0x30 = p_unk0x30; }
|
||||
|
||||
private:
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
undefined4 m_unk0x18; // 0x18
|
||||
undefined4 m_unk0x1c; // 0x1c
|
||||
MxU16 m_refcount; // 0x20
|
||||
MxDSBufferType m_mode; // 0x24
|
||||
Type m_mode; // 0x24
|
||||
MxU32 m_writeOffset; // 0x28
|
||||
MxU32 m_bytesRemaining; // 0x2c
|
||||
MxDSStreamingAction* m_unk0x30; // 0x30
|
||||
|
@@ -10,11 +10,11 @@
|
||||
class MxDSChunk : public MxCore {
|
||||
public:
|
||||
enum {
|
||||
Flag_Bit1 = 0x01,
|
||||
Flag_End = 0x02,
|
||||
Flag_Bit3 = 0x04,
|
||||
Flag_Split = 0x10,
|
||||
Flag_Bit16 = 0x8000
|
||||
c_bit1 = 0x01,
|
||||
c_end = 0x02,
|
||||
c_bit3 = 0x04,
|
||||
c_split = 0x10,
|
||||
c_bit16 = 0x8000
|
||||
};
|
||||
|
||||
MxDSChunk();
|
||||
|
@@ -4,7 +4,6 @@
|
||||
#include "decomp.h"
|
||||
#include "mxatomid.h"
|
||||
#include "mxcore.h"
|
||||
#include "mxdstypes.h"
|
||||
|
||||
class MxPresenter;
|
||||
|
||||
@@ -12,6 +11,21 @@ class MxPresenter;
|
||||
// SIZE 0x2c
|
||||
class MxDSObject : public MxCore {
|
||||
public:
|
||||
enum Type {
|
||||
e_object = 0,
|
||||
e_action,
|
||||
e_mediaAction,
|
||||
e_anim,
|
||||
e_sound,
|
||||
e_multiAction,
|
||||
e_serialAction,
|
||||
e_parallelAction,
|
||||
e_event,
|
||||
e_selectAction,
|
||||
e_still,
|
||||
e_objectAction,
|
||||
};
|
||||
|
||||
MxDSObject();
|
||||
virtual ~MxDSObject() override;
|
||||
|
||||
@@ -35,14 +49,14 @@ public:
|
||||
virtual void Deserialize(MxU8** p_source, MxS16 p_unk0x24); // vtable+1c;
|
||||
inline virtual void SetAtomId(MxAtomId p_atomId) { this->m_atomId = p_atomId; } // vtable+20;
|
||||
|
||||
inline MxDSType GetType() const { return (MxDSType) this->m_type; }
|
||||
inline Type GetType() const { return (Type) this->m_type; }
|
||||
inline const char* GetSourceName() const { return this->m_sourceName; }
|
||||
inline MxU32 GetObjectId() { return this->m_objectId; }
|
||||
inline const MxAtomId& GetAtomId() { return this->m_atomId; }
|
||||
inline MxS16 GetUnknown24() { return this->m_unk0x24; }
|
||||
inline MxPresenter* GetUnknown28() { return this->m_unk0x28; }
|
||||
|
||||
inline void SetType(MxDSType p_type) { this->m_type = p_type; }
|
||||
inline void SetType(Type p_type) { this->m_type = p_type; }
|
||||
inline void SetObjectId(MxU32 p_objectId) { this->m_objectId = p_objectId; }
|
||||
inline void SetUnknown24(MxS16 p_unk0x24) { this->m_unk0x24 = p_unk0x24; }
|
||||
inline void SetUnknown28(MxPresenter* p_unk0x28) { this->m_unk0x28 = p_unk0x28; }
|
||||
|
@@ -1,19 +0,0 @@
|
||||
#ifndef MXDSTYPES_H
|
||||
#define MXDSTYPES_H
|
||||
|
||||
enum MxDSType {
|
||||
MxDSType_Object = 0,
|
||||
MxDSType_Action = 1,
|
||||
MxDSType_MediaAction = 2,
|
||||
MxDSType_Anim = 3,
|
||||
MxDSType_Sound = 4,
|
||||
MxDSType_MultiAction = 5,
|
||||
MxDSType_SerialAction = 6,
|
||||
MxDSType_ParallelAction = 7,
|
||||
MxDSType_Event = 8,
|
||||
MxDSType_SelectAction = 9,
|
||||
MxDSType_Still = 10,
|
||||
MxDSType_ObjectAction = 11,
|
||||
};
|
||||
|
||||
#endif // MXDSTYPES_H
|
@@ -32,10 +32,10 @@ public:
|
||||
template <class T>
|
||||
class MxHashTable : protected MxCollection<T> {
|
||||
public:
|
||||
enum HashTableOpt {
|
||||
HashTableOpt_NoExpand = 0,
|
||||
HashTableOpt_ExpandAdd = 1,
|
||||
HashTableOpt_ExpandMultiply = 2,
|
||||
enum Option {
|
||||
e_noExpand = 0,
|
||||
e_expandAll,
|
||||
e_expandMultiply,
|
||||
};
|
||||
|
||||
MxHashTable()
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
m_numSlots = HASH_TABLE_INIT_SIZE;
|
||||
m_slots = new MxHashTableNode<T>*[HASH_TABLE_INIT_SIZE];
|
||||
memset(m_slots, 0, sizeof(MxHashTableNode<T>*) * m_numSlots);
|
||||
m_resizeOption = HashTableOpt_NoExpand;
|
||||
m_resizeOption = e_noExpand;
|
||||
}
|
||||
|
||||
virtual ~MxHashTable() override;
|
||||
@@ -62,7 +62,7 @@ protected:
|
||||
MxHashTableNode<T>** m_slots; // 0x10
|
||||
MxU32 m_numSlots; // 0x14
|
||||
MxU32 m_autoResizeRatio; // 0x18
|
||||
HashTableOpt m_resizeOption; // 0x1c
|
||||
Option m_resizeOption; // 0x1c
|
||||
// FIXME: or FIXME? This qword is used as an integer or double depending
|
||||
// on the value of m_resizeOption. Hard to say whether this is how the devs
|
||||
// did it, but a simple cast in either direction doesn't match.
|
||||
@@ -177,10 +177,10 @@ inline void MxHashTable<T>::Resize()
|
||||
MxHashTableNode<T>** oldTable = m_slots;
|
||||
|
||||
switch (m_resizeOption) {
|
||||
case HashTableOpt_ExpandAdd:
|
||||
case e_expandAll:
|
||||
m_numSlots += m_increaseAmount;
|
||||
break;
|
||||
case HashTableOpt_ExpandMultiply:
|
||||
case e_expandMultiply:
|
||||
m_numSlots *= m_increaseFactor;
|
||||
break;
|
||||
}
|
||||
|
@@ -8,29 +8,29 @@
|
||||
class MxCore;
|
||||
|
||||
enum NotificationId {
|
||||
PARAM_NONE = 0,
|
||||
c_notificationType0 = 0,
|
||||
c_notificationStartAction = 1, // 100dc210:100d8350
|
||||
c_notificationEndAction = 2, // 100d8358:100d8350
|
||||
TYPE4 = 4, // 100dc208:100d8350
|
||||
MXPRESENTER_NOTIFICATION = 5,
|
||||
MXSTREAMER_DELETE_NOTIFY = 6, // 100dc760
|
||||
c_notificationType4 = 4, // 100dc208:100d8350
|
||||
c_notificationPresenter = 5,
|
||||
c_notificationStreamer = 6, // 100dc760
|
||||
c_notificationKeyPress = 7, // 100d6aa0
|
||||
c_notificationButtonUp = 8, // 100d6aa0
|
||||
c_notificationButtonDown = 9, // 100d6aa0
|
||||
c_notificationMouseMove = 10, // 100d6aa0
|
||||
TYPE11 = 11, // 100d6aa0
|
||||
c_notificationType11 = 11, // 100d6aa0
|
||||
c_notificationDragEnd = 12,
|
||||
c_notificationDragStart = 13,
|
||||
c_notificationDrag = 14,
|
||||
c_notificationTimer = 15, // 100d6aa0
|
||||
TYPE17 = 17,
|
||||
TYPE18 = 18, // 100d7e80
|
||||
TYPE19 = 19, // 100d6230
|
||||
TYPE20 = 20,
|
||||
c_notificationType17 = 17,
|
||||
c_notificationType18 = 18, // 100d7e80
|
||||
c_notificationType19 = 19, // 100d6230
|
||||
c_notificationType20 = 20,
|
||||
c_notificationNewPresenter = 21,
|
||||
TYPE22 = 22,
|
||||
TYPE23 = 23,
|
||||
MXTRANSITIONMANAGER_TRANSITIONENDED = 24
|
||||
c_notificationType22 = 22,
|
||||
c_notificationType23 = 23,
|
||||
c_notificationTransitioned = 24
|
||||
};
|
||||
|
||||
// VTABLE: LEGO1 0x100d56e0
|
||||
|
@@ -6,84 +6,76 @@
|
||||
class MxOmniCreateFlags {
|
||||
public:
|
||||
enum LowFlags {
|
||||
Flag_CreateObjectFactory = 0x01,
|
||||
Flag_CreateVariableTable = 0x02,
|
||||
Flag_CreateTickleManager = 0x04,
|
||||
Flag_CreateNotificationManager = 0x08,
|
||||
Flag_CreateVideoManager = 0x10,
|
||||
Flag_CreateSoundManager = 0x20,
|
||||
Flag_CreateMusicManager = 0x40,
|
||||
Flag_CreateEventManager = 0x80
|
||||
c_createObjectFactory = 0x01,
|
||||
c_createVariableTable = 0x02,
|
||||
c_createTickleManager = 0x04,
|
||||
c_createNotificationManager = 0x08,
|
||||
c_createVideoManager = 0x10,
|
||||
c_createSoundManager = 0x20,
|
||||
c_createMusicManager = 0x40,
|
||||
c_createEventManager = 0x80
|
||||
};
|
||||
|
||||
enum HighFlags {
|
||||
Flag_CreateTimer = 0x02,
|
||||
Flag_CreateStreamer = 0x04
|
||||
c_createTimer = 0x02,
|
||||
c_createStreamer = 0x04
|
||||
};
|
||||
|
||||
__declspec(dllexport) MxOmniCreateFlags();
|
||||
|
||||
inline const MxBool CreateObjectFactory() const { return this->m_flags1 & Flag_CreateObjectFactory; }
|
||||
inline const MxBool CreateVariableTable() const { return this->m_flags1 & Flag_CreateVariableTable; }
|
||||
inline const MxBool CreateTickleManager() const { return this->m_flags1 & Flag_CreateTickleManager; }
|
||||
inline const MxBool CreateNotificationManager() const { return this->m_flags1 & Flag_CreateNotificationManager; }
|
||||
inline const MxBool CreateVideoManager() const { return this->m_flags1 & Flag_CreateVideoManager; }
|
||||
inline const MxBool CreateSoundManager() const { return this->m_flags1 & Flag_CreateSoundManager; }
|
||||
inline const MxBool CreateMusicManager() const { return this->m_flags1 & Flag_CreateMusicManager; }
|
||||
inline const MxBool CreateEventManager() const { return this->m_flags1 & Flag_CreateEventManager; }
|
||||
inline const MxBool CreateObjectFactory() const { return this->m_flags1 & c_createObjectFactory; }
|
||||
inline const MxBool CreateVariableTable() const { return this->m_flags1 & c_createVariableTable; }
|
||||
inline const MxBool CreateTickleManager() const { return this->m_flags1 & c_createTickleManager; }
|
||||
inline const MxBool CreateNotificationManager() const { return this->m_flags1 & c_createNotificationManager; }
|
||||
inline const MxBool CreateVideoManager() const { return this->m_flags1 & c_createVideoManager; }
|
||||
inline const MxBool CreateSoundManager() const { return this->m_flags1 & c_createSoundManager; }
|
||||
inline const MxBool CreateMusicManager() const { return this->m_flags1 & c_createMusicManager; }
|
||||
inline const MxBool CreateEventManager() const { return this->m_flags1 & c_createEventManager; }
|
||||
|
||||
inline const MxBool CreateTimer() const { return this->m_flags2 & Flag_CreateTimer; }
|
||||
inline const MxBool CreateStreamer() const { return this->m_flags2 & Flag_CreateStreamer; }
|
||||
inline const MxBool CreateTimer() const { return this->m_flags2 & c_createTimer; }
|
||||
inline const MxBool CreateStreamer() const { return this->m_flags2 & c_createStreamer; }
|
||||
|
||||
inline void CreateObjectFactory(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateObjectFactory : this->m_flags1 & ~Flag_CreateObjectFactory);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createObjectFactory : this->m_flags1 & ~c_createObjectFactory);
|
||||
}
|
||||
inline void CreateVariableTable(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateVariableTable : this->m_flags1 & ~Flag_CreateVariableTable);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createVariableTable : this->m_flags1 & ~c_createVariableTable);
|
||||
}
|
||||
inline void CreateTickleManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateTickleManager : this->m_flags1 & ~Flag_CreateTickleManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createTickleManager : this->m_flags1 & ~c_createTickleManager);
|
||||
}
|
||||
inline void CreateNotificationManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateNotificationManager
|
||||
: this->m_flags1 & ~Flag_CreateNotificationManager);
|
||||
(p_enable ? this->m_flags1 | c_createNotificationManager : this->m_flags1 & ~c_createNotificationManager);
|
||||
}
|
||||
inline void CreateVideoManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateVideoManager : this->m_flags1 & ~Flag_CreateVideoManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createVideoManager : this->m_flags1 & ~c_createVideoManager);
|
||||
}
|
||||
inline void CreateSoundManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateSoundManager : this->m_flags1 & ~Flag_CreateSoundManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createSoundManager : this->m_flags1 & ~c_createSoundManager);
|
||||
}
|
||||
inline void CreateMusicManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateMusicManager : this->m_flags1 & ~Flag_CreateMusicManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createMusicManager : this->m_flags1 & ~c_createMusicManager);
|
||||
}
|
||||
inline void CreateEventManager(MxBool p_enable)
|
||||
{
|
||||
this->m_flags1 =
|
||||
(p_enable ? this->m_flags1 | Flag_CreateEventManager : this->m_flags1 & ~Flag_CreateEventManager);
|
||||
this->m_flags1 = (p_enable ? this->m_flags1 | c_createEventManager : this->m_flags1 & ~c_createEventManager);
|
||||
}
|
||||
|
||||
inline void CreateTimer(MxBool p_enable)
|
||||
{
|
||||
this->m_flags2 = (p_enable ? this->m_flags2 | Flag_CreateTimer : this->m_flags2 & ~Flag_CreateTimer);
|
||||
this->m_flags2 = (p_enable ? this->m_flags2 | c_createTimer : this->m_flags2 & ~c_createTimer);
|
||||
}
|
||||
inline void CreateStreamer(MxBool p_enable)
|
||||
{
|
||||
this->m_flags2 = (p_enable ? this->m_flags2 | Flag_CreateStreamer : this->m_flags2 & ~Flag_CreateStreamer);
|
||||
this->m_flags2 = (p_enable ? this->m_flags2 | c_createStreamer : this->m_flags2 & ~c_createStreamer);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@@ -17,13 +17,13 @@ class MxEntity;
|
||||
class MxPresenter : public MxCore {
|
||||
public:
|
||||
enum TickleState {
|
||||
TickleState_Idle = 0,
|
||||
TickleState_Ready,
|
||||
TickleState_Starting,
|
||||
TickleState_Streaming,
|
||||
TickleState_Repeating,
|
||||
TickleState_unk5,
|
||||
TickleState_Done,
|
||||
e_idle = 0,
|
||||
e_ready,
|
||||
e_starting,
|
||||
e_streaming,
|
||||
e_repeating,
|
||||
e_unk5,
|
||||
e_done,
|
||||
};
|
||||
|
||||
MxPresenter() { Init(); }
|
||||
@@ -57,27 +57,27 @@ public:
|
||||
virtual void ReadyTickle()
|
||||
{
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
} // vtable+0x18
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be60
|
||||
virtual void StartingTickle() { ProgressTickleState(TickleState_Streaming); } // vtable+0x1c
|
||||
virtual void StartingTickle() { ProgressTickleState(e_streaming); } // vtable+0x1c
|
||||
|
||||
// FUNCTION: LEGO1 0x1000be80
|
||||
virtual void StreamingTickle() { ProgressTickleState(TickleState_Repeating); }; // vtable+0x20
|
||||
virtual void StreamingTickle() { ProgressTickleState(e_repeating); }; // vtable+0x20
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bea0
|
||||
virtual void RepeatingTickle() { ProgressTickleState(TickleState_unk5); }; // vtable+0x24
|
||||
virtual void RepeatingTickle() { ProgressTickleState(e_unk5); }; // vtable+0x24
|
||||
|
||||
// FUNCTION: LEGO1 0x1000bec0
|
||||
virtual void Unk5Tickle() { ProgressTickleState(TickleState_Done); }; // vtable+0x28
|
||||
virtual void Unk5Tickle() { ProgressTickleState(e_done); }; // vtable+0x28
|
||||
|
||||
protected:
|
||||
#ifdef ISLE_APP
|
||||
__declspec(dllexport) virtual void DoneTickle(); // vtable+0x2c
|
||||
#else
|
||||
// FUNCTION: LEGO1 0x1000bee0
|
||||
__declspec(dllexport) virtual void DoneTickle() { ProgressTickleState(TickleState_Idle); }; // vtable+0x2c
|
||||
__declspec(dllexport) virtual void DoneTickle() { ProgressTickleState(e_idle); }; // vtable+0x2c
|
||||
#endif
|
||||
|
||||
__declspec(dllexport) virtual void ParseExtra(); // vtable+0x30
|
||||
|
@@ -71,7 +71,7 @@ private:
|
||||
class MxStreamer : public MxCore {
|
||||
public:
|
||||
enum OpenMode {
|
||||
e_DiskStream,
|
||||
e_diskStream = 0,
|
||||
e_RAMStream
|
||||
};
|
||||
|
||||
|
@@ -11,11 +11,11 @@
|
||||
class MxVideoPresenter : public MxMediaPresenter {
|
||||
public:
|
||||
enum {
|
||||
Flag_Bit1 = 0x01,
|
||||
Flag_Bit2 = 0x02,
|
||||
Flag_Bit3 = 0x04,
|
||||
Flag_Bit4 = 0x08,
|
||||
Flag_Bit5 = 0x10,
|
||||
c_bit1 = 0x01,
|
||||
c_bit2 = 0x02,
|
||||
c_bit3 = 0x04,
|
||||
c_bit4 = 0x08,
|
||||
c_bit5 = 0x10,
|
||||
};
|
||||
|
||||
MxVideoPresenter() { Init(); }
|
||||
|
@@ -15,14 +15,14 @@ MxU16 g_sep = TWOCC(',', ' ');
|
||||
// FUNCTION: LEGO1 0x100ad810
|
||||
MxDSAction::MxDSAction()
|
||||
{
|
||||
this->m_flags = MxDSAction::Flag_Enabled;
|
||||
this->m_flags = MxDSAction::c_enabled;
|
||||
this->m_startTime = INT_MIN;
|
||||
this->m_extraData = NULL;
|
||||
this->m_extraLength = 0;
|
||||
this->m_duration = INT_MIN;
|
||||
this->m_loopCount = -1;
|
||||
|
||||
this->SetType(MxDSType_Action);
|
||||
this->SetType(e_action);
|
||||
this->m_location.Fill(FLT_MAX);
|
||||
this->m_direction.Fill(FLT_MAX);
|
||||
this->m_up.Fill(FLT_MAX);
|
||||
|
@@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(MxDSAnim, 0xb8)
|
||||
// FUNCTION: LEGO1 0x100c8ff0
|
||||
MxDSAnim::MxDSAnim()
|
||||
{
|
||||
this->SetType(MxDSType_Anim);
|
||||
this->SetType(e_anim);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c91a0
|
||||
|
@@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(MxDSEvent, 0xb8)
|
||||
// FUNCTION: LEGO1 0x100c95f0
|
||||
MxDSEvent::MxDSEvent()
|
||||
{
|
||||
this->SetType(MxDSType_Event);
|
||||
this->SetType(e_event);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c97a0
|
||||
|
@@ -15,7 +15,7 @@ MxDSMediaAction::MxDSMediaAction()
|
||||
this->m_paletteManagement = 1;
|
||||
this->m_unk0xb4 = -1;
|
||||
this->m_sustainTime = 0;
|
||||
this->SetType(MxDSType_MediaAction);
|
||||
this->SetType(e_mediaAction);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c8cf0
|
||||
|
@@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(MxDSActionListCursor, 0x10);
|
||||
// FUNCTION: LEGO1 0x100c9b90
|
||||
MxDSMultiAction::MxDSMultiAction()
|
||||
{
|
||||
this->SetType(MxDSType_MultiAction);
|
||||
this->SetType(e_multiAction);
|
||||
this->m_actions = new MxDSActionList;
|
||||
this->m_actions->SetDestroy(MxDSActionList::Destroy);
|
||||
}
|
||||
|
@@ -11,7 +11,6 @@
|
||||
#include "mxdsserialaction.h"
|
||||
#include "mxdssound.h"
|
||||
#include "mxdsstill.h"
|
||||
#include "mxdstypes.h"
|
||||
#include "mxutil.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -22,7 +21,7 @@ DECOMP_SIZE_ASSERT(MxDSObject, 0x2c);
|
||||
// FUNCTION: LEGO1 0x100bf6a0
|
||||
MxDSObject::MxDSObject()
|
||||
{
|
||||
this->SetType(MxDSType_Object);
|
||||
this->SetType(e_object);
|
||||
this->m_sourceName = NULL;
|
||||
this->m_unk0x14 = 0;
|
||||
this->m_objectName = NULL;
|
||||
@@ -148,40 +147,40 @@ MxDSObject* DeserializeDSObjectDispatch(MxU8** p_source, MxS16 p_flags)
|
||||
switch (type) {
|
||||
default:
|
||||
return NULL;
|
||||
case MxDSType_Object:
|
||||
case MxDSObject::e_object:
|
||||
obj = new MxDSObject();
|
||||
break;
|
||||
case MxDSType_Action:
|
||||
case MxDSObject::e_action:
|
||||
obj = new MxDSAction();
|
||||
break;
|
||||
case MxDSType_MediaAction:
|
||||
case MxDSObject::e_mediaAction:
|
||||
obj = new MxDSMediaAction();
|
||||
break;
|
||||
case MxDSType_Anim:
|
||||
case MxDSObject::e_anim:
|
||||
obj = new MxDSAnim();
|
||||
break;
|
||||
case MxDSType_Sound:
|
||||
case MxDSObject::e_sound:
|
||||
obj = new MxDSSound();
|
||||
break;
|
||||
case MxDSType_MultiAction:
|
||||
case MxDSObject::e_multiAction:
|
||||
obj = new MxDSMultiAction();
|
||||
break;
|
||||
case MxDSType_SerialAction:
|
||||
case MxDSObject::e_serialAction:
|
||||
obj = new MxDSSerialAction();
|
||||
break;
|
||||
case MxDSType_ParallelAction:
|
||||
case MxDSObject::e_parallelAction:
|
||||
obj = new MxDSParallelAction();
|
||||
break;
|
||||
case MxDSType_Event:
|
||||
case MxDSObject::e_event:
|
||||
obj = new MxDSEvent();
|
||||
break;
|
||||
case MxDSType_SelectAction:
|
||||
case MxDSObject::e_selectAction:
|
||||
obj = new MxDSSelectAction();
|
||||
break;
|
||||
case MxDSType_Still:
|
||||
case MxDSObject::e_still:
|
||||
obj = new MxDSStill();
|
||||
break;
|
||||
case MxDSType_ObjectAction:
|
||||
case MxDSObject::e_objectAction:
|
||||
obj = new MxDSObjectAction();
|
||||
break;
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(MxDSObjectAction, 0xb8)
|
||||
// FUNCTION: LEGO1 0x100c8870
|
||||
MxDSObjectAction::MxDSObjectAction()
|
||||
{
|
||||
this->SetType(MxDSType_ObjectAction);
|
||||
this->SetType(e_objectAction);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c8a20
|
||||
|
@@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(MxDSParallelAction, 0x9c)
|
||||
// FUNCTION: LEGO1 0x100cae80
|
||||
MxDSParallelAction::MxDSParallelAction()
|
||||
{
|
||||
this->SetType(MxDSType_ParallelAction);
|
||||
this->SetType(e_parallelAction);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100cb040
|
||||
|
@@ -12,7 +12,7 @@ DECOMP_SIZE_ASSERT(MxListEntry<MxString>, 0x18)
|
||||
// FUNCTION: LEGO1 0x100cb2b0
|
||||
MxDSSelectAction::MxDSSelectAction()
|
||||
{
|
||||
this->SetType(MxDSType_SelectAction);
|
||||
this->SetType(e_selectAction);
|
||||
this->m_unk0xac = new MxStringList;
|
||||
}
|
||||
|
||||
|
@@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(MxDSSerialAction, 0xa8)
|
||||
// FUNCTION: LEGO1 0x100ca9d0
|
||||
MxDSSerialAction::MxDSSerialAction()
|
||||
{
|
||||
this->SetType(MxDSType_SerialAction);
|
||||
this->SetType(e_serialAction);
|
||||
this->m_cursor = new MxDSActionListCursor(this->m_actions);
|
||||
this->m_unk0xa0 = 0;
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ DECOMP_SIZE_ASSERT(MxDSSound, 0xc0)
|
||||
MxDSSound::MxDSSound()
|
||||
{
|
||||
this->m_volume = 0x4f;
|
||||
this->SetType(MxDSType_Sound);
|
||||
this->SetType(e_sound);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9470
|
||||
|
@@ -5,7 +5,7 @@ DECOMP_SIZE_ASSERT(MxDSStill, 0xb8)
|
||||
// FUNCTION: LEGO1 0x100c98c0
|
||||
MxDSStill::MxDSStill()
|
||||
{
|
||||
this->SetType(MxDSType_Still);
|
||||
this->SetType(e_still);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c9a70
|
||||
|
@@ -21,7 +21,7 @@ void MxLoopingMIDIPresenter::StreamingTickle()
|
||||
}
|
||||
|
||||
if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime())
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2ae0
|
||||
@@ -38,7 +38,7 @@ MxResult MxLoopingMIDIPresenter::PutData()
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
|
||||
if (m_currentTickleState == TickleState_Streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
|
||||
if (m_currentTickleState == e_streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
|
||||
SetVolume(((MxDSSound*) m_action)->GetVolume());
|
||||
MusicManager()->FUN_100c09c0(m_chunk->GetData(), !m_action->GetLoopCount() ? -1 : m_action->GetLoopCount());
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ void MxMIDIPresenter::ReadyTickle()
|
||||
if (chunk) {
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,14 +62,14 @@ void MxMIDIPresenter::StartingTickle()
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime())
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2910
|
||||
void MxMIDIPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_chunk)
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
else
|
||||
m_chunk = NextChunk();
|
||||
}
|
||||
@@ -92,7 +92,7 @@ MxResult MxMIDIPresenter::PutData()
|
||||
{
|
||||
m_criticalSection.Enter();
|
||||
|
||||
if (m_currentTickleState == TickleState_Streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
|
||||
if (m_currentTickleState == e_streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
|
||||
SetVolume(((MxDSSound*) m_action)->GetVolume());
|
||||
|
||||
if (MusicManager()->FUN_100c09c0(m_chunk->GetData(), 1))
|
||||
|
@@ -86,7 +86,7 @@ void MxWavePresenter::WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length)
|
||||
}
|
||||
|
||||
if (dwStatus != DSBSTATUS_BUFFERLOST) {
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_looping) {
|
||||
m_writtenChunks++;
|
||||
m_lockSize = p_length;
|
||||
}
|
||||
@@ -99,7 +99,7 @@ void MxWavePresenter::WriteToSoundBuffer(void* p_audioPtr, MxU32 p_length)
|
||||
DS_OK) {
|
||||
memcpy(pvAudioPtr1, p_audioPtr, p_length);
|
||||
|
||||
if (m_lockSize > p_length && !(m_action->GetFlags() & MxDSAction::Flag_Looping)) {
|
||||
if (m_lockSize > p_length && !(m_action->GetFlags() & MxDSAction::c_looping)) {
|
||||
memset((MxU8*) pvAudioPtr1 + p_length, m_silenceData, m_lockSize - p_length);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ void MxWavePresenter::ReadyTickle()
|
||||
memcpy(m_waveFormat, chunk->GetData(), chunk->GetLength());
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ void MxWavePresenter::StartingTickle()
|
||||
else
|
||||
desc.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME;
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Looping)
|
||||
if (m_action->GetFlags() & MxDSAction::c_looping)
|
||||
desc.dwBufferBytes = m_waveFormat->m_waveFormatEx.nAvgBytesPerSec *
|
||||
(m_action->GetDuration() / m_action->GetLoopCount()) / 1000;
|
||||
else
|
||||
@@ -169,7 +169,7 @@ void MxWavePresenter::StartingTickle()
|
||||
}
|
||||
else {
|
||||
SetVolume(((MxDSSound*) m_action)->GetVolume());
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -178,11 +178,11 @@ void MxWavePresenter::StartingTickle()
|
||||
void MxWavePresenter::StreamingTickle()
|
||||
{
|
||||
if (!m_currentChunk) {
|
||||
if (!(m_action->GetFlags() & MxDSAction::Flag_Looping)) {
|
||||
if (!(m_action->GetFlags() & MxDSAction::c_looping)) {
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_End && !(chunk->GetFlags() & MxDSChunk::Flag_Bit16)) {
|
||||
chunk->SetFlags(chunk->GetFlags() | MxDSChunk::Flag_Bit16);
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::c_end && !(chunk->GetFlags() & MxDSChunk::c_bit16)) {
|
||||
chunk->SetFlags(chunk->GetFlags() | MxDSChunk::c_bit16);
|
||||
|
||||
m_currentChunk = new MxStreamChunk;
|
||||
MxU8* data = new MxU8[m_chunkLength];
|
||||
@@ -192,7 +192,7 @@ void MxWavePresenter::StreamingTickle()
|
||||
m_currentChunk->SetLength(m_chunkLength);
|
||||
m_currentChunk->SetData(data);
|
||||
m_currentChunk->SetTime(chunk->GetTime() + 1000);
|
||||
m_currentChunk->SetFlags(MxDSChunk::Flag_Bit1);
|
||||
m_currentChunk->SetFlags(MxDSChunk::c_bit1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ void MxWavePresenter::DoneTickle()
|
||||
m_dsBuffer->GetCurrentPosition(&dwCurrentPlayCursor, &dwCurrentWriteCursor);
|
||||
|
||||
MxS8 playedChunks = dwCurrentPlayCursor / m_chunkLength;
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit7 || m_action->GetFlags() & MxDSAction::Flag_Looping ||
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit7 || m_action->GetFlags() & MxDSAction::c_looping ||
|
||||
m_writtenChunks != playedChunks || m_lockSize + (m_chunkLength * playedChunks) <= dwCurrentPlayCursor)
|
||||
MxMediaPresenter::DoneTickle();
|
||||
}
|
||||
@@ -231,7 +231,7 @@ MxResult MxWavePresenter::PutData()
|
||||
|
||||
if (IsEnabled()) {
|
||||
switch (m_currentTickleState) {
|
||||
case TickleState_Streaming:
|
||||
case e_streaming:
|
||||
if (m_currentChunk && FUN_100b1ba0()) {
|
||||
WriteToSoundBuffer(m_currentChunk->GetData(), m_currentChunk->GetLength());
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
@@ -245,7 +245,7 @@ MxResult MxWavePresenter::PutData()
|
||||
m_started = TRUE;
|
||||
}
|
||||
break;
|
||||
case TickleState_Repeating:
|
||||
case e_repeating:
|
||||
if (m_started)
|
||||
break;
|
||||
|
||||
@@ -339,13 +339,13 @@ void MxWavePresenter::Resume()
|
||||
if (m_paused) {
|
||||
if (m_dsBuffer && m_started) {
|
||||
switch (m_currentTickleState) {
|
||||
case TickleState_Streaming:
|
||||
case e_streaming:
|
||||
m_dsBuffer->Play(0, 0, DSBPLAY_LOOPING);
|
||||
break;
|
||||
case TickleState_Repeating:
|
||||
case e_repeating:
|
||||
m_dsBuffer->Play(0, 0, m_action->GetLoopCount() > 1);
|
||||
break;
|
||||
case TickleState_Done:
|
||||
case e_done:
|
||||
m_dsBuffer->Play(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ MxAtomId& MxAtomId::operator=(const MxAtomId& p_atomId)
|
||||
Destroy();
|
||||
|
||||
if (p_atomId.m_internal && MxOmni::GetInstance() && AtomIdCounterSet()) {
|
||||
MxAtomIdCounter* counter = GetCounter(p_atomId.m_internal, LookupMode_Exact);
|
||||
MxAtomIdCounter* counter = GetCounter(p_atomId.m_internal, e_exact);
|
||||
counter->Inc();
|
||||
}
|
||||
|
||||
@@ -71,11 +71,11 @@ MxAtomIdCounter* MxAtomId::GetCounter(const char* p_str, LookupMode p_mode)
|
||||
MxAtomIdCounter* counter = new MxAtomIdCounter(p_str);
|
||||
|
||||
switch (p_mode) {
|
||||
case LookupMode_LowerCase:
|
||||
case LookupMode_LowerCase2:
|
||||
case e_lowerCase:
|
||||
case e_lowerCase2:
|
||||
counter->GetKey()->ToLowerCase();
|
||||
break;
|
||||
case LookupMode_UpperCase:
|
||||
case e_upperCase:
|
||||
counter->GetKey()->ToUpperCase();
|
||||
break;
|
||||
}
|
||||
|
@@ -112,7 +112,7 @@ MxLong MxCompositePresenter::Notify(MxParam& p_param)
|
||||
case c_notificationEndAction:
|
||||
VTable0x58((MxEndActionNotificationParam&) p_param);
|
||||
break;
|
||||
case MXPRESENTER_NOTIFICATION:
|
||||
case c_notificationPresenter:
|
||||
VTable0x5c((MxNotificationParam&) p_param);
|
||||
}
|
||||
|
||||
@@ -155,8 +155,8 @@ void MxCompositePresenter::VTable0x58(MxEndActionNotificationParam& p_param)
|
||||
else {
|
||||
if (m_action->IsA("MxDSSerialAction") && it != m_list.end()) {
|
||||
MxPresenter* presenter = *it;
|
||||
if (presenter->GetCurrentTickleState() == TickleState_Idle)
|
||||
presenter->SetTickleState(TickleState_Ready);
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
presenter->SetTickleState(e_ready);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,8 +171,8 @@ void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param)
|
||||
if (*it == presenter) {
|
||||
m_list.erase(it++);
|
||||
|
||||
if (presenter->GetCurrentTickleState() == TickleState_Idle)
|
||||
presenter->SetTickleState(TickleState_Ready);
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
presenter->SetTickleState(e_ready);
|
||||
|
||||
MxDSActionList* actions = ((MxDSMultiAction*) m_action)->GetActionList();
|
||||
MxDSActionListCursor cursor(actions);
|
||||
@@ -186,8 +186,8 @@ void MxCompositePresenter::VTable0x5c(MxNotificationParam& p_param)
|
||||
else {
|
||||
if (m_action->IsA("MxDSSerialAction")) {
|
||||
MxPresenter* presenter = *it;
|
||||
if (presenter->GetCurrentTickleState() == TickleState_Idle)
|
||||
presenter->SetTickleState(TickleState_Ready);
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
presenter->SetTickleState(e_ready);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,8 +210,8 @@ void MxCompositePresenter::VTable0x60(MxPresenter* p_presenter)
|
||||
}
|
||||
else if (m_action->IsA("MxDSSerialAction")) {
|
||||
MxPresenter* presenter = *it;
|
||||
if (presenter->GetCurrentTickleState() == TickleState_Idle)
|
||||
presenter->SetTickleState(TickleState_Ready);
|
||||
if (presenter->GetCurrentTickleState() == e_idle)
|
||||
presenter->SetTickleState(e_ready);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ void MxCompositePresenter::SetTickleState(TickleState p_tickleState)
|
||||
MxPresenter* presenter = *it;
|
||||
presenter->SetTickleState(p_tickleState);
|
||||
|
||||
if (m_action->IsA("MxDSSerialAction") && p_tickleState == TickleState_Ready)
|
||||
if (m_action->IsA("MxDSSerialAction") && p_tickleState == e_ready)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -60,12 +60,12 @@ MxStreamChunk* MxMediaPresenter::CurrentChunk()
|
||||
if (m_subscriber) {
|
||||
chunk = m_subscriber->CurrentChunk();
|
||||
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_Bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Bit7);
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::c_bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_bit7);
|
||||
m_subscriber->NextChunk();
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,11 +80,11 @@ MxStreamChunk* MxMediaPresenter::NextChunk()
|
||||
if (m_subscriber) {
|
||||
chunk = m_subscriber->NextChunk();
|
||||
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::Flag_Bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_Bit7);
|
||||
if (chunk && chunk->GetFlags() & MxDSChunk::c_bit3) {
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_bit7);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
chunk = NULL;
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ MxResult MxMediaPresenter::StartAction(MxStreamController* p_controller, MxDSAct
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (MxPresenter::StartAction(p_controller, p_action) == SUCCESS) {
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_looping) {
|
||||
m_loopingChunks = new MxStreamChunkList;
|
||||
m_loopingChunkCursor = new MxStreamChunkListCursor(m_loopingChunks);
|
||||
|
||||
@@ -131,10 +131,9 @@ void MxMediaPresenter::EndAction()
|
||||
|
||||
m_currentChunk = NULL;
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_World &&
|
||||
(!m_compositePresenter || !m_compositePresenter->VTable0x64(2))) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_world && (!m_compositePresenter || !m_compositePresenter->VTable0x64(2))) {
|
||||
MxPresenter::Enable(FALSE);
|
||||
SetTickleState(TickleState_Idle);
|
||||
SetTickleState(e_idle);
|
||||
}
|
||||
else {
|
||||
MxDSAction* action = m_action;
|
||||
@@ -178,12 +177,12 @@ void MxMediaPresenter::StreamingTickle()
|
||||
m_currentChunk = NextChunk();
|
||||
|
||||
if (m_currentChunk) {
|
||||
if (m_currentChunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
if (m_currentChunk->GetFlags() & MxDSChunk::c_end) {
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
ProgressTickleState(e_repeating);
|
||||
}
|
||||
else if (m_action->GetFlags() & MxDSAction::Flag_Looping) {
|
||||
else if (m_action->GetFlags() & MxDSAction::c_looping) {
|
||||
LoopChunk(m_currentChunk);
|
||||
|
||||
if (!IsEnabled()) {
|
||||
@@ -206,11 +205,11 @@ void MxMediaPresenter::RepeatingTickle()
|
||||
if (m_currentChunk) {
|
||||
MxLong time = m_currentChunk->GetTime();
|
||||
if (time <= m_action->GetElapsedTime() % m_action->GetLoopCount())
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
ProgressTickleState(e_unk5);
|
||||
}
|
||||
else {
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration())
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
ProgressTickleState(e_unk5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -219,7 +218,7 @@ void MxMediaPresenter::RepeatingTickle()
|
||||
void MxMediaPresenter::DoneTickle()
|
||||
{
|
||||
m_previousTickleStates |= 1 << m_currentTickleState;
|
||||
m_currentTickleState = TickleState_Idle;
|
||||
m_currentTickleState = e_idle;
|
||||
EndAction();
|
||||
}
|
||||
|
||||
@@ -246,13 +245,13 @@ void MxMediaPresenter::Enable(MxBool p_enable)
|
||||
if (p_enable) {
|
||||
MxLong time = Timer()->GetTime();
|
||||
m_action->SetUnknown90(time);
|
||||
SetTickleState(TickleState_Repeating);
|
||||
SetTickleState(e_repeating);
|
||||
}
|
||||
else {
|
||||
if (m_loopingChunkCursor)
|
||||
m_loopingChunkCursor->Reset();
|
||||
m_currentChunk = NULL;
|
||||
SetTickleState(TickleState_Done);
|
||||
SetTickleState(e_done);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ DECOMP_SIZE_ASSERT(MxObjectFactory, 0x38); // 100af1db
|
||||
// FUNCTION: LEGO1 0x100b0d80
|
||||
MxObjectFactory::MxObjectFactory()
|
||||
{
|
||||
#define X(V) this->m_id##V = MxAtomId(#V, LookupMode_Exact);
|
||||
#define X(V) this->m_id##V = MxAtomId(#V, e_exact);
|
||||
FOR_MXOBJECTFACTORY_OBJECTS(X)
|
||||
#undef X
|
||||
}
|
||||
@@ -28,7 +28,7 @@ MxObjectFactory::MxObjectFactory()
|
||||
MxCore* MxObjectFactory::Create(const char* p_name)
|
||||
{
|
||||
MxCore* object = NULL;
|
||||
MxAtomId atom(p_name, LookupMode_Exact);
|
||||
MxAtomId atom(p_name, e_exact);
|
||||
|
||||
if (0) {
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ DECOMP_SIZE_ASSERT(MxPresenter, 0x40);
|
||||
// FUNCTION: LEGO1 0x100b4d50
|
||||
void MxPresenter::Init()
|
||||
{
|
||||
m_currentTickleState = TickleState_Idle;
|
||||
m_currentTickleState = e_idle;
|
||||
m_action = NULL;
|
||||
m_location = MxPoint32(0, 0);
|
||||
m_displayZ = 0;
|
||||
@@ -41,7 +41,7 @@ MxResult MxPresenter::StartAction(MxStreamController*, MxDSAction* p_action)
|
||||
|
||||
this->m_location = MxPoint32(this->m_action->GetLocation()[0], this->m_action->GetLocation()[1]);
|
||||
this->m_displayZ = this->m_action->GetLocation()[2];
|
||||
ProgressTickleState(TickleState_Ready);
|
||||
ProgressTickleState(e_ready);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -70,7 +70,7 @@ void MxPresenter::EndAction()
|
||||
this->m_action = NULL;
|
||||
MxS32 previousTickleState = 1 << m_currentTickleState;
|
||||
this->m_previousTickleStates |= previousTickleState;
|
||||
this->m_currentTickleState = TickleState_Idle;
|
||||
this->m_currentTickleState = e_idle;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b4fc0
|
||||
@@ -96,7 +96,7 @@ void MxPresenter::ParseExtra()
|
||||
MxS32 val = token ? atoi(token) : 0;
|
||||
MxEntity* result = MxOmni::GetInstance()->FindWorld(buf, val, this);
|
||||
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::Flag_World);
|
||||
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_world);
|
||||
|
||||
if (result)
|
||||
SendToCompositePresenter(MxOmni::GetInstance());
|
||||
@@ -112,11 +112,11 @@ void MxPresenter::SendToCompositePresenter(MxOmni* p_omni)
|
||||
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxNotificationParam param(MXPRESENTER_NOTIFICATION, this);
|
||||
MxNotificationParam param(c_notificationPresenter, this);
|
||||
NotificationManager()->Send(m_compositePresenter, ¶m);
|
||||
}
|
||||
#else
|
||||
NotificationManager()->Send(m_compositePresenter, &MxNotificationParam(MXPRESENTER_NOTIFICATION, this));
|
||||
NotificationManager()->Send(m_compositePresenter, &MxNotificationParam(c_notificationPresenter, this));
|
||||
#endif
|
||||
|
||||
m_action->SetOrigin(p_omni ? p_omni : MxOmni::GetInstance());
|
||||
@@ -130,32 +130,32 @@ MxResult MxPresenter::Tickle()
|
||||
MxAutoLocker lock(&this->m_criticalSection);
|
||||
|
||||
switch (this->m_currentTickleState) {
|
||||
case TickleState_Ready:
|
||||
case e_ready:
|
||||
this->ReadyTickle();
|
||||
|
||||
if (m_currentTickleState != TickleState_Starting)
|
||||
if (m_currentTickleState != e_starting)
|
||||
break;
|
||||
case TickleState_Starting:
|
||||
case e_starting:
|
||||
this->StartingTickle();
|
||||
|
||||
if (m_currentTickleState != TickleState_Streaming)
|
||||
if (m_currentTickleState != e_streaming)
|
||||
break;
|
||||
case TickleState_Streaming:
|
||||
case e_streaming:
|
||||
this->StreamingTickle();
|
||||
|
||||
if (m_currentTickleState != TickleState_Repeating)
|
||||
if (m_currentTickleState != e_repeating)
|
||||
break;
|
||||
case TickleState_Repeating:
|
||||
case e_repeating:
|
||||
this->RepeatingTickle();
|
||||
|
||||
if (m_currentTickleState != TickleState_unk5)
|
||||
if (m_currentTickleState != e_unk5)
|
||||
break;
|
||||
case TickleState_unk5:
|
||||
case e_unk5:
|
||||
this->Unk5Tickle();
|
||||
|
||||
if (m_currentTickleState != TickleState_Done)
|
||||
if (m_currentTickleState != e_done)
|
||||
break;
|
||||
case TickleState_Done:
|
||||
case e_done:
|
||||
this->DoneTickle();
|
||||
default:
|
||||
break;
|
||||
@@ -171,9 +171,9 @@ void MxPresenter::Enable(MxBool p_enable)
|
||||
MxU32 flags = this->m_action->GetFlags();
|
||||
|
||||
if (p_enable)
|
||||
this->m_action->SetFlags(flags | MxDSAction::Flag_Enabled);
|
||||
this->m_action->SetFlags(flags | MxDSAction::c_enabled);
|
||||
else
|
||||
this->m_action->SetFlags(flags & ~MxDSAction::Flag_Enabled);
|
||||
this->m_action->SetFlags(flags & ~MxDSAction::c_enabled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ const char* PresenterNameDispatch(const MxDSAction& p_action)
|
||||
|
||||
if (!name || strlen(name) == 0) {
|
||||
switch (p_action.GetType()) {
|
||||
case MxDSType_Anim:
|
||||
case MxDSObject::e_anim:
|
||||
format = ((MxDSAnim&) p_action).GetMediaFormat();
|
||||
switch (format) {
|
||||
case FOURCC(' ', 'F', 'L', 'C'):
|
||||
@@ -197,7 +197,7 @@ const char* PresenterNameDispatch(const MxDSAction& p_action)
|
||||
}
|
||||
break;
|
||||
|
||||
case MxDSType_Sound:
|
||||
case MxDSObject::e_sound:
|
||||
format = ((MxDSSound&) p_action).GetMediaFormat();
|
||||
switch (format) {
|
||||
case FOURCC(' ', 'M', 'I', 'D'):
|
||||
@@ -209,17 +209,17 @@ const char* PresenterNameDispatch(const MxDSAction& p_action)
|
||||
}
|
||||
break;
|
||||
|
||||
case MxDSType_SerialAction:
|
||||
case MxDSType_ParallelAction:
|
||||
case MxDSType_SelectAction:
|
||||
case MxDSObject::e_serialAction:
|
||||
case MxDSObject::e_parallelAction:
|
||||
case MxDSObject::e_selectAction:
|
||||
name = "MxCompositePresenter";
|
||||
break;
|
||||
|
||||
case MxDSType_Event:
|
||||
case MxDSObject::e_event:
|
||||
name = "MxEventPresenter";
|
||||
break;
|
||||
|
||||
case MxDSType_Still:
|
||||
case MxDSObject::e_still:
|
||||
name = "MxStillPresenter";
|
||||
break;
|
||||
}
|
||||
@@ -252,5 +252,5 @@ MxEntity* MxPresenter::CreateEntity(const char* p_name)
|
||||
// FUNCTION: LEGO1 0x100b54c0
|
||||
MxBool MxPresenter::IsEnabled()
|
||||
{
|
||||
return this->m_action && this->m_action->GetFlags() & MxDSAction::Flag_Enabled;
|
||||
return this->m_action && this->m_action->GetFlags() & MxDSAction::c_enabled;
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ void MxEventPresenter::ReadyTickle()
|
||||
CopyData(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ void MxEventPresenter::StartingTickle()
|
||||
MxStreamChunk* chunk = CurrentChunk();
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime())
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c2ef0
|
||||
@@ -90,8 +90,8 @@ MxResult MxEventPresenter::PutData()
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (IsEnabled()) {
|
||||
if (m_currentTickleState >= TickleState_Streaming &&
|
||||
(m_currentTickleState <= TickleState_Repeating || m_currentTickleState == TickleState_Done)) {
|
||||
if (m_currentTickleState >= e_streaming &&
|
||||
(m_currentTickleState <= e_repeating || m_currentTickleState == e_done)) {
|
||||
if (m_currentChunk && m_currentChunk->GetLength()) {
|
||||
if (m_data[12] == 2) {
|
||||
const char* data = (const char*) m_currentChunk->GetData();
|
||||
@@ -103,7 +103,7 @@ MxResult MxEventPresenter::PutData()
|
||||
variableTable->SetVariable(key, value);
|
||||
}
|
||||
|
||||
if (m_currentTickleState == TickleState_Streaming)
|
||||
if (m_currentTickleState == e_streaming)
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
}
|
||||
|
@@ -129,7 +129,7 @@ void MxDiskStreamController::FUN_100c7980()
|
||||
if (m_unk0x3c.size() && m_unk0x8c < m_provider->GetStreamBuffersNum()) {
|
||||
buffer = new MxDSBuffer();
|
||||
|
||||
if (buffer->AllocateBuffer(m_provider->GetFileSize(), MxDSBufferType_Chunk) != SUCCESS) {
|
||||
if (buffer->AllocateBuffer(m_provider->GetFileSize(), MxDSBuffer::e_chunk) != SUCCESS) {
|
||||
if (buffer)
|
||||
delete buffer;
|
||||
return;
|
||||
@@ -213,10 +213,10 @@ void MxDiskStreamController::FUN_100c7cb0(MxDSStreamingAction* p_action)
|
||||
void MxDiskStreamController::FUN_100c7ce0(MxDSBuffer* p_buffer)
|
||||
{
|
||||
switch (p_buffer->GetMode()) {
|
||||
case MxDSBufferType_Chunk:
|
||||
case MxDSBuffer::e_chunk:
|
||||
m_unk0x8c--;
|
||||
case MxDSBufferType_Allocate:
|
||||
case MxDSBufferType_Unknown:
|
||||
case MxDSBuffer::e_allocate:
|
||||
case MxDSBuffer::e_unknown:
|
||||
delete p_buffer;
|
||||
break;
|
||||
}
|
||||
|
@@ -174,7 +174,7 @@ MxResult MxDiskStreamProvider::FUN_100d1780(MxDSStreamingAction* p_action)
|
||||
if (!buffer)
|
||||
return FAILURE;
|
||||
|
||||
if (buffer->AllocateBuffer(GetFileSize(), MxDSBufferType_Allocate) != SUCCESS) {
|
||||
if (buffer->AllocateBuffer(GetFileSize(), MxDSBuffer::e_allocate) != SUCCESS) {
|
||||
delete buffer;
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -282,7 +282,7 @@ MxResult MxDiskStreamProvider::FUN_100d1b20(MxDSStreamingAction* p_action)
|
||||
MxU32 size = p_action->GetUnknowna0()->GetWriteOffset() - p_action->GetUnknown94() + p_action->GetBufferOffset() +
|
||||
(p_action->GetUnknowna4() ? p_action->GetUnknowna4()->GetWriteOffset() : 0);
|
||||
|
||||
if (buffer->AllocateBuffer(size, MxDSBufferType_Allocate) != SUCCESS) {
|
||||
if (buffer->AllocateBuffer(size, MxDSBuffer::e_allocate) != SUCCESS) {
|
||||
if (!buffer)
|
||||
return FAILURE;
|
||||
|
||||
@@ -330,12 +330,12 @@ MxResult MxDiskStreamProvider::FUN_100d1b20(MxDSStreamingAction* p_action)
|
||||
if (!buffer3)
|
||||
return FAILURE;
|
||||
|
||||
if (buffer3->AllocateBuffer(size, MxDSBufferType_Allocate) == SUCCESS) {
|
||||
if (buffer3->AllocateBuffer(size, MxDSBuffer::e_allocate) == SUCCESS) {
|
||||
memcpy(buffer3->GetBuffer(), p_action->GetUnknowna4()->GetBuffer(), size);
|
||||
p_action->GetUnknowna4()->SetMode(MxDSBufferType_Allocate);
|
||||
p_action->GetUnknowna4()->SetMode(MxDSBuffer::e_allocate);
|
||||
delete p_action->GetUnknowna4();
|
||||
|
||||
buffer3->SetMode(MxDSBufferType_Unknown);
|
||||
buffer3->SetMode(MxDSBuffer::e_unknown);
|
||||
p_action->SetUnknowna4(buffer3);
|
||||
MxDSBuffer* buffer4 = p_action->GetUnknowna0();
|
||||
MxU32 unk0x14 = buffer4->GetUnknown14();
|
||||
|
@@ -22,7 +22,7 @@ MxDSBuffer::MxDSBuffer()
|
||||
m_unk0x1c = 0;
|
||||
m_writeOffset = 0;
|
||||
m_bytesRemaining = 0;
|
||||
m_mode = MxDSBufferType_Preallocated;
|
||||
m_mode = e_preallocated;
|
||||
m_unk0x30 = 0;
|
||||
}
|
||||
|
||||
@@ -31,12 +31,12 @@ MxDSBuffer::~MxDSBuffer()
|
||||
{
|
||||
if (m_pBuffer != NULL) {
|
||||
switch (m_mode) {
|
||||
case MxDSBufferType_Allocate:
|
||||
case MxDSBufferType_Unknown:
|
||||
case e_allocate:
|
||||
case e_unknown:
|
||||
delete[] m_pBuffer;
|
||||
break;
|
||||
|
||||
case MxDSBufferType_Chunk: {
|
||||
case e_chunk: {
|
||||
MxU32 offset = m_writeOffset / 1024;
|
||||
MxStreamer* streamer = Streamer();
|
||||
|
||||
@@ -77,16 +77,16 @@ MxDSBuffer::~MxDSBuffer()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c6640
|
||||
MxResult MxDSBuffer::AllocateBuffer(MxU32 p_bufferSize, MxDSBufferType p_mode)
|
||||
MxResult MxDSBuffer::AllocateBuffer(MxU32 p_bufferSize, Type p_mode)
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
|
||||
switch (p_mode) {
|
||||
case MxDSBufferType_Allocate:
|
||||
case e_allocate:
|
||||
m_pBuffer = new MxU8[p_bufferSize];
|
||||
break;
|
||||
|
||||
case MxDSBufferType_Chunk: {
|
||||
case e_chunk: {
|
||||
MxStreamer* streamer = Streamer();
|
||||
|
||||
switch (p_bufferSize / 1024) {
|
||||
@@ -150,7 +150,7 @@ MxResult MxDSBuffer::SetBufferPointer(MxU8* p_buffer, MxU32 p_size)
|
||||
m_pIntoBuffer2 = p_buffer;
|
||||
m_bytesRemaining = p_size;
|
||||
m_writeOffset = p_size;
|
||||
m_mode = MxDSBufferType_Preallocated;
|
||||
m_mode = e_preallocated;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -291,24 +291,24 @@ MxResult MxDSBuffer::ParseChunk(
|
||||
{
|
||||
MxResult result = SUCCESS;
|
||||
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::Flag_Bit3 && m_unk0x30->GetUnknowna8() && p_header->GetTime() < 0) {
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::c_bit3 && m_unk0x30->GetUnknowna8() && p_header->GetTime() < 0) {
|
||||
delete p_header;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
p_header->SetTime(p_header->GetTime() + m_unk0x30->GetUnknowna8());
|
||||
|
||||
if (p_header->GetFlags() & MxDSChunk::Flag_Split) {
|
||||
if (p_header->GetFlags() & MxDSChunk::c_split) {
|
||||
MxU32 length = p_header->GetLength() + MxDSChunk::GetHeaderSize() + 8;
|
||||
MxDSBuffer* buffer = new MxDSBuffer();
|
||||
|
||||
if (buffer && buffer->AllocateBuffer(length, MxDSBufferType_Allocate) == SUCCESS &&
|
||||
if (buffer && buffer->AllocateBuffer(length, e_allocate) == SUCCESS &&
|
||||
buffer->CalcBytesRemaining((MxU8*) p_data) == SUCCESS) {
|
||||
*p_streamingAction = new MxDSStreamingAction((MxDSStreamingAction&) *p_action);
|
||||
|
||||
if (*p_streamingAction) {
|
||||
MxU16* flags = MxStreamChunk::IntoFlags(buffer->GetBuffer());
|
||||
*flags = p_header->GetFlags() & ~MxDSChunk::Flag_Split;
|
||||
*flags = p_header->GetFlags() & ~MxDSChunk::c_split;
|
||||
|
||||
delete p_header;
|
||||
(*p_streamingAction)->SetUnknowna0(buffer);
|
||||
@@ -323,9 +323,9 @@ MxResult MxDSBuffer::ParseChunk(
|
||||
return FAILURE;
|
||||
}
|
||||
else {
|
||||
if (p_header->GetFlags() & MxDSChunk::Flag_End) {
|
||||
if (p_header->GetFlags() & MxDSChunk::c_end) {
|
||||
if (m_unk0x30->HasId(p_header->GetObjectId())) {
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::Flag_Bit3 &&
|
||||
if (m_unk0x30->GetFlags() & MxDSAction::c_bit3 &&
|
||||
(m_unk0x30->GetLoopCount() > 1 || m_unk0x30->GetDuration() == -1)) {
|
||||
|
||||
if (p_action->GetObjectId() == p_header->GetObjectId()) {
|
||||
@@ -456,7 +456,7 @@ MxResult MxDSBuffer::CalcBytesRemaining(MxU8* p_data)
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
|
||||
if (m_mode == MxDSBufferType_Allocate && m_bytesRemaining != 0) {
|
||||
if (m_mode == e_allocate && m_bytesRemaining != 0) {
|
||||
MxU32 bytesRead;
|
||||
MxU8* ptr;
|
||||
|
||||
|
@@ -15,7 +15,7 @@ MxDSChunk::MxDSChunk()
|
||||
// FUNCTION: LEGO1 0x100be170
|
||||
MxDSChunk::~MxDSChunk()
|
||||
{
|
||||
if (m_flags & Flag_Bit1)
|
||||
if (m_flags & c_bit1)
|
||||
delete[] m_data;
|
||||
}
|
||||
|
||||
|
@@ -119,7 +119,7 @@ void MxDSSubscriber::DestroyChunk(MxStreamChunk* p_chunk)
|
||||
if (p_chunk)
|
||||
delete p_chunk;
|
||||
}
|
||||
else if (p_chunk->GetFlags() & MxDSChunk::Flag_Bit1 && p_chunk)
|
||||
else if (p_chunk->GetFlags() & MxDSChunk::c_bit1 && p_chunk)
|
||||
delete p_chunk;
|
||||
}
|
||||
}
|
||||
|
@@ -124,22 +124,22 @@ MxU32 ReadData(MxU8* p_buffer, MxU32 p_size)
|
||||
data += MxDSChunk::Size(*psize);
|
||||
|
||||
if ((*MxDSChunk::IntoType(data2) == FOURCC('M', 'x', 'C', 'h')) &&
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::Flag_Split)) {
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::c_split)) {
|
||||
if (*MxStreamChunk::IntoObjectId(data2) == *MxStreamChunk::IntoObjectId(data3) &&
|
||||
(*MxStreamChunk::IntoFlags(data3) & MxDSChunk::Flag_Split) &&
|
||||
(*MxStreamChunk::IntoFlags(data3) & MxDSChunk::c_split) &&
|
||||
*MxStreamChunk::IntoTime(data2) == *MxStreamChunk::IntoTime(data3)) {
|
||||
MxDSBuffer::Append(data2, data3);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::Flag_Split;
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::c_split;
|
||||
}
|
||||
|
||||
data2 += MxDSChunk::Size(*MxDSChunk::IntoLength(data2));
|
||||
memcpy(data2, data3, MxDSChunk::Size(*psize));
|
||||
|
||||
if (*MxStreamChunk::IntoObjectId(data2) == id &&
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::Flag_End))
|
||||
(*MxStreamChunk::IntoFlags(data2) & MxDSChunk::c_end))
|
||||
break;
|
||||
}
|
||||
else
|
||||
@@ -151,6 +151,6 @@ MxU32 ReadData(MxU8* p_buffer, MxU32 p_size)
|
||||
} while (data < end);
|
||||
}
|
||||
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::Flag_Split;
|
||||
*MxStreamChunk::IntoFlags(data2) &= ~MxDSChunk::c_split;
|
||||
return MxDSChunk::End(data2) - p_buffer;
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ MxResult MxStreamChunk::SendChunk(MxStreamListMxDSSubscriber& p_subscriberList,
|
||||
{
|
||||
for (MxStreamListMxDSSubscriber::iterator it = p_subscriberList.begin(); it != p_subscriberList.end(); it++) {
|
||||
if ((*it)->GetObjectId() == m_objectId && (*it)->GetUnknown48() == p_obj24val) {
|
||||
if (m_flags & MxDSChunk::Flag_End && m_buffer) {
|
||||
if (m_flags & MxDSChunk::c_end && m_buffer) {
|
||||
m_buffer->ReleaseRef(this);
|
||||
m_buffer = NULL;
|
||||
}
|
||||
|
@@ -82,7 +82,7 @@ MxResult MxStreamController::Open(const char* p_filename)
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
MakeSourceName(sourceName, p_filename);
|
||||
this->m_atom = MxAtomId(sourceName, LookupMode_LowerCase2);
|
||||
this->m_atom = MxAtomId(sourceName, e_lowerCase2);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ MxResult MxStreamController::FUN_100c1f00(MxDSAction* p_action)
|
||||
if (!chunk)
|
||||
return FAILURE;
|
||||
|
||||
chunk->SetFlags(MxDSChunk::Flag_Bit3);
|
||||
chunk->SetFlags(MxDSChunk::c_bit3);
|
||||
chunk->SetObjectId(objectId);
|
||||
|
||||
if (chunk->SendChunk(m_subscriberList, FALSE, p_action->GetUnknown24()) != SUCCESS)
|
||||
|
@@ -50,7 +50,7 @@ MxStreamController* MxStreamer::Open(const char* p_name, MxU16 p_lookupType)
|
||||
|
||||
if (!GetOpenStream(p_name)) {
|
||||
switch (p_lookupType) {
|
||||
case e_DiskStream:
|
||||
case e_diskStream:
|
||||
stream = new MxDiskStreamController();
|
||||
break;
|
||||
case e_RAMStream:
|
||||
@@ -84,11 +84,11 @@ MxLong MxStreamer::Close(const char* p_name)
|
||||
else {
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c);
|
||||
MxStreamerNotification notification(c_notificationStreamer, NULL, c);
|
||||
NotificationManager()->Send(this, ¬ification);
|
||||
}
|
||||
#else
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(MXSTREAMER_DELETE_NOTIFY, NULL, c));
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(c_notificationStreamer, NULL, c));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ MxBool MxStreamer::FUN_100b9b30(MxDSObject& p_dsObject)
|
||||
// FUNCTION: LEGO1 0x100b9b60
|
||||
MxLong MxStreamer::Notify(MxParam& p_param)
|
||||
{
|
||||
if (((MxNotificationParam&) p_param).GetNotification() == MXSTREAMER_DELETE_NOTIFY) {
|
||||
if (((MxNotificationParam&) p_param).GetNotification() == c_notificationStreamer) {
|
||||
MxDSAction ds;
|
||||
|
||||
ds.SetUnknown24(-2);
|
||||
@@ -196,11 +196,11 @@ MxLong MxStreamer::Notify(MxParam& p_param)
|
||||
else {
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxStreamerNotification notification(MXSTREAMER_DELETE_NOTIFY, NULL, c);
|
||||
MxStreamerNotification notification(c_notificationStreamer, NULL, c);
|
||||
NotificationManager()->Send(this, ¬ification);
|
||||
}
|
||||
#else
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(MXSTREAMER_DELETE_NOTIFY, NULL, c));
|
||||
NotificationManager()->Send(this, &MxStreamerNotification(c_notificationStreamer, NULL, c));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ void MxDisplaySurface::Init()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100ba640
|
||||
void MxDisplaySurface::FUN_100ba640()
|
||||
void MxDisplaySurface::ClearScreen()
|
||||
{
|
||||
MxS32 backBuffers;
|
||||
DDSURFACEDESC desc;
|
||||
|
@@ -12,8 +12,8 @@ DECOMP_SIZE_ASSERT(MxFlcPresenter, 0x68);
|
||||
MxFlcPresenter::MxFlcPresenter()
|
||||
{
|
||||
this->m_flicHeader = NULL;
|
||||
this->m_flags &= ~Flag_Bit2;
|
||||
this->m_flags &= ~Flag_Bit3;
|
||||
this->m_flags &= ~c_bit2;
|
||||
this->m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b3420
|
||||
|
@@ -20,8 +20,8 @@ MxLoopingFlcPresenter::~MxLoopingFlcPresenter()
|
||||
void MxLoopingFlcPresenter::Init()
|
||||
{
|
||||
this->m_unk0x68 = 0;
|
||||
this->m_flags &= ~Flag_Bit2;
|
||||
this->m_flags &= ~Flag_Bit3;
|
||||
this->m_flags &= ~c_bit2;
|
||||
this->m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b4430
|
||||
@@ -40,8 +40,8 @@ void MxLoopingFlcPresenter::NextFrame()
|
||||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End)
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
if (chunk->GetFlags() & MxDSChunk::c_end)
|
||||
ProgressTickleState(e_repeating);
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
LoopChunk(chunk);
|
||||
|
@@ -21,8 +21,8 @@ MxLoopingSmkPresenter::~MxLoopingSmkPresenter()
|
||||
void MxLoopingSmkPresenter::Init()
|
||||
{
|
||||
this->m_elapsedDuration = 0;
|
||||
this->m_flags &= ~Flag_Bit2;
|
||||
this->m_flags &= ~Flag_Bit3;
|
||||
this->m_flags &= ~c_bit2;
|
||||
this->m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b49d0
|
||||
@@ -51,8 +51,8 @@ void MxLoopingSmkPresenter::NextFrame()
|
||||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End)
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
if (chunk->GetFlags() & MxDSChunk::c_end)
|
||||
ProgressTickleState(e_repeating);
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
LoopChunk(chunk);
|
||||
@@ -66,7 +66,7 @@ void MxLoopingSmkPresenter::NextFrame()
|
||||
void MxLoopingSmkPresenter::VTable0x8c()
|
||||
{
|
||||
if (m_action->GetDuration() < m_elapsedDuration)
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
ProgressTickleState(e_unk5);
|
||||
else {
|
||||
MxStreamChunk* chunk;
|
||||
m_loopingChunkCursor->Current(chunk);
|
||||
@@ -108,7 +108,7 @@ void MxLoopingSmkPresenter::RepeatingTickle()
|
||||
|
||||
m_loopingChunkCursor->Next(chunk);
|
||||
|
||||
if (m_currentTickleState != TickleState_Repeating)
|
||||
if (m_currentTickleState != e_repeating)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -23,8 +23,8 @@ void MxSmkPresenter::Init()
|
||||
{
|
||||
m_currentFrame = 0;
|
||||
memset(&m_mxSmack, 0, sizeof(m_mxSmack));
|
||||
m_flags &= ~Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags &= ~c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b3900
|
||||
|
@@ -75,13 +75,13 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk)
|
||||
MxRect32 rect(x, y, width + x, height + y);
|
||||
MVideoManager()->InvalidateRect(rect);
|
||||
|
||||
if (m_flags & Flag_Bit2) {
|
||||
if (m_flags & c_bit2) {
|
||||
undefined4 und = 0;
|
||||
m_unk0x58 = MxOmni::GetInstance()->GetVideoManager()->GetDisplaySurface()->VTable0x44(
|
||||
m_bitmap,
|
||||
&und,
|
||||
(m_flags & Flag_Bit4) / 8,
|
||||
m_action->GetFlags() & MxDSAction::Flag_Bit4
|
||||
(m_flags & c_bit4) / 8,
|
||||
m_action->GetFlags() & MxDSAction::c_bit4
|
||||
);
|
||||
|
||||
delete m_alpha;
|
||||
@@ -91,9 +91,9 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk)
|
||||
m_bitmap = NULL;
|
||||
|
||||
if (m_unk0x58 && und)
|
||||
m_flags |= Flag_Bit3;
|
||||
m_flags |= c_bit3;
|
||||
else
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ void MxStillPresenter::StartingTickle()
|
||||
{
|
||||
MxVideoPresenter::StartingTickle();
|
||||
|
||||
if (m_currentTickleState == TickleState_Streaming && ((MxDSMediaAction*) m_action)->GetPaletteManagement())
|
||||
if (m_currentTickleState == e_streaming && ((MxDSMediaAction*) m_action)->GetPaletteManagement())
|
||||
RealizePalette();
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ void MxStillPresenter::StreamingTickle()
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
m_chunkTime = chunk->GetTime();
|
||||
NextFrame();
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
ProgressTickleState(e_repeating);
|
||||
|
||||
if (m_action->GetDuration() == -1 && m_compositePresenter)
|
||||
m_compositePresenter->VTable0x60(this);
|
||||
@@ -134,7 +134,7 @@ void MxStillPresenter::RepeatingTickle()
|
||||
{
|
||||
if (m_action->GetDuration() != -1) {
|
||||
if (m_action->GetElapsedTime() >= m_action->GetStartTime() + m_action->GetDuration())
|
||||
ProgressTickleState(TickleState_unk5);
|
||||
ProgressTickleState(e_unk5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,8 +185,8 @@ void MxStillPresenter::ParseExtra()
|
||||
{
|
||||
MxPresenter::ParseExtra();
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit5)
|
||||
m_flags |= Flag_Bit4;
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit5)
|
||||
m_flags |= c_bit4;
|
||||
|
||||
MxU32 len = m_action->GetExtraLength();
|
||||
|
||||
@@ -207,9 +207,9 @@ void MxStillPresenter::ParseExtra()
|
||||
}
|
||||
|
||||
if (KeyValueStringParse(output, g_strBmpIsmap, buf)) {
|
||||
m_flags |= Flag_Bit5;
|
||||
m_flags &= ~Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags |= c_bit5;
|
||||
m_flags &= ~c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -117,16 +117,16 @@ void MxVideoPresenter::Init()
|
||||
m_unk0x5c = 1;
|
||||
m_unk0x58 = NULL;
|
||||
m_unk0x60 = -1;
|
||||
m_flags &= ~Flag_Bit1;
|
||||
m_flags &= ~c_bit1;
|
||||
|
||||
if (MVideoManager() != NULL) {
|
||||
MVideoManager();
|
||||
m_flags |= Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags |= c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
m_flags &= ~Flag_Bit4;
|
||||
m_flags &= ~Flag_Bit5;
|
||||
m_flags &= ~c_bit4;
|
||||
m_flags &= ~c_bit5;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b27b0
|
||||
@@ -138,8 +138,8 @@ void MxVideoPresenter::Destroy(MxBool p_fromDestructor)
|
||||
if (m_unk0x58) {
|
||||
m_unk0x58->Release();
|
||||
m_unk0x58 = NULL;
|
||||
m_flags &= ~Flag_Bit2;
|
||||
m_flags &= ~Flag_Bit3;
|
||||
m_flags &= ~c_bit2;
|
||||
m_flags &= ~c_bit3;
|
||||
}
|
||||
|
||||
if (MVideoManager() && (m_alpha || m_bitmap)) {
|
||||
@@ -168,9 +168,9 @@ void MxVideoPresenter::NextFrame()
|
||||
{
|
||||
MxStreamChunk* chunk = NextChunk();
|
||||
|
||||
if (chunk->GetFlags() & MxDSChunk::Flag_End) {
|
||||
if (chunk->GetFlags() & MxDSChunk::c_end) {
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ProgressTickleState(TickleState_Repeating);
|
||||
ProgressTickleState(e_repeating);
|
||||
}
|
||||
else {
|
||||
LoadFrame(chunk);
|
||||
@@ -182,7 +182,7 @@ void MxVideoPresenter::NextFrame()
|
||||
MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y)
|
||||
{
|
||||
MxDSAction* action = GetAction();
|
||||
if ((action == NULL) || (((action->GetFlags() & MxDSAction::Flag_Bit11) == 0) && !IsEnabled()) ||
|
||||
if ((action == NULL) || (((action->GetFlags() & MxDSAction::c_bit11) == 0) && !IsEnabled()) ||
|
||||
(!m_bitmap && !m_alpha))
|
||||
return FALSE;
|
||||
|
||||
@@ -234,7 +234,7 @@ MxBool MxVideoPresenter::IsHit(MxS32 p_x, MxS32 p_y)
|
||||
if (m_flags & 0x10)
|
||||
return (MxBool) *pixel;
|
||||
|
||||
if ((GetAction()->GetFlags() & MxDSAction::Flag_Bit4) && *pixel == 0)
|
||||
if ((GetAction()->GetFlags() & MxDSAction::c_bit4) && *pixel == 0)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
@@ -284,7 +284,7 @@ void MxVideoPresenter::PutFrame()
|
||||
LPDIRECTDRAWSURFACE ddSurface = displaySurface->GetDirectDrawSurface2();
|
||||
|
||||
MxRect32 rectSrc, rectDest;
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit5) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit5) {
|
||||
if (m_unk0x58) {
|
||||
// TODO: Match
|
||||
rectSrc.SetPoint(MxPoint32(0, 0));
|
||||
@@ -340,7 +340,7 @@ void MxVideoPresenter::PutFrame()
|
||||
rectDest.SetBottom(rectDest.GetTop() + regionRect->GetHeight());
|
||||
}
|
||||
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit4) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit4) {
|
||||
if (m_unk0x58) {
|
||||
if (PrepareRects(rectDest, rectSrc) >= 0)
|
||||
ddSurface->Blt((LPRECT) &rectDest, m_unk0x58, (LPRECT) &rectSrc, DDBLT_KEYSRC, NULL);
|
||||
@@ -387,7 +387,7 @@ void MxVideoPresenter::ReadyTickle()
|
||||
LoadHeader(chunk);
|
||||
m_subscriber->DestroyChunk(chunk);
|
||||
ParseExtra();
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
ProgressTickleState(e_starting);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,14 +398,14 @@ void MxVideoPresenter::StartingTickle()
|
||||
|
||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
||||
CreateBitmap();
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ProgressTickleState(e_streaming);
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b2fe0
|
||||
void MxVideoPresenter::StreamingTickle()
|
||||
{
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit10) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit10) {
|
||||
if (!m_currentChunk)
|
||||
MxMediaPresenter::StreamingTickle();
|
||||
|
||||
@@ -429,13 +429,13 @@ void MxVideoPresenter::StreamingTickle()
|
||||
LoadFrame(m_currentChunk);
|
||||
m_subscriber->DestroyChunk(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
m_flags |= Flag_Bit1;
|
||||
m_flags |= c_bit1;
|
||||
|
||||
if (m_currentTickleState != TickleState_Streaming)
|
||||
if (m_currentTickleState != e_streaming)
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_flags & Flag_Bit1)
|
||||
if (m_flags & c_bit1)
|
||||
m_unk0x5c = 5;
|
||||
}
|
||||
}
|
||||
@@ -444,7 +444,7 @@ void MxVideoPresenter::StreamingTickle()
|
||||
void MxVideoPresenter::RepeatingTickle()
|
||||
{
|
||||
if (IsEnabled()) {
|
||||
if (m_action->GetFlags() & MxDSAction::Flag_Bit10) {
|
||||
if (m_action->GetFlags() & MxDSAction::c_bit10) {
|
||||
if (!m_currentChunk)
|
||||
MxMediaPresenter::RepeatingTickle();
|
||||
|
||||
@@ -467,13 +467,13 @@ void MxVideoPresenter::RepeatingTickle()
|
||||
|
||||
LoadFrame(m_currentChunk);
|
||||
m_currentChunk = NULL;
|
||||
m_flags |= Flag_Bit1;
|
||||
m_flags |= c_bit1;
|
||||
|
||||
if (m_currentTickleState != TickleState_Repeating)
|
||||
if (m_currentTickleState != e_repeating)
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_flags & Flag_Bit1)
|
||||
if (m_flags & c_bit1)
|
||||
m_unk0x5c = 5;
|
||||
}
|
||||
}
|
||||
@@ -490,10 +490,10 @@ void MxVideoPresenter::Unk5Tickle()
|
||||
m_unk0x60 = m_action->GetElapsedTime();
|
||||
|
||||
if (m_action->GetElapsedTime() >= m_unk0x60 + ((MxDSMediaAction*) m_action)->GetSustainTime())
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
else
|
||||
ProgressTickleState(TickleState_Done);
|
||||
ProgressTickleState(e_done);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -535,7 +535,7 @@ MxResult MxVideoPresenter::PutData()
|
||||
{
|
||||
MxAutoLocker lock(&m_criticalSection);
|
||||
|
||||
if (IsEnabled() && m_currentTickleState >= TickleState_Streaming && m_currentTickleState <= TickleState_unk5)
|
||||
if (IsEnabled() && m_currentTickleState >= e_streaming && m_currentTickleState <= e_unk5)
|
||||
PutFrame();
|
||||
|
||||
return SUCCESS;
|
||||
|
Reference in New Issue
Block a user