X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEngine.cc;h=18ce5d7e5f8c6d0b4664da080b16ba1ad2623ace;hp=e97c8b5d1b7edbae52a5b48ebc1072574e697ebe;hb=ca0f7bdfba63140dca0bd20586d31980f3938eb2;hpb=660e768e64c2c30928c7f157d5ff34195a4347fa diff --git a/src/Moof/Engine.cc b/src/Moof/Engine.cc index e97c8b5..18ce5d7 100644 --- a/src/Moof/Engine.cc +++ b/src/Moof/Engine.cc @@ -51,7 +51,9 @@ public: Impl(int argc, char* argv[], const std::string& configFile, const std::string& name, const std::string& iconFile, Engine* outer) : - interface(outer) + interface(outer), + timestep(0.01), + printFps(false) { #if defined(_WIN32) || defined (_WIN64) || defined(__WIN32__) if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0) @@ -70,23 +72,20 @@ public: alutInit(&argc, argv); Settings& settings = Settings::getInstance(); - settings.parseArgs(argc, argv); settings.loadFromFile(configFile); + settings.parseArgs(argc, argv); long randomSeed; - if (settings.get("engine.rngseed", randomSeed)) setSeed(randomSeed); + if (settings.get("rngseed", randomSeed)) setSeed(randomSeed); else setSeed(); - double ts = 0.01; - settings.get("engine.timestep", ts); - timestep = Scalar(ts); + settings.get("timestep", timestep); long maxFps = 40; - settings.getNumber("video.maxfps", maxFps); + settings.get("maxfps", maxFps); drawRate = 1.0 / Scalar(maxFps); - printFps = false; - settings.get("video.printfps", printFps); + settings.get("printfps", printFps); video = Video::alloc(name, iconFile); video->makeActive(); @@ -169,7 +168,7 @@ public: if (printFps) { - logInfo("framerate: %d fps", fps); + logInfo("%d fps", fps); } }