From 7b7a510321112978090575e89c3dabeba9ea9f97 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 28 Jul 2018 10:52:03 +0800 Subject: *update --- bin/jin.exe | Bin 745984 -> 745984 bytes build/vs2015/jin.vcxproj | 4 ++-- src/libjin/Core/Game.cpp | 7 ++++++- src/libjin/Core/Game.h | 10 ++++++---- src/libjin/core/game.cpp | 7 ++++++- src/libjin/core/game.h | 10 ++++++---- 6 files changed, 26 insertions(+), 12 deletions(-) diff --git a/bin/jin.exe b/bin/jin.exe index 52dd814..d447672 100644 Binary files a/bin/jin.exe and b/bin/jin.exe differ diff --git a/build/vs2015/jin.vcxproj b/build/vs2015/jin.vcxproj index 930aca4..ffe034e 100644 --- a/build/vs2015/jin.vcxproj +++ b/build/vs2015/jin.vcxproj @@ -89,7 +89,7 @@ opengl32.lib;glu32.lib;SDL2main.lib;SDL2.lib;%(AdditionalDependencies) $(SolutionDir)libs\SDL2-2.0.5\lib\x86;%(AdditionalLibraryDirectories) - Console + Windows @@ -118,7 +118,7 @@ true opengl32.lib;glu32.lib;SDL2main.lib;SDL2.lib;%(AdditionalDependencies) $(SolutionDir)libs\SDL2-2.0.5\lib\x86;%(AdditionalLibraryDirectories) - Console + Windows diff --git a/src/libjin/Core/Game.cpp b/src/libjin/Core/Game.cpp index 5c2e69b..2090d64 100644 --- a/src/libjin/Core/Game.cpp +++ b/src/libjin/Core/Game.cpp @@ -5,7 +5,12 @@ namespace jin namespace core { - Game::Game() :run(true) {}; + Game::Game() :_run(true) {}; + + void Game::run() + { + + } } } diff --git a/src/libjin/Core/Game.h b/src/libjin/Core/Game.h index e155607..becb780 100644 --- a/src/libjin/Core/Game.h +++ b/src/libjin/Core/Game.h @@ -19,7 +19,7 @@ namespace core }; - inline void quit() // quit game loop + inline void quit() { CALLONCE(_quit()); } @@ -29,11 +29,13 @@ namespace core return run; } - inline void exit() // exit game + inline void exit() { CALLONCE(_exit()); } + void run(); + private: Game(); @@ -41,7 +43,7 @@ namespace core SINGLETON(Game); - bool run; + bool _run; inline void _exit() { @@ -50,7 +52,7 @@ namespace core inline void _quit() { - run = false; + _run = false; } }; } diff --git a/src/libjin/core/game.cpp b/src/libjin/core/game.cpp index 5c2e69b..2090d64 100644 --- a/src/libjin/core/game.cpp +++ b/src/libjin/core/game.cpp @@ -5,7 +5,12 @@ namespace jin namespace core { - Game::Game() :run(true) {}; + Game::Game() :_run(true) {}; + + void Game::run() + { + + } } } diff --git a/src/libjin/core/game.h b/src/libjin/core/game.h index e155607..becb780 100644 --- a/src/libjin/core/game.h +++ b/src/libjin/core/game.h @@ -19,7 +19,7 @@ namespace core }; - inline void quit() // quit game loop + inline void quit() { CALLONCE(_quit()); } @@ -29,11 +29,13 @@ namespace core return run; } - inline void exit() // exit game + inline void exit() { CALLONCE(_exit()); } + void run(); + private: Game(); @@ -41,7 +43,7 @@ namespace core SINGLETON(Game); - bool run; + bool _run; inline void _exit() { @@ -50,7 +52,7 @@ namespace core inline void _quit() { - run = false; + _run = false; } }; } -- cgit v1.1-26-g67d0