#include "xanimdeltapartquatdataframes.h"

XAnimDeltaPartQuatDataFrames::XAnimDeltaPartQuatDataFrames()
    : XAsset() {
}

quint32 XAnimDeltaPartQuatDataFrames::GetFramesPtr() const {
    return mFramesPtr;
}

void XAnimDeltaPartQuatDataFrames::SetFramesPtr(quint32 ptr) {
    mFramesPtr = ptr;
}

const qint16* XAnimDeltaPartQuatDataFrames::GetFrames() const {
    return mFrames;
}

void XAnimDeltaPartQuatDataFrames::SetFrames(const qint16* frames, size_t count) {
    if (count <= 2) {
        memcpy(mFrames, frames, count * sizeof(qint16));
    }
}

XAnimDynamicIndices& XAnimDeltaPartQuatDataFrames::GetIndices() {
    return mIndices;
}

const XAnimDynamicIndices& XAnimDeltaPartQuatDataFrames::GetIndices() const {
    return mIndices;
}

void XAnimDeltaPartQuatDataFrames::SetIndices(const XAnimDynamicIndices& indices) {
    mIndices = indices;
}

void XAnimDeltaPartQuatDataFrames::ParseData(QDataStream *aStream) {
    if (GetPtr() == -1) {
        *aStream
            >> mFramesPtr
            >> mFrames[0]
            >> mFrames[1];

        // Parse indices
        mIndices.ParseData(aStream);
    }
}

void XAnimDeltaPartQuatDataFrames::Clear()
{

}
