X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FMoof%2FEngine.cc;h=80a203e6989b368a86cb12c0790568fef0bc7b6c;hb=c082286454bb1e5a7e887a53268b084b923904f3;hp=27406521da79693040a6e8b7bdc9e34dd141528e;hpb=8ad81a8282ce6e9e488a453e6bcd05fbc09715dc;p=chaz%2Fyoink diff --git a/src/Moof/Engine.cc b/src/Moof/Engine.cc index 2740652..80a203e 100644 --- a/src/Moof/Engine.cc +++ b/src/Moof/Engine.cc @@ -27,15 +27,15 @@ *******************************************************************************/ #include // exit -#include #include #include #include "fastevents.h" -#include #include +#include "Dispatcher.hh" #include "Engine.hh" +#include "Log.hh" #include "Random.hh" #include "Settings.hh" #include "Timer.hh" @@ -59,18 +59,12 @@ public: if (SDL_Init(SDL_INIT_EVERYTHING | SDL_INIT_EVENTTHREAD) != 0) #endif { - std::cerr << "sdl is complaining: " << SDL_GetError() << std::endl; + logError("sdl is complaining: %s", SDL_GetError()); throw Exception(Exception::SDL_ERROR); } if (FE_Init() != 0) { - std::cerr << "fast events error: " << FE_GetError() << std::endl; - throw Exception(Exception::SDL_ERROR); - } - if (Sound_Init() == 0) - { - std::cerr << "sound initialization failed: " << Sound_GetError() - << std::endl; + logError("fast events error: %s", FE_GetError()); throw Exception(Exception::SDL_ERROR); } alutInit(&argc, argv); @@ -104,7 +98,6 @@ public: video.reset(); alutExit(); - Sound_Quit(); FE_Quit(); SDL_Quit(); } @@ -174,7 +167,7 @@ public: if (printFps) { - std::cout << "FPS: " << fps << std::endl; + logInfo("framerate: %d fps", fps); } }