From 7771ffd6ab79149c32f9480e7529c46689f5f693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega=20Froysa?= Date: Mon, 17 Dec 2018 20:18:38 +0100 Subject: [PATCH] Fixed rendering issue. It's because I was using `unsigned int' instead of `int' in the for loop. --- src/System.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/System.cpp b/src/System.cpp index 7bbd805..ecabb37 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -21,6 +21,7 @@ #define FPS 60 #include "System.hpp" +#include std::unique_ptr System::logger; @@ -180,9 +181,9 @@ void System::run() { asset_mngr.getModel("sphere")->draw(shaders.at("default")); } - for(unsigned int i = 0; i < 3; ++i) + for(int i = 0; i < 3; ++i) { - for(unsigned int j = 0; j < 3; ++j) + for(int j = 0; j < 3; ++j) { if(board[i][j] not_eq 0) { @@ -254,6 +255,7 @@ void System::handleKey(SDL_Keysym key){ break; } } + void System::syncInputs() { SDL_Event e; while(SDL_PollEvent(&e))