mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-26 09:38:14 -05:00
494a556f8e
* Adjustments to "decomp" language * Fix a comment * Fix accidental clang-formatting * Fix order * Fix order * Remove junk * Fix OFFSET * Adjustments based on new suggestions * Annotate globals * Globals in ISLE * More globals * Merge from parser2 branch * Allow prepending space for exact marker match * To eliminate noise, require the 0x prefix on offset for marker match * fix test from previous * Count tab stops for indented functions to reduce MISSED_END_OF_FUNCTION noise * FUNCTION to SYNTHETIC where needed * Missed marker conversion on SetAtomId * pylint cleanup, remove unused code * Fix unexpected function end, add more unit tests * Be more strict about synthetic name syntax * Revert "Missed marker conversion on SetAtomId" This reverts commitd87d665127
. * Revert "FUNCTION to SYNTHETIC where needed" This reverts commit8c815418d2
. * Implicit lookup by name for functions * Fix VTABLE SYNTHETIC and other decomp markers * Get vtable class name * Vtable marker should identify struct * No colon for SIZE comment * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update README.md * Update CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Fix destructor/annotation * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: disinvite <disinvite@users.noreply.github.com>
92 lines
2.1 KiB
C++
92 lines
2.1 KiB
C++
#include "mxdsstreamingaction.h"
|
|
|
|
#include "mxdsbuffer.h"
|
|
|
|
DECOMP_SIZE_ASSERT(MxDSStreamingAction, 0xb4)
|
|
|
|
// FUNCTION: LEGO1 0x100cd010
|
|
MxDSStreamingAction::MxDSStreamingAction(MxDSAction& p_dsAction, MxU32 p_offset)
|
|
{
|
|
Init();
|
|
|
|
*this = p_dsAction;
|
|
this->m_unk94 = p_offset;
|
|
this->m_bufferOffset = p_offset;
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x100cd090
|
|
MxBool MxDSStreamingAction::HasId(MxU32 p_objectId)
|
|
{
|
|
if (this->m_internalAction)
|
|
return this->m_internalAction->HasId(p_objectId);
|
|
return FALSE;
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x100cd0d0
|
|
MxDSStreamingAction::MxDSStreamingAction(MxDSStreamingAction& p_dsStreamingAction)
|
|
{
|
|
Init();
|
|
CopyFrom(p_dsStreamingAction);
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x100cd150
|
|
MxDSStreamingAction::~MxDSStreamingAction()
|
|
{
|
|
if (this->m_unka0)
|
|
delete this->m_unka0;
|
|
if (this->m_unka4)
|
|
delete this->m_unka4;
|
|
if (this->m_internalAction)
|
|
delete this->m_internalAction;
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x100cd1e0
|
|
MxResult MxDSStreamingAction::Init()
|
|
{
|
|
this->m_unk94 = 0;
|
|
this->m_bufferOffset = 0;
|
|
this->m_unk9c = 0;
|
|
this->m_unka0 = NULL;
|
|
this->m_unka4 = NULL;
|
|
this->m_unka8 = 0;
|
|
this->m_unkac = 2;
|
|
this->m_internalAction = NULL;
|
|
return SUCCESS;
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x100cd220
|
|
MxDSStreamingAction* MxDSStreamingAction::CopyFrom(MxDSStreamingAction& p_dsStreamingAction)
|
|
{
|
|
*this = p_dsStreamingAction;
|
|
this->m_unk94 = p_dsStreamingAction.m_unk94;
|
|
this->m_bufferOffset = p_dsStreamingAction.m_bufferOffset;
|
|
this->m_unk9c = p_dsStreamingAction.m_unk9c;
|
|
this->m_unka0 = NULL;
|
|
this->m_unka4 = NULL;
|
|
this->m_unkac = p_dsStreamingAction.m_unkac;
|
|
this->m_unka8 = p_dsStreamingAction.m_unka8;
|
|
SetInternalAction(p_dsStreamingAction.m_internalAction ? p_dsStreamingAction.m_internalAction->Clone() : NULL);
|
|
|
|
return this;
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x100cd2a0
|
|
void MxDSStreamingAction::SetInternalAction(MxDSAction* p_dsAction)
|
|
{
|
|
if (this->m_internalAction)
|
|
delete this->m_internalAction;
|
|
this->m_internalAction = p_dsAction;
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x100cd2d0
|
|
void MxDSStreamingAction::FUN_100CD2D0()
|
|
{
|
|
if (this->m_duration == -1)
|
|
return;
|
|
|
|
MxLong duration = this->m_duration / this->m_loopCount;
|
|
this->m_loopCount--;
|
|
|
|
this->m_duration -= duration;
|
|
this->m_unka8 += duration;
|
|
}
|