Isle
Loading...
Searching...
No Matches
mxdsstreamingaction.cpp
Go to the documentation of this file.
2
3#include "mxdsbuffer.h"
4
6
7// FUNCTION: LEGO1 0x100cd010
8// FUNCTION: BETA10 0x1015f380
10{
11 Init();
12
13 MxDSAction::operator=(p_dsAction);
14 m_unk0x94 = p_offset;
15 m_bufferOffset = p_offset;
16}
17
18// FUNCTION: LEGO1 0x100cd090
19// FUNCTION: BETA10 0x101565a0
21{
22 return m_internalAction ? m_internalAction->HasId(p_objectId) : FALSE;
23}
24
25// FUNCTION: LEGO1 0x100cd0d0
26// FUNCTION: BETA10 0x101564a0
28{
29 Init();
30 CopyFrom(p_dsStreamingAction);
31}
32
33// FUNCTION: LEGO1 0x100cd150
34// FUNCTION: BETA10 0x1015f41d
36{
37 if (m_unk0xa0) {
38 delete m_unk0xa0;
39 }
40 if (m_unk0xa4) {
41 delete m_unk0xa4;
42 }
43 if (m_internalAction) {
44 delete m_internalAction;
45 }
46}
47
48// FUNCTION: LEGO1 0x100cd1e0
49// FUNCTION: BETA10 0x1015f53c
51{
52 m_unk0x94 = 0;
53 m_bufferOffset = 0;
54 m_unk0x9c = 0;
55 m_unk0xa0 = NULL;
56 m_unk0xa4 = NULL;
57 m_unk0xa8 = 0;
58 m_unk0xac = 2;
59 m_internalAction = NULL;
60}
61
62// FUNCTION: LEGO1 0x100cd220
63// FUNCTION: BETA10 0x1015f5b9
65{
66 MxDSAction::operator=(p_dsStreamingAction);
67 m_unk0x94 = p_dsStreamingAction.m_unk0x94;
68 m_bufferOffset = p_dsStreamingAction.m_bufferOffset;
69 m_unk0x9c = p_dsStreamingAction.m_unk0x9c;
70 m_unk0xa0 = NULL;
71 m_unk0xa4 = NULL;
72 m_unk0xac = p_dsStreamingAction.m_unk0xac;
73 m_unk0xa8 = p_dsStreamingAction.m_unk0xa8;
74 SetInternalAction(p_dsStreamingAction.m_internalAction ? p_dsStreamingAction.m_internalAction->Clone() : NULL);
75
76 return this;
77}
78
79// FUNCTION: LEGO1 0x100cd2a0
80// FUNCTION: BETA10 0x1015f698
82{
83 if (m_internalAction) {
84 delete m_internalAction;
85 }
86 m_internalAction = p_dsAction;
87}
88
89// FUNCTION: LEGO1 0x100cd2d0
91{
92 if (m_duration == -1) {
93 return;
94 }
95
96 MxLong duration = m_duration / m_loopCount;
98
99 m_duration -= duration;
100 m_unk0xa8 += duration;
101}
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
MxDSAction & operator=(MxDSAction &p_dsAction)
[AI] Assignment operator: deep-copy from a different MxDSAction, including base class data and extra ...
Definition: mxdsaction.cpp:133
virtual MxBool HasId(MxU32 p_objectId)
[AI] Checks if this action contains/was created for a specific SI object id.
Definition: mxdsaction.cpp:53
MxS32 m_loopCount
[AI] Number of times to repeat the action, or -1 for infinite/not-set.
Definition: mxdsaction.h:305
MxLong m_duration
[AI] The duration to run the action, or INT_MIN for undefined.
Definition: mxdsaction.h:300
virtual MxDSAction * Clone()
[AI] Clones (deep-copies) this action and returns a new pointer.
Definition: mxdsaction.cpp:146
[AI] Represents an action that streams data from a buffer within a DirectScript (DS) media timeline.
~MxDSStreamingAction() override
[AI] Destructor.
void FUN_100cd2d0()
[AI] Updates duration, loop count, and accumulates advanced streaming time for repeated playback.
MxDSStreamingAction * CopyFrom(MxDSStreamingAction &p_dsStreamingAction)
[AI] Copies fields from another MxDSStreamingAction, deeply cloning the internal action if needed.
MxBool HasId(MxU32 p_objectId) override
[AI] Determines if this action or its internal action correspond to the given object ID.
void Init()
[AI] Initializes default values for members.
void SetInternalAction(MxDSAction *p_dsAction)
[AI] Sets or replaces the internal action held by this streaming action (ownership is transferred).
MxDSStreamingAction(MxDSAction &p_dsAction, MxU32 p_offset)
[AI] Constructs a streaming action from a base DS action with a given offset into the media buffer.
#define FALSE
Definition: d3drmdef.h:27
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
int MxLong
[AI]
Definition: mxtypes.h:83
unsigned int MxU32
[AI]
Definition: mxtypes.h:32