#ifndef CKERNEL_HPP #define CKERNEL_HPP #include #define GLM_ENABLE_EXPERIMENTAL #include #include #include #include "../Systems/Graphics/Window/CGameWindow.hpp" #include "../Scene/CScene.hpp" namespace CosmicCore { /** * @file CKernel.hpp * @brief Central class of the game, handle window and I/O. */ /** * @brief Central class of the game, handle window and I/O. */ class CKernel { private: std::string m_configPath; std::string m_gameName; // The config. //CGameConfiguration m_config; //CEngineConfiguration m_engineConfig; // The windows. //CLoadingWindow m_loadingWindow; CGameWindow m_window; // Global game var. bool m_finished; unsigned int m_deltaTime; // The Scenes. CScene* m_activeScene; std::map> m_sceneMap; public: /** * @brief A pointer to the simulation which is accessible from anywhere. */ static CKernel* m_kernel; CKernel() = delete; CKernel(std::string name, std::string gameName); ~CKernel(); std::string getName() { return m_gameName; }; //CGameConfiguration* getConfig() { return &m_config; }; //CEngineConfiguration* getEngineConfig() { return &m_engineConfig; }; //void addScene(std::shared_ptr& scene); //void setActiveScene(std::string scene); CScene* getActiveScene(); void cleanup(){m_sceneMap.clear();}; //unsigned int getNbScene() { return m_sceneList.size(); }; //std::map& getScenes() { return m_sceneList; }; /*CKeyboard* getKeyboard(void) { return m_inputHandler.getKeyboard(); }*/ /*CMouse* getMouse(void) { return m_inputHandler.getMouse(); }*/ unsigned int getDeltatime(void) { return m_deltaTime; } void setDeltatime(unsigned int delta){ m_deltaTime = delta; } //CGameWindow& getGameWindow(){return m_window;}; void start(bool isPreview = false); void loop(); void quit(); void fullscreen(); void desktop(); void focus(); }; } #endif