mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-14 07:36:11 +00:00
Added editor game info system, exporter now fetches game build version, merged asset name maps for all games, resource browser can now import/export names to/from a map XML, reworked asset name generation to more closely match Retro's organization scheme, bug fixes
This commit is contained in:
@@ -1,23 +1,18 @@
|
||||
#include "CAssetNameMap.h"
|
||||
|
||||
std::map<EGame, CAssetNameMap*> CAssetNameMap::smGameMap;
|
||||
|
||||
CAssetNameMap::CAssetNameMap(EGame Game)
|
||||
: mGame(Game)
|
||||
void CAssetNameMap::LoadAssetNames(TString Path /*= gkAssetMapPath*/)
|
||||
{
|
||||
TString ListPath = GetAssetListPath(mGame);
|
||||
CXMLReader Reader(ListPath);
|
||||
CXMLReader Reader(Path);
|
||||
Serialize(Reader);
|
||||
}
|
||||
|
||||
void CAssetNameMap::SaveAssetNames()
|
||||
void CAssetNameMap::SaveAssetNames(TString Path /*= gkAssetMapPath*/)
|
||||
{
|
||||
TString ListPath = GetAssetListPath(mGame);
|
||||
CXMLWriter Writer(ListPath, "AssetList", 0, mGame);
|
||||
CXMLWriter Writer(Path, "AssetNameMap", 0, eUnknownGame);
|
||||
Serialize(Writer);
|
||||
}
|
||||
|
||||
void CAssetNameMap::GetNameInfo(CAssetID ID, TString& rOutDirectory, TString& rOutName)
|
||||
bool CAssetNameMap::GetNameInfo(CAssetID ID, TString& rOutDirectory, TString& rOutName)
|
||||
{
|
||||
auto It = mMap.find(ID);
|
||||
|
||||
@@ -26,12 +21,14 @@ void CAssetNameMap::GetNameInfo(CAssetID ID, TString& rOutDirectory, TString& rO
|
||||
SAssetNameInfo& rInfo = It->second;
|
||||
rOutName = rInfo.Name;
|
||||
rOutDirectory = rInfo.Directory;
|
||||
return true;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
rOutDirectory = "Uncategorized\\";
|
||||
rOutName = ID.ToString();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user