#include "xanimdynamicframes.h"

XAnimDynamicFrames::XAnimDynamicFrames()
    : XAsset()
    , mFrames(3)
{
}

XAnimDynamicFrames::~XAnimDynamicFrames()
{

}

void XAnimDynamicFrames::ParseData(QDataStream *aStream) {
    if (GetPtr() == -1) {
        qint32 framePtr;
        *aStream >> framePtr;

        if (framePtr == -1)
        {
            *aStream
                >> mFrames[0]
                >> mFrames[1]
                >> mFrames[2];
        }
    }
}

void XAnimDynamicFrames::Clear()
{
    mFrames.clear();
}

QVector<quint8> XAnimDynamicFrames::GetFrames() const {
    return mFrames;
}

void XAnimDynamicFrames::SetFrames(QVector<quint8> aFrames) {
    mFrames = aFrames;
}
