X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEngine.cc;h=df6b35a8e92d2fece2439fe9a0499884d07f480c;hp=d7d04a846af6bc54753551d1135d582b481fab06;hb=fdfba4553433b9b2804c2772c7645211b828c2ea;hpb=a5f0d391406a68275b41448fc3f49e8d8396c497 diff --git a/src/Moof/Engine.cc b/src/Moof/Engine.cc index d7d04a8..df6b35a 100644 --- a/src/Moof/Engine.cc +++ b/src/Moof/Engine.cc @@ -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;