CAreaCooker: Make use of in-class initializers where applicable

Simplifies the construction code.
This commit is contained in:
Lioncash 2020-06-09 07:42:49 -04:00
parent 0096b28294
commit f727c07d13
2 changed files with 19 additions and 38 deletions

View File

@ -6,23 +6,7 @@
const bool gkForceDisableCompression = false;
CAreaCooker::CAreaCooker()
: mGeometrySecNum(-1)
, mSCLYSecNum(-1)
, mSCGNSecNum(-1)
, mCollisionSecNum(-1)
, mUnknownSecNum(-1)
, mLightsSecNum(-1)
, mVISISecNum(-1)
, mPATHSecNum(-1)
, mAROTSecNum(-1)
, mFFFFSecNum(-1)
, mPTLASecNum(-1)
, mEGMCSecNum(-1)
, mDepsSecNum(-1)
, mModulesSecNum(-1)
{
}
CAreaCooker::CAreaCooker() = default;
void CAreaCooker::DetermineSectionNumbersPrime()
{

View File

@ -9,33 +9,30 @@
class CAreaCooker
{
TResPtr<CGameArea> mpArea;
EGame mVersion;
EGame mVersion{};
std::vector<uint32> mSectionSizes;
uint32 mGeometrySecNum;
uint32 mSCLYSecNum;
uint32 mSCGNSecNum;
uint32 mCollisionSecNum;
uint32 mUnknownSecNum;
uint32 mLightsSecNum;
uint32 mVISISecNum;
uint32 mPATHSecNum;
uint32 mAROTSecNum;
uint32 mFFFFSecNum;
uint32 mPTLASecNum;
uint32 mEGMCSecNum;
uint32 mDepsSecNum;
uint32 mModulesSecNum;
uint32 mGeometrySecNum = UINT32_MAX;
uint32 mSCLYSecNum = UINT32_MAX;
uint32 mSCGNSecNum = UINT32_MAX;
uint32 mCollisionSecNum = UINT32_MAX;
uint32 mUnknownSecNum = UINT32_MAX;
uint32 mLightsSecNum = UINT32_MAX;
uint32 mVISISecNum = UINT32_MAX;
uint32 mPATHSecNum = UINT32_MAX;
uint32 mAROTSecNum = UINT32_MAX;
uint32 mFFFFSecNum = UINT32_MAX;
uint32 mPTLASecNum = UINT32_MAX;
uint32 mEGMCSecNum = UINT32_MAX;
uint32 mDepsSecNum = UINT32_MAX;
uint32 mModulesSecNum = UINT32_MAX;
struct SCompressedBlock
{
uint32 CompressedSize;
uint32 DecompressedSize;
uint32 NumSections;
SCompressedBlock()
: CompressedSize(0), DecompressedSize(0), NumSections(0) {}
uint32 CompressedSize = 0;
uint32 DecompressedSize = 0;
uint32 NumSections = 0;
};
SCompressedBlock mCurBlock;