X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEngine.cc;h=c74ace8ef2207428f360dc5ae397d663539aca28;hp=78233688d60f69dba90c880a0c9e94b9518f0814;hb=5fa5f117f28922a7e539a432367960c1a61f837d;hpb=bfa6212d09d8735d8fd5e2638188e4a99f21ada4 diff --git a/src/Moof/Engine.cc b/src/Moof/Engine.cc index 7823368..c74ace8 100644 --- a/src/Moof/Engine.cc +++ b/src/Moof/Engine.cc @@ -35,7 +35,6 @@ #include #include -#include "Dispatcher.hh" #include "Engine.hh" #include "Random.hh" #include "Settings.hh" @@ -52,24 +51,28 @@ public: Impl(int argc, char* argv[], const std::string& configFile, const std::string& name, const std::string& iconFile, Engine* outer) : - interface(outer), - settings(argc, argv) + interface(outer) { 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); + Settings& settings = Settings::getInstance(); + settings.parseArgs(argc, argv); settings.loadFromFile(configFile); long randomSeed; @@ -219,8 +222,6 @@ public: Engine* interface; - Settings settings; - Dispatcher dispatcher; VideoPtr video; bool running;