EntityFilePreprocessor

WIP

WIP

EntityFilePreprocessor
This commit is contained in:
2015-12-17 17:26:36 +01:00
parent c6655ce0d3
commit 0bcbcda8b8
11 changed files with 741 additions and 63 deletions
+4 -1
View File
@@ -10,6 +10,7 @@ Game::Game(int argc, char* argv[])
ResourceManager::RegisterType<Texture>("Texture");
ResourceManager::RegisterType<EntityXMLFile>("EntityXMLFile");
ResourceManager::RegisterType<ShaderProgram>("ShaderProgram");
ResourceManager::RegisterType<EntityFile>("EntityFile");
m_Config = ResourceManager::Load<ConfigFile>("Config.ini");
LOG_LEVEL = static_cast<_LOG_LEVEL>(m_Config->Get<int>("Debug.LogLevel", 1));
@@ -48,7 +49,9 @@ Game::Game(int argc, char* argv[])
m_World = new World();
std::string mapToLoad = m_Config->Get<std::string>("Debug.LoadMap", "");
if (!mapToLoad.empty()) {
ResourceManager::Load<EntityXMLFile>(mapToLoad)->PopulateWorld(m_World);
//ResourceManager::Load<EntityXMLFile>(mapToLoad)->PopulateWorld(m_World);
EntityFilePreprocessor fp(mapToLoad);
fp.RegisterComponents(m_World);
}
// Create system pipeline