+#define BUILD_GRAPHICS
+#ifdef BUILD_GRAPHICS
+
#ifndef GRAPHICS_H
#define GRAPHICS_H
+
#include <SDL/SDL.h>
#include <SDL/SDL_opengl.h>
+#define GRID_SIZE 64.0
+
+typedef SDL_Surface Screen;
+typedef SDL_Rect Rectangle;
+typedef short unsigned int SUint;
+typedef unsigned char Uint8;
#include <vector>
#include <list>
-typedef SDL_Surface Screen;
-typedef SDL_Rect Rectangle;
+
+#include <fstream>
+
-typedef short unsigned int SUint;
class Texture;
class Font;
static SDL_Surface * TextureFromColours(std::vector<SUint> * R, std::vector<SUint> * G, std::vector<SUint> * B, std::vector<SUint> * A = NULL);
static SDL_Surface * TextureFromColours(std::vector<std::vector<SUint> > * R, std::vector<std::vector<SUint> > * G, std::vector<std::vector<SUint> > * B, std::vector<std::vector<SUint> > * A = NULL);
-
- static void Wait(int n) {SDL_Delay(n);}
+
+ static void Wait(int n);
template <class T>
class TextureManager
};
static bool Initialised() {return initialised;}
-
+ static void ScreenShot(const char * fileName);
protected:
static void DrawColourData(SDL_Surface * dest, int destX, int destY, std::vector<SUint> * R, std::vector<SUint> * G, std::vector<SUint> * B, std::vector<SUint> * A = NULL);
static void DrawColourData(SDL_Surface * dest, int destX, int destY, std::vector<std::vector<SUint> > * R, std::vector<std::vector<SUint> > * G, std::vector<std::vector<SUint> > * B, std::vector<std::vector<SUint> > * A = NULL);
int width() const {return surface->w;}
int height() const {return surface->h;}
+
protected:
SDL_Surface * surface;
GLuint texture;
};
+
+
#endif //GRAPHICS_H
+#endif //BUILD_GRAPHICS
+
//EOF