2025-09-03 13:25:58 -04:00
|
|
|
#include "xsurface.h"
|
|
|
|
|
|
|
|
|
|
XSurface::XSurface()
|
|
|
|
|
: XAsset()
|
|
|
|
|
, mTileMode(0)
|
|
|
|
|
, mDeformed(false)
|
|
|
|
|
, mVertCount(0)
|
|
|
|
|
, mTriCount(0)
|
|
|
|
|
, mTriIndices(0)
|
|
|
|
|
, mVertInfo()
|
2025-09-07 23:16:14 -04:00
|
|
|
, mVert()
|
|
|
|
|
, mVertBuffer()
|
2025-09-03 13:25:58 -04:00
|
|
|
, mVertListCount(0)
|
|
|
|
|
, mVertList()
|
|
|
|
|
, mIndexBuffer()
|
|
|
|
|
, mPartBits()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-07 23:16:14 -04:00
|
|
|
XSurface::~XSurface()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-03 13:25:58 -04:00
|
|
|
void XSurface::ParseData(QDataStream *aStream)
|
|
|
|
|
{
|
2025-09-07 23:16:14 -04:00
|
|
|
*aStream
|
|
|
|
|
>> mTileMode
|
|
|
|
|
>> mDeformed
|
|
|
|
|
>> mVertCount
|
|
|
|
|
>> mTriCount;
|
|
|
|
|
|
|
|
|
|
aStream->skipRawData(2);
|
|
|
|
|
|
|
|
|
|
qint32 triIndicesPtr;
|
|
|
|
|
*aStream
|
|
|
|
|
>> triIndicesPtr;
|
|
|
|
|
|
|
|
|
|
mVertInfo.ParsePtr(aStream, false);
|
|
|
|
|
mVert.ParsePtr(aStream, false);
|
|
|
|
|
|
|
|
|
|
qint32 vertBuffersPtr, vertListPtr;
|
|
|
|
|
*aStream
|
|
|
|
|
>> vertBuffersPtr
|
|
|
|
|
>> mVertListCount
|
|
|
|
|
>> vertListPtr;
|
|
|
|
|
|
|
|
|
|
mIndexBuffer.ParseData(aStream);
|
|
|
|
|
|
|
|
|
|
*aStream
|
|
|
|
|
>> mPartBits[0]
|
|
|
|
|
>> mPartBits[1]
|
|
|
|
|
>> mPartBits[2]
|
|
|
|
|
>> mPartBits[3];
|
|
|
|
|
|
|
|
|
|
mVertInfo.ParseData(aStream);
|
|
|
|
|
mVert.ParseData(aStream);
|
|
|
|
|
|
|
|
|
|
// TODO: Fill out the rest of this
|
2025-09-03 13:25:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XSurface::Clear()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|