2025-08-17 13:14:17 -04:00
|
|
|
#include "xanimdeltapartquatdataframes.h"
|
|
|
|
|
|
|
|
|
|
XAnimDeltaPartQuatDataFrames::XAnimDeltaPartQuatDataFrames()
|
2025-09-10 21:55:48 -04:00
|
|
|
: XAsset()
|
|
|
|
|
{
|
|
|
|
|
SetName("Animation Delta Part Quat Data Frame");
|
2025-08-17 13:14:17 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-10 21:55:48 -04:00
|
|
|
void XAnimDeltaPartQuatDataFrames::ParseData(XDataStream *aStream) {
|
2025-09-03 13:00:41 -04:00
|
|
|
if (GetPtr() == -1) {
|
2025-09-10 21:55:48 -04:00
|
|
|
mFramesPtr = aStream->ParseInt32(QString("%1 frames ptr").arg(GetName()));
|
|
|
|
|
|
|
|
|
|
mFrames[0] = aStream->ParseInt16(QString("%1 frame %2").arg(GetName()).arg(0));
|
|
|
|
|
mFrames[1] = aStream->ParseInt16(QString("%1 frame %2").arg(GetName()).arg(1));
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-03 13:00:41 -04:00
|
|
|
// Parse indices
|
|
|
|
|
mIndices.ParseData(aStream);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-03 13:00:41 -04:00
|
|
|
void XAnimDeltaPartQuatDataFrames::Clear()
|
|
|
|
|
{
|
2025-08-17 13:14:17 -04:00
|
|
|
|
2025-09-03 13:00:41 -04:00
|
|
|
}
|