CAreaLoader: Make use of in-class initializers where applicable
Same behavior, less code.
This commit is contained in:
parent
4d4f1490b7
commit
d646b896e1
|
@ -9,29 +9,8 @@
|
||||||
#include <Common/CFourCC.h>
|
#include <Common/CFourCC.h>
|
||||||
|
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
CAreaLoader::CAreaLoader()
|
CAreaLoader::CAreaLoader() = default;
|
||||||
: mpMREA(nullptr)
|
|
||||||
, mHasDecompressedBuffer(false)
|
|
||||||
, mGeometryBlockNum(-1)
|
|
||||||
, mScriptLayerBlockNum(-1)
|
|
||||||
, mCollisionBlockNum(-1)
|
|
||||||
, mUnknownBlockNum(-1)
|
|
||||||
, mLightsBlockNum(-1)
|
|
||||||
, mVisiBlockNum(-1)
|
|
||||||
, mPathBlockNum(-1)
|
|
||||||
, mOctreeBlockNum(-1)
|
|
||||||
, mScriptGeneratorBlockNum(-1)
|
|
||||||
, mFFFFBlockNum(-1)
|
|
||||||
, mPTLABlockNum(-1)
|
|
||||||
, mEGMCBlockNum(-1)
|
|
||||||
, mBoundingBoxesBlockNum(-1)
|
|
||||||
, mDependenciesBlockNum(-1)
|
|
||||||
, mGPUBlockNum(-1)
|
|
||||||
, mRSOBlockNum(-1)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
CAreaLoader::~CAreaLoader()
|
CAreaLoader::~CAreaLoader()
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,41 +15,44 @@ class CAreaLoader
|
||||||
|
|
||||||
// Area data
|
// Area data
|
||||||
TResPtr<CGameArea> mpArea;
|
TResPtr<CGameArea> mpArea;
|
||||||
IInputStream *mpMREA;
|
IInputStream *mpMREA = nullptr;
|
||||||
CSectionMgrIn *mpSectionMgr;
|
CSectionMgrIn *mpSectionMgr = nullptr;
|
||||||
EGame mVersion;
|
EGame mVersion{};
|
||||||
uint32 mNumMeshes;
|
uint32 mNumMeshes = 0;
|
||||||
uint32 mNumLayers;
|
uint32 mNumLayers = 0;
|
||||||
|
|
||||||
// Object connections
|
// Object connections
|
||||||
std::unordered_map<uint32, std::vector<CLink*>> mConnectionMap;
|
std::unordered_map<uint32, std::vector<CLink*>> mConnectionMap;
|
||||||
|
|
||||||
// Compression
|
// Compression
|
||||||
uint8 *mpDecmpBuffer;
|
uint8 *mpDecmpBuffer = nullptr;
|
||||||
bool mHasDecompressedBuffer;
|
bool mHasDecompressedBuffer = false;
|
||||||
std::vector<SCompressedCluster> mClusters;
|
std::vector<SCompressedCluster> mClusters;
|
||||||
uint32 mTotalDecmpSize;
|
uint32 mTotalDecmpSize = 0;
|
||||||
|
|
||||||
// Block numbers
|
// Block numbers
|
||||||
uint32 mGeometryBlockNum;
|
uint32 mGeometryBlockNum = UINT32_MAX;
|
||||||
uint32 mScriptLayerBlockNum;
|
uint32 mScriptLayerBlockNum = UINT32_MAX;
|
||||||
uint32 mCollisionBlockNum;
|
uint32 mCollisionBlockNum = UINT32_MAX;
|
||||||
uint32 mUnknownBlockNum;
|
uint32 mUnknownBlockNum = UINT32_MAX;
|
||||||
uint32 mLightsBlockNum;
|
uint32 mLightsBlockNum = UINT32_MAX;
|
||||||
uint32 mVisiBlockNum;
|
uint32 mVisiBlockNum = UINT32_MAX;
|
||||||
uint32 mPathBlockNum;
|
uint32 mPathBlockNum = UINT32_MAX;
|
||||||
uint32 mOctreeBlockNum;
|
uint32 mOctreeBlockNum = UINT32_MAX;
|
||||||
uint32 mScriptGeneratorBlockNum;
|
uint32 mScriptGeneratorBlockNum = UINT32_MAX;
|
||||||
uint32 mFFFFBlockNum;
|
uint32 mFFFFBlockNum = UINT32_MAX;
|
||||||
uint32 mPTLABlockNum;
|
uint32 mPTLABlockNum = UINT32_MAX;
|
||||||
uint32 mEGMCBlockNum;
|
uint32 mEGMCBlockNum = UINT32_MAX;
|
||||||
uint32 mBoundingBoxesBlockNum;
|
uint32 mBoundingBoxesBlockNum = UINT32_MAX;
|
||||||
uint32 mDependenciesBlockNum;
|
uint32 mDependenciesBlockNum = UINT32_MAX;
|
||||||
uint32 mGPUBlockNum;
|
uint32 mGPUBlockNum = UINT32_MAX;
|
||||||
uint32 mRSOBlockNum;
|
uint32 mRSOBlockNum = UINT32_MAX;
|
||||||
|
|
||||||
struct SCompressedCluster {
|
struct SCompressedCluster {
|
||||||
uint32 BufferSize, DecompressedSize, CompressedSize, NumSections;
|
uint32 BufferSize;
|
||||||
|
uint32 DecompressedSize;
|
||||||
|
uint32 CompressedSize;
|
||||||
|
uint32 NumSections;
|
||||||
};
|
};
|
||||||
|
|
||||||
CAreaLoader();
|
CAreaLoader();
|
||||||
|
|
Loading…
Reference in New Issue