aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/game.cpp15
-rw-r--r--src/core/game.h21
2 files changed, 16 insertions, 20 deletions
diff --git a/src/core/game.cpp b/src/core/game.cpp
index 6452f48..1c47d87 100644
--- a/src/core/game.cpp
+++ b/src/core/game.cpp
@@ -4,24 +4,11 @@ namespace jin
{
namespace core
{
+
Game* Game::g_game = 0;
Game::Game() :run(true) {};
- Game* Game::get()
- {
- return g_game ? g_game : (g_game = new Game());
- }
-
- void Game::quit()
- {
- run = false;
- }
-
- bool Game::running()
- {
- return run;
- }
}
}
diff --git a/src/core/game.h b/src/core/game.h
index 939d945..d56b249 100644
--- a/src/core/game.h
+++ b/src/core/game.h
@@ -9,12 +9,21 @@ namespace core
{
public:
- void quit();
-
- bool running();
-
- static Game* get();
-
+ static inline Game* get()
+ {
+ return g_game ? g_game : (g_game = new Game());
+ }
+
+ inline void quit()
+ {
+ run = false;
+ }
+
+ inline bool running()
+ {
+ return run;
+ }
+
private:
Game();