I have a problem with my header Surface.h. Which is basically just a set off inline class for SDL_Surface and limited animation. The animation is where my problem is.
I have Graphics.h which is a simple wrapper for some SDL procedures (surface loading, blitting, and freeing).
the line with the error is commented, and in red.
Graphics.h - No problems with this file.
Surface.h - Error in the Animation class
//Initialize SDL and the display surface
int Init(unsigned int windowWidth = 800, unsigned int windowHeight = 600, bool fullscreen = false,
const char* windowTitle = NULL, unsigned int bgR = 0, unsigned int bgG = 0, unsigned int bgB = 0);
int createSurfaceFromFile(Surface& dst, int tran_r = -1, int tran_g = -1, int tran_b = -1);
void closeSurface(Surface& src);
int drawSurface(Surface& src, SDL_Rect* clip = NULL, unsigned int x_pos = 0, unsigned int y_pos = 0);
unsigned int m_bgR;
unsigned int m_bgG;
unsigned int m_bgB;
This makes no sense. I have Surface.h included before Graphics.h and even if i put #include "Graphics.h" in the Surface.h it won't work. I am lost for a solution.
Surface(const char* FILE):m_file(FILE),m_surface(NULL)
if ( m_surface != NULL )
m_surface = NULL;
const char* getFile()
class Animation : public Surface
//If clip does not exist it will create one ( or overwrite ) to the keyID provided
void SetClip(int keyID, int x, int y, int w, int h);
int Show(varia::Graphics* graphics);//Error: 'Graphics' undeclared identifier
//The Animation Timer
//The region vector
std::map<int, SDL_Rect> clips;
It will be greatly appreciated if anyone has a insight to my problem.