*******************************************************************************/
#include <cstdlib> // exit
-#include <iostream>
#include <string>
#include <SDL/SDL.h>
#include <SDL/SDL_sound.h>
#include <AL/alut.h>
+#include "Dispatcher.hh"
#include "Engine.hh"
+#include "Log.hh"
#include "Random.hh"
#include "Settings.hh"
#include "Timer.hh"
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);
if (printFps)
{
- std::cout << "FPS: " << fps << std::endl;
+ logInfo("framerate: %d fps", fps);
}
}