Refactored all the rendering code into its own class

This commit is contained in:
2011-06-24 09:40:13 -04:00
parent 5ed05fc829
commit 837b3466a5
4 changed files with 15 additions and 80 deletions

View File

@ -9,9 +9,9 @@
#ifndef _GAME_CORE_H_
#define _GAME_CORE_H_
#include <SDL/SDL.h>
#include "mainevent.h"
#include "gamedata.h"
#include "sdlrenderer.h"
class GameCore : public MainEvent
{
@ -28,16 +28,12 @@ class GameCore : public MainEvent
private:
bool init();
void iterate(); // updates the game state
void render();
void cleanup();
bool is_running;
SDL_Surface* display;
// textures to draw
SDL_Surface* background;
SDLRenderer renderer;
// data
GameData data;