Fix: Parse Animation Indices data correctly
This commit fixes the parsing of `XAnimIndices` data, ensuring that the index is correctly parsed from the data stream, including handling the case where the index pointer is -1.
This commit is contained in:
parent
2e4e0a6b99
commit
86885f999c
@ -4,21 +4,15 @@ XAnimIndices::XAnimIndices()
|
|||||||
: XAsset()
|
: XAsset()
|
||||||
, mIndex(0)
|
, mIndex(0)
|
||||||
{
|
{
|
||||||
|
SetName("Animation Indices");
|
||||||
}
|
}
|
||||||
|
|
||||||
XAnimIndices::~XAnimIndices()
|
void XAnimIndices::ParseData(XDataStream *aStream) {
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void XAnimIndices::ParseData(QDataStream *aStream) {
|
|
||||||
if (GetPtr() == -1) {
|
if (GetPtr() == -1) {
|
||||||
qint32 indexPtr;
|
qint32 indexPtr = aStream->ParseInt32(QString("%1 index ptr").arg(GetName()));
|
||||||
*aStream >> indexPtr;
|
|
||||||
if (indexPtr == -1)
|
if (indexPtr == -1)
|
||||||
{
|
{
|
||||||
*aStream >> mIndex;
|
mIndex = aStream->ParseUInt32(QString("%1 index").arg(GetName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user