Add xsurface structures

This commit is contained in:
Nicholas Johnson 2025-09-03 13:25:58 -04:00
parent 7b1d269986
commit 163f46b4cf
2 changed files with 71 additions and 0 deletions

29
libs/xassets/xsurface.cpp Normal file
View File

@ -0,0 +1,29 @@
#include "xsurface.h"
XSurface::XSurface()
: XAsset()
, mTileMode(0)
, mDeformed(false)
, mVertCount(0)
, mTriCount(0)
, mTriIndices(0)
, mVertInfo()
, mVerts0(new XGfxPackedVertex())
, mVb0()
, mVertListCount(0)
, mVertList()
, mIndexBuffer()
, mPartBits()
{
}
void XSurface::ParseData(QDataStream *aStream)
{
}
void XSurface::Clear()
{
}

42
libs/xassets/xsurface.h Normal file
View File

@ -0,0 +1,42 @@
#ifndef XSURFACE_H
#define XSURFACE_H
#include "xasset.h"
#include "xd3dindexbuffer.h"
#include "xrigidvertlist.h"
#include "xsurfacevertexinfo.h"
#include "xgfxpackedvertex.h"
#include "xd3dvertexbuffer.h"
class XSurface : public XAsset
{
public:
explicit XSurface();
void ParseData(QDataStream *aStream) override;
void Clear() override;
private:
quint8 mTileMode;
bool mDeformed;
quint16 mVertCount;
quint16 mTriCount;
quint16 *mTriIndices;
XSurfaceVertexInfo mVertInfo;
XGfxPackedVertex *mVerts0;
XD3DVertexBuffer mVb0;
unsigned int mVertListCount;
QVector<XRigidVertList> mVertList;
XD3DIndexBuffer mIndexBuffer;
int mPartBits[4];
};
#endif // XSURFACE_H