Made a bunch of changes to make the resource store system more friendly to multiple stores instead of just a single active one, and set up a resource database for editor assets

This commit is contained in:
parax0
2016-08-31 02:09:13 -06:00
parent 1de2691f33
commit a7b381f301
35 changed files with 848 additions and 178 deletions

View File

@@ -7,10 +7,7 @@ CGameProject *CGameProject::mspActiveProject = nullptr;
CGameProject::~CGameProject()
{
if (IsActive())
{
mspActiveProject = nullptr;
gpResourceStore->SetActiveProject(nullptr);
}
}
bool CGameProject::Load(const TWideString& rkPath)
@@ -21,6 +18,8 @@ bool CGameProject::Load(const TWideString& rkPath)
TString ProjPath = rkPath.ToUTF8();
CXMLReader Reader(ProjPath);
Serialize(Reader);
mpResourceStore->LoadResourceDatabase();
return true;
}
@@ -72,7 +71,7 @@ void CGameProject::SetActive()
if (mspActiveProject != this)
{
mspActiveProject = this;
gpResourceStore->SetActiveProject(this);
gpResourceStore = mpResourceStore;
}
}