PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
ScreenState.hpp
Go to the documentation of this file.
1 #ifndef SCREENSTATE_HPP
2 #define SCREENSTATE_HPP
3 
4 #include <SDL2/SDL.h>
5 
6 namespace pk
7 {
8 
15 {
16  public:
21  ScreenState();
22 
23  virtual ~ScreenState();
24 
30  virtual void display() = 0;
31 
37  virtual bool isRunning() = 0;
38 
44  Uint32 getState(){ return m_state; };
45 
51  void setState(Uint32 state) { m_state = state; };
52 
53  private:
54  Uint32 m_state;
55 };
56 
57 } //end namespace pk
58 
59 #endif // SCREENSTATE_HPP
Definition: Game.hpp:7
virtual bool isRunning()=0
Check if ScreenState is running. Requires and override in inherited classes.
ScreenState()
Default constructor.
Uint32 getState()
Get the internal state of the ScreenState.
Definition: ScreenState.hpp:44
void setState(Uint32 state)
Set the internal state of the ScreenState.
Definition: ScreenState.hpp:51
Abstract class for screen states, necessary for implementing the State pattern along with the Game cl...
Definition: ScreenState.hpp:14
virtual void display()=0
Display the screen state in the window. Requires and override in inherited classes.
virtual ~ScreenState()
Uint32 m_state
Definition: ScreenState.hpp:51