Advertisement
Guest User

SFMLApp.h

a guest
Nov 26th, 2013
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #ifndef SFMLAPP_H
  2. #define SFMLAPP_H
  3.  
  4. #include "SFML/Graphics/RenderWindow.hpp"
  5. #include "SFML/Window/Event.hpp"
  6. #include "SFML/System/Time.hpp"
  7. #include "Map.h"
  8. #include "MapGenerator.h"
  9.  
  10. class SFMLApp {
  11.     private:
  12.         bool running;
  13.         sf::RenderWindow* window;
  14.  
  15.         Map* currentMap;
  16.  
  17.     public:
  18.         static const int WINDOW_WIDTH = 800;
  19.         static const int WINDOW_HEIGHT = 600;
  20.  
  21.         SFMLApp();
  22.         virtual ~SFMLApp();
  23.  
  24.         bool Init(const char * title = "SFML App");
  25.  
  26.         void HandleEvent(sf::Event* event);
  27.         void Update(sf::Time elapsedTime);
  28.         void Render();
  29.  
  30.         void Cleanup();
  31.  
  32.         int Execute();
  33. };
  34.  
  35. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement