]> git.localhorst.tv Git - l2e.git/blob - src/app/State.h
made application and battle state resizable
[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
17 class State {
18
19 public:
20         virtual ~State() { };
21
22 public:
23         /// do some setup
24         /// @param ctrl the Application running the state
25         virtual void EnterState(Application &ctrl, SDL_Surface *screen) = 0;
26         virtual void ExitState() = 0;
27
28         /// adapt the state's graphics to given dimensions
29         virtual void Resize(int width, int height) = 0;
30
31         virtual void HandleEvent(const SDL_Event &) = 0;
32         virtual void UpdateWorld(float deltaT) = 0;
33         virtual void Render(SDL_Surface *) = 0;
34
35 };
36
37 }
38
39 #endif /* APP_STATE_H_ */