Advertisement
Guest User

SFMLApp.h

a guest
Nov 25th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #ifndef SFMLAPP_H
  2. #define SFMLAPP_H
  3.  
  4. #include "TextureManager.h"
  5. #include "Level.h"
  6. #include <SFML/Graphics.hpp>
  7. #include <SFML/Graphics/View.hpp>
  8.  
  9. class SFMLApp {
  10.     private:
  11.         bool running;
  12.         bool keys[4];
  13.         sf::RenderWindow* window;
  14.         sf::View viewport;
  15.  
  16.         Level* level;
  17.  
  18.     public:
  19.         static const int WINDOW_WIDTH = 640;
  20.         static const int WINDOW_HEIGHT = 480;
  21.  
  22.         static TextureManager* textureManager;
  23.        
  24.         SFMLApp();
  25.         virtual ~SFMLApp();
  26.  
  27.         bool Init();
  28.         void HandleEvent(sf::Event* event);
  29.         void Update(sf::Time elapsed);
  30.         void Render();
  31.         void Cleanup();
  32.  
  33.         int Execute();
  34.  
  35.         void GenerateLevel();
  36. };
  37.  
  38. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement