From 076b905c7274be18c028511e80a1b31ce43f69da Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Tue, 21 Dec 2021 16:18:49 -0500 Subject: [PATCH] Fix bug with const resource loading --- src/board.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/board.cpp b/src/board.cpp index 72a1fad..04e47f4 100644 --- a/src/board.cpp +++ b/src/board.cpp @@ -368,6 +368,7 @@ void board::start(){ SDL_RenderClear(_renderer); //PLACEHOLDER, cycle color + /* { static uint8_t green = 0; static bool up = true; @@ -387,6 +388,7 @@ void board::start(){ green --; } } + */ //END PLACEHOLDER @@ -428,11 +430,11 @@ void board::initConstResources(){ for(unsigned int i = 0; i < IMAGE_LOCATIONS_LENGTH; ++i){ - SDL_Texture_Wrapper tw(fullPath + IMAGE_LOCATIONS[0]); + SDL_Texture_Wrapper tw(fullPath + IMAGE_LOCATIONS[i]); SDL_Log("Loaded image %s at memory location %p\n", IMAGE_LOCATIONS[i], - setImage(IMAGE_LOCATIONS[0], + setImage(IMAGE_LOCATIONS[i], tw)); } SDL_Log("Loaded static images into working memory\n"); @@ -446,8 +448,8 @@ void board::initConstResources(){ for(unsigned int i = 0; i < FONT_LOCATIONS_LENGTH; ++i){ - SDL_Font_Wrapper fw(fullPath + FONT_LOCATIONS[0]._name, - FONT_LOCATIONS[0]._size); + SDL_Font_Wrapper fw(fullPath + FONT_LOCATIONS[i]._name, + FONT_LOCATIONS[i]._size); SDL_Log("Loaded font %s %lu at memory location %p\n", FONT_LOCATIONS[i]._name,