Refactored all the rendering code into its own class
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user