]> git.localhorst.tv Git - l2e.git/blobdiff - src/app/State.h
added basic application class
[l2e.git] / src / app / State.h
diff --git a/src/app/State.h b/src/app/State.h
new file mode 100644 (file)
index 0000000..471b44b
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * State.h
+ *
+ *  Created on: Apr 8, 2012
+ *      Author: holy
+ */
+
+#ifndef APP_APPLICATIONSTATE_H_
+#define APP_APPLICATIONSTATE_H_
+
+#include <SDL/SDL.h>
+
+namespace app {
+
+class Application;
+
+class State {
+
+public:
+       virtual ~State() { };
+
+public:
+       /// do some setup
+       /// @param ctrl the Application running the state
+       virtual void EnterState(Application &ctrl, SDL_Surface *screen) = 0;
+       virtual void ExitState() = 0;
+
+       virtual void HandleEvent(const SDL_Event &) = 0;
+       virtual void UpdateWorld(float deltaT) = 0;
+       virtual void Render(SDL_Surface *) = 0;
+
+};
+
+}
+
+#endif /* APP_STATE_H_ */