2025-09-05 18:35:17 -04:00
|
|
|
#include "xanimindices.h"
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
XAnimIndices::XAnimIndices()
|
|
|
|
|
: XAsset()
|
|
|
|
|
, mIndex(0)
|
|
|
|
|
{
|
2025-09-10 21:55:54 -04:00
|
|
|
SetName("Animation Indices");
|
2025-08-17 13:14:17 -04:00
|
|
|
}
|
|
|
|
|
|
2025-09-10 21:55:54 -04:00
|
|
|
void XAnimIndices::ParseData(XDataStream *aStream) {
|
2025-08-17 13:14:17 -04:00
|
|
|
if (GetPtr() == -1) {
|
2025-09-10 21:55:54 -04:00
|
|
|
qint32 indexPtr = aStream->ParseInt32(QString("%1 index ptr").arg(GetName()));
|
2025-09-05 18:35:17 -04:00
|
|
|
if (indexPtr == -1)
|
|
|
|
|
{
|
2025-09-10 21:55:54 -04:00
|
|
|
mIndex = aStream->ParseUInt32(QString("%1 index").arg(GetName()));
|
2025-09-05 18:35:17 -04:00
|
|
|
}
|
2025-08-17 13:14:17 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
void XAnimIndices::Clear()
|
|
|
|
|
{
|
|
|
|
|
mIndex = 0;
|
2025-08-17 13:14:17 -04:00
|
|
|
}
|
|
|
|
|
|
2025-09-07 12:36:08 -04:00
|
|
|
quint32 XAnimIndices::GetIndex() const {
|
2025-08-17 13:14:17 -04:00
|
|
|
return mIndex;
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-07 12:36:08 -04:00
|
|
|
void XAnimIndices::SetIndex(quint32 index) {
|
2025-08-17 13:14:17 -04:00
|
|
|
mIndex = index;
|
|
|
|
|
}
|