Merged all the Properties.xmls together to eliminate the need to sync property name changes between games

This commit is contained in:
parax0
2016-02-08 04:35:04 -07:00
parent 55b2c053ab
commit d9b5895074
17 changed files with 4034 additions and 18913 deletions

View File

@@ -6,7 +6,6 @@ CMasterTemplate::CMasterTemplate()
{
mVersion = 0;
mFullyLoaded = false;
mHasPropList = false;
}
CMasterTemplate::~CMasterTemplate()
@@ -100,21 +99,6 @@ TString CMasterTemplate::MessageByIndex(u32 Index)
return (std::next(it, Index))->second;
}
TString CMasterTemplate::PropertyName(u32 PropertyID)
{
auto it = mPropertyNames.find(PropertyID);
if (it != mPropertyNames.end())
return it->second;
else
return "Unknown";
}
bool CMasterTemplate::HasPropertyList()
{
return mHasPropList;
}
bool CMasterTemplate::IsLoadedSuccessfully()
{
return mFullyLoaded;
@@ -141,5 +125,16 @@ std::list<CMasterTemplate*> CMasterTemplate::GetMasterList()
return list;
}
TString CMasterTemplate::GetPropertyName(u32 PropertyID)
{
auto it = smPropertyNames.find(PropertyID);
if (it != smPropertyNames.end())
return it->second;
else
return "Unknown";
}
std::map<EGame, CMasterTemplate*> CMasterTemplate::smMasterMap;
std::map<u32, TString> CMasterTemplate::smPropertyNames;
u32 CMasterTemplate::smGameListVersion;

View File

@@ -22,10 +22,9 @@ class CMasterTemplate
std::map<u32, TString> mStates;
std::map<u32, TString> mMessages;
bool mHasPropList;
std::map<u32, TString> mPropertyNames;
static std::map<EGame, CMasterTemplate*> smMasterMap;
static std::map<u32, TString> smPropertyNames;
static u32 smGameListVersion;
public:
@@ -46,12 +45,11 @@ public:
TString MessageByID(u32 MessageID);
TString MessageByID(const CFourCC& MessageID);
TString MessageByIndex(u32 Index);
TString PropertyName(u32 PropertyID);
bool HasPropertyList();
bool IsLoadedSuccessfully();
static CMasterTemplate* GetMasterForGame(EGame Game);
static std::list<CMasterTemplate*> GetMasterList();
static TString GetPropertyName(u32 PropertyID);
};
// ************ INLINE ************