Advertisement
Suby

sdl_graphics.h

Jun 1st, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 KB | None | 0 0
  1. #ifndef SDL_GRAPHICS_H
  2. #define SDL_GRAPHICS_H
  3.  
  4. #include "SDL.h"
  5. #include "SDL_TTF.h"
  6.  
  7. class SDL_Graphics
  8. {
  9. private:
  10.     SDL_Surface *screen;
  11.     SDL_Surface *greensquare;
  12.     SDL_Surface *redsquare;
  13.     int backgroundColorRed, backgroundColorGreen, backgroundColorBlue;
  14.  
  15. public:
  16.     //initializes SDL
  17.     SDL_Graphics(int windowWidth, int windowHeight, int bgR, int bgG, int bgB);
  18.     ~SDL_Graphics();
  19.  
  20.     SDL_Surface* loadBitmap(const char* bitmapFileName);
  21.  
  22.     void closeBitmap(SDL_Surface* bitmap);
  23.     void clearScreen();
  24.     void updateScreen();
  25.     void drawSprite(int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip);
  26.     void setBackgroundColor(int r, int g, int b);
  27.     SDL_Surface* getShapeSurfaceGreenSquare();
  28.     SDL_Surface* getShapeSurfaceRedSquare();   
  29.     SDL_Surface* getShapeSurfaceScreen();
  30. };
  31.  
  32. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement