]> git.localhorst.tv Git - l2e.git/blob - src/app/State.h
added Input class for handling user input
[l2e.git] / src / app / State.h
1 /*
2  * State.h
3  *
4  *  Created on: Apr 8, 2012
5  *      Author: holy
6  */
7
8 #ifndef APP_APPLICATIONSTATE_H_
9 #define APP_APPLICATIONSTATE_H_
10
11 #include <SDL.h>
12
13 namespace app {
14
15 class Application;
16 class Input;
17
18 class State {
19
20 public:
21         virtual ~State() { };
22
23 public:
24         /// do some setup
25         /// @param ctrl the Application running the state
26         virtual void EnterState(Application &ctrl, SDL_Surface *screen) = 0;
27         virtual void ExitState() = 0;
28
29         /// adapt the state's graphics to given dimensions
30         virtual void Resize(int width, int height) = 0;
31
32         virtual void HandleInput(const Input &) = 0;
33         virtual void UpdateWorld(float deltaT) = 0;
34         virtual void Render(SDL_Surface *) = 0;
35
36 };
37
38 }
39
40 #endif /* APP_STATE_H_ */