Ajout du validateur json + correctif factory metadata
This commit is contained in:
@@ -7,24 +7,9 @@
|
||||
#include <glm/gtx/transform.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
|
||||
//#include "../Context/CContext.hpp"
|
||||
#include "../Graphics/Window/CGameWindow.hpp"
|
||||
//#include "../Context/Window/CLoadingWindow.hpp"
|
||||
|
||||
//#include "../Controller/Configuration/CGameConfiguration.hpp"
|
||||
//#include "../Controller/Configuration/CEngineConfiguration.hpp"
|
||||
|
||||
//#include "../Controller/Exception/CExceptionManager.hpp"
|
||||
|
||||
//#include "Input/CInput.hpp"
|
||||
#include "../Scene/CScene.hpp"
|
||||
//#include "../Model/Node/Components/Graphic/CAbstractRenderer.hpp"
|
||||
//#include "../Model/Node/Components/CAbstractScript.hpp"
|
||||
//#include "../Model/Node/Components/Graphic/CCamera.hpp"
|
||||
//#include "../Model/Graphic/Shader/CShader.hpp"
|
||||
//#include "Shader/CShadersManager.hpp"
|
||||
//#include "../Utils/CSerializable.hpp"
|
||||
//#include <boost/atomic/atomic.hpp>
|
||||
|
||||
namespace CosmicCore {
|
||||
|
||||
@@ -56,38 +41,28 @@ namespace CosmicCore {
|
||||
CScene* m_activeScene;
|
||||
std::map<std::string, std::unique_ptr<CScene>> m_sceneMap;
|
||||
|
||||
//CInput m_inputHandler;
|
||||
//SDL_GLContext m_GLcontext;
|
||||
//bool m_isOriginOfContext;
|
||||
|
||||
//CShadersManager m_shaderManager;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief A pointer to the simulation which is accessible from anywhere.
|
||||
*/
|
||||
static CKernel* m_kernel;
|
||||
|
||||
/**
|
||||
* @brief A pointer to the shader used, accessible from anywhere.
|
||||
*/
|
||||
//static CShader* m_mainShader;
|
||||
|
||||
CKernel() = delete;
|
||||
CKernel(std::string name, std::string gameName);
|
||||
|
||||
//CKernel(std::string name, std::string gameName, SDL_Window* window);
|
||||
~CKernel();
|
||||
|
||||
std::string getName() { return m_gameName; };
|
||||
|
||||
//CGameConfiguration* getConfig() { return &m_config; };
|
||||
//CEngineConfiguration* getEngineConfig() { return &m_engineConfig; };
|
||||
|
||||
//void addScene(std::shared_ptr<CScene>& scene);
|
||||
//void setActiveScene(std::string scene);
|
||||
//void setContext(SDL_GLContext context);
|
||||
|
||||
CScene* getActiveScene();
|
||||
void cleanup(){m_sceneMap.clear();};
|
||||
|
||||
//unsigned int getNbScene() { return m_sceneList.size(); };
|
||||
//std::map<std::string, CScene*>& getScenes() { return m_sceneList; };
|
||||
|
||||
@@ -107,49 +82,14 @@ namespace CosmicCore {
|
||||
m_deltaTime = delta;
|
||||
}
|
||||
|
||||
/*void updateInput(){
|
||||
m_inputHandler.updateEvent();
|
||||
}*/
|
||||
/*CShader* getShader(std::string shader)
|
||||
{
|
||||
return m_shaderManager.get(shader);
|
||||
}*/
|
||||
//CGameWindow& getGameWindow(){return m_window;};
|
||||
//SDL_GLContext getContext(){return m_GLcontext;};
|
||||
//void initGL();
|
||||
|
||||
void start(bool isPreview = false);
|
||||
void loop();
|
||||
void quit();
|
||||
void fullscreen();
|
||||
void desktop();
|
||||
void focus();
|
||||
|
||||
//nlohmann::json to_json();
|
||||
|
||||
/*static CKernel* from_json(SDL_Window* window, SDL_GLContext context, nlohmann::json& j)
|
||||
{
|
||||
CKernel* g = new CKernel(j["ProjectName"], j["ProjectName"], window);
|
||||
g->setContext(context);
|
||||
g->start(true);
|
||||
for (nlohmann::json& scene : j["Scenes"])
|
||||
{
|
||||
g->addScene(CScene::from_json(scene));
|
||||
}
|
||||
g->setActiveScene(j["ActiveScene"]);
|
||||
return g;
|
||||
};*/
|
||||
|
||||
/*static CKernel* from_json(nlohmann::json& j)
|
||||
{
|
||||
CKernel* g = new CKernel(j["ProjectName"], j["ProjectName"]);
|
||||
g->initGL();
|
||||
for (nlohmann::json& scene : j["Scenes"])
|
||||
{
|
||||
g->addScene(CScene::from_json(scene));
|
||||
}
|
||||
g->setActiveScene(j["ActiveScene"]);
|
||||
return g;
|
||||
};*/
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user