mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-15 08:06:10 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user