#include "xanimindices.h"

XAnimIndices::XAnimIndices()
    : XAsset()
    , mIndex(0)
{
    SetName("Animation Indices");
}

void XAnimIndices::ParseData(XDataStream *aStream) {
    if (GetPtr() == -1) {
        qint32 indexPtr = aStream->ParseInt32(QString("%1 index ptr").arg(GetName()));
        if (indexPtr == -1)
        {
            mIndex = aStream->ParseUInt32(QString("%1 index").arg(GetName()));
        }
    }
}

void XAnimIndices::Clear()
{
    mIndex = 0;
}

quint32 XAnimIndices::GetIndex() const {
    return mIndex;
}

void XAnimIndices::SetIndex(quint32 index) {
    mIndex = index;
}
