From 1eb340aaeae188dead61b08a661001948dec443a Mon Sep 17 00:00:00 2001 From: njohnson Date: Sun, 7 Sep 2025 13:13:27 -0400 Subject: [PATCH] Make buildable with all those assets. --- libs/xassets/xcardmemory.h | 2 +- libs/xassets/xcleaf.cpp | 5 +++ libs/xassets/xcleaf.h | 1 + libs/xassets/xcleafbrushnodeleaf.cpp | 5 +++ libs/xassets/xclipmap.cpp | 38 ++++++++++---------- libs/xassets/xcstaticmodel.cpp | 7 +++- libs/xassets/xdmaterial.cpp | 5 +++ libs/xassets/xgfxsurface.cpp | 20 +++++------ libs/xassets/xgputexturefetchconstantraw.cpp | 24 +------------ libs/xassets/xmaterialshaderargument.cpp | 4 +-- 10 files changed, 53 insertions(+), 58 deletions(-) diff --git a/libs/xassets/xcardmemory.h b/libs/xassets/xcardmemory.h index e6dbb52..e822d3a 100644 --- a/libs/xassets/xcardmemory.h +++ b/libs/xassets/xcardmemory.h @@ -6,7 +6,7 @@ class XCardMemory : public XAsset { public: - XCardMemory(); + explicit XCardMemory(); ~XCardMemory(); quint32 GetPlatform() const; diff --git a/libs/xassets/xcleaf.cpp b/libs/xassets/xcleaf.cpp index 6aeab84..2ea5952 100644 --- a/libs/xassets/xcleaf.cpp +++ b/libs/xassets/xcleaf.cpp @@ -13,6 +13,11 @@ XCLeaf::XCLeaf() { } +XCLeaf::~XCLeaf() +{ + +} + void XCLeaf::ParseData(QDataStream *aStream) { if (GetPtr() == -1) { *aStream diff --git a/libs/xassets/xcleaf.h b/libs/xassets/xcleaf.h index bb8564e..1a7a5e5 100644 --- a/libs/xassets/xcleaf.h +++ b/libs/xassets/xcleaf.h @@ -9,6 +9,7 @@ class XCLeaf : public XAsset { public: explicit XCLeaf(); + ~XCLeaf(); void ParseData(QDataStream *aStream) override; diff --git a/libs/xassets/xcleafbrushnodeleaf.cpp b/libs/xassets/xcleafbrushnodeleaf.cpp index d796332..2ba1f59 100644 --- a/libs/xassets/xcleafbrushnodeleaf.cpp +++ b/libs/xassets/xcleafbrushnodeleaf.cpp @@ -15,3 +15,8 @@ void XCLeafBrushNodeLeaf::ParseData(QDataStream *aStream) { // We would parse brushes here, but we're using a placeholder } } + +void XCLeafBrushNodeLeaf::Clear() +{ + +} diff --git a/libs/xassets/xclipmap.cpp b/libs/xassets/xclipmap.cpp index fdd0951..78c7003 100644 --- a/libs/xassets/xclipmap.cpp +++ b/libs/xassets/xclipmap.cpp @@ -236,26 +236,24 @@ void XClipMap::ParseData(QDataStream *aStream) } } - mLeafbrushNodes() - mLeafsurfaces() - mVerts() - mTriIndices() - mTriEdgeIsWalkable() - mBorders() - mPartitions() - mAabbTrees() - mCodels() - mBrushes() - mVisibility() - mMapEnts() - mBoxBrush() - mBoxModel() - mDynEntCount(0) - mDynEntDefList() - mDynEntPoseList() - mDynEntClientList() - mDynEntCollList() - (0) + // mLeafsurfaces() + // mVerts() + // mTriIndices() + // mTriEdgeIsWalkable() + // mBorders() + // mPartitions() + // mAabbTrees() + // mCodels() + // mBrushes() + // mVisibility() + // mMapEnts() + // mBoxBrush() + // mBoxModel() + // mDynEntCount(0) + // mDynEntDefList() + // mDynEntPoseList() + // mDynEntClientList() + // mDynEntCollList() } } diff --git a/libs/xassets/xcstaticmodel.cpp b/libs/xassets/xcstaticmodel.cpp index c4fb1b6..29fb2d1 100644 --- a/libs/xassets/xcstaticmodel.cpp +++ b/libs/xassets/xcstaticmodel.cpp @@ -3,7 +3,7 @@ XCStaticModel::XCStaticModel() : XAsset() , mWritable() - , mModel(new XModel()) + , mModel() , mOrigin() , mInvScaledAxis() , mAbsmin() @@ -11,6 +11,11 @@ XCStaticModel::XCStaticModel() { } +XCStaticModel::~XCStaticModel() +{ + +} + void XCStaticModel::ParseData(QDataStream *aStream) { if (GetPtr() == -1) { // Parse writable diff --git a/libs/xassets/xdmaterial.cpp b/libs/xassets/xdmaterial.cpp index 98916b4..5c653bb 100644 --- a/libs/xassets/xdmaterial.cpp +++ b/libs/xassets/xdmaterial.cpp @@ -5,6 +5,11 @@ XDMaterial::XDMaterial() : XAsset() { } +XDMaterial::~XDMaterial() +{ + +} + void XDMaterial::ParseData(QDataStream *aStream) { if (GetPtr() == -1) { mMaterial = XString::ParseCustom(aStream); diff --git a/libs/xassets/xgfxsurface.cpp b/libs/xassets/xgfxsurface.cpp index 85b50c5..8e6e0ce 100644 --- a/libs/xassets/xgfxsurface.cpp +++ b/libs/xassets/xgfxsurface.cpp @@ -1,23 +1,21 @@ -#include "xgfxstatebits.h" +#include "xgfxsurface.h" -XGfxStateBits::XGfxStateBits() - : XAsset() - , mLoadBits() +XGfxSurface::XGfxSurface() { - + } -XGfxStateBits::~XGfxStateBits() +XGfxSurface::~XGfxSurface() { - + } -void XGfxStateBits::ParseData(QDataStream *aStream) +void XGfxSurface::ParseData(QDataStream *aStream) { - + } -void XGfxStateBits::Clear() +void XGfxSurface::Clear() { - mLoadBits = QVector(); + } diff --git a/libs/xassets/xgputexturefetchconstantraw.cpp b/libs/xassets/xgputexturefetchconstantraw.cpp index ef1333f..b9fa3d0 100644 --- a/libs/xassets/xgputexturefetchconstantraw.cpp +++ b/libs/xassets/xgputexturefetchconstantraw.cpp @@ -1,23 +1 @@ -#include "xcardmemory.h" - -XCardMemory::XCardMemory() - : XAsset() - , mPlatform(0) -{ - -} - -XCardMemory::~XCardMemory() -{ - -} - -void XCardMemory::ParseData(QDataStream *aStream) -{ - *aStream >> mPlatform; -} - -void XCardMemory::Clear() -{ - mPlatform = 0; -} +#include "xgputexturefetchconstant.h" diff --git a/libs/xassets/xmaterialshaderargument.cpp b/libs/xassets/xmaterialshaderargument.cpp index b77351f..1a19d77 100644 --- a/libs/xassets/xmaterialshaderargument.cpp +++ b/libs/xassets/xmaterialshaderargument.cpp @@ -4,7 +4,7 @@ XMaterialShaderArgument::XMaterialShaderArgument() : XAsset() , mType(0) , mDest(0) - , mDef() + , mDef(*this) { SetName("Material Shader Argument"); } @@ -22,7 +22,7 @@ void XMaterialShaderArgument::ParseData(QDataStream *aStream) >> mType >> mDest; - mDef.ParseData(aStream, mType); + mDef.ParseData(aStream); } quint16 XMaterialShaderArgument::GetType() const