From 8cb74178c2b8e5883a1181af687fa8cfc0c6e5da Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 18 Nov 2018 23:44:40 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E7=9B=AE=E5=BD=95=E4=B8=BA=E5=B0=8F?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Game/je_application.h | 88 ---------------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 src/libjin/Game/je_application.h (limited to 'src/libjin/Game/je_application.h') diff --git a/src/libjin/Game/je_application.h b/src/libjin/Game/je_application.h deleted file mode 100644 index 094de6a..0000000 --- a/src/libjin/Game/je_application.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef __JE_CORE_GAME_H__ -#define __JE_CORE_GAME_H__ - -#include "../core/je_configuration.h" -#if defined(jin_game) - -#include "../common/je_subsystem.hpp" -#include "../utils/je_macros.h" -#include "../input/je_Event.h" - -#include "SDL2/SDL.h" - -namespace JinEngine -{ - namespace Game - { - - /// - /// Game class. - /// - class Application : public Subsystem - { - public: - - typedef void(*onLoad)(); - typedef void(*onEvent)(JinEngine::Input::Event* e); - typedef void(*onUpdate)(int dt); - typedef void(*onDraw)(); - - /// - /// Game setting. - /// - struct Setting : SettingBase - { - onEvent eventHandler; - onUpdate updater; - onDraw drawer; - onLoad loader; - }; - - /// - /// Main game loop. - /// - void run(); - - /// - /// Stop game. - /// - inline void stop() - { - _running = false; - }; - - /// - /// Return if game is running. - /// - /// @return True if game is running, otherwise return false. - /// - inline bool running() - { - return _running; - }; - - private: - - Application(); - ~Application() {}; - - singleton(Application); - - onEvent _onEvent; - onUpdate _onUpdate; - onDraw _onDraw; - onLoad _onLoad; - - bool _running; - - bool initSystem(const SettingBase* setting); - void quitSystem(); - - }; - - } // namespace Core -} // namespace JinEngine - -#endif // jin_game - -#endif // __JE_CORE_GAME_H__ \ No newline at end of file -- cgit v1.1-26-g67d0