diff options
author | chai <chaifix@163.com> | 2018-10-05 15:40:31 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-05 15:40:31 +0800 |
commit | 789895b4b9f99668b8b772f271d07d1ce3115742 (patch) | |
tree | 3ae85381358445b2c29c9a0afb59375de9a7ce66 /src/libjin/core/game.h | |
parent | 846d6ab0ec1033481574e8324a43fc547ecf5882 (diff) |
*update
Diffstat (limited to 'src/libjin/core/game.h')
-rw-r--r-- | src/libjin/core/game.h | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/src/libjin/core/game.h b/src/libjin/core/game.h deleted file mode 100644 index 725c62c..0000000 --- a/src/libjin/core/game.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef __LIBJIN_CORE_GAME_H -#define __LIBJIN_CORE_GAME_H - -#include "SDL2/SDL.h" - -#include "../Common/Subsystem.hpp" -#include "../utils/macros.h" -#include "../Input/Event.h" - -namespace jin -{ -namespace core -{ - - class Game : public Subsystem<Game> - { - public: - - typedef void(*onLoad)(); - typedef void(*onEvent)(jin::input::Event* e); - typedef void(*onUpdate)(int dt); - typedef void(*onDraw)(); - - struct Setting : SettingBase - { - onEvent eventHandler; - onUpdate updater; - onDraw drawer; - onLoad loader; - }; - - void run(); - inline void stop() { _running = false; }; - inline bool running() { return _running; }; - - private: - - Game(); - ~Game() {}; - - SINGLETON(Game); - - onEvent _onEvent; - onUpdate _onUpdate; - onDraw _onDraw; - onLoad _onLoad; - - bool _running; - - bool initSystem(const SettingBase* setting); - void quitSystem(); - - }; - -} // core -} // jin - -#endif // __LIBJIN_CORE_GAME_H |