X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEngine.cc;fp=src%2FMoof%2FEngine.cc;h=51a3af0f5bfb6d75d71cdaed34cb7bdd9518c3ac;hp=27406521da79693040a6e8b7bdc9e34dd141528e;hb=57b78ebe21b1b48acd337daa5a1cb8c383959cfa;hpb=58cedf00e6ebf6282938c019b8eb105e3fb05eaa diff --git a/src/Moof/Engine.cc b/src/Moof/Engine.cc index 2740652..51a3af0 100644 --- a/src/Moof/Engine.cc +++ b/src/Moof/Engine.cc @@ -27,7 +27,6 @@ *******************************************************************************/ #include // exit -#include #include #include @@ -35,7 +34,9 @@ #include #include +#include "Dispatcher.hh" #include "Engine.hh" +#include "Log.hh" #include "Random.hh" #include "Settings.hh" #include "Timer.hh" @@ -59,18 +60,17 @@ 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; + logError("fast events error: %s", FE_GetError()); throw Exception(Exception::SDL_ERROR); } if (Sound_Init() == 0) { - std::cerr << "sound initialization failed: " << Sound_GetError() - << std::endl; + logError("sound initialization failed: %s", Sound_GetError()); throw Exception(Exception::SDL_ERROR); } alutInit(&argc, argv); @@ -174,7 +174,7 @@ public: if (printFps) { - std::cout << "FPS: " << fps << std::endl; + logInfo("framerate: %d fps", fps); } }