Updated xsurface

This commit is contained in:
njohnson 2025-09-07 23:16:14 -04:00
parent 53f690c554
commit 6e73c2d50c
2 changed files with 45 additions and 7 deletions

View File

@ -8,8 +8,8 @@ XSurface::XSurface()
, mTriCount(0)
, mTriIndices(0)
, mVertInfo()
, mVerts0(new XGfxPackedVertex())
, mVb0()
, mVert()
, mVertBuffer()
, mVertListCount(0)
, mVertList()
, mIndexBuffer()
@ -18,9 +18,46 @@ XSurface::XSurface()
}
XSurface::~XSurface()
{
}
void XSurface::ParseData(QDataStream *aStream)
{
*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
}
void XSurface::Clear()

View File

@ -12,6 +12,7 @@ class XSurface : public XAsset
{
public:
explicit XSurface();
~XSurface();
void ParseData(QDataStream *aStream) override;
void Clear() override;
@ -21,14 +22,14 @@ private:
bool mDeformed;
quint32 mVertCount;
quint32 mTriCount;
quint32 *mTriIndices;
QVector<quint32> mTriIndices;
XSurfaceVertexInfo mVertInfo;
XGfxPackedVertex *mVerts0;
XD3DVertexBuffer mVb0;
XGfxPackedVertex mVert;
XD3DVertexBuffer mVertBuffer;
quint32 mVertListCount;
QVector<XRigidVertList> mVertList;
XD3DIndexBuffer mIndexBuffer;
int mPartBits[4];
QVector<int> mPartBits;
};
#endif // XSURFACE_H