diff --git a/source/map.cpp b/source/map.cpp index efcb211..5446f30 100644 --- a/source/map.cpp +++ b/source/map.cpp @@ -184,12 +184,15 @@ void Map::fillMapTexture() SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0x00); SDL_RenderClear(renderer); + SDL_Rect clip = {0, 0, 320, 240}; + texture_bg->render(renderer, 0, 0, &clip); + const int tile_size = 16; const int tileset_width_in_tiles = 16; const int map_width_in_tiles = 20; const int map_height_in_tiles = 13; - SDL_Rect clip = {0, 0, tile_size, tile_size}; + clip = {0, 0, tile_size, tile_size}; for (int y = 0; y < map_height_in_tiles; y++) for (int x = 0; x < map_width_in_tiles; x++)