From 74574c318e1e1c656b989c5aeaa5a5e270783a31 Mon Sep 17 00:00:00 2001 From: parax0 Date: Sat, 13 Aug 2016 01:43:55 -0600 Subject: [PATCH] Moved EGame to Common --- src/Common/Common.pro | 3 ++- src/{Core/Resource => Common}/EGame.h | 3 +-- src/Core/GameProject/CGameExporter.cpp | 4 ++-- src/Core/GameProject/CGameProject.h | 8 ++++---- src/Core/GameProject/CResourceEntry.cpp | 2 +- src/Core/Resource/CAnimationParameters.h | 2 +- src/Core/Resource/CMaterial.cpp | 2 +- src/Core/Resource/CMaterial.h | 2 +- src/Core/Resource/CMaterialSet.h | 2 +- src/Core/Resource/CResource.cpp | 4 ++-- src/Core/Resource/CResource.h | 2 +- src/Core/Resource/CScan.h | 2 +- src/Core/Resource/CWorld.cpp | 2 +- src/Core/Resource/Cooker/CAreaCooker.h | 2 +- src/Core/Resource/Cooker/CMaterialCooker.h | 2 +- src/Core/Resource/Cooker/CModelCooker.h | 2 +- src/Core/Resource/Cooker/CScriptCooker.h | 2 +- src/Core/Resource/Cooker/CWorldCooker.h | 2 +- src/Core/Resource/EResType.h | 2 +- src/Core/Resource/Factory/CAnimSetLoader.cpp | 2 +- src/Core/Resource/Factory/CAnimSetLoader.h | 2 +- src/Core/Resource/Factory/CAnimationLoader.cpp | 4 ++-- src/Core/Resource/Factory/CAnimationLoader.h | 2 +- src/Core/Resource/Factory/CAreaLoader.cpp | 2 +- src/Core/Resource/Factory/CAreaLoader.h | 2 +- src/Core/Resource/Factory/CCollisionLoader.cpp | 2 +- src/Core/Resource/Factory/CCollisionLoader.h | 2 +- src/Core/Resource/Factory/CDependencyGroupLoader.h | 2 +- src/Core/Resource/Factory/CFontLoader.cpp | 4 ++-- src/Core/Resource/Factory/CFontLoader.h | 2 +- src/Core/Resource/Factory/CMaterialLoader.h | 2 +- src/Core/Resource/Factory/CModelLoader.cpp | 4 ++-- src/Core/Resource/Factory/CModelLoader.h | 2 +- src/Core/Resource/Factory/CScanLoader.h | 2 +- src/Core/Resource/Factory/CSkeletonLoader.cpp | 2 +- src/Core/Resource/Factory/CSkeletonLoader.h | 2 +- src/Core/Resource/Factory/CStringLoader.cpp | 6 +++--- src/Core/Resource/Factory/CStringLoader.h | 2 +- src/Core/Resource/Factory/CWorldLoader.cpp | 4 ++-- src/Core/Resource/Factory/CWorldLoader.h | 2 +- src/Core/Resource/Script/CMasterTemplate.cpp | 2 +- src/Core/Resource/Script/CMasterTemplate.h | 2 +- src/Core/Resource/Script/IPropertyTemplate.cpp | 2 +- src/Editor/CPakToolDialog.h | 2 +- src/Editor/WorldEditor/CWorldEditor.h | 2 +- 45 files changed, 57 insertions(+), 57 deletions(-) rename src/{Core/Resource => Common}/EGame.h (66%) diff --git a/src/Common/Common.pro b/src/Common/Common.pro index 9d907041..988f2608 100644 --- a/src/Common/Common.pro +++ b/src/Common/Common.pro @@ -80,7 +80,8 @@ HEADERS += \ CAssetID.h \ Serialization/IArchive.h \ Serialization/CXMLWriter.h \ - Serialization/CXMLReader.h + Serialization/CXMLReader.h \ + EGame.h # Source Files SOURCES += \ diff --git a/src/Core/Resource/EGame.h b/src/Common/EGame.h similarity index 66% rename from src/Core/Resource/EGame.h rename to src/Common/EGame.h index 5bdfa1d5..c7e03e98 100644 --- a/src/Core/Resource/EGame.h +++ b/src/Common/EGame.h @@ -1,7 +1,6 @@ #ifndef EGAME_H #define EGAME_H -// Global version enum that can be easily shared between loaders enum EGame { ePrimeDemo, @@ -11,7 +10,7 @@ enum EGame eCorruptionProto, eCorruption, eReturns, - eUnknownVersion = -1 + eUnknownGame = -1 }; #endif // EGAME_H diff --git a/src/Core/GameProject/CGameExporter.cpp b/src/Core/GameProject/CGameExporter.cpp index 01d0f729..4de2faba 100644 --- a/src/Core/GameProject/CGameExporter.cpp +++ b/src/Core/GameProject/CGameExporter.cpp @@ -80,7 +80,7 @@ void CGameExporter::CopyDiscData() continue; // Hack to determine game - if (Game() == eUnknownVersion) + if (Game() == eUnknownGame) { TWideString Name = FullPath.GetFileName(false); if (Name == L"MetroidCWP") SetGame(ePrimeDemo); @@ -107,7 +107,7 @@ void CGameExporter::CopyDiscData() #endif } - ASSERT(Game() != eUnknownVersion); + ASSERT(Game() != eUnknownGame); mpProject->SetGame(Game()); mpProject->SetProjectName(CMasterTemplate::FindGameName(Game())); } diff --git a/src/Core/GameProject/CGameProject.h b/src/Core/GameProject/CGameProject.h index cb744553..fa57a022 100644 --- a/src/Core/GameProject/CGameProject.h +++ b/src/Core/GameProject/CGameProject.h @@ -3,9 +3,9 @@ #include "CPackage.h" #include "CResourceStore.h" -#include "Core/Resource/EGame.h" -#include #include +#include +#include #include #include @@ -29,12 +29,12 @@ class CGameProject public: CGameProject() - : mGame(eUnknownVersion) + : mGame(eUnknownGame) , mProjectName("Unnamed Project") {} CGameProject(const TWideString& rkProjRootDir) - : mGame(eUnknownVersion) + : mGame(eUnknownGame) , mProjectName("Unnamed Project") , mProjectRoot(rkProjRootDir) , mResourceDBPath(L"ResourceDB.rdb") diff --git a/src/Core/GameProject/CResourceEntry.cpp b/src/Core/GameProject/CResourceEntry.cpp index 58240529..5ff19dcc 100644 --- a/src/Core/GameProject/CResourceEntry.cpp +++ b/src/Core/GameProject/CResourceEntry.cpp @@ -25,7 +25,7 @@ CResourceEntry::CResourceEntry(CResourceStore *pStore, const CAssetID& rkID, mpDirectory = mpStore->GetVirtualDirectory(rkDir, Transient, true); if (mpDirectory) mpDirectory->AddChild(L"", this); - mGame = ((Transient || !mpStore->ActiveProject()) ? eUnknownVersion : mpStore->ActiveProject()->Game()); + mGame = ((Transient || !mpStore->ActiveProject()) ? eUnknownGame : mpStore->ActiveProject()->Game()); } CResourceEntry::~CResourceEntry() diff --git a/src/Core/Resource/CAnimationParameters.h b/src/Core/Resource/CAnimationParameters.h index ec581412..8100a4b6 100644 --- a/src/Core/Resource/CAnimationParameters.h +++ b/src/Core/Resource/CAnimationParameters.h @@ -3,9 +3,9 @@ #include "CAnimSet.h" #include "CResourceInfo.h" -#include "EGame.h" #include "TResPtr.h" #include "Core/Resource/Model/CModel.h" +#include class CAnimationParameters { diff --git a/src/Core/Resource/CMaterial.cpp b/src/Core/Resource/CMaterial.cpp index f27f501c..bc163a24 100644 --- a/src/Core/Resource/CMaterial.cpp +++ b/src/Core/Resource/CMaterial.cpp @@ -17,7 +17,7 @@ CMaterial::CMaterial() , mShaderStatus(eNoShader) , mRecalcHash(true) , mEnableBloom(false) - , mVersion(eUnknownVersion) + , mVersion(eUnknownGame) , mOptions(eNoSettings) , mVtxDesc(eNoAttributes) , mBlendSrcFac(GL_ONE) diff --git a/src/Core/Resource/CMaterial.h b/src/Core/Resource/CMaterial.h index 2769bc50..e0492d1b 100644 --- a/src/Core/Resource/CMaterial.h +++ b/src/Core/Resource/CMaterial.h @@ -3,13 +3,13 @@ #include "CMaterialPass.h" #include "CTexture.h" -#include "EGame.h" #include "TResPtr.h" #include "Core/Resource/Model/EVertexAttribute.h" #include "Core/Render/FRenderOptions.h" #include "Core/OpenGL/CShader.h" #include +#include #include #include #include diff --git a/src/Core/Resource/CMaterialSet.h b/src/Core/Resource/CMaterialSet.h index 057ea3ca..8187dcaa 100644 --- a/src/Core/Resource/CMaterialSet.h +++ b/src/Core/Resource/CMaterialSet.h @@ -3,8 +3,8 @@ #include "CMaterial.h" #include "CTexture.h" -#include "EGame.h" #include +#include class CMaterialSet { diff --git a/src/Core/Resource/CResource.cpp b/src/Core/Resource/CResource.cpp index be4b7809..bfbbd33e 100644 --- a/src/Core/Resource/CResource.cpp +++ b/src/Core/Resource/CResource.cpp @@ -124,7 +124,7 @@ TString GetResourceRawExtension(EResType Type, EGame /*Game*/) TString GetResourceCookedExtension(EResType Type, EGame Game) { - if (Game == eUnknownVersion) + if (Game == eUnknownGame) Game = ePrime; u32 GameTypeID = GetGameTypeID(Game, Type); @@ -151,7 +151,7 @@ TString GetResourceCookedExtension(EResType Type, EGame Game) public: \ CResourceTypeRegistrant__##CookedExtension() \ { \ - ASSERT(FirstGame != eUnknownVersion); \ + ASSERT(FirstGame != eUnknownGame); \ \ /* Register extension with resource type (should be consistent across all games) */ \ u32 IntExt = CFourCC(#CookedExtension).ToLong(); \ diff --git a/src/Core/Resource/CResource.h b/src/Core/Resource/CResource.h index b12d7a87..393241a3 100644 --- a/src/Core/Resource/CResource.h +++ b/src/Core/Resource/CResource.h @@ -48,7 +48,7 @@ public: inline TString Source() const { return mpEntry ? mpEntry->CookedAssetPath(true).GetFileName() : ""; } inline TString FullSource() const { return mpEntry ? mpEntry->CookedAssetPath(true) : ""; } inline CAssetID ID() const { return mpEntry ? mpEntry->ID() : CAssetID::skInvalidID64; } - inline EGame Game() const { return mpEntry ? mpEntry->Game() : eUnknownVersion; } + inline EGame Game() const { return mpEntry ? mpEntry->Game() : eUnknownGame; } inline bool IsReferenced() const { return mRefCount > 0; } inline void SetGame(EGame Game) { if (mpEntry) mpEntry->SetGame(Game); } inline void Lock() { mRefCount++; } diff --git a/src/Core/Resource/CScan.h b/src/Core/Resource/CScan.h index 173942af..638853b7 100644 --- a/src/Core/Resource/CScan.h +++ b/src/Core/Resource/CScan.h @@ -3,8 +3,8 @@ #include "CResource.h" #include "CStringTable.h" -#include "EGame.h" #include "TResPtr.h" +#include class CScan : public CResource { diff --git a/src/Core/Resource/CWorld.cpp b/src/Core/Resource/CWorld.cpp index 727bf29a..abc455c5 100644 --- a/src/Core/Resource/CWorld.cpp +++ b/src/Core/Resource/CWorld.cpp @@ -4,7 +4,7 @@ CWorld::CWorld(CResourceEntry *pEntry /*= 0*/) : CResource(pEntry) - , mWorldVersion(eUnknownVersion) + , mWorldVersion(eUnknownGame) , mpWorldName(nullptr) , mpDarkWorldName(nullptr) , mpSaveWorld(nullptr) diff --git a/src/Core/Resource/Cooker/CAreaCooker.h b/src/Core/Resource/Cooker/CAreaCooker.h index b0b28290..ab2a1289 100644 --- a/src/Core/Resource/Cooker/CAreaCooker.h +++ b/src/Core/Resource/Cooker/CAreaCooker.h @@ -3,8 +3,8 @@ #include "CSectionMgrOut.h" #include "Core/Resource/Area/CGameArea.h" -#include "Core/Resource/EGame.h" #include +#include class CAreaCooker { diff --git a/src/Core/Resource/Cooker/CMaterialCooker.h b/src/Core/Resource/Cooker/CMaterialCooker.h index b496471b..70beefa1 100644 --- a/src/Core/Resource/Cooker/CMaterialCooker.h +++ b/src/Core/Resource/Cooker/CMaterialCooker.h @@ -3,7 +3,7 @@ #include "Core/Resource/CMaterial.h" #include "Core/Resource/CMaterialSet.h" -#include "Core/Resource/EGame.h" +#include class CMaterialCooker { diff --git a/src/Core/Resource/Cooker/CModelCooker.h b/src/Core/Resource/Cooker/CModelCooker.h index fff03b54..bc7ed114 100644 --- a/src/Core/Resource/Cooker/CModelCooker.h +++ b/src/Core/Resource/Cooker/CModelCooker.h @@ -2,8 +2,8 @@ #define CMODELCOOKER_H #include "Core/Resource/Model/CModel.h" -#include "Core/Resource/EGame.h" #include +#include class CModelCooker { diff --git a/src/Core/Resource/Cooker/CScriptCooker.h b/src/Core/Resource/Cooker/CScriptCooker.h index 932f55d8..f67ca8b2 100644 --- a/src/Core/Resource/Cooker/CScriptCooker.h +++ b/src/Core/Resource/Cooker/CScriptCooker.h @@ -1,10 +1,10 @@ #ifndef CSCRIPTCOOKER_H #define CSCRIPTCOOKER_H -#include "Core/Resource/EGame.h" #include "Core/Resource/Script/CScriptLayer.h" #include "Core/Resource/Script/CScriptObject.h" #include +#include class CScriptCooker { diff --git a/src/Core/Resource/Cooker/CWorldCooker.h b/src/Core/Resource/Cooker/CWorldCooker.h index 68a9c1f3..96a3cca3 100644 --- a/src/Core/Resource/Cooker/CWorldCooker.h +++ b/src/Core/Resource/Cooker/CWorldCooker.h @@ -2,7 +2,7 @@ #define CWORLDCOOKER_H #include "Core/Resource/CWorld.h" -#include "Core/Resource/EGame.h" +#include #include class CWorldCooker diff --git a/src/Core/Resource/EResType.h b/src/Core/Resource/EResType.h index ec297954..325cfb75 100644 --- a/src/Core/Resource/EResType.h +++ b/src/Core/Resource/EResType.h @@ -1,7 +1,7 @@ #ifndef ERESTYPE #define ERESTYPE -#include "EGame.h" +#include #include enum EResType diff --git a/src/Core/Resource/Factory/CAnimSetLoader.cpp b/src/Core/Resource/Factory/CAnimSetLoader.cpp index 48c5b396..3342d644 100644 --- a/src/Core/Resource/Factory/CAnimSetLoader.cpp +++ b/src/Core/Resource/Factory/CAnimSetLoader.cpp @@ -232,7 +232,7 @@ CAnimSet* CAnimSetLoader::LoadANCS(IInputStream& rANCS, CResourceEntry *pEntry) rANCS.Seek(0x4, SEEK_CUR); // Skipping node self-index u16 Unknown1 = rANCS.ReadShort(); - if (iNode == 0 && Loader.mVersion == eUnknownVersion) + if (iNode == 0 && Loader.mVersion == eUnknownGame) { Loader.mVersion = (Unknown1 == 0xA) ? eEchoes : ePrime; // Best version indicator we know of unfortunately Loader.pSet->SetGame(Loader.mVersion); diff --git a/src/Core/Resource/Factory/CAnimSetLoader.h b/src/Core/Resource/Factory/CAnimSetLoader.h index f0c97bdd..771a53fd 100644 --- a/src/Core/Resource/Factory/CAnimSetLoader.h +++ b/src/Core/Resource/Factory/CAnimSetLoader.h @@ -2,7 +2,7 @@ #define CCHARACTERLOADER_H #include "Core/Resource/CAnimSet.h" -#include "Core/Resource/EGame.h" +#include class CAnimSetLoader { diff --git a/src/Core/Resource/Factory/CAnimationLoader.cpp b/src/Core/Resource/Factory/CAnimationLoader.cpp index c04e50d6..3bf376e0 100644 --- a/src/Core/Resource/Factory/CAnimationLoader.cpp +++ b/src/Core/Resource/Factory/CAnimationLoader.cpp @@ -75,7 +75,7 @@ void CAnimationLoader::ReadUncompressedANIM() NumBoneChannels++; } - if (mGame == eUnknownVersion) + if (mGame == eUnknownGame) { mGame = UncompressedCheckVersion(); mpAnim->SetGame(mGame); @@ -211,7 +211,7 @@ void CAnimationLoader::ReadCompressedANIM() // Header mpInput->Seek(0x4, SEEK_CUR); // Skip alloc size - if (mGame == eUnknownVersion) + if (mGame == eUnknownGame) { mGame = (mpInput->PeekShort() == 0x0101 ? eEchoes : ePrime); mpAnim->SetGame(mGame); diff --git a/src/Core/Resource/Factory/CAnimationLoader.h b/src/Core/Resource/Factory/CAnimationLoader.h index 9e7acb80..4f89ccb2 100644 --- a/src/Core/Resource/Factory/CAnimationLoader.h +++ b/src/Core/Resource/Factory/CAnimationLoader.h @@ -3,7 +3,7 @@ #include "Core/Resource/TResPtr.h" #include "Core/Resource/CAnimation.h" -#include "Core/Resource/EGame.h" +#include class CAnimationLoader { diff --git a/src/Core/Resource/Factory/CAreaLoader.cpp b/src/Core/Resource/Factory/CAreaLoader.cpp index 1ad6856c..80f414a3 100644 --- a/src/Core/Resource/Factory/CAreaLoader.cpp +++ b/src/Core/Resource/Factory/CAreaLoader.cpp @@ -749,6 +749,6 @@ EGame CAreaLoader::GetFormatVersion(u32 Version) case 0x1D: return eCorruptionProto; case 0x1E: return eCorruption; case 0x20: return eReturns; - default: return eUnknownVersion; + default: return eUnknownGame; } } diff --git a/src/Core/Resource/Factory/CAreaLoader.h b/src/Core/Resource/Factory/CAreaLoader.h index 39558216..860cfff6 100644 --- a/src/Core/Resource/Factory/CAreaLoader.h +++ b/src/Core/Resource/Factory/CAreaLoader.h @@ -5,7 +5,7 @@ #include "Core/GameProject/CResourceStore.h" #include "Core/Resource/Area/CGameArea.h" #include "Core/Resource/Script/CLink.h" -#include "Core/Resource/EGame.h" +#include #include diff --git a/src/Core/Resource/Factory/CCollisionLoader.cpp b/src/Core/Resource/Factory/CCollisionLoader.cpp index e248c865..e6179ebe 100644 --- a/src/Core/Resource/Factory/CCollisionLoader.cpp +++ b/src/Core/Resource/Factory/CCollisionLoader.cpp @@ -207,6 +207,6 @@ EGame CCollisionLoader::GetFormatVersion(u32 Version) case 0x3: return ePrime; case 0x4: return eEchoes; case 0x5: return eReturns; - default: return eUnknownVersion; + default: return eUnknownGame; } } diff --git a/src/Core/Resource/Factory/CCollisionLoader.h b/src/Core/Resource/Factory/CCollisionLoader.h index 89a4eedb..5d3f5d0d 100644 --- a/src/Core/Resource/Factory/CCollisionLoader.h +++ b/src/Core/Resource/Factory/CCollisionLoader.h @@ -3,7 +3,7 @@ #include "Core/Resource/CCollisionMesh.h" #include "Core/Resource/CCollisionMeshGroup.h" -#include "Core/Resource/EGame.h" +#include class CCollisionLoader { diff --git a/src/Core/Resource/Factory/CDependencyGroupLoader.h b/src/Core/Resource/Factory/CDependencyGroupLoader.h index f806b55c..cf5094c9 100644 --- a/src/Core/Resource/Factory/CDependencyGroupLoader.h +++ b/src/Core/Resource/Factory/CDependencyGroupLoader.h @@ -2,7 +2,7 @@ #define CDEPENDENCYGROUPLOADER_H #include "Core/Resource/CDependencyGroup.h" -#include "Core/Resource/EGame.h" +#include class CDependencyGroupLoader { diff --git a/src/Core/Resource/Factory/CFontLoader.cpp b/src/Core/Resource/Factory/CFontLoader.cpp index 9d3ef03f..e448f145 100644 --- a/src/Core/Resource/Factory/CFontLoader.cpp +++ b/src/Core/Resource/Factory/CFontLoader.cpp @@ -92,7 +92,7 @@ CFont* CFontLoader::LoadFONT(IInputStream& rFONT, CResourceEntry *pEntry) u32 FileVersion = rFONT.ReadLong(); EGame Version = GetFormatVersion(FileVersion); - if (Version == eUnknownVersion) + if (Version == eUnknownGame) { Log::FileError(rFONT.GetSourceString(), "Unsupported FONT version: " + TString::HexString(FileVersion, 0)); return nullptr; @@ -113,6 +113,6 @@ EGame CFontLoader::GetFormatVersion(u32 Version) case 2: return ePrime; case 4: return eEchoes; case 5: return eCorruption; - default: return eUnknownVersion; + default: return eUnknownGame; } } diff --git a/src/Core/Resource/Factory/CFontLoader.h b/src/Core/Resource/Factory/CFontLoader.h index a60db199..6f9aa8ef 100644 --- a/src/Core/Resource/Factory/CFontLoader.h +++ b/src/Core/Resource/Factory/CFontLoader.h @@ -3,7 +3,7 @@ #include "Core/GameProject/CResourceStore.h" #include "Core/Resource/CFont.h" -#include "Core/Resource/EGame.h" +#include class CFontLoader { diff --git a/src/Core/Resource/Factory/CMaterialLoader.h b/src/Core/Resource/Factory/CMaterialLoader.h index bbd79890..fc0f00d7 100644 --- a/src/Core/Resource/Factory/CMaterialLoader.h +++ b/src/Core/Resource/Factory/CMaterialLoader.h @@ -3,7 +3,7 @@ #include "Core/GameProject/CResourceStore.h" #include "Core/Resource/CMaterialSet.h" -#include "Core/Resource/EGame.h" +#include #include #include diff --git a/src/Core/Resource/Factory/CModelLoader.cpp b/src/Core/Resource/Factory/CModelLoader.cpp index 7b7e7d52..b4e81508 100644 --- a/src/Core/Resource/Factory/CModelLoader.cpp +++ b/src/Core/Resource/Factory/CModelLoader.cpp @@ -446,7 +446,7 @@ CModel* CModelLoader::LoadCMDL(IInputStream& rCMDL, CResourceEntry *pEntry) // The rest is common to all CMDL versions Loader.mVersion = GetFormatVersion(Version); - if (Loader.mVersion == eUnknownVersion) + if (Loader.mVersion == eUnknownGame) { Log::FileError(rCMDL.GetSourceString(), "Unsupported CMDL version: " + TString::HexString(Magic, 0)); return nullptr; @@ -644,6 +644,6 @@ EGame CModelLoader::GetFormatVersion(u32 Version) case 0x4: return eEchoes; case 0x5: return eCorruption; case 0xA: return eReturns; - default: return eUnknownVersion; + default: return eUnknownGame; } } diff --git a/src/Core/Resource/Factory/CModelLoader.h b/src/Core/Resource/Factory/CModelLoader.h index 6c4d79e6..46e7d8ba 100644 --- a/src/Core/Resource/Factory/CModelLoader.h +++ b/src/Core/Resource/Factory/CModelLoader.h @@ -5,7 +5,7 @@ #include "Core/GameProject/CResourceStore.h" #include "Core/Resource/Model/CBasicModel.h" #include "Core/Resource/Model/CModel.h" -#include "Core/Resource/EGame.h" +#include #include #include diff --git a/src/Core/Resource/Factory/CScanLoader.h b/src/Core/Resource/Factory/CScanLoader.h index 7436aee1..2f3cb42f 100644 --- a/src/Core/Resource/Factory/CScanLoader.h +++ b/src/Core/Resource/Factory/CScanLoader.h @@ -2,7 +2,7 @@ #define CSCANLOADER_H #include "Core/Resource/CScan.h" -#include "Core/Resource/EGame.h" +#include class CScanLoader { diff --git a/src/Core/Resource/Factory/CSkeletonLoader.cpp b/src/Core/Resource/Factory/CSkeletonLoader.cpp index 32819dd0..3d2e5f42 100644 --- a/src/Core/Resource/Factory/CSkeletonLoader.cpp +++ b/src/Core/Resource/Factory/CSkeletonLoader.cpp @@ -56,7 +56,7 @@ CSkeleton* CSkeletonLoader::LoadCINF(IInputStream& rCINF, CResourceEntry *pEntry // rotation value in MP2. The max bone count is 100 so the linked bone count will not be higher // than that. Additionally, every bone links to its parent at least and every skeleton (as far as I // know) has at least two bones so the linked bone count will never be 0. - if (Game == eUnknownVersion) + if (Game == eUnknownGame) { u32 Check = rCINF.PeekLong(); Game = ((Check > 100 || Check == 0) ? eEchoes : ePrime); diff --git a/src/Core/Resource/Factory/CSkeletonLoader.h b/src/Core/Resource/Factory/CSkeletonLoader.h index 87c235f1..3ed4ac53 100644 --- a/src/Core/Resource/Factory/CSkeletonLoader.h +++ b/src/Core/Resource/Factory/CSkeletonLoader.h @@ -2,8 +2,8 @@ #define CSKELETONLOADER_H #include "Core/Resource/CSkeleton.h" -#include "Core/Resource/EGame.h" #include "Core/Resource/TResPtr.h" +#include class CSkeletonLoader { diff --git a/src/Core/Resource/Factory/CStringLoader.cpp b/src/Core/Resource/Factory/CStringLoader.cpp index 85385fde..b51ac961 100644 --- a/src/Core/Resource/Factory/CStringLoader.cpp +++ b/src/Core/Resource/Factory/CStringLoader.cpp @@ -160,7 +160,7 @@ CStringTable* CStringLoader::LoadSTRG(IInputStream& rSTRG, CResourceEntry *pEntr if (!rSTRG.IsValid()) return nullptr; u32 Magic = rSTRG.ReadLong(); - EGame Version = eUnknownVersion; + EGame Version = eUnknownGame; if (Magic != 0x87654321) { @@ -185,7 +185,7 @@ CStringTable* CStringLoader::LoadSTRG(IInputStream& rSTRG, CResourceEntry *pEntr u32 FileVersion = rSTRG.ReadLong(); Version = GetFormatVersion(FileVersion); - if (FileVersion == eUnknownVersion) + if (FileVersion == eUnknownGame) { Log::FileError(rSTRG.GetSourceString(), "Unsupported STRG version: " + TString::HexString(FileVersion, 0)); return nullptr; @@ -212,6 +212,6 @@ EGame CStringLoader::GetFormatVersion(u32 Version) case 0x0: return ePrime; case 0x1: return eEchoes; case 0x3: return eCorruption; - default: return eUnknownVersion; + default: return eUnknownGame; } } diff --git a/src/Core/Resource/Factory/CStringLoader.h b/src/Core/Resource/Factory/CStringLoader.h index 7f2ef1c8..8d236612 100644 --- a/src/Core/Resource/Factory/CStringLoader.h +++ b/src/Core/Resource/Factory/CStringLoader.h @@ -3,8 +3,8 @@ #include "Core/GameProject/CResourceStore.h" #include "Core/Resource/CStringTable.h" -#include "Core/Resource/EGame.h" #include "Core/Resource/TResPtr.h" +#include class CStringLoader { diff --git a/src/Core/Resource/Factory/CWorldLoader.cpp b/src/Core/Resource/Factory/CWorldLoader.cpp index 601896a3..f278d530 100644 --- a/src/Core/Resource/Factory/CWorldLoader.cpp +++ b/src/Core/Resource/Factory/CWorldLoader.cpp @@ -293,7 +293,7 @@ CWorld* CWorldLoader::LoadMLVL(IInputStream& rMLVL, CResourceEntry *pEntry) u32 FileVersion = rMLVL.ReadLong(); EGame Version = GetFormatVersion(FileVersion); - if (Version == eUnknownVersion) + if (Version == eUnknownGame) { Log::FileError(rMLVL.GetSourceString(), "Unsupported MLVL version: " + TString::HexString(FileVersion, 2)); return nullptr; @@ -324,6 +324,6 @@ EGame CWorldLoader::GetFormatVersion(u32 Version) case 0x17: return eEchoes; case 0x19: return eCorruption; case 0x1B: return eReturns; - default: return eUnknownVersion; + default: return eUnknownGame; } } diff --git a/src/Core/Resource/Factory/CWorldLoader.h b/src/Core/Resource/Factory/CWorldLoader.h index f21a06f3..a2714862 100644 --- a/src/Core/Resource/Factory/CWorldLoader.h +++ b/src/Core/Resource/Factory/CWorldLoader.h @@ -3,7 +3,7 @@ #include "Core/GameProject/CResourceStore.h" #include "Core/Resource/CWorld.h" -#include "Core/Resource/EGame.h" +#include #include diff --git a/src/Core/Resource/Script/CMasterTemplate.cpp b/src/Core/Resource/Script/CMasterTemplate.cpp index 862349a6..3795eb23 100644 --- a/src/Core/Resource/Script/CMasterTemplate.cpp +++ b/src/Core/Resource/Script/CMasterTemplate.cpp @@ -136,7 +136,7 @@ EGame CMasterTemplate::FindGameForName(const TString& rkName) return pMaster->Game(); } - return eUnknownVersion; + return eUnknownGame; } TString CMasterTemplate::PropertyName(u32 PropertyID) diff --git a/src/Core/Resource/Script/CMasterTemplate.h b/src/Core/Resource/Script/CMasterTemplate.h index 928f17a4..c764f673 100644 --- a/src/Core/Resource/Script/CMasterTemplate.h +++ b/src/Core/Resource/Script/CMasterTemplate.h @@ -3,7 +3,7 @@ #include "CLink.h" #include "CScriptTemplate.h" -#include "Core/Resource/EGame.h" +#include #include #include diff --git a/src/Core/Resource/Script/IPropertyTemplate.cpp b/src/Core/Resource/Script/IPropertyTemplate.cpp index 5b3cc00e..17fe5da5 100644 --- a/src/Core/Resource/Script/IPropertyTemplate.cpp +++ b/src/Core/Resource/Script/IPropertyTemplate.cpp @@ -5,7 +5,7 @@ // ************ IPropertyTemplate ************ EGame IPropertyTemplate::Game() const { - return (mpMasterTemplate ? mpMasterTemplate->Game() : eUnknownVersion); + return (mpMasterTemplate ? mpMasterTemplate->Game() : eUnknownGame); } bool IPropertyTemplate::IsInVersion(u32 Version) const diff --git a/src/Editor/CPakToolDialog.h b/src/Editor/CPakToolDialog.h index eec07fc4..123c9c04 100644 --- a/src/Editor/CPakToolDialog.h +++ b/src/Editor/CPakToolDialog.h @@ -1,9 +1,9 @@ #ifndef CPAKTOOLDIALOG #define CPAKTOOLDIALOG +#include #include #include -#include #include "Editor/UICommon.h" #include diff --git a/src/Editor/WorldEditor/CWorldEditor.h b/src/Editor/WorldEditor/CWorldEditor.h index ae0350e1..b666c900 100644 --- a/src/Editor/WorldEditor/CWorldEditor.h +++ b/src/Editor/WorldEditor/CWorldEditor.h @@ -59,7 +59,7 @@ public: bool HasAnyScriptNodesSelected() const; inline CGameArea* ActiveArea() const { return mpArea; } - inline EGame CurrentGame() const { return mpArea ? mpArea->Version() : eUnknownVersion; } + inline EGame CurrentGame() const { return mpArea ? mpArea->Version() : eUnknownGame; } inline CLinkDialog* LinkDialog() const { return mpLinkDialog; } CSceneViewport* Viewport() const;