]> git.localhorst.tv Git - l2e.git/blobdiff - src/app/Application.h
added Input class for handling user input
[l2e.git] / src / app / Application.h
index e43faf44e1692b0905d079d25b95084f5262edaf..f70dd69a29185383f395566397769e980c32aff1 100644 (file)
@@ -8,10 +8,11 @@
 #ifndef APP_APPLICATION_H_
 #define APP_APPLICATION_H_
 
+#include "Input.h"
 #include "../sdl/InitScreen.h"
 
 #include <stack>
-#include <SDL/SDL.h>
+#include <SDL.h>
 
 
 namespace app {
@@ -21,7 +22,7 @@ class State;
 class Application {
 
 public:
-       explicit Application(SDL_Surface *screen, State *initialState);
+       Application(sdl::InitScreen *screen, State *initialState);
        ~Application(void);
 private:
        Application(const Application &);
@@ -36,6 +37,8 @@ public:
        void PushState(State *);
        void PopState(void);
        void Quit(void);
+       Input &Buttons() { return input; }
+       const Input &Buttons() const { return input; }
 
 private:
        State *CurrentState(void);
@@ -49,8 +52,9 @@ private:
        void Render(void);
 
 private:
-       SDL_Surface *screen;
+       sdl::InitScreen *screen;
        std::stack<State *> states;
+       Input input;
        Uint32 last;
 
 };