Hoogo

Game.h

Jan 7th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #ifndef GAME_H
  2. #define GAME_H
  3.  
  4. #include <SDL.h>
  5. #include <SDL_image.h>
  6. #include <iostream>
  7.  
  8. using namespace std;
  9.  
  10. const int WIN_W = 1500;
  11. const int WIN_H = 900;
  12.  
  13.  
  14.  
  15. class Game
  16. {
  17.     private:
  18.         bool isRunning;
  19.         SDL_Window* window;
  20.  
  21.     public:
  22.         Game();
  23.         ~Game();
  24.  
  25.         bool init(const char* title, int xpos, int ypos, int width, int height);
  26.  
  27.         void handleEvents();
  28.         void update();
  29.         void render();
  30.         void clean();
  31.  
  32.         bool running()
  33.             { return isRunning; }
  34.  
  35.         static SDL_Renderer* renderer;
  36. };
  37.  
  38. #endif
Advertisement
Add Comment
Please, Sign In to add comment