X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=judge%2Fmanager%2Fgraphics.h;h=2a969327d8a14790564067c76e9426ce8ee76083;hp=f81bdb3b50329e41f17482a43080e3f9a7c24af0;hb=40f97f3afd1a897096030faed69f8a9d11d604d8;hpb=1a03b2543b67f0551e62babec4cd119f1e0e4640 diff --git a/judge/manager/graphics.h b/judge/manager/graphics.h index f81bdb3..2a96932 100644 --- a/judge/manager/graphics.h +++ b/judge/manager/graphics.h @@ -1,19 +1,26 @@ +//#define BUILD_GRAPHICS +#ifdef BUILD_GRAPHICS + #ifndef GRAPHICS_H #define GRAPHICS_H + #include #include +typedef SDL_Surface Screen; +typedef SDL_Rect Rectangle; +typedef short unsigned int SUint; +typedef unsigned char Uint8; #include #include -typedef SDL_Surface Screen; -typedef SDL_Rect Rectangle; -typedef short unsigned int SUint; + + class Texture; class Font; @@ -72,8 +79,8 @@ class Graphics static SDL_Surface * TextureFromColours(std::vector * R, std::vector * G, std::vector * B, std::vector * A = NULL); static SDL_Surface * TextureFromColours(std::vector > * R, std::vector > * G, std::vector > * B, std::vector > * A = NULL); - - static void Wait(int n) {SDL_Delay(n);} + + static void Wait(int n); template class TextureManager @@ -120,6 +127,7 @@ class Texture int width() const {return surface->w;} int height() const {return surface->h;} + protected: SDL_Surface * surface; GLuint texture; @@ -145,4 +153,6 @@ class Font : private Texture #endif //GRAPHICS_H +#endif //BUILD_GRAPHICS + //EOF