diff options
Diffstat (limited to 'src/libjin/game/je_application.h')
-rw-r--r-- | src/libjin/game/je_application.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/libjin/game/je_application.h b/src/libjin/game/je_application.h index 9de6e1c..6eb8af2 100644 --- a/src/libjin/game/je_application.h +++ b/src/libjin/game/je_application.h @@ -12,19 +12,19 @@ namespace JinEngine { - namespace Game - { + namespace Game + { /// /// Game class. /// - class Application : public Subsystem<Application> - { - public: - typedef void(*onLoad)(); - typedef void(*onEvent)(JinEngine::Input::Event* e); - typedef void(*onUpdate)(int dt); - typedef void(*onDraw)(); + class Application : public Subsystem<Application> + { + public: + typedef void(*onLoad)(); + typedef void(*onEvent)(JinEngine::Input::Event* e); + typedef void(*onUpdate)(int dt); + typedef void(*onDraw)(); Application(); ~Application() {}; @@ -32,23 +32,23 @@ namespace JinEngine /// /// Game setting. /// - struct Setting : SettingBase - { - onEvent eventHandler; - onUpdate updater; - onDraw drawer; - onLoad loader; - }; + struct Setting : SettingBase + { + onEvent eventHandler; + onUpdate updater; + onDraw drawer; + onLoad loader; + }; /// /// Main game loop. /// - void run(); + void run(); /// /// Stop game. /// - inline void stop() + inline void stop() { _running = false; }; @@ -58,25 +58,25 @@ namespace JinEngine /// /// @return True if game is running, otherwise return false. /// - inline bool running() + inline bool running() { return _running; }; - private: - onEvent _onEvent; - onUpdate _onUpdate; - onDraw _onDraw; - onLoad _onLoad; + private: + onEvent _onEvent; + onUpdate _onUpdate; + onDraw _onDraw; + onLoad _onLoad; - bool _running; + bool _running; - bool startSystem(const SettingBase* setting); - void quitSystem(); + bool startSystem(const SettingBase* setting); + void quitSystem(); - }; + }; - } // namespace Core + } // namespace Core } // namespace JinEngine #endif // jin_game |