]> git.localhorst.tv Git - sdl-test8.git/blobdiff - src/sdl/InitScreen.h
added collision engine, more or less stole gameplay from sdl-test7
[sdl-test8.git] / src / sdl / InitScreen.h
diff --git a/src/sdl/InitScreen.h b/src/sdl/InitScreen.h
new file mode 100644 (file)
index 0000000..ba731da
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * InitScreen.h
+ *
+ *  Created on: Apr 22, 2012
+ *      Author: holy
+ */
+
+#ifndef SDL_INITSCREEN_H_
+#define SDL_INITSCREEN_H_
+
+#include <SDL/SDL.h>
+
+namespace sdl {
+
+class InitScreen {
+
+       public:
+               InitScreen(int width, int height, int bpp = 32, Sint32 flags = SDL_HWSURFACE | SDL_DOUBLEBUF);
+               virtual ~InitScreen(void);
+       private:
+               InitScreen(const InitScreen &);
+               InitScreen &operator =(const InitScreen &);
+
+       public:
+               SDL_Surface *Screen(void) { return screen; };
+               const SDL_Surface *Screen(void) const { return screen; };
+
+               void Flip(void) { SDL_Flip(screen); };
+
+       private:
+               SDL_Surface *screen;
+
+};
+
+}
+
+#endif /* SDL_INITSCREEN_H_ */