We have covered a lot on the subject of drawing images with SDL but we have yet to tie everything together into our framework so that it becomes reusable throughout our game. What we will now cover is creating a texture manager class that will have all of the functions we need to easily load and draw textures.
The texture manager will have functions that allow us to load and create an
SDL_Texture structure from an image file, draw the texture (either static or animated), and also hold a list of
SDL_Texture*, so that we can use them whenever we need to. Let's go ahead and create the
loadfunction. As parameters, the function takes the filename of the ...