diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 17 | 
1 files changed, 2 insertions, 15 deletions
| diff --git a/src/main.cpp b/src/main.cpp index d51da7d..ddbc15f 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
| @@ -1,27 +1,14 @@ | |||
| 1 | #include <ctime> | ||
| 2 | #include <list> | ||
| 3 | #include <cstdlib> | ||
| 4 | #include "renderer.h" | ||
| 5 | #include "muxer.h" | 1 | #include "muxer.h" | 
| 6 | #include "game.h" | 2 | #include "game.h" | 
| 7 | 3 | ||
| 8 | int main() | 4 | int main() | 
| 9 | { | 5 | { | 
| 10 | srand(time(NULL)); | ||
| 11 | |||
| 12 | GLFWwindow* window = initRenderer(); | ||
| 13 | glfwSwapInterval(1); | ||
| 14 | |||
| 15 | initMuxer(); | 6 | initMuxer(); | 
| 16 | 7 | ||
| 17 | // Put this in a block so game goes out of scope before we destroy the renderer | 8 | Game game; | 
| 18 | { | 9 | game.execute(); | 
| 19 | Game game {window}; | ||
| 20 | game.execute(); | ||
| 21 | } | ||
| 22 | 10 | ||
| 23 | destroyMuxer(); | 11 | destroyMuxer(); | 
| 24 | destroyRenderer(); | ||
| 25 | 12 | ||
| 26 | return 0; | 13 | return 0; | 
| 27 | } | 14 | } | 
