1 #ifndef UGDK_SYSTEM_ENGINE_H_
2 #define UGDK_SYSTEM_ENGINE_H_
14 #define GET_OWNERSHIP(T) T&&
16 #define GET_OWNERSHIP(T) T
22 typedef std::function<std::unique_ptr<action::Scene> ()>
SceneFactory;
55 void PushSceneFactory(
const std::function<std::unique_ptr<action::Scene>()>& scene_factory);
66 const std::list<std::unique_ptr<action::Scene>>&
scene_list();
A game scene, or screen.
Definition: scene.h:29
void PushSceneFactory(const std::function< std::unique_ptr< action::Scene >()> &scene_factory)
Queues a scene to be added just before the start of the next frame.
EventHandler & GetCurrentSceneEventHandler()
Returns the EventHandler for the current scene.
void DeregisterSDLHandler(const SDLEventHandler *)
Definition: animation.h:11
#define GET_OWNERSHIP(T)
Definition: engine.h:16
void PushScene(GET_OWNERSHIP(std::unique_ptr< action::Scene >) scene)
Queues a scene to be added just before the start of the next frame.
const Configuration & CurrentConfiguration()
Returns the current configuration.
Definition: eventhandler.h:40
std::function< std::unique_ptr< action::Scene >)> SceneFactory
Definition: engine.h:22
void RegisterSDLHandler(const SDLEventHandler *)
void Suspend()
Stops the main loop.
EventHandler & GlobalEventHandler()
Returns the global EventHandler.
void Run()
Starts running the engine.
void Release()
Releases all the resouces allocated by the engine.
const std::list< std::shared_ptr< const debug::SectionData > > & profile_data_list()
Definition: configuration.h:13
action::Scene & CurrentScene()
Returns the currently focused scene.
const std::list< std::unique_ptr< action::Scene > > & scene_list()
Returns the scene list.
bool Initialize(const Configuration &configuration)
Initializes the engine. Returns true if sucessful, false otherwise.