Introduce clang-format (#240)

This commit is contained in:
Christian Semmler
2023-10-24 19:38:27 -04:00
committed by GitHub
parent e928fc9425
commit b449da1fa3
408 changed files with 12434 additions and 12813 deletions

View File

@@ -1,4 +1,5 @@
#include "mxdsserialaction.h"
#include "mxdsmediaaction.h"
DECOMP_SIZE_ASSERT(MxDSSerialAction, 0xa8)
@@ -6,75 +7,75 @@ DECOMP_SIZE_ASSERT(MxDSSerialAction, 0xa8)
// OFFSET: LEGO1 0x100ca9d0
MxDSSerialAction::MxDSSerialAction()
{
this->SetType(MxDSType_SerialAction);
this->m_cursor = new MxDSActionListCursor(this->m_actions);
this->m_unk0xa0 = 0;
this->SetType(MxDSType_SerialAction);
this->m_cursor = new MxDSActionListCursor(this->m_actions);
this->m_unk0xa0 = 0;
}
// OFFSET: LEGO1 0x100caac0
void MxDSSerialAction::SetDuration(MxLong p_duration)
{
this->m_duration = p_duration;
this->m_duration = p_duration;
}
// OFFSET: LEGO1 0x100cac10
MxDSSerialAction::~MxDSSerialAction()
{
if (this->m_cursor)
delete this->m_cursor;
if (this->m_cursor)
delete this->m_cursor;
this->m_cursor = NULL;
this->m_cursor = NULL;
}
// OFFSET: LEGO1 0x100cac90
void MxDSSerialAction::CopyFrom(MxDSSerialAction &p_dsSerialAction)
void MxDSSerialAction::CopyFrom(MxDSSerialAction& p_dsSerialAction)
{
}
// OFFSET: LEGO1 0x100caca0
MxDSSerialAction &MxDSSerialAction::operator=(MxDSSerialAction &p_dsSerialAction)
MxDSSerialAction& MxDSSerialAction::operator=(MxDSSerialAction& p_dsSerialAction)
{
if (this == &p_dsSerialAction)
return *this;
if (this == &p_dsSerialAction)
return *this;
MxDSMultiAction::operator=(p_dsSerialAction);
this->CopyFrom(p_dsSerialAction);
return *this;
MxDSMultiAction::operator=(p_dsSerialAction);
this->CopyFrom(p_dsSerialAction);
return *this;
}
// OFFSET: LEGO1 0x100cacd0
MxDSAction *MxDSSerialAction::Clone()
MxDSAction* MxDSSerialAction::Clone()
{
MxDSSerialAction *clone = new MxDSSerialAction();
MxDSSerialAction* clone = new MxDSSerialAction();
if (clone)
*clone = *this;
if (clone)
*clone = *this;
return clone;
return clone;
}
// OFFSET: LEGO1 0x100cad60
MxLong MxDSSerialAction::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;
this->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")) {
MxLong sustainTime = ((MxDSMediaAction*) action)->GetSustainTime();
if (sustainTime && sustainTime != -1)
this->m_duration += sustainTime;
}
}
if (sustainTime && sustainTime != -1)
this->m_duration += sustainTime;
}
}
return this->m_duration;
return this->m_duration;
}