mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-19 13:51:16 +00:00
Merge remote-tracking branch 'isle/master' into mergeisle6
This commit is contained in:
commit
7670f89f03
@ -48,17 +48,17 @@ class MxDSAction : public MxDSObject {
|
|||||||
return !strcmp(p_name, MxDSAction::ClassName()) || MxDSObject::IsA(p_name);
|
return !strcmp(p_name, MxDSAction::ClassName()) || MxDSObject::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
undefined4 VTable0x14() override; // vtable+14;
|
undefined4 VTable0x14() override; // vtable+0x14
|
||||||
MxU32 GetSizeOnDisk() override; // vtable+18;
|
MxU32 GetSizeOnDisk() override; // vtable+0x18
|
||||||
void Deserialize(MxU8*& p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
void Deserialize(MxU8*& p_source, MxS16 p_unk0x24) override; // vtable+0x1c
|
||||||
virtual MxLong GetDuration(); // vtable+24;
|
virtual MxLong GetDuration(); // vtable+0x24
|
||||||
virtual void SetDuration(MxLong p_duration); // vtable+28;
|
virtual void SetDuration(MxLong p_duration); // vtable+0x28
|
||||||
virtual MxDSAction* Clone(); // vtable+2c;
|
virtual MxDSAction* Clone(); // vtable+0x2c
|
||||||
virtual void MergeFrom(MxDSAction& p_dsAction); // vtable+30;
|
virtual void MergeFrom(MxDSAction& p_dsAction); // vtable+0x30
|
||||||
virtual MxBool HasId(MxU32 p_objectId); // vtable+34;
|
virtual MxBool HasId(MxU32 p_objectId); // vtable+0x34
|
||||||
virtual void SetUnknown90(MxLong p_unk0x90); // vtable+38;
|
virtual void SetUnknown90(MxLong p_unk0x90); // vtable+0x38
|
||||||
virtual MxLong GetUnknown90(); // vtable+3c;
|
virtual MxLong GetUnknown90(); // vtable+0x3c
|
||||||
virtual MxLong GetElapsedTime(); // vtable+40;
|
virtual MxLong GetElapsedTime(); // vtable+0x40
|
||||||
|
|
||||||
void AppendExtra(MxU16 p_extraLength, const char* p_extraData);
|
void AppendExtra(MxU16 p_extraLength, const char* p_extraData);
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,7 @@ class MxDSActionList : public MxList<MxDSAction*> {
|
|||||||
} // vtable+0x14
|
} // vtable+0x14
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9cb0
|
// FUNCTION: LEGO1 0x100c9cb0
|
||||||
|
// FUNCTION: BETA10 0x1015add0
|
||||||
static void Destroy(MxDSAction* p_action) { delete p_action; }
|
static void Destroy(MxDSAction* p_action) { delete p_action; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100c9dc0
|
// SYNTHETIC: LEGO1 0x100c9dc0
|
||||||
@ -139,4 +140,7 @@ class MxDSActionListCursor : public MxListCursor<MxDSAction*> {
|
|||||||
// TEMPLATE: BETA10 0x1015bd90
|
// TEMPLATE: BETA10 0x1015bd90
|
||||||
// MxList<MxDSAction *>::DeleteAll
|
// MxList<MxDSAction *>::DeleteAll
|
||||||
|
|
||||||
|
// TEMPLATE: BETA10 0x1015be20
|
||||||
|
// MxListCursor<MxDSAction *>::HasMatch
|
||||||
|
|
||||||
#endif // MXDSACTIONLIST_H
|
#endif // MXDSACTIONLIST_H
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
class MxDSAnim : public MxDSMediaAction {
|
class MxDSAnim : public MxDSMediaAction {
|
||||||
public:
|
public:
|
||||||
MxDSAnim();
|
MxDSAnim();
|
||||||
|
MxDSAnim(MxDSAnim& p_dsAnim);
|
||||||
~MxDSAnim() override;
|
~MxDSAnim() override;
|
||||||
|
|
||||||
void CopyFrom(MxDSAnim& p_dsAnim);
|
void CopyFrom(MxDSAnim& p_dsAnim);
|
||||||
@ -23,14 +24,16 @@ class MxDSAnim : public MxDSMediaAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9070
|
// FUNCTION: LEGO1 0x100c9070
|
||||||
|
// FUNCTION: BETA10 0x1015d8b0
|
||||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, MxDSAnim::ClassName()) || MxDSMediaAction::IsA(p_name);
|
return !strcmp(p_name, MxDSAnim::ClassName()) || MxDSMediaAction::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
MxDSAction* Clone() override; // vtable+2c;
|
MxDSAction* Clone() override; // vtable+0x2c
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100c9180
|
// SYNTHETIC: LEGO1 0x100c9180
|
||||||
|
// SYNTHETIC: BETA10 0x1015d910
|
||||||
// MxDSAnim::`scalar deleting destructor'
|
// MxDSAnim::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
class MxDSEvent : public MxDSMediaAction {
|
class MxDSEvent : public MxDSMediaAction {
|
||||||
public:
|
public:
|
||||||
MxDSEvent();
|
MxDSEvent();
|
||||||
|
MxDSEvent(MxDSEvent& p_dsEvent);
|
||||||
~MxDSEvent() override;
|
~MxDSEvent() override;
|
||||||
|
|
||||||
void CopyFrom(MxDSEvent& p_dsEvent);
|
void CopyFrom(MxDSEvent& p_dsEvent);
|
||||||
@ -22,14 +23,16 @@ class MxDSEvent : public MxDSMediaAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9670
|
// FUNCTION: LEGO1 0x100c9670
|
||||||
|
// FUNCTION: BETA10 0x1015da30
|
||||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, MxDSEvent::ClassName()) || MxDSMediaAction::IsA(p_name);
|
return !strcmp(p_name, MxDSEvent::ClassName()) || MxDSMediaAction::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
MxDSAction* Clone() override; // vtable+2c;
|
MxDSAction* Clone() override; // vtable+0x2c
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100c9780
|
// SYNTHETIC: LEGO1 0x100c9780
|
||||||
|
// SYNTHETIC: BETA10 0x1015da90
|
||||||
// MxDSEvent::`scalar deleting destructor'
|
// MxDSEvent::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -10,10 +10,10 @@
|
|||||||
class MxDSMediaAction : public MxDSAction {
|
class MxDSMediaAction : public MxDSAction {
|
||||||
public:
|
public:
|
||||||
MxDSMediaAction();
|
MxDSMediaAction();
|
||||||
|
MxDSMediaAction(MxDSMediaAction& p_dsMediaAction);
|
||||||
~MxDSMediaAction() override;
|
~MxDSMediaAction() override;
|
||||||
|
|
||||||
void CopyFrom(MxDSMediaAction& p_dsMediaAction);
|
void CopyFrom(MxDSMediaAction& p_dsMediaAction);
|
||||||
MxDSMediaAction(MxDSMediaAction& p_dsMediaAction);
|
|
||||||
MxDSMediaAction& operator=(MxDSMediaAction& p_dsMediaAction);
|
MxDSMediaAction& operator=(MxDSMediaAction& p_dsMediaAction);
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c8be0
|
// FUNCTION: LEGO1 0x100c8be0
|
||||||
@ -35,10 +35,10 @@ class MxDSMediaAction : public MxDSAction {
|
|||||||
// SYNTHETIC: BETA10 0x1015d810
|
// SYNTHETIC: BETA10 0x1015d810
|
||||||
// MxDSMediaAction::`scalar deleting destructor'
|
// MxDSMediaAction::`scalar deleting destructor'
|
||||||
|
|
||||||
undefined4 VTable0x14() override; // vtable+14;
|
undefined4 VTable0x14() override; // vtable+0x14
|
||||||
MxU32 GetSizeOnDisk() override; // vtable+18;
|
MxU32 GetSizeOnDisk() override; // vtable+0x18
|
||||||
void Deserialize(MxU8*& p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
void Deserialize(MxU8*& p_source, MxS16 p_unk0x24) override; // vtable+0x1c
|
||||||
MxDSAction* Clone() override; // vtable+2c;
|
MxDSAction* Clone() override; // vtable+0x2c
|
||||||
|
|
||||||
void CopyMediaSrcPath(const char* p_mediaSrcPath);
|
void CopyMediaSrcPath(const char* p_mediaSrcPath);
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
class MxDSMultiAction : public MxDSAction {
|
class MxDSMultiAction : public MxDSAction {
|
||||||
public:
|
public:
|
||||||
MxDSMultiAction();
|
MxDSMultiAction();
|
||||||
|
MxDSMultiAction(MxDSMultiAction& p_dsMultiAction);
|
||||||
~MxDSMultiAction() override;
|
~MxDSMultiAction() override;
|
||||||
|
|
||||||
void CopyFrom(MxDSMultiAction& p_dsMultiAction);
|
void CopyFrom(MxDSMultiAction& p_dsMultiAction);
|
||||||
@ -24,29 +25,31 @@ class MxDSMultiAction : public MxDSAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9f60
|
// FUNCTION: LEGO1 0x100c9f60
|
||||||
|
// FUNCTION: BETA10 0x1015b1b0
|
||||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, MxDSMultiAction::ClassName()) || MxDSAction::IsA(p_name);
|
return !strcmp(p_name, MxDSMultiAction::ClassName()) || MxDSAction::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
undefined4 VTable0x14() override; // vtable+14;
|
undefined4 VTable0x14() override; // vtable+0x14
|
||||||
MxU32 GetSizeOnDisk() override; // vtable+18;
|
MxU32 GetSizeOnDisk() override; // vtable+0x18
|
||||||
void Deserialize(MxU8*& p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
void Deserialize(MxU8*& p_source, MxS16 p_unk0x24) override; // vtable+0x1c
|
||||||
void SetAtomId(MxAtomId p_atomId) override; // vtable+20;
|
void SetAtomId(MxAtomId p_atomId) override; // vtable+0x20
|
||||||
MxDSAction* Clone() override; // vtable+2c;
|
MxDSAction* Clone() override; // vtable+0x2c
|
||||||
void MergeFrom(MxDSAction& p_dsAction) override; // vtable+30;
|
void MergeFrom(MxDSAction& p_dsAction) override; // vtable+0x30
|
||||||
MxBool HasId(MxU32 p_objectId) override; // vtable+34;
|
MxBool HasId(MxU32 p_objectId) override; // vtable+0x34
|
||||||
void SetUnknown90(MxLong p_unk0x90) override; // vtable+38;
|
void SetUnknown90(MxLong p_unk0x90) override; // vtable+0x38
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x1004e180
|
// FUNCTION: BETA10 0x1004e180
|
||||||
MxDSActionList* GetActionList() const { return m_actions; }
|
MxDSActionList* GetActionList() const { return m_actionList; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100ca040
|
// SYNTHETIC: LEGO1 0x100ca040
|
||||||
|
// SYNTHETIC: BETA10 0x1015b210
|
||||||
// MxDSMultiAction::`scalar deleting destructor'
|
// MxDSMultiAction::`scalar deleting destructor'
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MxU32 m_sizeOnDisk; // 0x94
|
MxU32 m_sizeOnDisk; // 0x94
|
||||||
MxDSActionList* m_actions; // 0x98
|
MxDSActionList* m_actionList; // 0x98
|
||||||
};
|
};
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1004ad10
|
// SYNTHETIC: LEGO1 0x1004ad10
|
||||||
|
|||||||
@ -55,23 +55,23 @@ class MxDSObject : public MxCore {
|
|||||||
|
|
||||||
// FUNCTION: LEGO1 0x100bf730
|
// FUNCTION: LEGO1 0x100bf730
|
||||||
// FUNCTION: BETA10 0x1012bdd0
|
// FUNCTION: BETA10 0x1012bdd0
|
||||||
const char* ClassName() const override { return "MxDSObject"; } // vtable+0c
|
const char* ClassName() const override { return "MxDSObject"; } // vtable+0x0c
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100bf740
|
// FUNCTION: LEGO1 0x100bf740
|
||||||
// FUNCTION: BETA10 0x1012bd70
|
// FUNCTION: BETA10 0x1012bd70
|
||||||
MxBool IsA(const char* p_name) const override
|
MxBool IsA(const char* p_name) const override
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, MxDSObject::ClassName()) || MxCore::IsA(p_name);
|
return !strcmp(p_name, MxDSObject::ClassName()) || MxCore::IsA(p_name);
|
||||||
} // vtable+10;
|
} // vtable+0x10
|
||||||
|
|
||||||
virtual undefined4 VTable0x14(); // vtable+14;
|
virtual undefined4 VTable0x14(); // vtable+0x14
|
||||||
virtual MxU32 GetSizeOnDisk(); // vtable+18;
|
virtual MxU32 GetSizeOnDisk(); // vtable+0x18
|
||||||
virtual void Deserialize(MxU8*& p_source, MxS16 p_unk0x24); // vtable+1c;
|
virtual void Deserialize(MxU8*& p_source, MxS16 p_unk0x24); // vtable+0x1c
|
||||||
|
|
||||||
// FUNCTION: ISLE 0x401c40
|
// FUNCTION: ISLE 0x401c40
|
||||||
// FUNCTION: LEGO1 0x10005530
|
// FUNCTION: LEGO1 0x10005530
|
||||||
// FUNCTION: BETA10 0x100152e0
|
// FUNCTION: BETA10 0x100152e0
|
||||||
virtual void SetAtomId(MxAtomId p_atomId) { m_atomId = p_atomId; } // vtable+20;
|
virtual void SetAtomId(MxAtomId p_atomId) { m_atomId = p_atomId; } // vtable+0x20
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x1012ef90
|
// FUNCTION: BETA10 0x1012ef90
|
||||||
Type GetType() const { return (Type) m_type; }
|
Type GetType() const { return (Type) m_type; }
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
class MxDSObjectAction : public MxDSMediaAction {
|
class MxDSObjectAction : public MxDSMediaAction {
|
||||||
public:
|
public:
|
||||||
MxDSObjectAction();
|
MxDSObjectAction();
|
||||||
|
MxDSObjectAction(MxDSObjectAction& p_dsObjectAction);
|
||||||
~MxDSObjectAction() override;
|
~MxDSObjectAction() override;
|
||||||
|
|
||||||
MxDSObjectAction& operator=(MxDSObjectAction& p_dsObjectAction);
|
MxDSObjectAction& operator=(MxDSObjectAction& p_dsObjectAction);
|
||||||
@ -22,15 +23,17 @@ class MxDSObjectAction : public MxDSMediaAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c88f0
|
// FUNCTION: LEGO1 0x100c88f0
|
||||||
|
// FUNCTION: BETA10 0x1015c640
|
||||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, MxDSObjectAction::ClassName()) || MxDSMediaAction::IsA(p_name);
|
return !strcmp(p_name, MxDSObjectAction::ClassName()) || MxDSMediaAction::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
MxDSAction* Clone() override; // vtable+2c;
|
MxDSAction* Clone() override; // vtable+0x2c
|
||||||
virtual void CopyFrom(MxDSObjectAction& p_dsObjectAction); // vtable+44;
|
virtual void CopyFrom(MxDSObjectAction& p_dsObjectAction); // vtable+0x44
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100c8a00
|
// SYNTHETIC: LEGO1 0x100c8a00
|
||||||
|
// SYNTHETIC: BETA10 0x1015c720
|
||||||
// MxDSObjectAction::`scalar deleting destructor'
|
// MxDSObjectAction::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
class MxDSParallelAction : public MxDSMultiAction {
|
class MxDSParallelAction : public MxDSMultiAction {
|
||||||
public:
|
public:
|
||||||
MxDSParallelAction();
|
MxDSParallelAction();
|
||||||
|
MxDSParallelAction(MxDSParallelAction& p_dsParallelAction);
|
||||||
~MxDSParallelAction() override;
|
~MxDSParallelAction() override;
|
||||||
|
|
||||||
void CopyFrom(MxDSParallelAction& p_dsParallelAction);
|
void CopyFrom(MxDSParallelAction& p_dsParallelAction);
|
||||||
@ -23,20 +24,23 @@ class MxDSParallelAction : public MxDSMultiAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100caf10
|
// FUNCTION: LEGO1 0x100caf10
|
||||||
|
// FUNCTION: BETA10 0x1015b3c0
|
||||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, MxDSParallelAction::ClassName()) || MxDSMultiAction::IsA(p_name);
|
return !strcmp(p_name, MxDSParallelAction::ClassName()) || MxDSMultiAction::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100cb020
|
MxLong GetDuration() override; // vtable+0x24
|
||||||
// MxDSParallelAction::`scalar deleting destructor'
|
|
||||||
|
|
||||||
MxLong GetDuration() override; // vtable+24;
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100caef0
|
// FUNCTION: LEGO1 0x100caef0
|
||||||
|
// FUNCTION: BETA10 0x1015b370
|
||||||
void SetDuration(MxLong p_duration) override { m_duration = p_duration; } // vtable+0x28
|
void SetDuration(MxLong p_duration) override { m_duration = p_duration; } // vtable+0x28
|
||||||
|
|
||||||
MxDSAction* Clone() override; // vtable+2c;
|
MxDSAction* Clone() override; // vtable+0x2c
|
||||||
|
|
||||||
|
// SYNTHETIC: LEGO1 0x100cb020
|
||||||
|
// SYNTHETIC: BETA10 0x1015b420
|
||||||
|
// MxDSParallelAction::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXDSPARALLELACTION_H
|
#endif // MXDSPARALLELACTION_H
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
class MxDSSelectAction : public MxDSParallelAction {
|
class MxDSSelectAction : public MxDSParallelAction {
|
||||||
public:
|
public:
|
||||||
MxDSSelectAction();
|
MxDSSelectAction();
|
||||||
|
MxDSSelectAction(MxDSSelectAction& p_dsSelectAction);
|
||||||
~MxDSSelectAction() override;
|
~MxDSSelectAction() override;
|
||||||
|
|
||||||
void CopyFrom(MxDSSelectAction& p_dsSelectAction);
|
void CopyFrom(MxDSSelectAction& p_dsSelectAction);
|
||||||
@ -25,16 +26,18 @@ class MxDSSelectAction : public MxDSParallelAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cb700
|
// FUNCTION: LEGO1 0x100cb700
|
||||||
|
// FUNCTION: BETA10 0x1015b480
|
||||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, MxDSSelectAction::ClassName()) || MxDSParallelAction::IsA(p_name);
|
return !strcmp(p_name, MxDSSelectAction::ClassName()) || MxDSParallelAction::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
MxU32 GetSizeOnDisk() override; // vtable+18;
|
MxU32 GetSizeOnDisk() override; // vtable+0x18
|
||||||
void Deserialize(MxU8*& p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
void Deserialize(MxU8*& p_source, MxS16 p_unk0x24) override; // vtable+0x1c
|
||||||
MxDSAction* Clone() override; // vtable+2c;
|
MxDSAction* Clone() override; // vtable+0x2c
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100cb840
|
// SYNTHETIC: LEGO1 0x100cb840
|
||||||
|
// SYNTHETIC: BETA10 0x1015b4e0
|
||||||
// MxDSSelectAction::`scalar deleting destructor'
|
// MxDSSelectAction::`scalar deleting destructor'
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
class MxDSSerialAction : public MxDSMultiAction {
|
class MxDSSerialAction : public MxDSMultiAction {
|
||||||
public:
|
public:
|
||||||
MxDSSerialAction();
|
MxDSSerialAction();
|
||||||
|
MxDSSerialAction(MxDSSerialAction& p_dsSerialAction);
|
||||||
~MxDSSerialAction() override;
|
~MxDSSerialAction() override;
|
||||||
|
|
||||||
void CopyFrom(MxDSSerialAction& p_dsSerialAction);
|
void CopyFrom(MxDSSerialAction& p_dsSerialAction);
|
||||||
@ -24,22 +25,24 @@ class MxDSSerialAction : public MxDSMultiAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100caae0
|
// FUNCTION: LEGO1 0x100caae0
|
||||||
|
// FUNCTION: BETA10 0x1015b2d0
|
||||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, MxDSSerialAction::ClassName()) || MxDSMultiAction::IsA(p_name);
|
return !strcmp(p_name, MxDSSerialAction::ClassName()) || MxDSMultiAction::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
MxLong GetDuration() override; // vtable+24;
|
MxLong GetDuration() override; // vtable+0x24
|
||||||
void SetDuration(MxLong p_duration) override; // vtable+28;
|
void SetDuration(MxLong p_duration) override; // vtable+0x28
|
||||||
MxDSAction* Clone() override; // vtable+2c;
|
MxDSAction* Clone() override; // vtable+0x2c
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100cabf0
|
// SYNTHETIC: LEGO1 0x100cabf0
|
||||||
|
// SYNTHETIC: BETA10 0x1015b330
|
||||||
// MxDSSerialAction::`scalar deleting destructor'
|
// MxDSSerialAction::`scalar deleting destructor'
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxDSActionListCursor* m_cursor;
|
MxDSActionListCursor* m_cursor; // 0x9c
|
||||||
undefined4 m_unk0xa0;
|
undefined4 m_unk0xa0; // 0xa0
|
||||||
undefined4 m_unk0xa4;
|
undefined4 m_unk0xa4; // 0xa4
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXDSSERIALACTION_H
|
#endif // MXDSSERIALACTION_H
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
class MxDSSound : public MxDSMediaAction {
|
class MxDSSound : public MxDSMediaAction {
|
||||||
public:
|
public:
|
||||||
MxDSSound();
|
MxDSSound();
|
||||||
|
MxDSSound(MxDSSound& p_dsSound);
|
||||||
~MxDSSound() override;
|
~MxDSSound() override;
|
||||||
|
|
||||||
void CopyFrom(MxDSSound& p_dsSound);
|
void CopyFrom(MxDSSound& p_dsSound);
|
||||||
@ -23,19 +24,21 @@ class MxDSSound : public MxDSMediaAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9340
|
// FUNCTION: LEGO1 0x100c9340
|
||||||
|
// FUNCTION: BETA10 0x1015d970
|
||||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, MxDSSound::ClassName()) || MxDSMediaAction::IsA(p_name);
|
return !strcmp(p_name, MxDSSound::ClassName()) || MxDSMediaAction::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
MxU32 GetSizeOnDisk() override; // vtable+18;
|
MxU32 GetSizeOnDisk() override; // vtable+0x18
|
||||||
void Deserialize(MxU8*& p_source, MxS16 p_unk0x24) override; // vtable+1c;
|
void Deserialize(MxU8*& p_source, MxS16 p_unk0x24) override; // vtable+0x1c
|
||||||
MxDSAction* Clone() override; // vtable+2c;
|
MxDSAction* Clone() override; // vtable+0x2c
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x1008d060
|
// FUNCTION: BETA10 0x1008d060
|
||||||
MxS32 GetVolume() const { return m_volume; }
|
MxS32 GetVolume() const { return m_volume; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100c9450
|
// SYNTHETIC: LEGO1 0x100c9450
|
||||||
|
// SYNTHETIC: BETA10 0x1015d9d0
|
||||||
// MxDSSound::`scalar deleting destructor'
|
// MxDSSound::`scalar deleting destructor'
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
class MxDSStill : public MxDSMediaAction {
|
class MxDSStill : public MxDSMediaAction {
|
||||||
public:
|
public:
|
||||||
MxDSStill();
|
MxDSStill();
|
||||||
|
MxDSStill(MxDSStill& p_dsStill);
|
||||||
~MxDSStill() override;
|
~MxDSStill() override;
|
||||||
|
|
||||||
void CopyFrom(MxDSStill& p_dsStill);
|
void CopyFrom(MxDSStill& p_dsStill);
|
||||||
@ -23,14 +24,16 @@ class MxDSStill : public MxDSMediaAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9940
|
// FUNCTION: LEGO1 0x100c9940
|
||||||
|
// FUNCTION: BETA10 0x1015daf0
|
||||||
MxBool IsA(const char* p_name) const override // vtable+0x10
|
MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, MxDSStill::ClassName()) || MxDSMediaAction::IsA(p_name);
|
return !strcmp(p_name, MxDSStill::ClassName()) || MxDSMediaAction::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
MxDSAction* Clone() override; // vtable+2c;
|
MxDSAction* Clone() override; // vtable+0x2c
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100c9a50
|
// SYNTHETIC: LEGO1 0x100c9a50
|
||||||
|
// SYNTHETIC: BETA10 0x1015db50
|
||||||
// MxDSStill::`scalar deleting destructor'
|
// MxDSStill::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class MxDSStreamingAction : public MxDSAction {
|
|||||||
|
|
||||||
MxDSStreamingAction* CopyFrom(MxDSStreamingAction& p_dsStreamingAction);
|
MxDSStreamingAction* CopyFrom(MxDSStreamingAction& p_dsStreamingAction);
|
||||||
|
|
||||||
MxBool HasId(MxU32 p_objectId) override; // vtable+0x34;
|
MxBool HasId(MxU32 p_objectId) override; // vtable+0x34
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
void SetInternalAction(MxDSAction* p_dsAction);
|
void SetInternalAction(MxDSAction* p_dsAction);
|
||||||
|
|||||||
@ -48,10 +48,13 @@ class MxVideoPresenter : public MxMediaPresenter {
|
|||||||
virtual MxBool VTable0x7c() { return m_frameBitmap != NULL || m_alpha != NULL; } // vtable+0x7c
|
virtual MxBool VTable0x7c() { return m_frameBitmap != NULL || m_alpha != NULL; } // vtable+0x7c
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1000c7e0
|
// FUNCTION: LEGO1 0x1000c7e0
|
||||||
virtual MxS32 GetWidth() { return m_alpha ? m_alpha->m_width : m_frameBitmap->GetBmiWidth(); } // vtable+0x80
|
virtual MxS32 GetWidth() { return m_alpha ? m_alpha->GetWidth() : m_frameBitmap->GetBmiWidth(); } // vtable+0x80
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1000c800
|
// FUNCTION: LEGO1 0x1000c800
|
||||||
virtual MxS32 GetHeight() { return m_alpha ? m_alpha->m_height : m_frameBitmap->GetBmiHeightAbs(); } // vtable+0x84
|
virtual MxS32 GetHeight()
|
||||||
|
{
|
||||||
|
return m_alpha ? m_alpha->GetHeight() : m_frameBitmap->GetBmiHeightAbs();
|
||||||
|
} // vtable+0x84
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x100551b0
|
// FUNCTION: BETA10 0x100551b0
|
||||||
static const char* HandlerClassName()
|
static const char* HandlerClassName()
|
||||||
@ -85,19 +88,24 @@ class MxVideoPresenter : public MxMediaPresenter {
|
|||||||
|
|
||||||
// VTABLE: LEGO1 0x100dc2bc
|
// VTABLE: LEGO1 0x100dc2bc
|
||||||
// SIZE 0x0c
|
// SIZE 0x0c
|
||||||
struct AlphaMask {
|
class AlphaMask {
|
||||||
MxU8* m_bitmask;
|
public:
|
||||||
MxU16 m_width;
|
|
||||||
MxU16 m_height;
|
|
||||||
|
|
||||||
AlphaMask(const MxBitmap&);
|
AlphaMask(const MxBitmap&);
|
||||||
AlphaMask(const AlphaMask&);
|
AlphaMask(const AlphaMask&);
|
||||||
virtual ~AlphaMask();
|
virtual ~AlphaMask();
|
||||||
|
|
||||||
MxS32 IsHit(MxU32 p_x, MxU32 p_y);
|
MxS32 IsHit(MxU32 p_x, MxU32 p_y);
|
||||||
|
|
||||||
|
MxS32 GetWidth() const { return m_width; }
|
||||||
|
MxS32 GetHeight() const { return m_height; }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100b2650
|
// SYNTHETIC: LEGO1 0x100b2650
|
||||||
// MxVideoPresenter::AlphaMask::`scalar deleting destructor'
|
// MxVideoPresenter::AlphaMask::`scalar deleting destructor'
|
||||||
|
|
||||||
|
private:
|
||||||
|
MxU8* m_bitmask; // 0x00
|
||||||
|
MxU16 m_width; // 0x04
|
||||||
|
MxU16 m_height; // 0x08
|
||||||
};
|
};
|
||||||
|
|
||||||
inline MxS32 PrepareRects(RECT& p_rectDest, RECT& p_rectSrc);
|
inline MxS32 PrepareRects(RECT& p_rectDest, RECT& p_rectSrc);
|
||||||
|
|||||||
@ -6,20 +6,29 @@ DECOMP_SIZE_ASSERT(MxDSAnim, 0xb8)
|
|||||||
// FUNCTION: BETA10 0x1015cd71
|
// FUNCTION: BETA10 0x1015cd71
|
||||||
MxDSAnim::MxDSAnim()
|
MxDSAnim::MxDSAnim()
|
||||||
{
|
{
|
||||||
this->SetType(e_anim);
|
m_type = e_anim;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c91a0
|
// FUNCTION: LEGO1 0x100c91a0
|
||||||
|
// FUNCTION: BETA10 0x1015cde9
|
||||||
MxDSAnim::~MxDSAnim()
|
MxDSAnim::~MxDSAnim()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c91f0
|
// FUNCTION: LEGO1 0x100c91f0
|
||||||
|
// FUNCTION: BETA10 0x1015ce51
|
||||||
void MxDSAnim::CopyFrom(MxDSAnim& p_dsAnim)
|
void MxDSAnim::CopyFrom(MxDSAnim& p_dsAnim)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1015ce69
|
||||||
|
MxDSAnim::MxDSAnim(MxDSAnim& p_dsAnim) : MxDSMediaAction(p_dsAnim)
|
||||||
|
{
|
||||||
|
CopyFrom(p_dsAnim);
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9200
|
// FUNCTION: LEGO1 0x100c9200
|
||||||
|
// FUNCTION: BETA10 0x1015ceea
|
||||||
MxDSAnim& MxDSAnim::operator=(MxDSAnim& p_dsAnim)
|
MxDSAnim& MxDSAnim::operator=(MxDSAnim& p_dsAnim)
|
||||||
{
|
{
|
||||||
if (this == &p_dsAnim) {
|
if (this == &p_dsAnim) {
|
||||||
@ -27,11 +36,12 @@ MxDSAnim& MxDSAnim::operator=(MxDSAnim& p_dsAnim)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MxDSMediaAction::operator=(p_dsAnim);
|
MxDSMediaAction::operator=(p_dsAnim);
|
||||||
this->CopyFrom(p_dsAnim);
|
CopyFrom(p_dsAnim);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9230
|
// FUNCTION: LEGO1 0x100c9230
|
||||||
|
// FUNCTION: BETA10 0x1015cf31
|
||||||
MxDSAction* MxDSAnim::Clone()
|
MxDSAction* MxDSAnim::Clone()
|
||||||
{
|
{
|
||||||
MxDSAnim* clone = new MxDSAnim();
|
MxDSAnim* clone = new MxDSAnim();
|
||||||
|
|||||||
@ -6,20 +6,29 @@ DECOMP_SIZE_ASSERT(MxDSEvent, 0xb8)
|
|||||||
// FUNCTION: BETA10 0x1015d2e5
|
// FUNCTION: BETA10 0x1015d2e5
|
||||||
MxDSEvent::MxDSEvent()
|
MxDSEvent::MxDSEvent()
|
||||||
{
|
{
|
||||||
this->SetType(e_event);
|
m_type = e_event;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c97a0
|
// FUNCTION: LEGO1 0x100c97a0
|
||||||
|
// FUNCTION: BETA10 0x1015d35d
|
||||||
MxDSEvent::~MxDSEvent()
|
MxDSEvent::~MxDSEvent()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c97f0
|
// FUNCTION: LEGO1 0x100c97f0
|
||||||
|
// FUNCTION: BETA10 0x1015d3c5
|
||||||
void MxDSEvent::CopyFrom(MxDSEvent& p_dsEvent)
|
void MxDSEvent::CopyFrom(MxDSEvent& p_dsEvent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1015d3dd
|
||||||
|
MxDSEvent::MxDSEvent(MxDSEvent& p_dsEvent) : MxDSMediaAction(p_dsEvent)
|
||||||
|
{
|
||||||
|
CopyFrom(p_dsEvent);
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9800
|
// FUNCTION: LEGO1 0x100c9800
|
||||||
|
// FUNCTION: BETA10 0x1015d45e
|
||||||
MxDSEvent& MxDSEvent::operator=(MxDSEvent& p_dsEvent)
|
MxDSEvent& MxDSEvent::operator=(MxDSEvent& p_dsEvent)
|
||||||
{
|
{
|
||||||
if (this == &p_dsEvent) {
|
if (this == &p_dsEvent) {
|
||||||
@ -27,11 +36,12 @@ MxDSEvent& MxDSEvent::operator=(MxDSEvent& p_dsEvent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MxDSMediaAction::operator=(p_dsEvent);
|
MxDSMediaAction::operator=(p_dsEvent);
|
||||||
this->CopyFrom(p_dsEvent);
|
CopyFrom(p_dsEvent);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9830
|
// FUNCTION: LEGO1 0x100c9830
|
||||||
|
// FUNCTION: BETA10 0x1015d4a5
|
||||||
MxDSAction* MxDSEvent::Clone()
|
MxDSAction* MxDSEvent::Clone()
|
||||||
{
|
{
|
||||||
MxDSEvent* clone = new MxDSEvent();
|
MxDSEvent* clone = new MxDSEvent();
|
||||||
|
|||||||
@ -87,8 +87,9 @@ void MxDSMediaAction::CopyMediaSrcPath(const char* p_mediaSrcPath)
|
|||||||
if (m_mediaSrcPath) {
|
if (m_mediaSrcPath) {
|
||||||
strcpy(m_mediaSrcPath, p_mediaSrcPath);
|
strcpy(m_mediaSrcPath, p_mediaSrcPath);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
MxTrace("MxDSMediaAction: name allocation failed: %s.\n", p_mediaSrcPath);
|
MxTrace("MxDSMediaAction: name allocation failed: %s.\n", p_mediaSrcPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_mediaSrcPath = NULL;
|
m_mediaSrcPath = NULL;
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#include "mxdsmultiaction.h"
|
#include "mxdsmultiaction.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxDSMultiAction, 0x9c)
|
DECOMP_SIZE_ASSERT(MxDSMultiAction, 0x9c)
|
||||||
DECOMP_SIZE_ASSERT(MxDSActionList, 0x1c);
|
DECOMP_SIZE_ASSERT(MxDSActionList, 0x1c);
|
||||||
DECOMP_SIZE_ASSERT(MxDSActionListCursor, 0x10);
|
DECOMP_SIZE_ASSERT(MxDSActionListCursor, 0x10);
|
||||||
@ -8,33 +10,40 @@ DECOMP_SIZE_ASSERT(MxDSActionListCursor, 0x10);
|
|||||||
// FUNCTION: BETA10 0x10159410
|
// FUNCTION: BETA10 0x10159410
|
||||||
MxDSMultiAction::MxDSMultiAction()
|
MxDSMultiAction::MxDSMultiAction()
|
||||||
{
|
{
|
||||||
this->SetType(e_multiAction);
|
m_type = e_multiAction;
|
||||||
this->m_actions = new MxDSActionList;
|
m_actionList = new MxDSActionList;
|
||||||
this->m_actions->SetDestroy(MxDSActionList::Destroy);
|
assert(m_actionList);
|
||||||
|
m_actionList->SetDestroy(MxDSActionList::Destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ca060
|
// FUNCTION: LEGO1 0x100ca060
|
||||||
|
// FUNCTION: BETA10 0x10159518
|
||||||
MxDSMultiAction::~MxDSMultiAction()
|
MxDSMultiAction::~MxDSMultiAction()
|
||||||
{
|
{
|
||||||
if (this->m_actions) {
|
delete m_actionList;
|
||||||
delete this->m_actions;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ca0d0
|
// FUNCTION: LEGO1 0x100ca0d0
|
||||||
// FUNCTION: BETA10 0x101595ad
|
// FUNCTION: BETA10 0x101595ad
|
||||||
void MxDSMultiAction::CopyFrom(MxDSMultiAction& p_dsMultiAction)
|
void MxDSMultiAction::CopyFrom(MxDSMultiAction& p_dsMultiAction)
|
||||||
{
|
{
|
||||||
this->m_actions->DeleteAll();
|
m_actionList->DeleteAll();
|
||||||
|
|
||||||
MxDSActionListCursor cursor(p_dsMultiAction.m_actions);
|
MxDSActionListCursor cursor(p_dsMultiAction.m_actionList);
|
||||||
MxDSAction* action;
|
MxDSAction* action;
|
||||||
while (cursor.Next(action)) {
|
while (cursor.Next(action)) {
|
||||||
this->m_actions->Append(action->Clone());
|
m_actionList->Append(action->Clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10159660
|
||||||
|
MxDSMultiAction::MxDSMultiAction(MxDSMultiAction& p_dsMultiAction) : MxDSAction(p_dsMultiAction)
|
||||||
|
{
|
||||||
|
CopyFrom(p_dsMultiAction);
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ca260
|
// FUNCTION: LEGO1 0x100ca260
|
||||||
|
// FUNCTION: BETA10 0x101596e1
|
||||||
MxDSMultiAction& MxDSMultiAction::operator=(MxDSMultiAction& p_dsMultiAction)
|
MxDSMultiAction& MxDSMultiAction::operator=(MxDSMultiAction& p_dsMultiAction)
|
||||||
{
|
{
|
||||||
if (this == &p_dsMultiAction) {
|
if (this == &p_dsMultiAction) {
|
||||||
@ -42,16 +51,17 @@ MxDSMultiAction& MxDSMultiAction::operator=(MxDSMultiAction& p_dsMultiAction)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MxDSAction::operator=(p_dsMultiAction);
|
MxDSAction::operator=(p_dsMultiAction);
|
||||||
this->CopyFrom(p_dsMultiAction);
|
CopyFrom(p_dsMultiAction);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ca290
|
// FUNCTION: LEGO1 0x100ca290
|
||||||
|
// FUNCTION: BETA10 0x10159728
|
||||||
void MxDSMultiAction::SetUnknown90(MxLong p_unk0x90)
|
void MxDSMultiAction::SetUnknown90(MxLong p_unk0x90)
|
||||||
{
|
{
|
||||||
this->m_unk0x90 = p_unk0x90;
|
m_unk0x90 = p_unk0x90;
|
||||||
|
|
||||||
MxDSActionListCursor cursor(this->m_actions);
|
MxDSActionListCursor cursor(m_actionList);
|
||||||
MxDSAction* action;
|
MxDSAction* action;
|
||||||
while (cursor.Next(action)) {
|
while (cursor.Next(action)) {
|
||||||
action->SetUnknown90(p_unk0x90);
|
action->SetUnknown90(p_unk0x90);
|
||||||
@ -59,11 +69,12 @@ void MxDSMultiAction::SetUnknown90(MxLong p_unk0x90)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ca370
|
// FUNCTION: LEGO1 0x100ca370
|
||||||
|
// FUNCTION: BETA10 0x101597ce
|
||||||
void MxDSMultiAction::MergeFrom(MxDSAction& p_dsMultiAction)
|
void MxDSMultiAction::MergeFrom(MxDSAction& p_dsMultiAction)
|
||||||
{
|
{
|
||||||
MxDSAction::MergeFrom(p_dsMultiAction);
|
MxDSAction::MergeFrom(p_dsMultiAction);
|
||||||
|
|
||||||
MxDSActionListCursor cursor(this->m_actions);
|
MxDSActionListCursor cursor(m_actionList);
|
||||||
MxDSAction* action;
|
MxDSAction* action;
|
||||||
while (cursor.Next(action)) {
|
while (cursor.Next(action)) {
|
||||||
action->MergeFrom(p_dsMultiAction);
|
action->MergeFrom(p_dsMultiAction);
|
||||||
@ -71,13 +82,14 @@ void MxDSMultiAction::MergeFrom(MxDSAction& p_dsMultiAction)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ca450
|
// FUNCTION: LEGO1 0x100ca450
|
||||||
|
// FUNCTION: BETA10 0x10159874
|
||||||
MxBool MxDSMultiAction::HasId(MxU32 p_objectId)
|
MxBool MxDSMultiAction::HasId(MxU32 p_objectId)
|
||||||
{
|
{
|
||||||
if (this->GetObjectId() == p_objectId) {
|
if (GetObjectId() == p_objectId) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
MxDSActionListCursor cursor(this->m_actions);
|
MxDSActionListCursor cursor(m_actionList);
|
||||||
MxDSAction* action;
|
MxDSAction* action;
|
||||||
while (cursor.Next(action)) {
|
while (cursor.Next(action)) {
|
||||||
if (action->HasId(p_objectId)) {
|
if (action->HasId(p_objectId)) {
|
||||||
@ -89,6 +101,7 @@ MxBool MxDSMultiAction::HasId(MxU32 p_objectId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ca550
|
// FUNCTION: LEGO1 0x100ca550
|
||||||
|
// FUNCTION: BETA10 0x10159959
|
||||||
MxDSAction* MxDSMultiAction::Clone()
|
MxDSAction* MxDSMultiAction::Clone()
|
||||||
{
|
{
|
||||||
MxDSMultiAction* clone = new MxDSMultiAction();
|
MxDSMultiAction* clone = new MxDSMultiAction();
|
||||||
@ -101,11 +114,12 @@ MxDSAction* MxDSMultiAction::Clone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ca5e0
|
// FUNCTION: LEGO1 0x100ca5e0
|
||||||
|
// FUNCTION: BETA10 0x10159a03
|
||||||
undefined4 MxDSMultiAction::VTable0x14()
|
undefined4 MxDSMultiAction::VTable0x14()
|
||||||
{
|
{
|
||||||
undefined4 result = MxDSAction::VTable0x14();
|
undefined4 result = MxDSAction::VTable0x14();
|
||||||
|
|
||||||
MxDSActionListCursor cursor(this->m_actions);
|
MxDSActionListCursor cursor(m_actionList);
|
||||||
MxDSAction* action;
|
MxDSAction* action;
|
||||||
while (cursor.Next(action)) {
|
while (cursor.Next(action)) {
|
||||||
result += action->VTable0x14();
|
result += action->VTable0x14();
|
||||||
@ -115,22 +129,26 @@ undefined4 MxDSMultiAction::VTable0x14()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ca6c0
|
// FUNCTION: LEGO1 0x100ca6c0
|
||||||
|
// FUNCTION: BETA10 0x10159aaf
|
||||||
MxU32 MxDSMultiAction::GetSizeOnDisk()
|
MxU32 MxDSMultiAction::GetSizeOnDisk()
|
||||||
{
|
{
|
||||||
MxU32 totalSizeOnDisk = MxDSAction::GetSizeOnDisk() + 16;
|
MxU32 totalSizeOnDisk = MxDSAction::GetSizeOnDisk();
|
||||||
|
totalSizeOnDisk += 12;
|
||||||
|
totalSizeOnDisk += 4;
|
||||||
|
|
||||||
MxDSActionListCursor cursor(this->m_actions);
|
MxDSActionListCursor cursor(m_actionList);
|
||||||
MxDSAction* action;
|
MxDSAction* action;
|
||||||
while (cursor.Next(action)) {
|
while (cursor.Next(action)) {
|
||||||
totalSizeOnDisk += action->GetSizeOnDisk();
|
totalSizeOnDisk += action->GetSizeOnDisk();
|
||||||
}
|
}
|
||||||
|
|
||||||
this->m_sizeOnDisk = totalSizeOnDisk - MxDSAction::GetSizeOnDisk();
|
m_sizeOnDisk = totalSizeOnDisk - MxDSAction::GetSizeOnDisk();
|
||||||
|
|
||||||
return totalSizeOnDisk;
|
return totalSizeOnDisk;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ca7b0
|
// FUNCTION: LEGO1 0x100ca7b0
|
||||||
|
// FUNCTION: BETA10 0x10159b79
|
||||||
void MxDSMultiAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24)
|
void MxDSMultiAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24)
|
||||||
{
|
{
|
||||||
MxDSAction::Deserialize(p_source, p_unk0x24);
|
MxDSAction::Deserialize(p_source, p_unk0x24);
|
||||||
@ -149,7 +167,7 @@ void MxDSMultiAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24)
|
|||||||
MxDSAction* action = (MxDSAction*) DeserializeDSObjectDispatch(p_source, p_unk0x24);
|
MxDSAction* action = (MxDSAction*) DeserializeDSObjectDispatch(p_source, p_unk0x24);
|
||||||
p_source += extraFlag;
|
p_source += extraFlag;
|
||||||
|
|
||||||
this->m_actions->Append(action);
|
m_actionList->Append(action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,11 +175,12 @@ void MxDSMultiAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100ca8c0
|
// FUNCTION: LEGO1 0x100ca8c0
|
||||||
|
// FUNCTION: BETA10 0x10159c37
|
||||||
void MxDSMultiAction::SetAtomId(MxAtomId p_atomId)
|
void MxDSMultiAction::SetAtomId(MxAtomId p_atomId)
|
||||||
{
|
{
|
||||||
MxDSAction::SetAtomId(p_atomId);
|
MxDSAction::SetAtomId(p_atomId);
|
||||||
|
|
||||||
MxDSActionListCursor cursor(this->m_actions);
|
MxDSActionListCursor cursor(m_actionList);
|
||||||
MxDSAction* action;
|
MxDSAction* action;
|
||||||
while (cursor.Next(action)) {
|
while (cursor.Next(action)) {
|
||||||
action->SetAtomId(p_atomId);
|
action->SetAtomId(p_atomId);
|
||||||
|
|||||||
@ -6,20 +6,29 @@ DECOMP_SIZE_ASSERT(MxDSObjectAction, 0xb8)
|
|||||||
// FUNCTION: BETA10 0x1015c3b0
|
// FUNCTION: BETA10 0x1015c3b0
|
||||||
MxDSObjectAction::MxDSObjectAction()
|
MxDSObjectAction::MxDSObjectAction()
|
||||||
{
|
{
|
||||||
this->SetType(e_objectAction);
|
m_type = e_objectAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c8a20
|
// FUNCTION: LEGO1 0x100c8a20
|
||||||
|
// FUNCTION: BETA10 0x1015c428
|
||||||
MxDSObjectAction::~MxDSObjectAction()
|
MxDSObjectAction::~MxDSObjectAction()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c8a70
|
// FUNCTION: LEGO1 0x100c8a70
|
||||||
|
// FUNCTION: BETA10 0x1015c490
|
||||||
void MxDSObjectAction::CopyFrom(MxDSObjectAction& p_dsObjectAction)
|
void MxDSObjectAction::CopyFrom(MxDSObjectAction& p_dsObjectAction)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1015c4a8
|
||||||
|
MxDSObjectAction::MxDSObjectAction(MxDSObjectAction& p_dsObjectAction) : MxDSMediaAction(p_dsObjectAction)
|
||||||
|
{
|
||||||
|
CopyFrom(p_dsObjectAction);
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c8a80
|
// FUNCTION: LEGO1 0x100c8a80
|
||||||
|
// FUNCTION: BETA10 0x1015c529
|
||||||
MxDSObjectAction& MxDSObjectAction::operator=(MxDSObjectAction& p_dsObjectAction)
|
MxDSObjectAction& MxDSObjectAction::operator=(MxDSObjectAction& p_dsObjectAction)
|
||||||
{
|
{
|
||||||
if (this == &p_dsObjectAction) {
|
if (this == &p_dsObjectAction) {
|
||||||
@ -27,11 +36,12 @@ MxDSObjectAction& MxDSObjectAction::operator=(MxDSObjectAction& p_dsObjectAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
MxDSMediaAction::operator=(p_dsObjectAction);
|
MxDSMediaAction::operator=(p_dsObjectAction);
|
||||||
this->CopyFrom(p_dsObjectAction);
|
CopyFrom(p_dsObjectAction);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c8ab0
|
// FUNCTION: LEGO1 0x100c8ab0
|
||||||
|
// FUNCTION: BETA10 0x1015c573
|
||||||
MxDSAction* MxDSObjectAction::Clone()
|
MxDSAction* MxDSObjectAction::Clone()
|
||||||
{
|
{
|
||||||
MxDSObjectAction* clone = new MxDSObjectAction();
|
MxDSObjectAction* clone = new MxDSObjectAction();
|
||||||
|
|||||||
@ -8,20 +8,29 @@ DECOMP_SIZE_ASSERT(MxDSParallelAction, 0x9c)
|
|||||||
// FUNCTION: BETA10 0x1015a14d
|
// FUNCTION: BETA10 0x1015a14d
|
||||||
MxDSParallelAction::MxDSParallelAction()
|
MxDSParallelAction::MxDSParallelAction()
|
||||||
{
|
{
|
||||||
this->SetType(e_parallelAction);
|
m_type = e_parallelAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cb040
|
// FUNCTION: LEGO1 0x100cb040
|
||||||
|
// FUNCTION: BETA10 0x1015a1c5
|
||||||
MxDSParallelAction::~MxDSParallelAction()
|
MxDSParallelAction::~MxDSParallelAction()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cb090
|
// FUNCTION: LEGO1 0x100cb090
|
||||||
|
// FUNCTION: BETA10 0x1015a22d
|
||||||
void MxDSParallelAction::CopyFrom(MxDSParallelAction& p_dsParallelAction)
|
void MxDSParallelAction::CopyFrom(MxDSParallelAction& p_dsParallelAction)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1015a245
|
||||||
|
MxDSParallelAction::MxDSParallelAction(MxDSParallelAction& p_dsParallelAction) : MxDSMultiAction(p_dsParallelAction)
|
||||||
|
{
|
||||||
|
CopyFrom(p_dsParallelAction);
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cb0a0
|
// FUNCTION: LEGO1 0x100cb0a0
|
||||||
|
// FUNCTION: BETA10 0x1015a2c6
|
||||||
MxDSParallelAction& MxDSParallelAction::operator=(MxDSParallelAction& p_dsParallelAction)
|
MxDSParallelAction& MxDSParallelAction::operator=(MxDSParallelAction& p_dsParallelAction)
|
||||||
{
|
{
|
||||||
if (this == &p_dsParallelAction) {
|
if (this == &p_dsParallelAction) {
|
||||||
@ -29,11 +38,12 @@ MxDSParallelAction& MxDSParallelAction::operator=(MxDSParallelAction& p_dsParall
|
|||||||
}
|
}
|
||||||
|
|
||||||
MxDSMultiAction::operator=(p_dsParallelAction);
|
MxDSMultiAction::operator=(p_dsParallelAction);
|
||||||
this->CopyFrom(p_dsParallelAction);
|
CopyFrom(p_dsParallelAction);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cb0d0
|
// FUNCTION: LEGO1 0x100cb0d0
|
||||||
|
// FUNCTION: BETA10 0x1015a30d
|
||||||
MxDSAction* MxDSParallelAction::Clone()
|
MxDSAction* MxDSParallelAction::Clone()
|
||||||
{
|
{
|
||||||
MxDSParallelAction* clone = new MxDSParallelAction();
|
MxDSParallelAction* clone = new MxDSParallelAction();
|
||||||
@ -46,13 +56,14 @@ MxDSAction* MxDSParallelAction::Clone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cb160
|
// FUNCTION: LEGO1 0x100cb160
|
||||||
|
// FUNCTION: BETA10 0x1015a3b7
|
||||||
MxLong MxDSParallelAction::GetDuration()
|
MxLong MxDSParallelAction::GetDuration()
|
||||||
{
|
{
|
||||||
if (this->m_duration) {
|
if (m_duration) {
|
||||||
return this->m_duration;
|
return m_duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
MxDSActionListCursor cursor(this->m_actions);
|
MxDSActionListCursor cursor(m_actionList);
|
||||||
MxDSAction* action;
|
MxDSAction* action;
|
||||||
|
|
||||||
while (cursor.Next(action)) {
|
while (cursor.Next(action)) {
|
||||||
@ -62,7 +73,7 @@ MxLong MxDSParallelAction::GetDuration()
|
|||||||
|
|
||||||
MxLong duration = action->GetDuration();
|
MxLong duration = action->GetDuration();
|
||||||
if (duration == -1) {
|
if (duration == -1) {
|
||||||
this->m_duration = -1;
|
m_duration = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,18 +90,18 @@ MxLong MxDSParallelAction::GetDuration()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (duration == -1) {
|
if (duration == -1) {
|
||||||
this->m_duration = -1;
|
m_duration = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_duration < duration) {
|
if (m_duration < duration) {
|
||||||
this->m_duration = duration;
|
m_duration = duration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->IsBit3()) {
|
if (IsBit3()) {
|
||||||
this->m_duration *= this->m_loopCount;
|
m_duration *= m_loopCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this->m_duration;
|
return m_duration;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,44 +15,51 @@ DECOMP_SIZE_ASSERT(MxListEntry<MxString>, 0x18)
|
|||||||
// FUNCTION: BETA10 0x1015a515
|
// FUNCTION: BETA10 0x1015a515
|
||||||
MxDSSelectAction::MxDSSelectAction()
|
MxDSSelectAction::MxDSSelectAction()
|
||||||
{
|
{
|
||||||
this->SetType(e_selectAction);
|
m_type = e_selectAction;
|
||||||
this->m_unk0xac = new MxStringList;
|
m_unk0xac = new MxStringList;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cb8d0
|
// FUNCTION: LEGO1 0x100cb8d0
|
||||||
|
// FUNCTION: BETA10 0x1015a5fd
|
||||||
MxDSSelectAction::~MxDSSelectAction()
|
MxDSSelectAction::~MxDSSelectAction()
|
||||||
{
|
{
|
||||||
if (this->m_unk0xac) {
|
delete m_unk0xac;
|
||||||
delete this->m_unk0xac;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cb950
|
// FUNCTION: LEGO1 0x100cb950
|
||||||
// FUNCTION: BETA10 0x1015a6ae
|
// FUNCTION: BETA10 0x1015a6ae
|
||||||
void MxDSSelectAction::CopyFrom(MxDSSelectAction& p_dsSelectAction)
|
void MxDSSelectAction::CopyFrom(MxDSSelectAction& p_dsSelectAction)
|
||||||
{
|
{
|
||||||
this->m_unk0x9c = p_dsSelectAction.m_unk0x9c;
|
m_unk0x9c = p_dsSelectAction.m_unk0x9c;
|
||||||
|
|
||||||
this->m_unk0xac->DeleteAll();
|
m_unk0xac->DeleteAll();
|
||||||
|
|
||||||
MxStringListCursor cursor(p_dsSelectAction.m_unk0xac);
|
MxStringListCursor cursor(p_dsSelectAction.m_unk0xac);
|
||||||
MxString string;
|
MxString string;
|
||||||
while (cursor.Next(string)) {
|
while (cursor.Next(string)) {
|
||||||
this->m_unk0xac->Append(string);
|
m_unk0xac->Append(string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1015a7ad
|
||||||
|
MxDSSelectAction::MxDSSelectAction(MxDSSelectAction& p_dsSelectAction) : MxDSParallelAction(p_dsSelectAction)
|
||||||
|
{
|
||||||
|
CopyFrom(p_dsSelectAction);
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cbd50
|
// FUNCTION: LEGO1 0x100cbd50
|
||||||
|
// FUNCTION: BETA10 0x1015a84f
|
||||||
MxDSSelectAction& MxDSSelectAction::operator=(MxDSSelectAction& p_dsSelectAction)
|
MxDSSelectAction& MxDSSelectAction::operator=(MxDSSelectAction& p_dsSelectAction)
|
||||||
{
|
{
|
||||||
if (this != &p_dsSelectAction) {
|
if (this != &p_dsSelectAction) {
|
||||||
MxDSParallelAction::operator=(p_dsSelectAction);
|
MxDSParallelAction::operator=(p_dsSelectAction);
|
||||||
this->CopyFrom(p_dsSelectAction);
|
CopyFrom(p_dsSelectAction);
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cbd80
|
// FUNCTION: LEGO1 0x100cbd80
|
||||||
|
// FUNCTION: BETA10 0x1015a88e
|
||||||
MxDSAction* MxDSSelectAction::Clone()
|
MxDSAction* MxDSSelectAction::Clone()
|
||||||
{
|
{
|
||||||
MxDSSelectAction* clone = new MxDSSelectAction();
|
MxDSSelectAction* clone = new MxDSSelectAction();
|
||||||
@ -65,13 +72,14 @@ MxDSAction* MxDSSelectAction::Clone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cbe10
|
// FUNCTION: LEGO1 0x100cbe10
|
||||||
|
// FUNCTION: BETA10 0x1015a938
|
||||||
MxU32 MxDSSelectAction::GetSizeOnDisk()
|
MxU32 MxDSSelectAction::GetSizeOnDisk()
|
||||||
{
|
{
|
||||||
MxU32 totalSizeOnDisk = MxDSParallelAction::GetSizeOnDisk();
|
MxU32 totalSizeOnDisk = MxDSParallelAction::GetSizeOnDisk();
|
||||||
|
|
||||||
totalSizeOnDisk += strlen(this->m_unk0x9c.GetData()) + 1;
|
totalSizeOnDisk += strlen(m_unk0x9c.GetData()) + 1;
|
||||||
|
|
||||||
MxStringListCursor cursor(this->m_unk0xac);
|
MxStringListCursor cursor(m_unk0xac);
|
||||||
MxString string;
|
MxString string;
|
||||||
while (cursor.Next(string)) {
|
while (cursor.Next(string)) {
|
||||||
totalSizeOnDisk += strlen(string.GetData()) + 1;
|
totalSizeOnDisk += strlen(string.GetData()) + 1;
|
||||||
@ -79,7 +87,7 @@ MxU32 MxDSSelectAction::GetSizeOnDisk()
|
|||||||
|
|
||||||
// Note: unlike the other classes, MxDSSelectAction does not have its own
|
// Note: unlike the other classes, MxDSSelectAction does not have its own
|
||||||
// sizeOnDisk member. Instead, it overrides the one from MxDSMultiAction.
|
// sizeOnDisk member. Instead, it overrides the one from MxDSMultiAction.
|
||||||
this->m_sizeOnDisk = totalSizeOnDisk;
|
m_sizeOnDisk = totalSizeOnDisk;
|
||||||
|
|
||||||
return totalSizeOnDisk;
|
return totalSizeOnDisk;
|
||||||
}
|
}
|
||||||
@ -88,25 +96,26 @@ MxU32 MxDSSelectAction::GetSizeOnDisk()
|
|||||||
// FUNCTION: BETA10 0x1015aa30
|
// FUNCTION: BETA10 0x1015aa30
|
||||||
void MxDSSelectAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24)
|
void MxDSSelectAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24)
|
||||||
{
|
{
|
||||||
|
MxDSAction* action = NULL;
|
||||||
MxString string;
|
MxString string;
|
||||||
MxDSAction::Deserialize(p_source, p_unk0x24);
|
MxDSAction::Deserialize(p_source, p_unk0x24);
|
||||||
|
|
||||||
MxU32 extraFlag = *(MxU32*) (p_source + 4) & 1;
|
MxU32 extraFlag = *(MxU32*) (p_source + 4) & 1;
|
||||||
p_source += 12;
|
p_source += 12;
|
||||||
|
|
||||||
this->m_unk0x9c = (char*) p_source;
|
m_unk0x9c = (char*) p_source;
|
||||||
|
|
||||||
if (!SDL_strncasecmp(this->m_unk0x9c.GetData(), "RANDOM_", strlen("RANDOM_"))) {
|
if (SDL_strncasecmp(m_unk0x9c.GetData(), "RANDOM_", strlen("RANDOM_")) != 0) {
|
||||||
|
string = VariableTable()->GetVariable((char*) p_source);
|
||||||
|
}
|
||||||
|
else {
|
||||||
char buffer[10];
|
char buffer[10];
|
||||||
MxS16 value = atoi(&this->m_unk0x9c.GetData()[strlen("RANDOM_")]);
|
MxS16 value = atoi(&m_unk0x9c.GetData()[strlen("RANDOM_")]);
|
||||||
|
|
||||||
srand(Timer()->GetTime());
|
srand(Timer()->GetTime());
|
||||||
MxS32 random = rand() % value;
|
MxS32 random = rand() % value;
|
||||||
string = SDL_itoa((MxS16) random, buffer, 10);
|
string = SDL_itoa((MxS16) random, buffer, 10);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
string = VariableTable()->GetVariable((char*) p_source);
|
|
||||||
}
|
|
||||||
|
|
||||||
p_source += strlen((char*) p_source) + 1;
|
p_source += strlen((char*) p_source) + 1;
|
||||||
|
|
||||||
@ -115,7 +124,7 @@ void MxDSSelectAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24)
|
|||||||
|
|
||||||
if (count) {
|
if (count) {
|
||||||
MxS32 index = -1;
|
MxS32 index = -1;
|
||||||
this->m_unk0xac->DeleteAll();
|
m_unk0xac->DeleteAll();
|
||||||
|
|
||||||
MxU32 i;
|
MxU32 i;
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
@ -123,7 +132,7 @@ void MxDSSelectAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24)
|
|||||||
index = i;
|
index = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->m_unk0xac->Append((char*) p_source);
|
m_unk0xac->Append((char*) p_source);
|
||||||
p_source += strlen((char*) p_source) + 1;
|
p_source += strlen((char*) p_source) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,10 +140,10 @@ void MxDSSelectAction::Deserialize(MxU8*& p_source, MxS16 p_unk0x24)
|
|||||||
MxU32 extraFlag = *(MxU32*) (p_source + 4) & 1;
|
MxU32 extraFlag = *(MxU32*) (p_source + 4) & 1;
|
||||||
p_source += 8;
|
p_source += 8;
|
||||||
|
|
||||||
MxDSAction* action = (MxDSAction*) DeserializeDSObjectDispatch(p_source, p_unk0x24);
|
action = (MxDSAction*) DeserializeDSObjectDispatch(p_source, p_unk0x24);
|
||||||
|
|
||||||
if (index == i) {
|
if (index == i) {
|
||||||
this->m_actions->Append(action);
|
m_actionList->Append(action);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
delete action;
|
delete action;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
#include "mxdsserialaction.h"
|
#include "mxdsserialaction.h"
|
||||||
|
|
||||||
|
#include "mxdebug.h"
|
||||||
#include "mxdsmediaaction.h"
|
#include "mxdsmediaaction.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxDSSerialAction, 0xa8)
|
DECOMP_SIZE_ASSERT(MxDSSerialAction, 0xa8)
|
||||||
@ -8,33 +9,43 @@ DECOMP_SIZE_ASSERT(MxDSSerialAction, 0xa8)
|
|||||||
// FUNCTION: BETA10 0x10159cf3
|
// FUNCTION: BETA10 0x10159cf3
|
||||||
MxDSSerialAction::MxDSSerialAction()
|
MxDSSerialAction::MxDSSerialAction()
|
||||||
{
|
{
|
||||||
this->SetType(e_serialAction);
|
m_type = e_serialAction;
|
||||||
this->m_cursor = new MxDSActionListCursor(this->m_actions);
|
m_cursor = new MxDSActionListCursor(m_actionList);
|
||||||
this->m_unk0xa0 = 0;
|
m_unk0xa0 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100caac0
|
// FUNCTION: LEGO1 0x100caac0
|
||||||
|
// FUNCTION: BETA10 0x1015b280
|
||||||
void MxDSSerialAction::SetDuration(MxLong p_duration)
|
void MxDSSerialAction::SetDuration(MxLong p_duration)
|
||||||
{
|
{
|
||||||
this->m_duration = p_duration;
|
m_duration = p_duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cac10
|
// FUNCTION: LEGO1 0x100cac10
|
||||||
|
// FUNCTION: BETA10 0x10159dd1
|
||||||
MxDSSerialAction::~MxDSSerialAction()
|
MxDSSerialAction::~MxDSSerialAction()
|
||||||
{
|
{
|
||||||
if (this->m_cursor) {
|
delete m_cursor;
|
||||||
delete this->m_cursor;
|
m_cursor = NULL;
|
||||||
}
|
|
||||||
|
|
||||||
this->m_cursor = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cac90
|
// FUNCTION: LEGO1 0x100cac90
|
||||||
|
// FUNCTION: BETA10 0x10159e73
|
||||||
void MxDSSerialAction::CopyFrom(MxDSSerialAction& p_dsSerialAction)
|
void MxDSSerialAction::CopyFrom(MxDSSerialAction& p_dsSerialAction)
|
||||||
{
|
{
|
||||||
|
if (p_dsSerialAction.m_cursor->HasMatch() || p_dsSerialAction.m_unk0xa0) {
|
||||||
|
MxTrace("copying a serialAction while someone is traversing it's list\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10159ec2
|
||||||
|
MxDSSerialAction::MxDSSerialAction(MxDSSerialAction& p_dsSerialAction) : MxDSMultiAction(p_dsSerialAction)
|
||||||
|
{
|
||||||
|
CopyFrom(p_dsSerialAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100caca0
|
// FUNCTION: LEGO1 0x100caca0
|
||||||
|
// FUNCTION: BETA10 0x10159f43
|
||||||
MxDSSerialAction& MxDSSerialAction::operator=(MxDSSerialAction& p_dsSerialAction)
|
MxDSSerialAction& MxDSSerialAction::operator=(MxDSSerialAction& p_dsSerialAction)
|
||||||
{
|
{
|
||||||
if (this == &p_dsSerialAction) {
|
if (this == &p_dsSerialAction) {
|
||||||
@ -42,11 +53,12 @@ MxDSSerialAction& MxDSSerialAction::operator=(MxDSSerialAction& p_dsSerialAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
MxDSMultiAction::operator=(p_dsSerialAction);
|
MxDSMultiAction::operator=(p_dsSerialAction);
|
||||||
this->CopyFrom(p_dsSerialAction);
|
CopyFrom(p_dsSerialAction);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cacd0
|
// FUNCTION: LEGO1 0x100cacd0
|
||||||
|
// FUNCTION: BETA10 0x10159f8a
|
||||||
MxDSAction* MxDSSerialAction::Clone()
|
MxDSAction* MxDSSerialAction::Clone()
|
||||||
{
|
{
|
||||||
MxDSSerialAction* clone = new MxDSSerialAction();
|
MxDSSerialAction* clone = new MxDSSerialAction();
|
||||||
@ -59,30 +71,29 @@ MxDSAction* MxDSSerialAction::Clone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100cad60
|
// FUNCTION: LEGO1 0x100cad60
|
||||||
|
// FUNCTION: BETA10 0x1015a034
|
||||||
MxLong MxDSSerialAction::GetDuration()
|
MxLong MxDSSerialAction::GetDuration()
|
||||||
{
|
{
|
||||||
if (this->m_duration) {
|
if (m_duration) {
|
||||||
return this->m_duration;
|
return m_duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
MxDSActionListCursor cursor(this->m_actions);
|
MxDSActionListCursor cursor(m_actionList);
|
||||||
MxDSAction* action;
|
MxDSAction* action;
|
||||||
|
|
||||||
while (cursor.Next(action)) {
|
while (cursor.Next(action)) {
|
||||||
if (!action) {
|
if (action) {
|
||||||
continue;
|
m_duration += action->GetDuration() + action->GetStartTime();
|
||||||
}
|
|
||||||
|
|
||||||
this->m_duration += action->GetDuration() + action->GetStartTime();
|
if (action->IsA("MxDSMediaAction")) {
|
||||||
|
MxLong sustainTime = ((MxDSMediaAction*) action)->GetSustainTime();
|
||||||
|
|
||||||
if (action->IsA("MxDSMediaAction")) {
|
if (sustainTime && sustainTime != -1) {
|
||||||
MxLong sustainTime = ((MxDSMediaAction*) action)->GetSustainTime();
|
m_duration += sustainTime;
|
||||||
|
}
|
||||||
if (sustainTime && sustainTime != -1) {
|
|
||||||
this->m_duration += sustainTime;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this->m_duration;
|
return m_duration;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,30 +1,37 @@
|
|||||||
#include "mxdssound.h"
|
#include "mxdssound.h"
|
||||||
|
|
||||||
#include "mxutilities.h"
|
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxDSSound, 0xc0)
|
DECOMP_SIZE_ASSERT(MxDSSound, 0xc0)
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c92c0
|
// FUNCTION: LEGO1 0x100c92c0
|
||||||
// FUNCTION: BETA10 0x1015cfdb
|
// FUNCTION: BETA10 0x1015cfdb
|
||||||
MxDSSound::MxDSSound()
|
MxDSSound::MxDSSound()
|
||||||
{
|
{
|
||||||
this->m_volume = 0x4f;
|
m_type = e_sound;
|
||||||
this->SetType(e_sound);
|
m_volume = 0x4f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9470
|
// FUNCTION: LEGO1 0x100c9470
|
||||||
|
// FUNCTION: BETA10 0x1015d060
|
||||||
MxDSSound::~MxDSSound()
|
MxDSSound::~MxDSSound()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c94c0
|
// FUNCTION: LEGO1 0x100c94c0
|
||||||
|
// FUNCTION: BETA10 0x1015d0c8
|
||||||
void MxDSSound::CopyFrom(MxDSSound& p_dsSound)
|
void MxDSSound::CopyFrom(MxDSSound& p_dsSound)
|
||||||
{
|
{
|
||||||
this->SetType(p_dsSound.GetType());
|
m_type = p_dsSound.m_type;
|
||||||
this->m_volume = p_dsSound.m_volume;
|
m_volume = p_dsSound.m_volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1015d100
|
||||||
|
MxDSSound::MxDSSound(MxDSSound& p_dsSound) : MxDSMediaAction(p_dsSound)
|
||||||
|
{
|
||||||
|
CopyFrom(p_dsSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c94e0
|
// FUNCTION: LEGO1 0x100c94e0
|
||||||
|
// FUNCTION: BETA10 0x1015d181
|
||||||
MxDSSound& MxDSSound::operator=(MxDSSound& p_dsSound)
|
MxDSSound& MxDSSound::operator=(MxDSSound& p_dsSound)
|
||||||
{
|
{
|
||||||
if (this == &p_dsSound) {
|
if (this == &p_dsSound) {
|
||||||
@ -32,11 +39,12 @@ MxDSSound& MxDSSound::operator=(MxDSSound& p_dsSound)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MxDSMediaAction::operator=(p_dsSound);
|
MxDSMediaAction::operator=(p_dsSound);
|
||||||
this->CopyFrom(p_dsSound);
|
CopyFrom(p_dsSound);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9510
|
// FUNCTION: LEGO1 0x100c9510
|
||||||
|
// FUNCTION: BETA10 0x1015d1c8
|
||||||
MxDSAction* MxDSSound::Clone()
|
MxDSAction* MxDSSound::Clone()
|
||||||
{
|
{
|
||||||
MxDSSound* clone = new MxDSSound();
|
MxDSSound* clone = new MxDSSound();
|
||||||
@ -49,18 +57,21 @@ MxDSAction* MxDSSound::Clone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c95a0
|
// FUNCTION: LEGO1 0x100c95a0
|
||||||
|
// FUNCTION: BETA10 0x1015d272
|
||||||
void MxDSSound::Deserialize(MxU8*& p_source, MxS16 p_unk0x24)
|
void MxDSSound::Deserialize(MxU8*& p_source, MxS16 p_unk0x24)
|
||||||
{
|
{
|
||||||
MxDSMediaAction::Deserialize(p_source, p_unk0x24);
|
MxDSMediaAction::Deserialize(p_source, p_unk0x24);
|
||||||
|
m_volume = *(MxS32*) p_source;
|
||||||
GetScalar(p_source, this->m_volume);
|
p_source += sizeof(m_volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c95d0
|
// FUNCTION: LEGO1 0x100c95d0
|
||||||
|
// FUNCTION: BETA10 0x1015d2b0
|
||||||
MxU32 MxDSSound::GetSizeOnDisk()
|
MxU32 MxDSSound::GetSizeOnDisk()
|
||||||
{
|
{
|
||||||
MxU32 totalSizeOnDisk = MxDSMediaAction::GetSizeOnDisk();
|
MxU32 totalSizeOnDisk = MxDSMediaAction::GetSizeOnDisk();
|
||||||
|
totalSizeOnDisk += sizeof(m_volume);
|
||||||
|
|
||||||
this->m_sizeOnDisk = sizeof(this->m_volume);
|
m_sizeOnDisk = sizeof(m_volume);
|
||||||
return totalSizeOnDisk + 4;
|
return totalSizeOnDisk;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,20 +6,29 @@ DECOMP_SIZE_ASSERT(MxDSStill, 0xb8)
|
|||||||
// FUNCTION: BETA10 0x1015d54f
|
// FUNCTION: BETA10 0x1015d54f
|
||||||
MxDSStill::MxDSStill()
|
MxDSStill::MxDSStill()
|
||||||
{
|
{
|
||||||
this->SetType(e_still);
|
m_type = e_still;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9a70
|
// FUNCTION: LEGO1 0x100c9a70
|
||||||
|
// FUNCTION: BETA10 0x1015d5c7
|
||||||
MxDSStill::~MxDSStill()
|
MxDSStill::~MxDSStill()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9ac0
|
// FUNCTION: LEGO1 0x100c9ac0
|
||||||
|
// FUNCTION: BETA10 0x1015d62f
|
||||||
void MxDSStill::CopyFrom(MxDSStill& p_dsStill)
|
void MxDSStill::CopyFrom(MxDSStill& p_dsStill)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1015d647
|
||||||
|
MxDSStill::MxDSStill(MxDSStill& p_dsStill) : MxDSMediaAction(p_dsStill)
|
||||||
|
{
|
||||||
|
CopyFrom(p_dsStill);
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9ad0
|
// FUNCTION: LEGO1 0x100c9ad0
|
||||||
|
// FUNCTION: BETA10 0x1015d6c8
|
||||||
MxDSStill& MxDSStill::operator=(MxDSStill& p_dsStill)
|
MxDSStill& MxDSStill::operator=(MxDSStill& p_dsStill)
|
||||||
{
|
{
|
||||||
if (this == &p_dsStill) {
|
if (this == &p_dsStill) {
|
||||||
@ -27,11 +36,12 @@ MxDSStill& MxDSStill::operator=(MxDSStill& p_dsStill)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MxDSMediaAction::operator=(p_dsStill);
|
MxDSMediaAction::operator=(p_dsStill);
|
||||||
this->CopyFrom(p_dsStill);
|
CopyFrom(p_dsStill);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c9b00
|
// FUNCTION: LEGO1 0x100c9b00
|
||||||
|
// FUNCTION: BETA10 0x1015d70f
|
||||||
MxDSAction* MxDSStill::Clone()
|
MxDSAction* MxDSStill::Clone()
|
||||||
{
|
{
|
||||||
MxDSStill* clone = new MxDSStill();
|
MxDSStill* clone = new MxDSStill();
|
||||||
|
|||||||
@ -6,6 +6,7 @@ DECOMP_SIZE_ASSERT(Camera, 0x04);
|
|||||||
DECOMP_SIZE_ASSERT(CameraImpl, 0x08);
|
DECOMP_SIZE_ASSERT(CameraImpl, 0x08);
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a36f0
|
// FUNCTION: LEGO1 0x100a36f0
|
||||||
|
// FUNCTION: BETA10 0x1016f2e0
|
||||||
void* CameraImpl::ImplementationDataPtr()
|
void* CameraImpl::ImplementationDataPtr()
|
||||||
{
|
{
|
||||||
return reinterpret_cast<void*>(&m_data);
|
return reinterpret_cast<void*>(&m_data);
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
#include "impl.h"
|
#include "impl.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
#include <d3drmwin.h>
|
#include <d3drmwin.h>
|
||||||
|
|
||||||
using namespace TglImpl;
|
using namespace TglImpl;
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2bf0
|
// FUNCTION: LEGO1 0x100a2bf0
|
||||||
|
// FUNCTION: BETA10 0x1016ddf0
|
||||||
void* DeviceImpl::ImplementationDataPtr()
|
void* DeviceImpl::ImplementationDataPtr()
|
||||||
{
|
{
|
||||||
return reinterpret_cast<void*>(&m_data);
|
return reinterpret_cast<void*>(&m_data);
|
||||||
@ -28,13 +30,20 @@ Result DeviceImpl::SetColorModel(ColorModel)
|
|||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016e020
|
||||||
|
inline Result DeviceSetShadingModel(IDirect3DRMDevice2* pDevice, ShadingModel model)
|
||||||
|
{
|
||||||
|
D3DRMRENDERQUALITY renderQuality = Translate(model);
|
||||||
|
return ResultVal(pDevice->SetQuality(renderQuality));
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2c30
|
// FUNCTION: LEGO1 0x100a2c30
|
||||||
|
// FUNCTION: BETA10 0x1016dfc0
|
||||||
Result DeviceImpl::SetShadingModel(ShadingModel model)
|
Result DeviceImpl::SetShadingModel(ShadingModel model)
|
||||||
{
|
{
|
||||||
// Doesn't match well even though we know this is exactly
|
assert(m_data);
|
||||||
// the original code thanks to the jump table.
|
|
||||||
D3DRMRENDERQUALITY renderQuality = Translate(model);
|
return DeviceSetShadingModel(m_data, model);
|
||||||
return ResultVal(m_data->SetQuality(renderQuality));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2ca0
|
// FUNCTION: LEGO1 0x100a2ca0
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
using namespace TglImpl;
|
using namespace TglImpl;
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a31d0
|
// FUNCTION: LEGO1 0x100a31d0
|
||||||
|
// FUNCTION: BETA10 0x1016a480
|
||||||
void* GroupImpl::ImplementationDataPtr()
|
void* GroupImpl::ImplementationDataPtr()
|
||||||
{
|
{
|
||||||
return reinterpret_cast<void*>(&m_data);
|
return reinterpret_cast<void*>(&m_data);
|
||||||
|
|||||||
@ -26,6 +26,7 @@ namespace TglImpl
|
|||||||
using namespace Tgl;
|
using namespace Tgl;
|
||||||
|
|
||||||
// Utility function used by implementations
|
// Utility function used by implementations
|
||||||
|
// FUNCTION: BETA10 0x10169cf0
|
||||||
inline Result ResultVal(HRESULT result)
|
inline Result ResultVal(HRESULT result)
|
||||||
{
|
{
|
||||||
return SUCCEEDED(result) ? Success : Error;
|
return SUCCEEDED(result) ? Success : Error;
|
||||||
@ -43,9 +44,13 @@ class TextureImpl;
|
|||||||
class MeshBuilderImpl;
|
class MeshBuilderImpl;
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100db910
|
// VTABLE: LEGO1 0x100db910
|
||||||
|
// VTABLE: BETA10 0x101c30d8
|
||||||
class RendererImpl : public Renderer {
|
class RendererImpl : public Renderer {
|
||||||
public:
|
public:
|
||||||
|
// FUNCTION: BETA10 0x10169a20
|
||||||
RendererImpl() : m_data(0) {}
|
RendererImpl() : m_data(0) {}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10169d20
|
||||||
~RendererImpl() override { Destroy(); }
|
~RendererImpl() override { Destroy(); }
|
||||||
|
|
||||||
void* ImplementationDataPtr() override;
|
void* ImplementationDataPtr() override;
|
||||||
@ -90,18 +95,49 @@ class RendererImpl : public Renderer {
|
|||||||
return m_data->CreateTextureFromSurface(pSurface, pTexture2);
|
return m_data->CreateTextureFromSurface(pSurface, pTexture2);
|
||||||
}
|
}
|
||||||
|
|
||||||
IDirect3DRM2* ImplementationData() const { return m_data; }
|
typedef IDirect3DRM2* RendererDataType;
|
||||||
|
|
||||||
|
const RendererDataType& ImplementationData() const { return m_data; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10174c10
|
||||||
|
RendererDataType& ImplementationData() { return m_data; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline Result Create();
|
inline Result Create();
|
||||||
inline void Destroy();
|
inline void Destroy();
|
||||||
|
inline Result CreateLight(LightType type, float r, float g, float b, LightImpl& rLight);
|
||||||
|
inline Result CreateView(
|
||||||
|
const DeviceImpl& rDevice,
|
||||||
|
const CameraImpl& rCamera,
|
||||||
|
unsigned long x,
|
||||||
|
unsigned long y,
|
||||||
|
unsigned long width,
|
||||||
|
unsigned long height,
|
||||||
|
ViewImpl& rView
|
||||||
|
);
|
||||||
|
inline Result CreateMeshBuilder(MeshBuilderImpl& rMesh);
|
||||||
|
inline Result CreateCamera(CameraImpl& rCamera);
|
||||||
|
inline Result CreateTexture(TextureImpl& rTexture);
|
||||||
|
inline Result CreateTexture(
|
||||||
|
TextureImpl& rTexture,
|
||||||
|
int width,
|
||||||
|
int height,
|
||||||
|
int bitsPerTexel,
|
||||||
|
const void* pTexels,
|
||||||
|
int texelsArePersistent,
|
||||||
|
int paletteEntryCount,
|
||||||
|
const PaletteEntry* pEntries
|
||||||
|
);
|
||||||
|
inline Result CreateDevice(const DeviceDirect3DCreateData& rCreateData, DeviceImpl& rDevice);
|
||||||
|
inline Result CreateDevice(const DeviceDirectDrawCreateData& rCreateData, DeviceImpl& rDevice);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IDirect3DRM2* m_data;
|
RendererDataType m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern IDirect3DRM2* g_pD3DRM;
|
extern IDirect3DRM2* g_pD3DRM;
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016dd20
|
||||||
inline void RendererDestroy(IDirect3DRM2* pRenderer)
|
inline void RendererDestroy(IDirect3DRM2* pRenderer)
|
||||||
{
|
{
|
||||||
int refCount = pRenderer->Release();
|
int refCount = pRenderer->Release();
|
||||||
@ -111,6 +147,7 @@ inline void RendererDestroy(IDirect3DRM2* pRenderer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Inlined only
|
// Inlined only
|
||||||
|
// FUNCTION: BETA10 0x1016dce0
|
||||||
void RendererImpl::Destroy()
|
void RendererImpl::Destroy()
|
||||||
{
|
{
|
||||||
if (m_data) {
|
if (m_data) {
|
||||||
@ -120,16 +157,14 @@ void RendererImpl::Destroy()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100db988
|
// VTABLE: LEGO1 0x100db988
|
||||||
|
// VTABLE: BETA10 0x101c31f0
|
||||||
class DeviceImpl : public Device {
|
class DeviceImpl : public Device {
|
||||||
public:
|
public:
|
||||||
|
// FUNCTION: BETA10 0x1016b2e0
|
||||||
DeviceImpl() : m_data(0) {}
|
DeviceImpl() : m_data(0) {}
|
||||||
~DeviceImpl() override
|
|
||||||
{
|
// FUNCTION: BETA10 0x1016dd80
|
||||||
if (m_data) {
|
~DeviceImpl() override { Destroy(); }
|
||||||
m_data->Release();
|
|
||||||
m_data = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void* ImplementationDataPtr() override;
|
void* ImplementationDataPtr() override;
|
||||||
|
|
||||||
@ -148,26 +183,48 @@ class DeviceImpl : public Device {
|
|||||||
void HandleActivate(WORD) override;
|
void HandleActivate(WORD) override;
|
||||||
void HandlePaint(HDC) override;
|
void HandlePaint(HDC) override;
|
||||||
|
|
||||||
IDirect3DRMDevice2* ImplementationData() const { return m_data; }
|
typedef IDirect3DRMDevice2* DeviceDataType;
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x101708e0
|
||||||
|
const DeviceDataType& ImplementationData() const { return m_data; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x100d9540
|
||||||
|
DeviceDataType& ImplementationData() { return m_data; }
|
||||||
|
|
||||||
void SetImplementationData(IDirect3DRMDevice2* device) { m_data = device; }
|
void SetImplementationData(IDirect3DRMDevice2* device) { m_data = device; }
|
||||||
|
|
||||||
|
inline void Destroy();
|
||||||
|
|
||||||
friend class RendererImpl;
|
friend class RendererImpl;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IDirect3DRMDevice2* m_data;
|
DeviceDataType m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x101708c0
|
||||||
|
inline void DeviceDestroy(IDirect3DRMDevice2* pDevice)
|
||||||
|
{
|
||||||
|
pDevice->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170880
|
||||||
|
void DeviceImpl::Destroy()
|
||||||
|
{
|
||||||
|
if (m_data) {
|
||||||
|
DeviceDestroy(m_data);
|
||||||
|
m_data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100db9e8
|
// VTABLE: LEGO1 0x100db9e8
|
||||||
|
// VTABLE: BETA10 0x101c3220
|
||||||
class ViewImpl : public View {
|
class ViewImpl : public View {
|
||||||
public:
|
public:
|
||||||
|
// FUNCTION: BETA10 0x1016b360
|
||||||
ViewImpl() : m_data(0) {}
|
ViewImpl() : m_data(0) {}
|
||||||
~ViewImpl() override
|
|
||||||
{
|
// FUNCTION: BETA10 0x1016e5d0
|
||||||
if (m_data) {
|
~ViewImpl() override { Destroy(); }
|
||||||
m_data->Release();
|
|
||||||
m_data = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void* ImplementationDataPtr() override;
|
void* ImplementationDataPtr() override;
|
||||||
|
|
||||||
@ -199,53 +256,107 @@ class ViewImpl : public View {
|
|||||||
int& rPickedGroupCount
|
int& rPickedGroupCount
|
||||||
) override;
|
) override;
|
||||||
|
|
||||||
IDirect3DRMViewport* ImplementationData() const { return m_data; }
|
typedef IDirect3DRMViewport* ViewDataType;
|
||||||
|
|
||||||
|
const ViewDataType& ImplementationData() const { return m_data; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x101711c0
|
||||||
|
ViewDataType& ImplementationData() { return m_data; }
|
||||||
|
|
||||||
void SetImplementationData(IDirect3DRMViewport* viewport) { m_data = viewport; }
|
void SetImplementationData(IDirect3DRMViewport* viewport) { m_data = viewport; }
|
||||||
|
|
||||||
static Result ViewportCreateAppData(IDirect3DRM2*, IDirect3DRMViewport*, IDirect3DRMFrame2*);
|
static Result ViewportCreateAppData(IDirect3DRM2*, IDirect3DRMViewport*, IDirect3DRMFrame2*);
|
||||||
|
|
||||||
|
inline void Destroy();
|
||||||
|
Result Add(const LightImpl& rLight);
|
||||||
|
Result Remove(const LightImpl& rLight);
|
||||||
|
Result SetCamera(const CameraImpl& rCamera);
|
||||||
|
Result Render(const GroupImpl& rScene);
|
||||||
|
Result Pick(
|
||||||
|
unsigned long x,
|
||||||
|
unsigned long y,
|
||||||
|
const GroupImpl** ppGroupsToPickFrom,
|
||||||
|
int groupsToPickFromCount,
|
||||||
|
const Group**& rppPickedGroups,
|
||||||
|
int& rPickedGroupCount
|
||||||
|
);
|
||||||
|
|
||||||
friend class RendererImpl;
|
friend class RendererImpl;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IDirect3DRMViewport* m_data;
|
ViewDataType m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x101711a0
|
||||||
|
inline void ViewDestroy(IDirect3DRMViewport* pView)
|
||||||
|
{
|
||||||
|
pView->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10171160
|
||||||
|
void ViewImpl::Destroy()
|
||||||
|
{
|
||||||
|
if (m_data) {
|
||||||
|
ViewDestroy(m_data);
|
||||||
|
m_data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dbad8
|
// VTABLE: LEGO1 0x100dbad8
|
||||||
|
// VTABLE: BETA10 0x101c3260
|
||||||
class CameraImpl : public Camera {
|
class CameraImpl : public Camera {
|
||||||
public:
|
public:
|
||||||
|
// FUNCTION: BETA10 0x1016b3e0
|
||||||
CameraImpl() : m_data(0) {}
|
CameraImpl() : m_data(0) {}
|
||||||
~CameraImpl() override
|
|
||||||
{
|
// FUNCTION: BETA10 0x1016f200
|
||||||
if (m_data) {
|
~CameraImpl() override { Destroy(); }
|
||||||
m_data->Release();
|
|
||||||
m_data = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void* ImplementationDataPtr() override;
|
void* ImplementationDataPtr() override;
|
||||||
|
|
||||||
// vtable+0x08
|
// vtable+0x08
|
||||||
Result SetTransformation(FloatMatrix4&) override;
|
Result SetTransformation(FloatMatrix4&) override;
|
||||||
|
|
||||||
IDirect3DRMFrame2* ImplementationData() const { return m_data; }
|
typedef IDirect3DRMFrame2* CameraDataType;
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170960
|
||||||
|
const CameraDataType& ImplementationData() const { return m_data; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170980
|
||||||
|
CameraDataType& ImplementationData() { return m_data; }
|
||||||
|
|
||||||
|
inline void Destroy();
|
||||||
|
|
||||||
friend class RendererImpl;
|
friend class RendererImpl;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IDirect3DRMFrame2* m_data;
|
CameraDataType m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170940
|
||||||
|
inline void CameraDestroy(IDirect3DRMFrame2* pFrame)
|
||||||
|
{
|
||||||
|
pFrame->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170900
|
||||||
|
void CameraImpl::Destroy()
|
||||||
|
{
|
||||||
|
if (m_data) {
|
||||||
|
CameraDestroy(m_data);
|
||||||
|
m_data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dbaf8
|
// VTABLE: LEGO1 0x100dbaf8
|
||||||
|
// VTABLE: BETA10 0x101c3270
|
||||||
class LightImpl : public Light {
|
class LightImpl : public Light {
|
||||||
public:
|
public:
|
||||||
|
// FUNCTION: BETA10 0x1016b460
|
||||||
LightImpl() : m_data(0) {}
|
LightImpl() : m_data(0) {}
|
||||||
~LightImpl() override
|
|
||||||
{
|
// FUNCTION: BETA10 0x1016f5c0
|
||||||
if (m_data) {
|
~LightImpl() override { Destroy(); }
|
||||||
m_data->Release();
|
|
||||||
m_data = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void* ImplementationDataPtr() override;
|
void* ImplementationDataPtr() override;
|
||||||
|
|
||||||
@ -253,25 +364,46 @@ class LightImpl : public Light {
|
|||||||
Result SetTransformation(FloatMatrix4&) override;
|
Result SetTransformation(FloatMatrix4&) override;
|
||||||
Result SetColor(float r, float g, float b) override;
|
Result SetColor(float r, float g, float b) override;
|
||||||
|
|
||||||
IDirect3DRMFrame2* ImplementationData() const { return m_data; }
|
typedef IDirect3DRMFrame2* LightDataType;
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10171b90
|
||||||
|
const LightDataType& ImplementationData() const { return m_data; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10171240
|
||||||
|
LightDataType& ImplementationData() { return m_data; }
|
||||||
|
|
||||||
|
inline void Destroy();
|
||||||
|
|
||||||
friend class RendererImpl;
|
friend class RendererImpl;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IDirect3DRMFrame2* m_data;
|
LightDataType m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10171220
|
||||||
|
inline void LightDestroy(IDirect3DRMFrame2* pLight)
|
||||||
|
{
|
||||||
|
pLight->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x101711e0
|
||||||
|
void LightImpl::Destroy()
|
||||||
|
{
|
||||||
|
if (m_data) {
|
||||||
|
LightDestroy(m_data);
|
||||||
|
m_data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dbb88
|
// VTABLE: LEGO1 0x100dbb88
|
||||||
|
// VTABLE: BETA10 0x101c3340
|
||||||
class MeshImpl : public Mesh {
|
class MeshImpl : public Mesh {
|
||||||
public:
|
public:
|
||||||
|
// FUNCTION: BETA10 0x1016f970
|
||||||
MeshImpl() : m_data(0) {}
|
MeshImpl() : m_data(0) {}
|
||||||
~MeshImpl() override
|
|
||||||
{
|
// FUNCTION: BETA10 0x10170460
|
||||||
if (m_data) {
|
~MeshImpl() override { Destroy(); }
|
||||||
delete m_data;
|
|
||||||
m_data = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void* ImplementationDataPtr() override;
|
void* ImplementationDataPtr() override;
|
||||||
|
|
||||||
@ -296,25 +428,43 @@ class MeshImpl : public Mesh {
|
|||||||
typedef MeshData* MeshDataType;
|
typedef MeshData* MeshDataType;
|
||||||
|
|
||||||
const MeshDataType& ImplementationData() const { return m_data; }
|
const MeshDataType& ImplementationData() const { return m_data; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10171b70
|
||||||
MeshDataType& ImplementationData() { return m_data; }
|
MeshDataType& ImplementationData() { return m_data; }
|
||||||
|
|
||||||
|
inline void Destroy();
|
||||||
|
inline Mesh* DeepClone(const MeshBuilderImpl& rMesh);
|
||||||
|
|
||||||
friend class RendererImpl;
|
friend class RendererImpl;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MeshDataType m_data;
|
MeshDataType m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10171b40
|
||||||
|
inline void MeshDestroy(MeshImpl::MeshDataType pMesh)
|
||||||
|
{
|
||||||
|
delete pMesh;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10171b00
|
||||||
|
void MeshImpl::Destroy()
|
||||||
|
{
|
||||||
|
if (m_data) {
|
||||||
|
MeshDestroy(m_data);
|
||||||
|
m_data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dba68
|
// VTABLE: LEGO1 0x100dba68
|
||||||
|
// VTABLE: BETA10 0x101c3150
|
||||||
class GroupImpl : public Group {
|
class GroupImpl : public Group {
|
||||||
public:
|
public:
|
||||||
|
// FUNCTION: BETA10 0x1016a240
|
||||||
GroupImpl() : m_data(0) {}
|
GroupImpl() : m_data(0) {}
|
||||||
~GroupImpl() override
|
|
||||||
{
|
// FUNCTION: BETA10 0x1016a410
|
||||||
if (m_data) {
|
~GroupImpl() override { Destroy(); }
|
||||||
m_data->Release();
|
|
||||||
m_data = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void* ImplementationDataPtr() override;
|
void* ImplementationDataPtr() override;
|
||||||
|
|
||||||
@ -337,25 +487,46 @@ class GroupImpl : public Group {
|
|||||||
// vtable+0x30
|
// vtable+0x30
|
||||||
Result Bounds(D3DVECTOR* p_min, D3DVECTOR* p_max) override;
|
Result Bounds(D3DVECTOR* p_min, D3DVECTOR* p_max) override;
|
||||||
|
|
||||||
IDirect3DRMFrame2* ImplementationData() const { return m_data; }
|
typedef IDirect3DRMFrame2* GroupDataType;
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016fc20
|
||||||
|
const GroupDataType& ImplementationData() const { return m_data; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016fce0
|
||||||
|
GroupDataType& ImplementationData() { return m_data; }
|
||||||
|
|
||||||
|
inline void Destroy();
|
||||||
|
|
||||||
friend class RendererImpl;
|
friend class RendererImpl;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IDirect3DRMFrame2* m_data;
|
GroupDataType m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016c2b0
|
||||||
|
inline void GroupDestroy(IDirect3DRMFrame2* pGroup)
|
||||||
|
{
|
||||||
|
pGroup->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016c270
|
||||||
|
void GroupImpl::Destroy()
|
||||||
|
{
|
||||||
|
if (m_data) {
|
||||||
|
GroupDestroy(m_data);
|
||||||
|
m_data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dbb18
|
// VTABLE: LEGO1 0x100dbb18
|
||||||
|
// VTABLE: BETA10 0x101c31e0
|
||||||
class MeshBuilderImpl : public MeshBuilder {
|
class MeshBuilderImpl : public MeshBuilder {
|
||||||
public:
|
public:
|
||||||
|
// FUNCTION: BETA10 0x1016b260
|
||||||
MeshBuilderImpl() : m_data(0) {}
|
MeshBuilderImpl() : m_data(0) {}
|
||||||
~MeshBuilderImpl() override
|
|
||||||
{
|
// FUNCTION: BETA10 0x1016c7e0
|
||||||
if (m_data) {
|
~MeshBuilderImpl() override { Destroy(); }
|
||||||
m_data->Release();
|
|
||||||
m_data = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void* ImplementationDataPtr() override;
|
void* ImplementationDataPtr() override;
|
||||||
|
|
||||||
@ -375,7 +546,15 @@ class MeshBuilderImpl : public MeshBuilder {
|
|||||||
// vtable+0x10
|
// vtable+0x10
|
||||||
MeshBuilder* Clone() override;
|
MeshBuilder* Clone() override;
|
||||||
|
|
||||||
IDirect3DRMMesh* ImplementationData() const { return m_data; }
|
typedef IDirect3DRMMesh* MeshBuilderDataType;
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170420
|
||||||
|
const MeshBuilderDataType& ImplementationData() const { return m_data; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170440
|
||||||
|
MeshBuilderDataType& ImplementationData() { return m_data; }
|
||||||
|
|
||||||
|
inline void Destroy();
|
||||||
|
|
||||||
friend class RendererImpl;
|
friend class RendererImpl;
|
||||||
|
|
||||||
@ -392,9 +571,24 @@ class MeshBuilderImpl : public MeshBuilder {
|
|||||||
ShadingModel shadingModel
|
ShadingModel shadingModel
|
||||||
);
|
);
|
||||||
|
|
||||||
IDirect3DRMMesh* m_data;
|
MeshBuilderDataType m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170390
|
||||||
|
inline void MeshBuilderDestroy(IDirect3DRMMesh* pMeshBuilder)
|
||||||
|
{
|
||||||
|
pMeshBuilder->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170350
|
||||||
|
void MeshBuilderImpl::Destroy()
|
||||||
|
{
|
||||||
|
if (m_data) {
|
||||||
|
MeshBuilderDestroy(m_data);
|
||||||
|
m_data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// No vtable, this is just a simple wrapper around D3DRMIMAGE
|
// No vtable, this is just a simple wrapper around D3DRMIMAGE
|
||||||
class TglD3DRMIMAGE {
|
class TglD3DRMIMAGE {
|
||||||
public:
|
public:
|
||||||
@ -419,16 +613,14 @@ class TglD3DRMIMAGE {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dbb48
|
// VTABLE: LEGO1 0x100dbb48
|
||||||
|
// VTABLE: BETA10 0x101c31c0
|
||||||
class TextureImpl : public Texture {
|
class TextureImpl : public Texture {
|
||||||
public:
|
public:
|
||||||
|
// FUNCTION: BETA10 0x1016b1e0
|
||||||
TextureImpl() : m_data(0) {}
|
TextureImpl() : m_data(0) {}
|
||||||
~TextureImpl() override
|
|
||||||
{
|
// FUNCTION: BETA10 0x1016c2d0
|
||||||
if (m_data) {
|
~TextureImpl() override { Destroy(); }
|
||||||
m_data->Release();
|
|
||||||
m_data = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void* ImplementationDataPtr() override;
|
void* ImplementationDataPtr() override;
|
||||||
|
|
||||||
@ -448,18 +640,43 @@ class TextureImpl : public Texture {
|
|||||||
) override;
|
) override;
|
||||||
Result SetPalette(int entryCount, PaletteEntry* entries) override;
|
Result SetPalette(int entryCount, PaletteEntry* entries) override;
|
||||||
|
|
||||||
IDirect3DRMTexture* ImplementationData() const { return m_data; }
|
typedef IDirect3DRMTexture* TextureDataType;
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016fd60
|
||||||
|
const TextureDataType& ImplementationData() const { return m_data; }
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016fe20
|
||||||
|
TextureDataType& ImplementationData() { return m_data; }
|
||||||
|
|
||||||
void SetImplementation(IDirect3DRMTexture* pData) { m_data = pData; }
|
void SetImplementation(IDirect3DRMTexture* pData) { m_data = pData; }
|
||||||
|
|
||||||
|
inline void Destroy();
|
||||||
|
|
||||||
friend class RendererImpl;
|
friend class RendererImpl;
|
||||||
|
|
||||||
static Result SetImage(IDirect3DRMTexture* pSelf, TglD3DRMIMAGE* pImage);
|
static Result SetImage(IDirect3DRMTexture* pSelf, TglD3DRMIMAGE* pImage);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IDirect3DRMTexture* m_data;
|
TextureDataType m_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016fd40
|
||||||
|
inline void TextureDestroy(IDirect3DRMTexture* pTexture)
|
||||||
|
{
|
||||||
|
pTexture->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016fd00
|
||||||
|
void TextureImpl::Destroy()
|
||||||
|
{
|
||||||
|
if (m_data) {
|
||||||
|
TextureDestroy(m_data);
|
||||||
|
m_data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Translation helpers
|
// Translation helpers
|
||||||
|
// FUNCTION: BETA10 0x1016fc40
|
||||||
inline D3DRMRENDERQUALITY Translate(ShadingModel tglShadingModel)
|
inline D3DRMRENDERQUALITY Translate(ShadingModel tglShadingModel)
|
||||||
{
|
{
|
||||||
D3DRMRENDERQUALITY renderQuality;
|
D3DRMRENDERQUALITY renderQuality;
|
||||||
@ -488,6 +705,7 @@ inline D3DRMRENDERQUALITY Translate(ShadingModel tglShadingModel)
|
|||||||
return renderQuality;
|
return renderQuality;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x101703b0
|
||||||
inline D3DRMPROJECTIONTYPE Translate(ProjectionType tglProjectionType)
|
inline D3DRMPROJECTIONTYPE Translate(ProjectionType tglProjectionType)
|
||||||
{
|
{
|
||||||
D3DRMPROJECTIONTYPE projectionType;
|
D3DRMPROJECTIONTYPE projectionType;
|
||||||
@ -518,33 +736,85 @@ inline D3DRMMATRIX4D* Translate(FloatMatrix4& tglMatrix4x4, D3DRMMATRIX4D& rD3DR
|
|||||||
return &rD3DRMMatrix4x4;
|
return &rD3DRMMatrix4x4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016fba0
|
||||||
|
inline D3DVECTOR* Translate(const float tglVector[3], D3DVECTOR& rD3DVector)
|
||||||
|
{
|
||||||
|
rD3DVector.x = D3DVAL(tglVector[0]);
|
||||||
|
rD3DVector.y = D3DVAL(tglVector[1]);
|
||||||
|
rD3DVector.z = D3DVAL(tglVector[2]);
|
||||||
|
|
||||||
|
return &rD3DVector;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016fd80
|
||||||
|
inline D3DRMLIGHTTYPE Translate(LightType tglLightType)
|
||||||
|
{
|
||||||
|
D3DRMLIGHTTYPE lightType;
|
||||||
|
|
||||||
|
// ??? use lookup table
|
||||||
|
switch (tglLightType) {
|
||||||
|
case Ambient:
|
||||||
|
lightType = D3DRMLIGHT_AMBIENT;
|
||||||
|
break;
|
||||||
|
case Point:
|
||||||
|
lightType = D3DRMLIGHT_POINT;
|
||||||
|
break;
|
||||||
|
case Spot:
|
||||||
|
lightType = D3DRMLIGHT_SPOT;
|
||||||
|
break;
|
||||||
|
case Directional:
|
||||||
|
lightType = D3DRMLIGHT_DIRECTIONAL;
|
||||||
|
break;
|
||||||
|
case ParallelPoint:
|
||||||
|
lightType = D3DRMLIGHT_PARALLELPOINT;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
lightType = D3DRMLIGHT_AMBIENT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return lightType;
|
||||||
|
}
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a16d0
|
// SYNTHETIC: LEGO1 0x100a16d0
|
||||||
|
// SYNTHETIC: BETA10 0x10169aa0
|
||||||
// TglImpl::RendererImpl::`scalar deleting destructor'
|
// TglImpl::RendererImpl::`scalar deleting destructor'
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a22c0
|
// SYNTHETIC: LEGO1 0x100a22c0
|
||||||
|
// SYNTHETIC: BETA10 0x1016b700
|
||||||
// TglImpl::DeviceImpl::`scalar deleting destructor'
|
// TglImpl::DeviceImpl::`scalar deleting destructor'
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a23a0
|
// SYNTHETIC: LEGO1 0x100a23a0
|
||||||
|
// SYNTHETIC: BETA10 0x1016b810
|
||||||
// TglImpl::ViewImpl::`scalar deleting destructor'
|
// TglImpl::ViewImpl::`scalar deleting destructor'
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2480
|
// SYNTHETIC: LEGO1 0x100a2480
|
||||||
|
// SYNTHETIC: BETA10 0x1016a2c0
|
||||||
// TglImpl::GroupImpl::`scalar deleting destructor'
|
// TglImpl::GroupImpl::`scalar deleting destructor'
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2560
|
// SYNTHETIC: LEGO1 0x100a2560
|
||||||
|
// SYNTHETIC: BETA10 0x1016b920
|
||||||
// TglImpl::CameraImpl::`scalar deleting destructor'
|
// TglImpl::CameraImpl::`scalar deleting destructor'
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2640
|
// SYNTHETIC: LEGO1 0x100a2640
|
||||||
|
// SYNTHETIC: BETA10 0x1016ba30
|
||||||
// TglImpl::LightImpl::`scalar deleting destructor'
|
// TglImpl::LightImpl::`scalar deleting destructor'
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2720
|
// SYNTHETIC: LEGO1 0x100a2720
|
||||||
|
// SYNTHETIC: BETA10 0x1016b5f0
|
||||||
// TglImpl::MeshBuilderImpl::`scalar deleting destructor'
|
// TglImpl::MeshBuilderImpl::`scalar deleting destructor'
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2800
|
// SYNTHETIC: LEGO1 0x100a2800
|
||||||
|
// SYNTHETIC: BETA10 0x1016b4e0
|
||||||
// TglImpl::TextureImpl::`scalar deleting destructor'
|
// TglImpl::TextureImpl::`scalar deleting destructor'
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a3d80
|
// SYNTHETIC: LEGO1 0x100a3d80
|
||||||
|
// SYNTHETIC: BETA10 0x1016fa90
|
||||||
// TglImpl::MeshImpl::`scalar deleting destructor'
|
// TglImpl::MeshImpl::`scalar deleting destructor'
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x10169960
|
||||||
|
// ViewportAppData::`scalar deleting destructor'
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100dd1e0
|
// GLOBAL: LEGO1 0x100dd1e0
|
||||||
// IID_IDirect3DRMMeshBuilder
|
// IID_IDirect3DRMMeshBuilder
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@ DECOMP_SIZE_ASSERT(Light, 0x04);
|
|||||||
DECOMP_SIZE_ASSERT(LightImpl, 0x08);
|
DECOMP_SIZE_ASSERT(LightImpl, 0x08);
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a3770
|
// FUNCTION: LEGO1 0x100a3770
|
||||||
|
// FUNCTION: BETA10 0x1016f630
|
||||||
void* LightImpl::ImplementationDataPtr()
|
void* LightImpl::ImplementationDataPtr()
|
||||||
{
|
{
|
||||||
return reinterpret_cast<void*>(&m_data);
|
return reinterpret_cast<void*>(&m_data);
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#include "impl.h"
|
#include "impl.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
using namespace TglImpl;
|
using namespace TglImpl;
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(D3DRMVERTEX, 0x24);
|
DECOMP_SIZE_ASSERT(D3DRMVERTEX, 0x24);
|
||||||
@ -8,6 +10,7 @@ DECOMP_SIZE_ASSERT(Mesh, 0x04);
|
|||||||
DECOMP_SIZE_ASSERT(MeshImpl, 0x08);
|
DECOMP_SIZE_ASSERT(MeshImpl, 0x08);
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a3ed0
|
// FUNCTION: LEGO1 0x100a3ed0
|
||||||
|
// FUNCTION: BETA10 0x101704d0
|
||||||
void* MeshImpl::ImplementationDataPtr()
|
void* MeshImpl::ImplementationDataPtr()
|
||||||
{
|
{
|
||||||
return reinterpret_cast<void*>(&m_data);
|
return reinterpret_cast<void*>(&m_data);
|
||||||
@ -48,73 +51,112 @@ Result MeshImpl::SetTextureMappingMode(TextureMappingMode mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a3fc0
|
// FUNCTION: BETA10 0x10170750
|
||||||
Result MeshImpl::SetShadingModel(ShadingModel model)
|
inline Result MeshSetShadingModel(MeshImpl::MeshData* pMesh, ShadingModel model)
|
||||||
{
|
{
|
||||||
D3DRMRENDERQUALITY mode;
|
D3DRMRENDERQUALITY mode = Translate(model);
|
||||||
switch (model) {
|
return ResultVal(pMesh->groupMesh->SetGroupQuality(pMesh->groupIndex, mode));
|
||||||
case Wireframe:
|
|
||||||
mode = D3DRMRENDER_WIREFRAME;
|
|
||||||
break;
|
|
||||||
case UnlitFlat:
|
|
||||||
mode = D3DRMRENDER_UNLITFLAT;
|
|
||||||
break;
|
|
||||||
case Flat:
|
|
||||||
mode = D3DRMRENDER_FLAT;
|
|
||||||
break;
|
|
||||||
case Gouraud:
|
|
||||||
mode = D3DRMRENDER_GOURAUD;
|
|
||||||
break;
|
|
||||||
case Phong:
|
|
||||||
mode = D3DRMRENDER_PHONG;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return ResultVal(m_data->groupMesh->SetGroupQuality(m_data->groupIndex, mode));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a4030
|
// FUNCTION: LEGO1 0x100a3fc0
|
||||||
Mesh* MeshImpl::DeepClone(MeshBuilder* pMeshBuilder)
|
// FUNCTION: BETA10 0x101706f0
|
||||||
|
Result MeshImpl::SetShadingModel(ShadingModel model)
|
||||||
{
|
{
|
||||||
// Create group
|
assert(m_data);
|
||||||
MeshImpl* newMesh = new MeshImpl();
|
return MeshSetShadingModel(m_data, model);
|
||||||
MeshData* data = new MeshData();
|
}
|
||||||
newMesh->m_data = data;
|
|
||||||
|
// FUNCTION: BETA10 0x101714e0
|
||||||
|
inline Result MeshDeepClone(MeshImpl::MeshData* pSource, MeshImpl::MeshData*& rpTarget, IDirect3DRMMesh* pMesh)
|
||||||
|
{
|
||||||
|
rpTarget = new MeshImpl::MeshData();
|
||||||
|
rpTarget->groupMesh = pMesh;
|
||||||
|
|
||||||
// Query information from old group
|
// Query information from old group
|
||||||
DWORD dataSize;
|
DWORD dataSize;
|
||||||
unsigned int vcount, fcount, vperface;
|
unsigned int vcount, fcount, vperface;
|
||||||
m_data->groupMesh->GetGroup(m_data->groupIndex, &vcount, &fcount, &vperface, &dataSize, NULL);
|
|
||||||
|
Result result =
|
||||||
|
ResultVal(pSource->groupMesh->GetGroup(pSource->groupIndex, &vcount, &fcount, &vperface, &dataSize, NULL));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
unsigned int* faceBuffer = new unsigned int[dataSize];
|
unsigned int* faceBuffer = new unsigned int[dataSize];
|
||||||
m_data->groupMesh->GetGroup(m_data->groupIndex, &vcount, &fcount, &vperface, &dataSize, faceBuffer);
|
result =
|
||||||
|
ResultVal(pSource->groupMesh->GetGroup(pSource->groupIndex, &vcount, &fcount, &vperface, &dataSize, faceBuffer)
|
||||||
|
);
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
// We expect vertex to be sized 0x24, checked at start of file.
|
// We expect vertex to be sized 0x24, checked at start of file.
|
||||||
D3DRMVERTEX* vertexBuffer = new D3DRMVERTEX[vcount];
|
D3DRMVERTEX* vertexBuffer = new D3DRMVERTEX[vcount];
|
||||||
m_data->groupMesh->GetVertices(m_data->groupIndex, 0, vcount, vertexBuffer);
|
result = ResultVal(pSource->groupMesh->GetVertices(pSource->groupIndex, 0, vcount, vertexBuffer));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
LPDIRECT3DRMTEXTURE textureRef;
|
LPDIRECT3DRMTEXTURE textureRef;
|
||||||
m_data->groupMesh->GetGroupTexture(m_data->groupIndex, &textureRef);
|
result = ResultVal(pSource->groupMesh->GetGroupTexture(pSource->groupIndex, &textureRef));
|
||||||
D3DRMMAPPING mapping = m_data->groupMesh->GetGroupMapping(m_data->groupIndex);
|
assert(Succeeded(result));
|
||||||
D3DRMRENDERQUALITY quality = m_data->groupMesh->GetGroupQuality(m_data->groupIndex);
|
|
||||||
D3DCOLOR color = m_data->groupMesh->GetGroupColor(m_data->groupIndex);
|
D3DRMMAPPING mapping = pSource->groupMesh->GetGroupMapping(pSource->groupIndex);
|
||||||
|
D3DRMRENDERQUALITY quality = pSource->groupMesh->GetGroupQuality(pSource->groupIndex);
|
||||||
|
D3DCOLOR color = pSource->groupMesh->GetGroupColor(pSource->groupIndex);
|
||||||
|
|
||||||
// Push information to new group
|
// Push information to new group
|
||||||
MeshBuilderImpl* target = static_cast<MeshBuilderImpl*>(pMeshBuilder);
|
|
||||||
D3DRMGROUPINDEX index;
|
D3DRMGROUPINDEX index;
|
||||||
target->ImplementationData()->AddGroup(vcount, fcount, vperface, faceBuffer, &index);
|
result = ResultVal(pMesh->AddGroup(vcount, fcount, 3, faceBuffer, &index));
|
||||||
newMesh->m_data->groupIndex = index;
|
assert(Succeeded(result));
|
||||||
target->ImplementationData()->SetVertices(index, 0, vcount, vertexBuffer);
|
|
||||||
target->ImplementationData()->SetGroupTexture(index, textureRef);
|
rpTarget->groupIndex = index;
|
||||||
target->ImplementationData()->SetGroupMapping(index, mapping);
|
result = ResultVal(pMesh->SetVertices(index, 0, vcount, vertexBuffer));
|
||||||
target->ImplementationData()->SetGroupQuality(index, quality);
|
assert(Succeeded(result));
|
||||||
Result result = ResultVal(target->ImplementationData()->SetGroupColor(index, color));
|
|
||||||
|
result = ResultVal(pMesh->SetGroupTexture(index, textureRef));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
|
result = ResultVal(pMesh->SetGroupMapping(index, mapping));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
|
result = ResultVal(pMesh->SetGroupQuality(index, quality));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
|
result = ResultVal(pMesh->SetGroupColor(index, color));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
// Cleanup
|
// Cleanup
|
||||||
delete[] faceBuffer;
|
if (faceBuffer) {
|
||||||
delete[] vertexBuffer;
|
delete[] faceBuffer;
|
||||||
if (result == Error) {
|
|
||||||
delete newMesh;
|
|
||||||
newMesh = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return newMesh;
|
if (vertexBuffer) {
|
||||||
|
delete[] vertexBuffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10171360
|
||||||
|
inline Mesh* MeshImpl::DeepClone(const MeshBuilderImpl& rMesh)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(rMesh.ImplementationData());
|
||||||
|
|
||||||
|
MeshImpl* clone = new MeshImpl();
|
||||||
|
assert(!clone->ImplementationData());
|
||||||
|
|
||||||
|
if (!MeshDeepClone(m_data, clone->ImplementationData(), rMesh.ImplementationData())) {
|
||||||
|
delete clone;
|
||||||
|
clone = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100a4030
|
||||||
|
// FUNCTION: BETA10 0x101707a0
|
||||||
|
Mesh* MeshImpl::DeepClone(MeshBuilder* pMesh)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(pMesh);
|
||||||
|
|
||||||
|
return DeepClone(*static_cast<MeshBuilderImpl*>(pMesh));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a4240
|
// FUNCTION: LEGO1 0x100a4240
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
#include "impl.h"
|
#include "impl.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
using namespace TglImpl;
|
using namespace TglImpl;
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MeshBuilder, 0x04);
|
DECOMP_SIZE_ASSERT(MeshBuilder, 0x04);
|
||||||
DECOMP_SIZE_ASSERT(MeshBuilderImpl, 0x08);
|
DECOMP_SIZE_ASSERT(MeshBuilderImpl, 0x08);
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a3830
|
// FUNCTION: LEGO1 0x100a3830
|
||||||
|
// FUNCTION: BETA10 0x1016c9f0
|
||||||
void* MeshBuilderImpl::ImplementationDataPtr()
|
void* MeshBuilderImpl::ImplementationDataPtr()
|
||||||
{
|
{
|
||||||
return reinterpret_cast<void*>(&m_data);
|
return reinterpret_cast<void*>(&m_data);
|
||||||
@ -158,12 +161,12 @@ inline Result MeshBuilderImpl::CreateMeshImpl(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a3ae0
|
// FUNCTION: BETA10 0x1016e060
|
||||||
Result MeshBuilderImpl::GetBoundingBox(float min[3], float max[3]) const
|
inline Result MeshBuilderGetBoundingBox(IDirect3DRMMesh* pMesh, float min[3], float max[3])
|
||||||
{
|
{
|
||||||
D3DRMBOX box;
|
D3DRMBOX box;
|
||||||
Result result = ResultVal(m_data->GetBox(&box));
|
Result result = ResultVal(pMesh->GetBox(&box));
|
||||||
if (result == Success) {
|
if (Succeeded(result)) {
|
||||||
min[0] = box.min.x;
|
min[0] = box.min.x;
|
||||||
min[1] = box.min.y;
|
min[1] = box.min.y;
|
||||||
min[2] = box.min.z;
|
min[2] = box.min.z;
|
||||||
@ -174,6 +177,15 @@ Result MeshBuilderImpl::GetBoundingBox(float min[3], float max[3]) const
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100a3ae0
|
||||||
|
// FUNCTION: BETA10 0x1016ce00
|
||||||
|
Result MeshBuilderImpl::GetBoundingBox(float min[3], float max[3]) const
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
|
||||||
|
return MeshBuilderGetBoundingBox(m_data, min, max);
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a3b40
|
// FUNCTION: LEGO1 0x100a3b40
|
||||||
MeshBuilder* MeshBuilderImpl::Clone()
|
MeshBuilder* MeshBuilderImpl::Clone()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#include "impl.h"
|
#include "impl.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
using namespace TglImpl;
|
using namespace TglImpl;
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a15e0
|
// FUNCTION: LEGO1 0x100a15e0
|
||||||
@ -34,64 +36,158 @@ Result RendererImpl::Create()
|
|||||||
return (m_data != NULL) ? Success : Error;
|
return (m_data != NULL) ? Success : Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016cf00
|
||||||
|
inline Result RendererCreateDevice(
|
||||||
|
IDirect3DRM2* pD3DRM,
|
||||||
|
const DeviceDirect3DCreateData& rCreateData,
|
||||||
|
IDirect3DRMDevice2*& rpDevice
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Result result =
|
||||||
|
ResultVal(pD3DRM->CreateDeviceFromD3D(rCreateData.m_pDirect3D, rCreateData.m_pDirect3DDevice, &rpDevice));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016ce60
|
||||||
|
inline Result RendererImpl::CreateDevice(const DeviceDirect3DCreateData& rCreateData, DeviceImpl& rDevice)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(!rDevice.ImplementationData());
|
||||||
|
|
||||||
|
return RendererCreateDevice(m_data, rCreateData, rDevice.ImplementationData());
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a1830
|
// FUNCTION: LEGO1 0x100a1830
|
||||||
|
// FUNCTION: BETA10 0x10169d90
|
||||||
Device* RendererImpl::CreateDevice(const DeviceDirect3DCreateData& data)
|
Device* RendererImpl::CreateDevice(const DeviceDirect3DCreateData& data)
|
||||||
{
|
{
|
||||||
|
assert(m_data);
|
||||||
DeviceImpl* device = new DeviceImpl();
|
DeviceImpl* device = new DeviceImpl();
|
||||||
HRESULT result = m_data->CreateDeviceFromD3D(data.m_pDirect3D, data.m_pDirect3DDevice, &device->m_data);
|
|
||||||
if (!SUCCEEDED(result)) {
|
if (!CreateDevice(data, *device)) {
|
||||||
delete device;
|
delete device;
|
||||||
device = NULL;
|
device = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016cfe0
|
||||||
|
inline Result RendererCreateDevice(
|
||||||
|
IDirect3DRM2* pD3DRM,
|
||||||
|
const DeviceDirectDrawCreateData& rCreateData,
|
||||||
|
IDirect3DRMDevice2*& rpDevice
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Result result = ResultVal(pD3DRM->CreateDeviceFromSurface(
|
||||||
|
const_cast<GUID*>(rCreateData.m_driverGUID),
|
||||||
|
rCreateData.m_pDirectDraw,
|
||||||
|
rCreateData.m_pBackBuffer,
|
||||||
|
&rpDevice
|
||||||
|
));
|
||||||
|
|
||||||
|
if (Succeeded(result)) {
|
||||||
|
if (rCreateData.m_pBackBuffer) {
|
||||||
|
// LEGO1 0x10101040
|
||||||
|
// GLOBAL: BETA10 0x102055f4
|
||||||
|
static int g_setBufferCount = 1;
|
||||||
|
if (g_setBufferCount) {
|
||||||
|
Result result2 = ResultVal(rpDevice->SetBufferCount(2));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016cf40
|
||||||
|
inline Result RendererImpl::CreateDevice(const DeviceDirectDrawCreateData& rCreateData, DeviceImpl& rDevice)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(!rDevice.ImplementationData());
|
||||||
|
|
||||||
|
return RendererCreateDevice(m_data, rCreateData, rDevice.ImplementationData());
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a1900
|
// FUNCTION: LEGO1 0x100a1900
|
||||||
|
// FUNCTION: BETA10 0x10169ea0
|
||||||
Device* RendererImpl::CreateDevice(const DeviceDirectDrawCreateData& data)
|
Device* RendererImpl::CreateDevice(const DeviceDirectDrawCreateData& data)
|
||||||
{
|
{
|
||||||
// at LEGO1 0x10101040, needs no annotation
|
assert(m_data);
|
||||||
static int g_SetBufferCount = 1;
|
|
||||||
|
|
||||||
DeviceImpl* device = new DeviceImpl();
|
DeviceImpl* device = new DeviceImpl();
|
||||||
HRESULT result = m_data->CreateDeviceFromSurface(
|
|
||||||
const_cast<LPGUID>(data.m_driverGUID),
|
if (!CreateDevice(data, *device)) {
|
||||||
data.m_pDirectDraw,
|
|
||||||
data.m_pBackBuffer,
|
|
||||||
&device->m_data
|
|
||||||
);
|
|
||||||
if (SUCCEEDED(result) && data.m_pBackBuffer && g_SetBufferCount) {
|
|
||||||
device->m_data->SetBufferCount(2);
|
|
||||||
}
|
|
||||||
if (!SUCCEEDED(result)) {
|
|
||||||
delete device;
|
delete device;
|
||||||
device = NULL;
|
device = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016d1d0
|
||||||
inline Result RendererCreateView(
|
inline Result RendererCreateView(
|
||||||
IDirect3DRM2* pRenderer,
|
IDirect3DRM2* pRenderer,
|
||||||
IDirect3DRMDevice2* pDevice,
|
const IDirect3DRMDevice2* pDevice,
|
||||||
IDirect3DRMFrame2* pCamera,
|
const IDirect3DRMFrame2* pCamera,
|
||||||
IDirect3DRMViewport*& rpView,
|
|
||||||
unsigned long x,
|
unsigned long x,
|
||||||
unsigned long y,
|
unsigned long y,
|
||||||
unsigned long width,
|
unsigned long width,
|
||||||
unsigned long height
|
unsigned long height,
|
||||||
|
IDirect3DRMViewport*& rpView
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Result result = ResultVal(pRenderer->CreateViewport(pDevice, pCamera, x, y, width, height, &rpView));
|
Result result = ResultVal(pRenderer->CreateViewport(
|
||||||
|
const_cast<IDirect3DRMDevice2*>(pDevice),
|
||||||
|
const_cast<IDirect3DRMFrame2*>(pCamera),
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
&rpView
|
||||||
|
));
|
||||||
|
|
||||||
if (Succeeded(result)) {
|
if (Succeeded(result)) {
|
||||||
result = ViewImpl::ViewportCreateAppData(pRenderer, rpView, pCamera);
|
result = ViewImpl::ViewportCreateAppData(pRenderer, rpView, const_cast<IDirect3DRMFrame2*>(pCamera));
|
||||||
if (!Succeeded(result)) {
|
if (!Succeeded(result)) {
|
||||||
rpView->Release();
|
rpView->Release();
|
||||||
rpView = NULL;
|
rpView = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016d0b0
|
||||||
|
inline Result RendererImpl::CreateView(
|
||||||
|
const DeviceImpl& rDevice,
|
||||||
|
const CameraImpl& rCamera,
|
||||||
|
unsigned long x,
|
||||||
|
unsigned long y,
|
||||||
|
unsigned long width,
|
||||||
|
unsigned long height,
|
||||||
|
ViewImpl& rView
|
||||||
|
)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(rDevice.ImplementationData());
|
||||||
|
assert(rCamera.ImplementationData());
|
||||||
|
assert(!rView.ImplementationData());
|
||||||
|
|
||||||
|
return RendererCreateView(
|
||||||
|
m_data,
|
||||||
|
rDevice.ImplementationData(),
|
||||||
|
rCamera.ImplementationData(),
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
rView.ImplementationData()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a1a00
|
// FUNCTION: LEGO1 0x100a1a00
|
||||||
|
// FUNCTION: BETA10 0x10169fb0
|
||||||
View* RendererImpl::CreateView(
|
View* RendererImpl::CreateView(
|
||||||
const Device* pDevice,
|
const Device* pDevice,
|
||||||
const Camera* pCamera,
|
const Camera* pCamera,
|
||||||
@ -101,21 +197,24 @@ View* RendererImpl::CreateView(
|
|||||||
unsigned long height
|
unsigned long height
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(pDevice);
|
||||||
|
assert(pCamera);
|
||||||
|
|
||||||
ViewImpl* view = new ViewImpl();
|
ViewImpl* view = new ViewImpl();
|
||||||
Result result = RendererCreateView(
|
if (!CreateView(
|
||||||
m_data,
|
*static_cast<const DeviceImpl*>(pDevice),
|
||||||
static_cast<const DeviceImpl*>(pDevice)->m_data,
|
*static_cast<const CameraImpl*>(pCamera),
|
||||||
static_cast<const CameraImpl*>(pCamera)->m_data,
|
x,
|
||||||
view->m_data,
|
y,
|
||||||
x,
|
width,
|
||||||
y,
|
height,
|
||||||
width,
|
*view
|
||||||
height
|
)) {
|
||||||
);
|
|
||||||
if (!result) {
|
|
||||||
delete view;
|
delete view;
|
||||||
view = NULL;
|
view = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,113 +244,214 @@ Group* RendererImpl::CreateGroup(const Group* pParent)
|
|||||||
return group;
|
return group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016d4b0
|
||||||
|
inline Result RendererCreateCamera(IDirect3DRM2* pD3DRM, IDirect3DRMFrame2*& rpCamera)
|
||||||
|
{
|
||||||
|
return ResultVal(pD3DRM->CreateFrame(NULL, &rpCamera));
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016d420
|
||||||
|
inline Result RendererImpl::CreateCamera(CameraImpl& rCamera)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(!rCamera.ImplementationData());
|
||||||
|
|
||||||
|
return RendererCreateCamera(m_data, rCamera.ImplementationData());
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a1c30
|
// FUNCTION: LEGO1 0x100a1c30
|
||||||
|
// FUNCTION: BETA10 0x1016a980
|
||||||
Camera* RendererImpl::CreateCamera()
|
Camera* RendererImpl::CreateCamera()
|
||||||
{
|
{
|
||||||
|
assert(m_data);
|
||||||
CameraImpl* camera = new CameraImpl();
|
CameraImpl* camera = new CameraImpl();
|
||||||
if (FAILED(m_data->CreateFrame(NULL, &camera->m_data))) {
|
|
||||||
|
if (!CreateCamera(*camera)) {
|
||||||
delete camera;
|
delete camera;
|
||||||
camera = NULL;
|
camera = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return camera;
|
return camera;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016d580
|
||||||
|
inline Result RendererCreateLight(
|
||||||
|
IDirect3DRM2* pD3DRM,
|
||||||
|
LightType type,
|
||||||
|
float r,
|
||||||
|
float g,
|
||||||
|
float b,
|
||||||
|
IDirect3DRMFrame2*& rpLight
|
||||||
|
)
|
||||||
|
{
|
||||||
|
D3DRMLIGHTTYPE lightType = Translate(type);
|
||||||
|
IDirect3DRMFrame2* pLightFrame;
|
||||||
|
IDirect3DRMLight* pLight;
|
||||||
|
Result result;
|
||||||
|
|
||||||
|
result = ResultVal(pD3DRM->CreateFrame(NULL, &pLightFrame));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
if (!Succeeded(result)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
// pLightFrame ref count is now 1
|
||||||
|
assert((pLightFrame->AddRef(), pLightFrame->Release()) == 1);
|
||||||
|
|
||||||
|
result = ResultVal(pD3DRM->CreateLightRGB(lightType, D3DVAL(r), D3DVAL(g), D3DVAL(b), &pLight));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
if (!Succeeded(result)) {
|
||||||
|
pLightFrame->Release();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
// pLight ref count is now 1
|
||||||
|
assert((pLight->AddRef(), pLight->Release()) == 1);
|
||||||
|
|
||||||
|
result = ResultVal(pLightFrame->AddLight(pLight));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
if (!Succeeded(result)) {
|
||||||
|
pLightFrame->Release();
|
||||||
|
pLight->Release();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
// pLightFrame ref count is still 1
|
||||||
|
assert((pLightFrame->AddRef(), pLightFrame->Release()) == 1);
|
||||||
|
|
||||||
|
// pLight ref count is now 2
|
||||||
|
assert((pLight->AddRef(), pLight->Release()) == 2);
|
||||||
|
|
||||||
|
// Release() pLight so it gets deleted when pLightFrame is Release()
|
||||||
|
pLight->Release();
|
||||||
|
|
||||||
|
rpLight = pLightFrame;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016d4e0
|
||||||
|
inline Result RendererImpl::CreateLight(LightType type, float r, float g, float b, LightImpl& rLight)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(!rLight.ImplementationData());
|
||||||
|
|
||||||
|
return RendererCreateLight(m_data, type, r, g, b, rLight.ImplementationData());
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a1cf0
|
// FUNCTION: LEGO1 0x100a1cf0
|
||||||
|
// FUNCTION: BETA10 0x1016aa90
|
||||||
Light* RendererImpl::CreateLight(LightType type, float r, float g, float b)
|
Light* RendererImpl::CreateLight(LightType type, float r, float g, float b)
|
||||||
{
|
{
|
||||||
LightImpl* newLight = new LightImpl();
|
assert(m_data);
|
||||||
D3DRMLIGHTTYPE translatedType;
|
|
||||||
switch (type) {
|
LightImpl* pLightImpl = new LightImpl;
|
||||||
case Ambient:
|
|
||||||
translatedType = D3DRMLIGHT_AMBIENT;
|
if (!CreateLight(type, r, g, b, *pLightImpl)) {
|
||||||
break;
|
delete pLightImpl;
|
||||||
case Point:
|
pLightImpl = 0;
|
||||||
translatedType = D3DRMLIGHT_POINT;
|
|
||||||
break;
|
|
||||||
case Spot:
|
|
||||||
translatedType = D3DRMLIGHT_SPOT;
|
|
||||||
break;
|
|
||||||
case Directional:
|
|
||||||
translatedType = D3DRMLIGHT_DIRECTIONAL;
|
|
||||||
break;
|
|
||||||
case ParallelPoint:
|
|
||||||
translatedType = D3DRMLIGHT_PARALLELPOINT;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
translatedType = D3DRMLIGHT_AMBIENT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LPDIRECT3DRMFRAME2 frame;
|
return pLightImpl;
|
||||||
Result result = ResultVal(m_data->CreateFrame(NULL, &frame));
|
}
|
||||||
if (Succeeded(result)) {
|
|
||||||
LPDIRECT3DRMLIGHT d3dLight;
|
// FUNCTION: BETA10 0x1016d8e0
|
||||||
result = ResultVal(m_data->CreateLightRGB(translatedType, r, g, b, &d3dLight));
|
inline Result RendererCreateMeshBuilder(IDirect3DRM2* pD3DRM, IDirect3DRMMesh*& rpMesh)
|
||||||
if (!Succeeded(result)) {
|
{
|
||||||
frame->Release();
|
return ResultVal(pD3DRM->CreateMesh(&rpMesh));
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
result = ResultVal(frame->AddLight(d3dLight));
|
// FUNCTION: BETA10 0x1016d850
|
||||||
if (!Succeeded(result)) {
|
inline Result RendererImpl::CreateMeshBuilder(MeshBuilderImpl& rMesh)
|
||||||
d3dLight->Release();
|
{
|
||||||
frame->Release();
|
assert(m_data);
|
||||||
}
|
assert(!rMesh.ImplementationData());
|
||||||
else {
|
|
||||||
d3dLight->Release();
|
return RendererCreateMeshBuilder(m_data, rMesh.ImplementationData());
|
||||||
newLight->m_data = frame;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!Succeeded(result)) {
|
|
||||||
delete newLight;
|
|
||||||
newLight = NULL;
|
|
||||||
}
|
|
||||||
return newLight;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a1e90
|
// FUNCTION: LEGO1 0x100a1e90
|
||||||
|
// FUNCTION: BETA10 0x1016abf0
|
||||||
MeshBuilder* RendererImpl::CreateMeshBuilder()
|
MeshBuilder* RendererImpl::CreateMeshBuilder()
|
||||||
{
|
{
|
||||||
|
assert(m_data);
|
||||||
MeshBuilderImpl* meshBuilder = new MeshBuilderImpl();
|
MeshBuilderImpl* meshBuilder = new MeshBuilderImpl();
|
||||||
if (FAILED(m_data->CreateMesh(&meshBuilder->m_data))) {
|
|
||||||
|
if (!CreateMeshBuilder(*static_cast<MeshBuilderImpl*>(meshBuilder))) {
|
||||||
delete meshBuilder;
|
delete meshBuilder;
|
||||||
meshBuilder = NULL;
|
meshBuilder = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return meshBuilder;
|
return meshBuilder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016d9c0
|
||||||
inline Result RendererCreateTexture(
|
inline Result RendererCreateTexture(
|
||||||
IDirect3DRM2* renderer,
|
IDirect3DRM2* pRenderer,
|
||||||
IDirect3DRMTexture*& texture,
|
|
||||||
int width,
|
int width,
|
||||||
int height,
|
int height,
|
||||||
int bytesPerPixel,
|
int bytesPerPixel,
|
||||||
void* pBuffer,
|
void* pBuffer,
|
||||||
int useBuffer,
|
int useBuffer,
|
||||||
int paletteSize,
|
int paletteSize,
|
||||||
PaletteEntry* pEntries
|
PaletteEntry* pEntries,
|
||||||
|
IDirect3DRMTexture*& rpTexture
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
TglD3DRMIMAGE* image;
|
|
||||||
Result result;
|
Result result;
|
||||||
|
|
||||||
image = new TglD3DRMIMAGE(width, height, bytesPerPixel, pBuffer, useBuffer, paletteSize, pEntries);
|
TglD3DRMIMAGE* pImage = new TglD3DRMIMAGE(width, height, bytesPerPixel, pBuffer, useBuffer, paletteSize, pEntries);
|
||||||
|
assert(pImage);
|
||||||
|
|
||||||
// TODO: LPDIRECT3DRMTEXTURE2?
|
// TODO: LPDIRECT3DRMTEXTURE2?
|
||||||
result = ResultVal(renderer->CreateTexture(&image->m_image, (LPDIRECT3DRMTEXTURE2*) &texture));
|
result = ResultVal(pRenderer->CreateTexture(&pImage->m_image, (LPDIRECT3DRMTEXTURE2*) &rpTexture));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
assert((rpTexture->AddRef(), rpTexture->Release()) == 1);
|
||||||
|
|
||||||
if (Succeeded(result)) {
|
if (Succeeded(result)) {
|
||||||
result = TextureImpl::SetImage(texture, image);
|
result = TextureImpl::SetImage(rpTexture, pImage);
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
if (!Succeeded(result)) {
|
if (!Succeeded(result)) {
|
||||||
texture->Release();
|
rpTexture->Release();
|
||||||
texture = NULL;
|
rpTexture = NULL;
|
||||||
delete image;
|
delete pImage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
delete image;
|
delete pImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016d910
|
||||||
|
inline Result RendererImpl::CreateTexture(
|
||||||
|
TextureImpl& rTexture,
|
||||||
|
int width,
|
||||||
|
int height,
|
||||||
|
int bitsPerTexel,
|
||||||
|
const void* pTexels,
|
||||||
|
int texelsArePersistent,
|
||||||
|
int paletteEntryCount,
|
||||||
|
const PaletteEntry* pEntries
|
||||||
|
)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(!rTexture.ImplementationData());
|
||||||
|
|
||||||
|
return RendererCreateTexture(
|
||||||
|
m_data,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
bitsPerTexel,
|
||||||
|
const_cast<void*>(pTexels),
|
||||||
|
texelsArePersistent,
|
||||||
|
paletteEntryCount,
|
||||||
|
const_cast<PaletteEntry*>(pEntries),
|
||||||
|
rTexture.ImplementationData()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a1f50
|
// FUNCTION: LEGO1 0x100a1f50
|
||||||
|
// FUNCTION: BETA10 0x1016ad00
|
||||||
Texture* RendererImpl::CreateTexture(
|
Texture* RendererImpl::CreateTexture(
|
||||||
int width,
|
int width,
|
||||||
int height,
|
int height,
|
||||||
@ -262,10 +462,11 @@ Texture* RendererImpl::CreateTexture(
|
|||||||
const PaletteEntry* pEntries
|
const PaletteEntry* pEntries
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
assert(m_data);
|
||||||
|
|
||||||
TextureImpl* texture = new TextureImpl();
|
TextureImpl* texture = new TextureImpl();
|
||||||
if (!Succeeded(RendererCreateTexture(
|
if (!CreateTexture(
|
||||||
m_data,
|
*texture,
|
||||||
texture->m_data,
|
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
bitsPerTexel,
|
bitsPerTexel,
|
||||||
@ -273,21 +474,40 @@ Texture* RendererImpl::CreateTexture(
|
|||||||
texelsArePersistent,
|
texelsArePersistent,
|
||||||
paletteEntryCount,
|
paletteEntryCount,
|
||||||
const_cast<PaletteEntry*>(pEntries)
|
const_cast<PaletteEntry*>(pEntries)
|
||||||
))) {
|
)) {
|
||||||
delete texture;
|
delete texture;
|
||||||
texture = NULL;
|
texture = NULL;
|
||||||
}
|
}
|
||||||
return texture;
|
return texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016dcb0
|
||||||
|
inline Result RendererCreateTexture(IDirect3DRM2* pRenderer, IDirect3DRMTexture*& rpTexture)
|
||||||
|
{
|
||||||
|
return RendererCreateTexture(pRenderer, 0, 0, 0, NULL, FALSE, 0, NULL, rpTexture);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016dc20
|
||||||
|
inline Result RendererImpl::CreateTexture(TextureImpl& rTexture)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(!rTexture.ImplementationData());
|
||||||
|
|
||||||
|
return RendererCreateTexture(m_data, rTexture.ImplementationData());
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a20d0
|
// FUNCTION: LEGO1 0x100a20d0
|
||||||
|
// FUNCTION: BETA10 0x1016ae20
|
||||||
Texture* RendererImpl::CreateTexture()
|
Texture* RendererImpl::CreateTexture()
|
||||||
{
|
{
|
||||||
|
assert(m_data);
|
||||||
|
|
||||||
TextureImpl* texture = new TextureImpl();
|
TextureImpl* texture = new TextureImpl();
|
||||||
if (!Succeeded(RendererCreateTexture(m_data, texture->m_data, 0, 0, 0, NULL, FALSE, 0, NULL))) {
|
if (!CreateTexture(*texture)) {
|
||||||
delete texture;
|
delete texture;
|
||||||
texture = NULL;
|
texture = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return texture;
|
return texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,6 +524,7 @@ Result RendererImpl::SetTextureDefaultColorCount(unsigned long colorCount)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a22b0
|
// FUNCTION: LEGO1 0x100a22b0
|
||||||
|
// FUNCTION: BETA10 0x1016b050
|
||||||
void* RendererImpl::ImplementationDataPtr()
|
void* RendererImpl::ImplementationDataPtr()
|
||||||
{
|
{
|
||||||
return reinterpret_cast<void*>(&m_data);
|
return reinterpret_cast<void*>(&m_data);
|
||||||
|
|||||||
@ -224,6 +224,7 @@ Result TextureImpl::SetPalette(int entryCount, PaletteEntry* pEntries)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a3d70
|
// FUNCTION: LEGO1 0x100a3d70
|
||||||
|
// FUNCTION: BETA10 0x1016c760
|
||||||
void* TextureImpl::ImplementationDataPtr()
|
void* TextureImpl::ImplementationDataPtr()
|
||||||
{
|
{
|
||||||
return reinterpret_cast<void*>(&m_data);
|
return reinterpret_cast<void*>(&m_data);
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#include "impl.h"
|
#include "impl.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
using namespace TglImpl;
|
using namespace TglImpl;
|
||||||
|
|
||||||
struct ViewportAppData {
|
struct ViewportAppData {
|
||||||
@ -17,9 +19,12 @@ struct ViewportAppData {
|
|||||||
DECOMP_SIZE_ASSERT(ViewportAppData, 0x18);
|
DECOMP_SIZE_ASSERT(ViewportAppData, 0x18);
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a10b0
|
// FUNCTION: LEGO1 0x100a10b0
|
||||||
|
// FUNCTION: BETA10 0x10168920
|
||||||
ViewportAppData::ViewportAppData(IDirect3DRM2* pRenderer)
|
ViewportAppData::ViewportAppData(IDirect3DRM2* pRenderer)
|
||||||
{
|
{
|
||||||
pRenderer->CreateFrame(NULL, &m_pLightFrame);
|
Result result = ResultVal(pRenderer->CreateFrame(NULL, &m_pLightFrame));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
m_pCamera = NULL;
|
m_pCamera = NULL;
|
||||||
m_pLastRenderedFrame = NULL;
|
m_pLastRenderedFrame = NULL;
|
||||||
m_backgroundColorRed = 0.0f;
|
m_backgroundColorRed = 0.0f;
|
||||||
@ -28,39 +33,68 @@ ViewportAppData::ViewportAppData(IDirect3DRM2* pRenderer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a10e0
|
// FUNCTION: LEGO1 0x100a10e0
|
||||||
|
// FUNCTION: BETA10 0x101689bd
|
||||||
ViewportAppData::~ViewportAppData()
|
ViewportAppData::~ViewportAppData()
|
||||||
{
|
{
|
||||||
|
int refCount;
|
||||||
IDirect3DRMFrameArray* pChildFrames;
|
IDirect3DRMFrameArray* pChildFrames;
|
||||||
IDirect3DRMFrame* pChildFrame = NULL;
|
IDirect3DRMFrame* pChildFrame = NULL;
|
||||||
m_pLightFrame->GetChildren(&pChildFrames);
|
Result result = ResultVal(m_pLightFrame->GetChildren(&pChildFrames));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
for (int i = 0; i < (int) pChildFrames->GetSize(); i++) {
|
for (int i = 0; i < (int) pChildFrames->GetSize(); i++) {
|
||||||
pChildFrames->GetElement(i, &pChildFrame);
|
result = ResultVal(pChildFrames->GetElement(i, &pChildFrame));
|
||||||
m_pLightFrame->DeleteChild(pChildFrame);
|
assert(Succeeded(result));
|
||||||
pChildFrame->Release(); // GetElement() does AddRef()
|
|
||||||
|
result = ResultVal(m_pLightFrame->DeleteChild(pChildFrame));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
|
refCount = pChildFrame->Release(); // GetElement() does AddRef()
|
||||||
|
assert(refCount >= 1);
|
||||||
}
|
}
|
||||||
pChildFrames->Release();
|
|
||||||
m_pLightFrame->Release();
|
refCount = pChildFrames->Release();
|
||||||
|
assert(refCount == 0);
|
||||||
|
|
||||||
|
refCount = m_pLightFrame->Release();
|
||||||
|
assert(refCount == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forward declare to satisfy order check
|
// Forward declare to satisfy order check
|
||||||
void ViewportDestroyCallback(IDirect3DRMObject* pObject, void* pArg);
|
void ViewportDestroyCallback(IDirect3DRMObject* pObject, void* pArg);
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a1160
|
// FUNCTION: LEGO1 0x100a1160
|
||||||
Result ViewImpl::ViewportCreateAppData(IDirect3DRM2* pDevice, IDirect3DRMViewport* pView, IDirect3DRMFrame2* pCamera)
|
// FUNCTION: BETA10 0x10168ba5
|
||||||
|
Result ViewImpl::ViewportCreateAppData(
|
||||||
|
IDirect3DRM2* pDevice,
|
||||||
|
IDirect3DRMViewport* pViewport,
|
||||||
|
IDirect3DRMFrame2* pCamera
|
||||||
|
)
|
||||||
{
|
{
|
||||||
ViewportAppData* data = new ViewportAppData(pDevice);
|
ViewportAppData* pViewportAppData = new ViewportAppData(pDevice);
|
||||||
data->m_pCamera = pCamera;
|
assert(pViewportAppData);
|
||||||
Result result = ResultVal(pView->SetAppData(reinterpret_cast<LPD3DRM_APPDATA>(data)));
|
|
||||||
|
pViewportAppData->m_pCamera = pCamera;
|
||||||
|
assert(!pViewport->GetAppData());
|
||||||
|
|
||||||
|
Result result = ResultVal(pViewport->SetAppData(reinterpret_cast<LPD3DRM_APPDATA>(pViewportAppData)));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
assert(reinterpret_cast<ViewportAppData*>(pViewport->GetAppData()) == pViewportAppData);
|
||||||
|
|
||||||
if (Succeeded(result)) {
|
if (Succeeded(result)) {
|
||||||
result = ResultVal(pView->AddDestroyCallback(ViewportDestroyCallback, data));
|
result = ResultVal(pViewport->AddDestroyCallback(ViewportDestroyCallback, pViewportAppData));
|
||||||
|
assert(Succeeded(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Succeeded(result)) {
|
if (!Succeeded(result)) {
|
||||||
delete data;
|
delete pViewportAppData;
|
||||||
pView->SetAppData(0);
|
pViewport->SetAppData(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016bd80
|
||||||
inline Result ViewRestoreFrameAfterRender(
|
inline Result ViewRestoreFrameAfterRender(
|
||||||
IDirect3DRMFrame* pFrame,
|
IDirect3DRMFrame* pFrame,
|
||||||
IDirect3DRMFrame* pCamera,
|
IDirect3DRMFrame* pCamera,
|
||||||
@ -72,7 +106,11 @@ inline Result ViewRestoreFrameAfterRender(
|
|||||||
// remove camera and light frame from frame that was rendered
|
// remove camera and light frame from frame that was rendered
|
||||||
// this doesn't destroy the camera as it is still the camera of the viewport...
|
// this doesn't destroy the camera as it is still the camera of the viewport...
|
||||||
result = ResultVal(pFrame->DeleteChild(pCamera));
|
result = ResultVal(pFrame->DeleteChild(pCamera));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
assert((pCamera->AddRef(), pCamera->Release()) > 0);
|
||||||
|
|
||||||
result = ResultVal(pFrame->DeleteChild(pLightFrame));
|
result = ResultVal(pFrame->DeleteChild(pLightFrame));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
// decrease frame's ref count (it was increased in ViewPrepareFrameForRender())
|
// decrease frame's ref count (it was increased in ViewPrepareFrameForRender())
|
||||||
pFrame->Release();
|
pFrame->Release();
|
||||||
@ -83,25 +121,31 @@ inline Result ViewRestoreFrameAfterRender(
|
|||||||
// FIXME: from LEGO1/tgl/d3drm/view.cpp
|
// FIXME: from LEGO1/tgl/d3drm/view.cpp
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a1240
|
// FUNCTION: LEGO1 0x100a1240
|
||||||
|
// FUNCTION: BETA10 0x10168dc9
|
||||||
void ViewportDestroyCallback(IDirect3DRMObject* pObject, void* pArg)
|
void ViewportDestroyCallback(IDirect3DRMObject* pObject, void* pArg)
|
||||||
{
|
{
|
||||||
ViewportAppData* pViewportAppData = reinterpret_cast<ViewportAppData*>(pArg);
|
ViewportAppData* pViewportAppData = reinterpret_cast<ViewportAppData*>(pArg);
|
||||||
|
assert(static_cast<ViewImpl::ViewDataType>(pObject));
|
||||||
|
assert(pViewportAppData);
|
||||||
|
|
||||||
ViewRestoreFrameAfterRender(
|
Result result = ViewRestoreFrameAfterRender(
|
||||||
pViewportAppData->m_pLastRenderedFrame,
|
pViewportAppData->m_pLastRenderedFrame,
|
||||||
pViewportAppData->m_pCamera,
|
pViewportAppData->m_pCamera,
|
||||||
pViewportAppData->m_pLightFrame
|
pViewportAppData->m_pLightFrame
|
||||||
);
|
);
|
||||||
|
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
delete pViewportAppData;
|
delete pViewportAppData;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a1290
|
// FUNCTION: LEGO1 0x100a1290
|
||||||
|
// FUNCTION: BETA10 0x10168eab
|
||||||
Result ViewportPickImpl(
|
Result ViewportPickImpl(
|
||||||
IDirect3DRMViewport* pViewport,
|
IDirect3DRMViewport* pViewport,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
const Group** ppGroupsToPickFrom,
|
const GroupImpl** ppGroupsToPickFrom,
|
||||||
int groupsToPickFromCount,
|
int groupsToPickFromCount,
|
||||||
const Group**& rppPickedGroups,
|
const Group**& rppPickedGroups,
|
||||||
int& rPickedGroupCount
|
int& rPickedGroupCount
|
||||||
@ -116,108 +160,230 @@ inline ViewportAppData* ViewportGetData(IDirect3DRMViewport* pViewport)
|
|||||||
return reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
|
return reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170ab0
|
||||||
inline IDirect3DRMFrame* ViewportGetLightFrame(IDirect3DRMViewport* pViewport)
|
inline IDirect3DRMFrame* ViewportGetLightFrame(IDirect3DRMViewport* pViewport)
|
||||||
{
|
{
|
||||||
return ViewportGetData(pViewport)->m_pLightFrame;
|
assert(pViewport->GetAppData());
|
||||||
|
return reinterpret_cast<ViewportAppData*>(pViewport->GetAppData())->m_pLightFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2d80
|
// FUNCTION: LEGO1 0x100a2d80
|
||||||
|
// FUNCTION: BETA10 0x1016e640
|
||||||
void* ViewImpl::ImplementationDataPtr()
|
void* ViewImpl::ImplementationDataPtr()
|
||||||
{
|
{
|
||||||
return reinterpret_cast<void*>(&m_data);
|
return reinterpret_cast<void*>(&m_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170a40
|
||||||
|
inline Result ViewAddLight(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame* pLight)
|
||||||
|
{
|
||||||
|
IDirect3DRMFrame* pLightFrame = ViewportGetLightFrame(pViewport);
|
||||||
|
|
||||||
|
assert(pLightFrame);
|
||||||
|
return ResultVal(pLightFrame->AddChild(const_cast<IDirect3DRMFrame*>(pLight)));
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x101709a0
|
||||||
|
inline Result ViewImpl::Add(const LightImpl& rLight)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(rLight.ImplementationData());
|
||||||
|
|
||||||
|
return ViewAddLight(m_data, rLight.ImplementationData());
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2d90
|
// FUNCTION: LEGO1 0x100a2d90
|
||||||
|
// FUNCTION: BETA10 0x1016e690
|
||||||
Result ViewImpl::Add(const Light* pLight)
|
Result ViewImpl::Add(const Light* pLight)
|
||||||
{
|
{
|
||||||
const LightImpl* light = static_cast<const LightImpl*>(pLight);
|
assert(m_data);
|
||||||
IDirect3DRMFrame* frame = light->ImplementationData();
|
assert(pLight);
|
||||||
return ResultVal(ViewportGetLightFrame(m_data)->AddChild(frame));
|
|
||||||
|
return Add(*static_cast<const LightImpl*>(pLight));
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170bb0
|
||||||
|
inline Result ViewRemoveLight(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame* pLight)
|
||||||
|
{
|
||||||
|
IDirect3DRMFrame* pLightFrame = ViewportGetLightFrame(pViewport);
|
||||||
|
|
||||||
|
assert(pLightFrame);
|
||||||
|
return ResultVal(pLightFrame->DeleteChild(const_cast<IDirect3DRMFrame*>(pLight)));
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170b10
|
||||||
|
inline Result ViewImpl::Remove(const LightImpl& rLight)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(rLight.ImplementationData());
|
||||||
|
|
||||||
|
return ViewRemoveLight(m_data, rLight.ImplementationData());
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2dc0
|
// FUNCTION: LEGO1 0x100a2dc0
|
||||||
|
// FUNCTION: BETA10 0x1016e710
|
||||||
Result ViewImpl::Remove(const Light* pLight)
|
Result ViewImpl::Remove(const Light* pLight)
|
||||||
{
|
{
|
||||||
const LightImpl* light = static_cast<const LightImpl*>(pLight);
|
assert(m_data);
|
||||||
IDirect3DRMFrame* frame = light->ImplementationData();
|
assert(pLight);
|
||||||
return ResultVal(ViewportGetLightFrame(m_data)->DeleteChild(frame));
|
|
||||||
|
return Remove(*static_cast<const LightImpl*>(pLight));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2df0
|
// FUNCTION: BETA10 0x10170cc0
|
||||||
Result ViewImpl::SetCamera(const Camera* pCamera)
|
inline Result ViewSetCamera(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame2* pCamera)
|
||||||
{
|
{
|
||||||
const CameraImpl* camera = static_cast<const CameraImpl*>(pCamera);
|
|
||||||
IDirect3DRMFrame2* frame = camera->ImplementationData();
|
|
||||||
|
|
||||||
ViewportAppData* pViewportAppData;
|
ViewportAppData* pViewportAppData;
|
||||||
Result result;
|
Result result;
|
||||||
|
|
||||||
pViewportAppData = reinterpret_cast<ViewportAppData*>(m_data->GetAppData());
|
pViewportAppData = reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
|
||||||
|
assert(pViewportAppData);
|
||||||
|
|
||||||
result = ViewRestoreFrameAfterRender(
|
result = ViewRestoreFrameAfterRender(
|
||||||
pViewportAppData->m_pLastRenderedFrame,
|
pViewportAppData->m_pLastRenderedFrame,
|
||||||
pViewportAppData->m_pCamera,
|
pViewportAppData->m_pCamera,
|
||||||
pViewportAppData->m_pLightFrame
|
pViewportAppData->m_pLightFrame
|
||||||
);
|
);
|
||||||
pViewportAppData->m_pCamera = frame;
|
assert(Succeeded(result));
|
||||||
|
pViewportAppData->m_pCamera = const_cast<IDirect3DRMFrame2*>(pCamera);
|
||||||
pViewportAppData->m_pLastRenderedFrame = 0;
|
pViewportAppData->m_pLastRenderedFrame = 0;
|
||||||
|
|
||||||
return ResultVal(m_data->SetCamera(frame));
|
return ResultVal(pViewport->SetCamera(const_cast<IDirect3DRMFrame2*>(pCamera)));
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170c20
|
||||||
|
inline Result ViewImpl::SetCamera(const CameraImpl& rCamera)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(rCamera.ImplementationData());
|
||||||
|
|
||||||
|
return ViewSetCamera(m_data, rCamera.ImplementationData());
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100a2df0
|
||||||
|
// FUNCTION: BETA10 0x1016e790
|
||||||
|
Result ViewImpl::SetCamera(const Camera* pCamera)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(pCamera);
|
||||||
|
|
||||||
|
return SetCamera(*static_cast<const CameraImpl*>(pCamera));
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016e870
|
||||||
|
inline Result ViewSetProjection(IDirect3DRMViewport* pViewport, ProjectionType type)
|
||||||
|
{
|
||||||
|
D3DRMPROJECTIONTYPE projectionType = Translate(type);
|
||||||
|
|
||||||
|
return ResultVal(pViewport->SetProjection(projectionType));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2e70
|
// FUNCTION: LEGO1 0x100a2e70
|
||||||
|
// FUNCTION: BETA10 0x1016e810
|
||||||
Result ViewImpl::SetProjection(ProjectionType type)
|
Result ViewImpl::SetProjection(ProjectionType type)
|
||||||
{
|
{
|
||||||
return ResultVal(m_data->SetProjection(Translate(type)));
|
assert(m_data);
|
||||||
|
|
||||||
|
return ViewSetProjection(m_data, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2eb0
|
// FUNCTION: BETA10 0x1016e920
|
||||||
Result ViewImpl::SetFrustrum(float frontClippingDistance, float backClippingDistance, float degrees)
|
inline Result ViewSetFrustrum(
|
||||||
|
IDirect3DRMViewport* pViewport,
|
||||||
|
float frontClippingDistance,
|
||||||
|
float backClippingDistance,
|
||||||
|
float degrees
|
||||||
|
)
|
||||||
{
|
{
|
||||||
float field = frontClippingDistance * tan(DegreesToRadians(degrees / 2));
|
float field = frontClippingDistance * tan(DegreesToRadians(degrees / 2));
|
||||||
Result result;
|
Result result;
|
||||||
result = ResultVal(m_data->SetFront(frontClippingDistance));
|
result = ResultVal(pViewport->SetFront(frontClippingDistance));
|
||||||
if (Succeeded(result)) {
|
if (Succeeded(result)) {
|
||||||
result = ResultVal(m_data->SetBack(backClippingDistance));
|
result = ResultVal(pViewport->SetBack(backClippingDistance));
|
||||||
}
|
}
|
||||||
if (Succeeded(result)) {
|
if (Succeeded(result)) {
|
||||||
result = ResultVal(m_data->SetField(field));
|
result = ResultVal(pViewport->SetField(field));
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100a2eb0
|
||||||
|
// FUNCTION: BETA10 0x1016e8b0
|
||||||
|
Result ViewImpl::SetFrustrum(float frontClippingDistance, float backClippingDistance, float degrees)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
|
||||||
|
return ViewSetFrustrum(m_data, frontClippingDistance, backClippingDistance, degrees);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016ea70
|
||||||
|
inline Result ViewSetBackgroundColor(IDirect3DRMViewport* pViewport, float r, float g, float b)
|
||||||
|
{
|
||||||
|
Result result = Success;
|
||||||
|
|
||||||
|
ViewportAppData* pViewportAppData = reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
|
||||||
|
assert(pViewportAppData);
|
||||||
|
|
||||||
|
pViewportAppData->m_backgroundColorRed = r;
|
||||||
|
pViewportAppData->m_backgroundColorGreen = g;
|
||||||
|
pViewportAppData->m_backgroundColorBlue = b;
|
||||||
|
|
||||||
|
if (pViewportAppData->m_pLastRenderedFrame) {
|
||||||
|
result = ResultVal(pViewportAppData->m_pLastRenderedFrame->SetSceneBackgroundRGB(r, g, b));
|
||||||
|
assert(Succeeded(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2f30
|
// FUNCTION: LEGO1 0x100a2f30
|
||||||
|
// FUNCTION: BETA10 0x1016ea00
|
||||||
Result ViewImpl::SetBackgroundColor(float r, float g, float b)
|
Result ViewImpl::SetBackgroundColor(float r, float g, float b)
|
||||||
{
|
{
|
||||||
Result ret = Success;
|
assert(m_data);
|
||||||
// Note, this method in the shipped game is very diverged from
|
|
||||||
// the Tgl leak code.
|
return ViewSetBackgroundColor(m_data, r, g, b);
|
||||||
ViewportAppData* data = ViewportGetData(m_data);
|
|
||||||
data->m_backgroundColorRed = r;
|
|
||||||
data->m_backgroundColorGreen = g;
|
|
||||||
data->m_backgroundColorBlue = b;
|
|
||||||
if (data->m_pLastRenderedFrame) {
|
|
||||||
ret = ResultVal(data->m_pLastRenderedFrame->SetSceneBackgroundRGB(r, g, b));
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2f80
|
// FUNCTION: BETA10 0x1016ebd0
|
||||||
Result ViewImpl::GetBackgroundColor(float* r, float* g, float* b)
|
inline Result ViewGetBackgroundColor(IDirect3DRMViewport* pViewport, float* r, float* g, float* b)
|
||||||
{
|
{
|
||||||
ViewportAppData* data = ViewportGetData(m_data);
|
ViewportAppData* pViewportAppData = reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
|
||||||
*r = data->m_backgroundColorRed;
|
assert(pViewportAppData);
|
||||||
*g = data->m_backgroundColorGreen;
|
|
||||||
*b = data->m_backgroundColorBlue;
|
*r = pViewportAppData->m_backgroundColorRed;
|
||||||
|
*g = pViewportAppData->m_backgroundColorGreen;
|
||||||
|
*b = pViewportAppData->m_backgroundColorBlue;
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2fb0
|
// FUNCTION: LEGO1 0x100a2f80
|
||||||
Result ViewImpl::Clear()
|
// FUNCTION: BETA10 0x1016eb60
|
||||||
|
Result ViewImpl::GetBackgroundColor(float* r, float* g, float* b)
|
||||||
{
|
{
|
||||||
return ResultVal(m_data->Clear());
|
assert(m_data);
|
||||||
|
|
||||||
|
return ViewGetBackgroundColor(m_data, r, g, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016ecb0
|
||||||
|
inline Result ViewClear(IDirect3DRMViewport* pViewport)
|
||||||
|
{
|
||||||
|
return ResultVal(pViewport->Clear());
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100a2fb0
|
||||||
|
// FUNCTION: BETA10 0x1016ec50
|
||||||
|
Result ViewImpl::Clear()
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
|
||||||
|
return ViewClear(m_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170fb0
|
||||||
inline Result ViewPrepareFrameForRender(
|
inline Result ViewPrepareFrameForRender(
|
||||||
IDirect3DRMFrame* pFrame,
|
IDirect3DRMFrame* pFrame,
|
||||||
IDirect3DRMFrame* pCamera,
|
IDirect3DRMFrame* pCamera,
|
||||||
@ -232,12 +398,15 @@ inline Result ViewPrepareFrameForRender(
|
|||||||
if (pFrame) {
|
if (pFrame) {
|
||||||
// set background color
|
// set background color
|
||||||
result = ResultVal(pFrame->SetSceneBackgroundRGB(backgroundRed, backgroundGreen, backgroundBlue));
|
result = ResultVal(pFrame->SetSceneBackgroundRGB(backgroundRed, backgroundGreen, backgroundBlue));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
// add camera to frame to be rendered
|
// add camera to frame to be rendered
|
||||||
result = ResultVal(pFrame->AddChild(pCamera));
|
result = ResultVal(pFrame->AddChild(pCamera));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
// add light frame to frame to be rendered
|
// add light frame to frame to be rendered
|
||||||
result = ResultVal(pFrame->AddChild(pLightFrame));
|
result = ResultVal(pFrame->AddChild(pLightFrame));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
// increase ref count of frame to ensure it does not get deleted underneath us
|
// increase ref count of frame to ensure it does not get deleted underneath us
|
||||||
pFrame->AddRef();
|
pFrame->AddRef();
|
||||||
@ -246,12 +415,14 @@ inline Result ViewPrepareFrameForRender(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170e30
|
||||||
inline Result ViewRender(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame2* pGroup)
|
inline Result ViewRender(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame2* pGroup)
|
||||||
{
|
{
|
||||||
ViewportAppData* pViewportAppData;
|
ViewportAppData* pViewportAppData;
|
||||||
Result result;
|
Result result;
|
||||||
|
|
||||||
pViewportAppData = reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
|
pViewportAppData = reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
|
||||||
|
assert(pViewportAppData);
|
||||||
|
|
||||||
if (pViewportAppData->m_pLastRenderedFrame != pGroup) {
|
if (pViewportAppData->m_pLastRenderedFrame != pGroup) {
|
||||||
result = ViewRestoreFrameAfterRender(
|
result = ViewRestoreFrameAfterRender(
|
||||||
@ -260,6 +431,8 @@ inline Result ViewRender(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame2
|
|||||||
pViewportAppData->m_pLightFrame
|
pViewportAppData->m_pLightFrame
|
||||||
);
|
);
|
||||||
|
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
pViewportAppData->m_pLastRenderedFrame = const_cast<IDirect3DRMFrame2*>(pGroup);
|
pViewportAppData->m_pLastRenderedFrame = const_cast<IDirect3DRMFrame2*>(pGroup);
|
||||||
|
|
||||||
result = ViewPrepareFrameForRender(
|
result = ViewPrepareFrameForRender(
|
||||||
@ -272,32 +445,66 @@ inline Result ViewRender(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame2
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
result = ResultVal(pViewport->Render(const_cast<IDirect3DRMFrame2*>(pGroup)));
|
result = ResultVal(pViewport->Render(const_cast<IDirect3DRMFrame2*>(pGroup)));
|
||||||
|
assert(Succeeded(result));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10170d90
|
||||||
|
inline Result ViewImpl::Render(const GroupImpl& rScene)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
assert(rScene.ImplementationData());
|
||||||
|
|
||||||
|
return ViewRender(m_data, rScene.ImplementationData());
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2fd0
|
// FUNCTION: LEGO1 0x100a2fd0
|
||||||
|
// FUNCTION: BETA10 0x1016ece0
|
||||||
Result ViewImpl::Render(const Group* pGroup)
|
Result ViewImpl::Render(const Group* pGroup)
|
||||||
{
|
{
|
||||||
return ViewRender(m_data, static_cast<const GroupImpl*>(pGroup)->ImplementationData());
|
assert(m_data);
|
||||||
|
assert(pGroup);
|
||||||
|
|
||||||
|
return Render(*static_cast<const GroupImpl*>(pGroup));
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016edd0
|
||||||
|
inline Result ViewForceUpdate(
|
||||||
|
IDirect3DRMViewport* pViewport,
|
||||||
|
unsigned long x,
|
||||||
|
unsigned long y,
|
||||||
|
unsigned long width,
|
||||||
|
unsigned long height
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return ResultVal(pViewport->ForceUpdate(x, y, x + width - 1, y + height - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a3080
|
// FUNCTION: LEGO1 0x100a3080
|
||||||
|
// FUNCTION: BETA10 0x1016ed60
|
||||||
Result ViewImpl::ForceUpdate(unsigned long x, unsigned long y, unsigned long width, unsigned long height)
|
Result ViewImpl::ForceUpdate(unsigned long x, unsigned long y, unsigned long width, unsigned long height)
|
||||||
{
|
{
|
||||||
return ResultVal(m_data->ForceUpdate(x, y, x + width - 1, y + height - 1));
|
assert(m_data);
|
||||||
|
|
||||||
|
return ViewForceUpdate(m_data, x, y, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a30c0
|
// FUNCTION: BETA10 0x101710f0
|
||||||
Result ViewImpl::Pick(
|
inline Result ViewImpl::Pick(
|
||||||
unsigned long x,
|
unsigned long x,
|
||||||
unsigned long y,
|
unsigned long y,
|
||||||
const Group** ppGroupsToPickFrom,
|
const GroupImpl** ppGroupsToPickFrom,
|
||||||
int groupsToPickFromCount,
|
int groupsToPickFromCount,
|
||||||
const Group**& rppPickedGroups,
|
const Group**& rppPickedGroups,
|
||||||
int& rPickedGroupCount
|
int& rPickedGroupCount
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
assert(m_data);
|
||||||
|
|
||||||
return ViewportPickImpl(
|
return ViewportPickImpl(
|
||||||
m_data,
|
m_data,
|
||||||
x,
|
x,
|
||||||
@ -309,17 +516,38 @@ Result ViewImpl::Pick(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a30f0
|
// FUNCTION: LEGO1 0x100a30c0
|
||||||
Result ViewImpl::TransformWorldToScreen(const float world[3], float screen[4])
|
// FUNCTION: BETA10 0x1016ee10
|
||||||
|
Result ViewImpl::Pick(
|
||||||
|
unsigned long x,
|
||||||
|
unsigned long y,
|
||||||
|
const Group** ppGroupsToPickFrom,
|
||||||
|
int groupsToPickFromCount,
|
||||||
|
const Group**& rppPickedGroups,
|
||||||
|
int& rPickedGroupCount
|
||||||
|
)
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
|
||||||
|
return Pick(
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
reinterpret_cast<const GroupImpl**>(ppGroupsToPickFrom),
|
||||||
|
groupsToPickFromCount,
|
||||||
|
rppPickedGroups,
|
||||||
|
rPickedGroupCount
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016eff0
|
||||||
|
inline Result ViewTransformWorldToScreen(IDirect3DRMViewport* pViewport, const float world[3], float screen[4])
|
||||||
{
|
{
|
||||||
D3DRMVECTOR4D d3dRMScreen;
|
D3DRMVECTOR4D d3dRMScreen;
|
||||||
D3DVECTOR d3dRMWorld;
|
D3DVECTOR d3dRMWorld;
|
||||||
d3dRMWorld.x = world[0];
|
D3DVECTOR* pD3DRMWorld = Translate(world, d3dRMWorld);
|
||||||
d3dRMWorld.y = world[1];
|
|
||||||
d3dRMWorld.z = world[2];
|
|
||||||
Result result;
|
Result result;
|
||||||
|
|
||||||
result = ResultVal(m_data->Transform(&d3dRMScreen, &d3dRMWorld));
|
result = ResultVal(pViewport->Transform(&d3dRMScreen, pD3DRMWorld));
|
||||||
|
|
||||||
if (Succeeded(result)) {
|
if (Succeeded(result)) {
|
||||||
screen[0] = d3dRMScreen.x;
|
screen[0] = d3dRMScreen.x;
|
||||||
@ -331,10 +559,18 @@ Result ViewImpl::TransformWorldToScreen(const float world[3], float screen[4])
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a3160
|
// FUNCTION: LEGO1 0x100a30f0
|
||||||
Result ViewImpl::TransformScreenToWorld(const float screen[4], float world[3])
|
// FUNCTION: BETA10 0x1016ef90
|
||||||
|
Result ViewImpl::TransformWorldToScreen(const float world[3], float screen[4])
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
|
||||||
|
return ViewTransformWorldToScreen(m_data, world, screen);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016f0d0
|
||||||
|
inline Result ViewTransformScreenToWorld(IDirect3DRMViewport* pViewport, const float screen[4], float world[3])
|
||||||
{
|
{
|
||||||
// 100% match minus instruction reordering.
|
|
||||||
D3DVECTOR d3dRMWorld;
|
D3DVECTOR d3dRMWorld;
|
||||||
D3DRMVECTOR4D d3dScreen;
|
D3DRMVECTOR4D d3dScreen;
|
||||||
d3dScreen.x = screen[0];
|
d3dScreen.x = screen[0];
|
||||||
@ -343,7 +579,7 @@ Result ViewImpl::TransformScreenToWorld(const float screen[4], float world[3])
|
|||||||
d3dScreen.w = screen[3];
|
d3dScreen.w = screen[3];
|
||||||
Result result;
|
Result result;
|
||||||
|
|
||||||
result = ResultVal(m_data->InverseTransform(&d3dRMWorld, &d3dScreen));
|
result = ResultVal(pViewport->InverseTransform(&d3dRMWorld, &d3dScreen));
|
||||||
|
|
||||||
if (Succeeded(result)) {
|
if (Succeeded(result)) {
|
||||||
world[0] = d3dRMWorld.x;
|
world[0] = d3dRMWorld.x;
|
||||||
@ -353,3 +589,12 @@ Result ViewImpl::TransformScreenToWorld(const float screen[4], float world[3])
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100a3160
|
||||||
|
// FUNCTION: BETA10 0x1016f070
|
||||||
|
Result ViewImpl::TransformScreenToWorld(const float screen[4], float world[3])
|
||||||
|
{
|
||||||
|
assert(m_data);
|
||||||
|
|
||||||
|
return ViewTransformScreenToWorld(m_data, screen, world);
|
||||||
|
}
|
||||||
|
|||||||
@ -81,6 +81,7 @@ enum Result {
|
|||||||
Success = 1
|
Success = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x10169c60
|
||||||
inline int Succeeded(Result result)
|
inline int Succeeded(Result result)
|
||||||
{
|
{
|
||||||
return (result == Success);
|
return (result == Success);
|
||||||
@ -99,18 +100,25 @@ class Texture;
|
|||||||
class MeshBuilder;
|
class MeshBuilder;
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100db980
|
// VTABLE: LEGO1 0x100db980
|
||||||
|
// VTABLE: BETA10 0x101c3148
|
||||||
class Object {
|
class Object {
|
||||||
public:
|
public:
|
||||||
// FUNCTION: LEGO1 0x100a2240
|
// FUNCTION: LEGO1 0x100a2240
|
||||||
|
// FUNCTION: BETA10 0x10169c90
|
||||||
virtual ~Object() {}
|
virtual ~Object() {}
|
||||||
|
|
||||||
virtual void* ImplementationDataPtr() = 0;
|
virtual void* ImplementationDataPtr() = 0;
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x10169b50
|
||||||
|
// Tgl::Object::Object
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2250
|
// SYNTHETIC: LEGO1 0x100a2250
|
||||||
|
// SYNTHETIC: BETA10 0x10169cb0
|
||||||
// Tgl::Object::`scalar deleting destructor'
|
// Tgl::Object::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100db948
|
// VTABLE: LEGO1 0x100db948
|
||||||
|
// VTABLE: BETA10 0x101c3110
|
||||||
class Renderer : public Object {
|
class Renderer : public Object {
|
||||||
public:
|
public:
|
||||||
// vtable+0x08
|
// vtable+0x08
|
||||||
@ -147,16 +155,22 @@ class Renderer : public Object {
|
|||||||
// vtable+0x30
|
// vtable+0x30
|
||||||
virtual Result SetTextureDefaultColorCount(unsigned long) = 0;
|
virtual Result SetTextureDefaultColorCount(unsigned long) = 0;
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x10169ae0
|
||||||
|
// Tgl::Renderer::Renderer
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a1770
|
// SYNTHETIC: LEGO1 0x100a1770
|
||||||
|
// SYNTHETIC: BETA10 0x10169b80
|
||||||
// Tgl::Renderer::~Renderer
|
// Tgl::Renderer::~Renderer
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a17c0
|
// SYNTHETIC: LEGO1 0x100a17c0
|
||||||
|
// SYNTHETIC: BETA10 0x10169be0
|
||||||
// Tgl::Renderer::`scalar deleting destructor'
|
// Tgl::Renderer::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
Renderer* CreateRenderer();
|
Renderer* CreateRenderer();
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100db9b8
|
// VTABLE: LEGO1 0x100db9b8
|
||||||
|
// VTABLE: BETA10 0x101c32b0
|
||||||
class Device : public Object {
|
class Device : public Object {
|
||||||
public:
|
public:
|
||||||
// vtable+0x08
|
// vtable+0x08
|
||||||
@ -174,14 +188,20 @@ class Device : public Object {
|
|||||||
virtual void HandleActivate(WORD) = 0;
|
virtual void HandleActivate(WORD) = 0;
|
||||||
virtual void HandlePaint(HDC) = 0;
|
virtual void HandlePaint(HDC) = 0;
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x1016b740
|
||||||
|
// Tgl::Device::Device
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2350
|
// SYNTHETIC: LEGO1 0x100a2350
|
||||||
|
// SYNTHETIC: BETA10 0x1016b7b0
|
||||||
// Tgl::Device::~Device
|
// Tgl::Device::~Device
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a28e0
|
// SYNTHETIC: LEGO1 0x100a28e0
|
||||||
|
// SYNTHETIC: BETA10 0x1016bbc0
|
||||||
// Tgl::Device::`scalar deleting destructor'
|
// Tgl::Device::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dba28
|
// VTABLE: LEGO1 0x100dba28
|
||||||
|
// VTABLE: BETA10 0x101c32e0
|
||||||
class View : public Object {
|
class View : public Object {
|
||||||
public:
|
public:
|
||||||
virtual Result Add(const Light*) = 0;
|
virtual Result Add(const Light*) = 0;
|
||||||
@ -234,44 +254,59 @@ class View : public Object {
|
|||||||
int& rPickedGroupCount
|
int& rPickedGroupCount
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x1016b850
|
||||||
|
// Tgl::View::View
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2430
|
// SYNTHETIC: LEGO1 0x100a2430
|
||||||
|
// SYNTHETIC: BETA10 0x1016b8c0
|
||||||
// Tgl::View::~View
|
// Tgl::View::~View
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2950
|
// SYNTHETIC: LEGO1 0x100a2950
|
||||||
|
// SYNTHETIC: BETA10 0x1016bc00
|
||||||
// Tgl::View::`scalar deleting destructor'
|
// Tgl::View::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dbae8
|
// VTABLE: LEGO1 0x100dbae8
|
||||||
|
// VTABLE: BETA10 0x101c3320
|
||||||
class Camera : public Object {
|
class Camera : public Object {
|
||||||
public:
|
public:
|
||||||
virtual Result SetTransformation(FloatMatrix4&) = 0;
|
virtual Result SetTransformation(FloatMatrix4&) = 0;
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x1016b960
|
||||||
|
// Tgl::Camera::Camera
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a25f0
|
// SYNTHETIC: LEGO1 0x100a25f0
|
||||||
|
// SYNTHETIC: BETA10 0x1016b9d0
|
||||||
// Tgl::Camera::~Camera
|
// Tgl::Camera::~Camera
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2a30
|
// SYNTHETIC: LEGO1 0x100a2a30
|
||||||
|
// SYNTHETIC: BETA10 0x1016bc40
|
||||||
// Tgl::Camera::`scalar deleting destructor'
|
// Tgl::Camera::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dbb08
|
// VTABLE: LEGO1 0x100dbb08
|
||||||
|
// VTABLE: BETA10 0x101c3330
|
||||||
class Light : public Object {
|
class Light : public Object {
|
||||||
public:
|
public:
|
||||||
virtual Result SetTransformation(FloatMatrix4&) = 0;
|
virtual Result SetTransformation(FloatMatrix4&) = 0;
|
||||||
virtual Result SetColor(float r, float g, float b) = 0;
|
virtual Result SetColor(float r, float g, float b) = 0;
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x1016ba70
|
||||||
|
// Tgl::Light::Light
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a26d0
|
// SYNTHETIC: LEGO1 0x100a26d0
|
||||||
|
// SYNTHETIC: BETA10 0x1016bae0
|
||||||
// Tgl::Light::~Light
|
// Tgl::Light::~Light
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2aa0
|
// SYNTHETIC: LEGO1 0x100a2aa0
|
||||||
|
// SYNTHETIC: BETA10 0x1016bc80
|
||||||
// Tgl::Light::`scalar deleting destructor'
|
// Tgl::Light::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dbbb0
|
// VTABLE: LEGO1 0x100dbbb0
|
||||||
|
// VTABLE: BETA10 0x101c3360
|
||||||
class Mesh : public Object {
|
class Mesh : public Object {
|
||||||
public:
|
public:
|
||||||
// SYNTHETIC: LEGO1 0x100a3e10
|
|
||||||
// Tgl::Mesh::~Mesh
|
|
||||||
|
|
||||||
virtual Result SetColor(float r, float g, float b, float a) = 0;
|
virtual Result SetColor(float r, float g, float b, float a) = 0;
|
||||||
virtual Result SetTexture(const Texture*) = 0;
|
virtual Result SetTexture(const Texture*) = 0;
|
||||||
virtual Result GetTexture(Texture*&) = 0;
|
virtual Result GetTexture(Texture*&) = 0;
|
||||||
@ -285,11 +320,20 @@ class Mesh : public Object {
|
|||||||
// Just get another Group pointing to the same underlying data
|
// Just get another Group pointing to the same underlying data
|
||||||
virtual Mesh* ShallowClone(MeshBuilder*) = 0;
|
virtual Mesh* ShallowClone(MeshBuilder*) = 0;
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x1016fad0
|
||||||
|
// Tgl::Mesh::Mesh
|
||||||
|
|
||||||
|
// SYNTHETIC: LEGO1 0x100a3e10
|
||||||
|
// SYNTHETIC: BETA10 0x1016fb40
|
||||||
|
// Tgl::Mesh::~Mesh
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a3e60
|
// SYNTHETIC: LEGO1 0x100a3e60
|
||||||
|
// SYNTHETIC: BETA10 0x1016fbe0
|
||||||
// Tgl::Mesh::`scalar deleting destructor'
|
// Tgl::Mesh::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dbaa0
|
// VTABLE: LEGO1 0x100dbaa0
|
||||||
|
// VTABLE: BETA10 0x101c3188
|
||||||
class Group : public Object {
|
class Group : public Object {
|
||||||
public:
|
public:
|
||||||
virtual Result SetTransformation(FloatMatrix4&) = 0;
|
virtual Result SetTransformation(FloatMatrix4&) = 0;
|
||||||
@ -307,10 +351,15 @@ class Group : public Object {
|
|||||||
// to have been replaced by something else in the shipped code.
|
// to have been replaced by something else in the shipped code.
|
||||||
virtual Result Bounds(D3DVECTOR*, D3DVECTOR*) = 0;
|
virtual Result Bounds(D3DVECTOR*, D3DVECTOR*) = 0;
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x1016a300
|
||||||
|
// Tgl::Group::Group
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2510
|
// SYNTHETIC: LEGO1 0x100a2510
|
||||||
|
// SYNTHETIC: BETA10 0x1016a370
|
||||||
// Tgl::Group::~Group
|
// Tgl::Group::~Group
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a29c0
|
// SYNTHETIC: LEGO1 0x100a29c0
|
||||||
|
// SYNTHETIC: BETA10 0x1016a3d0
|
||||||
// Tgl::Group::`scalar deleting destructor'
|
// Tgl::Group::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -318,6 +367,7 @@ class Group : public Object {
|
|||||||
// was not in the leaked Tgl code. My suspicion is that it's
|
// was not in the leaked Tgl code. My suspicion is that it's
|
||||||
// some kind of builder class for creating meshes.
|
// some kind of builder class for creating meshes.
|
||||||
// VTABLE: LEGO1 0x100dbb30
|
// VTABLE: LEGO1 0x100dbb30
|
||||||
|
// VTABLE: BETA10 0x101c32a0
|
||||||
class MeshBuilder : public Object {
|
class MeshBuilder : public Object {
|
||||||
public:
|
public:
|
||||||
virtual Mesh* CreateMesh(
|
virtual Mesh* CreateMesh(
|
||||||
@ -333,14 +383,20 @@ class MeshBuilder : public Object {
|
|||||||
virtual Result GetBoundingBox(float min[3], float max[3]) const = 0;
|
virtual Result GetBoundingBox(float min[3], float max[3]) const = 0;
|
||||||
virtual MeshBuilder* Clone() = 0;
|
virtual MeshBuilder* Clone() = 0;
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x1016b630
|
||||||
|
// Tgl::MeshBuilder::MeshBuilder
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a27b0
|
// SYNTHETIC: LEGO1 0x100a27b0
|
||||||
|
// SYNTHETIC: BETA10 0x1016b6a0
|
||||||
// Tgl::MeshBuilder::~MeshBuilder
|
// Tgl::MeshBuilder::~MeshBuilder
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2b10
|
// SYNTHETIC: LEGO1 0x100a2b10
|
||||||
|
// SYNTHETIC: BETA10 0x1016bb80
|
||||||
// Tgl::MeshBuilder::`scalar deleting destructor'
|
// Tgl::MeshBuilder::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dbb68
|
// VTABLE: LEGO1 0x100dbb68
|
||||||
|
// VTABLE: BETA10 0x101c3280
|
||||||
class Texture : public Object {
|
class Texture : public Object {
|
||||||
public:
|
public:
|
||||||
// vtable+0x08
|
// vtable+0x08
|
||||||
@ -359,10 +415,15 @@ class Texture : public Object {
|
|||||||
) = 0;
|
) = 0;
|
||||||
virtual Result SetPalette(int entryCount, PaletteEntry* pEntries) = 0;
|
virtual Result SetPalette(int entryCount, PaletteEntry* pEntries) = 0;
|
||||||
|
|
||||||
|
// SYNTHETIC: BETA10 0x1016b520
|
||||||
|
// Tgl::Texture::Texture
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2890
|
// SYNTHETIC: LEGO1 0x100a2890
|
||||||
|
// SYNTHETIC: BETA10 0x1016b590
|
||||||
// Tgl::Texture::~Texture
|
// Tgl::Texture::~Texture
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100a2b80
|
// SYNTHETIC: LEGO1 0x100a2b80
|
||||||
|
// SYNTHETIC: BETA10 0x1016bb40
|
||||||
// Tgl::Texture::`scalar deleting destructor'
|
// Tgl::Texture::`scalar deleting destructor'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user