Fixed volumetric fog, added transform system

This commit is contained in:
Antoine Pilote
2021-07-03 20:52:29 -04:00
parent b384154eb4
commit 78d02a5859
8 changed files with 108 additions and 36 deletions

View File

@@ -104,6 +104,19 @@ bool Project::Deserialize(const std::string& str)
Name = j["Name"];
Description = j["Description"];
if (j.contains("EntityDefinition"))
{
std::string path = j["EntityDefinition"];
EntityDefinitionsFile = CreateRef<FGDFile>(path);
std::string content = FileSystem::ReadFile(path, false);
EntityDefinitionsFile->Deserialize(content);
}
if (j.contains("TrenchbroomPath"))
{
this->TrenchbroomPath = j["TrenchbroomPath"];
}
DefaultScene = Scene::New();
// Load default scene, a project can have no default scene set.
@@ -121,19 +134,6 @@ bool Project::Deserialize(const std::string& str)
return false;
}
if (j.contains("EntityDefinition"))
{
std::string path = j["EntityDefinition"];
EntityDefinitionsFile = CreateRef<FGDFile>(path);
std::string content = FileSystem::ReadFile(path, false);
EntityDefinitionsFile->Deserialize(content);
}
if (j.contains("TrenchbroomPath"))
{
this->TrenchbroomPath = j["TrenchbroomPath"];
}
DefaultScene->Path = scenePath;
Logger::Log("Successfully loaded scene: " + scenePath);