]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Engine.cc
dispatcher alias methods
[chaz/yoink] / src / Moof / Engine.cc
index d7d04a846af6bc54753551d1135d582b481fab06..df6b35a8e92d2fece2439fe9a0499884d07f480c 100644 (file)
@@ -55,16 +55,19 @@ public:
        {
                if (SDL_Init(SDL_INIT_EVERYTHING | SDL_INIT_EVENTTHREAD) != 0)
                {
-                       throw Exception(SDL_GetError());
+                       std::cerr << "sdl is complaining: " << SDL_GetError() << std::endl;
+                       throw Exception(Exception::SDL_ERROR);
                }
                if (FE_Init() != 0)
                {
-                       throw Exception(FE_GetError());
+                       std::cerr << "fast events error: " << FE_GetError() << std::endl;
+                       throw Exception(Exception::SDL_ERROR);
                }
-               if (Sound_Init() != 0)
+               if (Sound_Init() == 0)
                {
-                       //throw Exception(Sound_GetError());
-                       std::cerr << Sound_GetError() << std::endl;
+                       std::cerr << "sound initialization failed: " << Sound_GetError()
+                               << std::endl;
+                       throw Exception(Exception::SDL_ERROR);
                }
                alutInit(&argc, argv);
 
@@ -87,7 +90,7 @@ public:
                printFps = false;
                settings.get("video.printfps", printFps);
 
-               video = VideoPtr(new Video(name, iconFile));
+               video = Video::alloc(name, iconFile);
                video->makeActive();
        }
 
@@ -219,7 +222,7 @@ public:
 
        Engine*         interface;
 
-       VideoPtr        video;
+       VideoP          video;
 
        bool            running;
        int                     exitCode;
This page took 0.018073 seconds and 4 git commands to generate.