]> git.localhorst.tv Git - l2e.git/blobdiff - src/main.cpp
fixed SDL inclusion in application classes
[l2e.git] / src / main.cpp
index 0fce8fe511640d4e9f3fdb7fa9feceaa224e7e1a..2040663eba42195dd402a2aa0f5034d127ba5c1c 100644 (file)
@@ -5,6 +5,31 @@
  *      Author: holy
  */
 
+#include "sdl/InitScreen.h"
+#include "sdl/InitSDL.h"
+
+#include <exception>
+#include <iostream>
+
+using sdl::InitScreen;
+using sdl::InitSDL;
+
+using std::cerr;
+using std::cout;
+using std::endl;
+using std::exception;
+
 int main(int argc, char **argv) {
-       return 0;
+       const int width = 800;
+       const int height = 480;
+
+       try {
+               InitSDL sdl;
+               InitScreen screen(width, height);
+
+               return 0;
+       } catch (exception &e) {
+               cerr << "exception in main(): " << e.what() << endl;
+               return 1;
+       }
 }