mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
Introduce clang-format (#240)
This commit is contained in:

committed by
GitHub

parent
e928fc9425
commit
b449da1fa3
@@ -1,4 +1,5 @@
|
||||
#include "mxdsparallelaction.h"
|
||||
|
||||
#include "mxdsmediaaction.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxDSParallelAction, 0x9c)
|
||||
@@ -6,7 +7,7 @@ DECOMP_SIZE_ASSERT(MxDSParallelAction, 0x9c)
|
||||
// OFFSET: LEGO1 0x100cae80
|
||||
MxDSParallelAction::MxDSParallelAction()
|
||||
{
|
||||
this->SetType(MxDSType_ParallelAction);
|
||||
this->SetType(MxDSType_ParallelAction);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cb040
|
||||
@@ -15,72 +16,72 @@ MxDSParallelAction::~MxDSParallelAction()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cb090
|
||||
void MxDSParallelAction::CopyFrom(MxDSParallelAction &p_dsParallelAction)
|
||||
void MxDSParallelAction::CopyFrom(MxDSParallelAction& p_dsParallelAction)
|
||||
{
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cb0a0
|
||||
MxDSParallelAction &MxDSParallelAction::operator=(MxDSParallelAction &p_dsParallelAction)
|
||||
MxDSParallelAction& MxDSParallelAction::operator=(MxDSParallelAction& p_dsParallelAction)
|
||||
{
|
||||
if (this == &p_dsParallelAction)
|
||||
return *this;
|
||||
if (this == &p_dsParallelAction)
|
||||
return *this;
|
||||
|
||||
MxDSMultiAction::operator=(p_dsParallelAction);
|
||||
this->CopyFrom(p_dsParallelAction);
|
||||
return *this;
|
||||
MxDSMultiAction::operator=(p_dsParallelAction);
|
||||
this->CopyFrom(p_dsParallelAction);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cb0d0
|
||||
MxDSAction *MxDSParallelAction::Clone()
|
||||
MxDSAction* MxDSParallelAction::Clone()
|
||||
{
|
||||
MxDSParallelAction *clone = new MxDSParallelAction();
|
||||
MxDSParallelAction* clone = new MxDSParallelAction();
|
||||
|
||||
if (clone)
|
||||
*clone = *this;
|
||||
if (clone)
|
||||
*clone = *this;
|
||||
|
||||
return clone;
|
||||
return clone;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cb160
|
||||
MxLong MxDSParallelAction::GetDuration()
|
||||
{
|
||||
if (this->m_duration)
|
||||
return this->m_duration;
|
||||
if (this->m_duration)
|
||||
return this->m_duration;
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction *action;
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction* action;
|
||||
|
||||
while (cursor.Next(action)) {
|
||||
if (!action)
|
||||
continue;
|
||||
while (cursor.Next(action)) {
|
||||
if (!action)
|
||||
continue;
|
||||
|
||||
MxLong duration = action->GetDuration();
|
||||
if (duration == -1) {
|
||||
this->m_duration = -1;
|
||||
break;
|
||||
}
|
||||
MxLong duration = action->GetDuration();
|
||||
if (duration == -1) {
|
||||
this->m_duration = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
duration += action->GetStartTime();
|
||||
if (action->IsA("MxDSMediaAction")) {
|
||||
MxLong sustainTime = ((MxDSMediaAction*) action)->GetSustainTime();
|
||||
duration += action->GetStartTime();
|
||||
if (action->IsA("MxDSMediaAction")) {
|
||||
MxLong sustainTime = ((MxDSMediaAction*) action)->GetSustainTime();
|
||||
|
||||
if (sustainTime == -1)
|
||||
duration = -1;
|
||||
else if (sustainTime)
|
||||
duration += sustainTime;
|
||||
}
|
||||
if (sustainTime == -1)
|
||||
duration = -1;
|
||||
else if (sustainTime)
|
||||
duration += sustainTime;
|
||||
}
|
||||
|
||||
if (duration == -1) {
|
||||
this->m_duration = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->m_duration < duration)
|
||||
this->m_duration = duration;
|
||||
}
|
||||
if (duration == -1) {
|
||||
this->m_duration = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->IsBit3())
|
||||
this->m_duration *= this->m_loopCount;
|
||||
if (this->m_duration < duration)
|
||||
this->m_duration = duration;
|
||||
}
|
||||
|
||||
return this->m_duration;
|
||||
if (this->IsBit3())
|
||||
this->m_duration *= this->m_loopCount;
|
||||
|
||||
return this->m_duration;
|
||||
}
|
Reference in New Issue
Block a user