]> git.localhorst.tv Git - sdl-test8.git/blobdiff - src/sdl/InitScreen.cpp
added collision engine, more or less stole gameplay from sdl-test7
[sdl-test8.git] / src / sdl / InitScreen.cpp
diff --git a/src/sdl/InitScreen.cpp b/src/sdl/InitScreen.cpp
new file mode 100644 (file)
index 0000000..c9b275f
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * InitScreen.cpp
+ *
+ *  Created on: Apr 22, 2012
+ *      Author: holy
+ */
+
+#include "InitScreen.h"
+
+#include <stdexcept>
+
+using std::runtime_error;
+
+
+namespace sdl {
+
+InitScreen::InitScreen(int width, int height, int bpp, Sint32 flags)
+: screen(SDL_SetVideoMode(width, height, bpp, flags)) {
+       if (!screen) {
+               throw runtime_error("failed to open screen");
+       }
+}
+
+InitScreen::~InitScreen(void) {
+
+}
+
+}