/* This class handles all of the messy details of SDL rendering * We typically want to call init() when we start up, and * render() when we want to render a frame * * Note that this class does NOT call SDL_init() - that should be * done before init()ing here * * cleanup() does the SDL destructor work - call it explicitly in case * we want to keep the object around and re-init it... */ #ifndef _SDLRENDERER_H_ #define _SDLRENDERER_H_ #include "gamedata.h" #include class SDLRenderer { public: SDLRenderer(); bool init(); void render(GameData& data); void cleanup(); private: // Main surface - our window SDL_Surface* display; // surfaces containing textures to draw SDL_Surface* background; }; #endif