Isle
Loading...
Searching...
No Matches
mxdsparallelaction.cpp
Go to the documentation of this file.
2
3#include "mxdsmediaaction.h"
4
6
7// FUNCTION: LEGO1 0x100cae80
8// FUNCTION: BETA10 0x1015a14d
10{
11 m_type = e_parallelAction;
12}
13
14// FUNCTION: LEGO1 0x100cb040
15// FUNCTION: BETA10 0x1015a1c5
17{
18}
19
20// FUNCTION: LEGO1 0x100cb090
21// FUNCTION: BETA10 0x1015a22d
23{
24}
25
26// FUNCTION: BETA10 0x1015a245
28{
29 CopyFrom(p_dsParallelAction);
30}
31
32// FUNCTION: LEGO1 0x100cb0a0
33// FUNCTION: BETA10 0x1015a2c6
35{
36 if (this == &p_dsParallelAction) {
37 return *this;
38 }
39
40 MxDSMultiAction::operator=(p_dsParallelAction);
41 CopyFrom(p_dsParallelAction);
42 return *this;
43}
44
45// FUNCTION: LEGO1 0x100cb0d0
46// FUNCTION: BETA10 0x1015a30d
48{
50
51 if (clone) {
52 *clone = *this;
53 }
54
55 return clone;
56}
57
58// FUNCTION: LEGO1 0x100cb160
59// FUNCTION: BETA10 0x1015a3b7
61{
62 if (m_duration) {
63 return m_duration;
64 }
65
67 MxDSAction* action;
68
69 while (cursor.Next(action)) {
70 if (!action) {
71 continue;
72 }
73
74 MxLong duration = action->GetDuration();
75 if (duration == -1) {
76 m_duration = -1;
77 break;
78 }
79
80 duration += action->GetStartTime();
81 if (action->IsA("MxDSMediaAction")) {
82 MxLong sustainTime = ((MxDSMediaAction*) action)->GetSustainTime();
83
84 if (sustainTime == -1) {
85 duration = -1;
86 }
87 else if (sustainTime) {
88 duration += sustainTime;
89 }
90 }
91
92 if (duration == -1) {
93 m_duration = -1;
94 break;
95 }
96
97 if (m_duration < duration) {
98 m_duration = duration;
99 }
100 }
101
102 if (IsBit3()) {
104 }
105
106 return m_duration;
107}
[AI] Convenience cursor class for iterating over an MxDSActionList.
[AI] Represents an action deserialized from SI chunks, holding key animation or script parameters suc...
Definition: mxdsaction.h:17
MxLong GetStartTime() const
[AI] Gets the nominal start time for the action, as loaded or scheduled.
Definition: mxdsaction.h:198
MxBool IsBit3() const
[AI] Tests for the state of the (unknown purpose) bit 3 flag in m_flags.
Definition: mxdsaction.h:275
MxBool IsA(const char *p_name) const override
[AI] Run-time type check, compares provided name with this or any ancestor type.
Definition: mxdsaction.h:80
MxS32 m_loopCount
[AI] Number of times to repeat the action, or -1 for infinite/not-set.
Definition: mxdsaction.h:305
virtual MxLong GetDuration()
[AI] Gets the duration for which this action is intended to run.
Definition: mxdsaction.cpp:39
MxLong m_duration
[AI] The duration to run the action, or INT_MIN for undefined.
Definition: mxdsaction.h:300
MxDSMediaAction extends MxDSAction to add media-specific playback properties and management.
[AI] Represents a container for multiple MxDSAction objects, facilitating the grouping and management...
MxDSActionList * m_actionList
[AI] List of contained actions (ownership: this owns and deletes subactions).
MxDSMultiAction & operator=(MxDSMultiAction &p_dsMultiAction)
[AI] Assignment operator, deeply copies all state and actions from another MxDSMultiAction.
[AI] Represents an action that can play multiple MxDSActions in parallel.
MxLong GetDuration() override
[AI] Fetches the total duration in ticks of the parallel action, including all contained child action...
MxDSAction * Clone() override
[AI] Produces a complete copy (clone) of this parallel action, including deep-copied data members.
MxDSParallelAction & operator=(MxDSParallelAction &p_dsParallelAction)
[AI] Assignment operator.
~MxDSParallelAction() override
[AI] Destroys the parallel action.
MxDSParallelAction()
[AI] Constructs a parallel action object.
void CopyFrom(MxDSParallelAction &p_dsParallelAction)
[AI] Copies all member data from another parallel action into this one.
MxBool Next()
[AI]
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
int MxLong
[AI]
Definition: mxtypes.h:83