]> git.localhorst.tv Git - sdl-test8.git/blobdiff - src/app/State.h
added collision engine, more or less stole gameplay from sdl-test7
[sdl-test8.git] / src / app / State.h
diff --git a/src/app/State.h b/src/app/State.h
new file mode 100644 (file)
index 0000000..548fc94
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * State.h
+ *
+ *  Created on: Apr 8, 2012
+ *      Author: holy
+ */
+
+#ifndef APP_APPLICATIONSTATE_H_
+#define APP_APPLICATIONSTATE_H_
+
+#include <SDL/SDL.h>
+
+namespace app {
+
+class Control;
+class Timer;
+
+class State {
+
+       public:
+               virtual ~State(void) { };
+
+       public:
+               virtual void EnterState(Control *ctrl, SDL_Surface *screen) = 0;
+               virtual void ExitState(void) = 0;
+
+               virtual void HandleEvent(const SDL_Event &) = 0;
+               virtual void UpdateWorld(const Timer &) = 0;
+               virtual void Render(SDL_Surface *) = 0;
+
+};
+
+}
+
+#endif /* APP_STATE_H_ */