[qt4=$enableval],
[qt4=no])
-AC_ARG_WITH([log-level],
- [AS_HELP_STRING([--with-log-level=NUM],
- [0, none... 1, errors... 4, everything (default: 3)])],
- [log_level=$withval],
- [log_level=3])
-
if test x$debug = xyes
then
[Define to 1 if you want to use QT4 info/error dialogs.])
fi
-AC_DEFINE_UNQUOTED([YOINK_LOGLEVEL], [$log_level],
- [Define to detail level of logging.])
-
if test "x$prefix" = xNONE
then
echo " Target: $target"
echo " Prefix: $prefix"
echo " Data Directory: $DATADIR"
-echo " Log Level: $log_level"
echo " Debug: $debug"
echo " Double Precision: $double_precision"
echo " Profile: $profile"
-- Set this to print the current actual framerate to the console each
-- second.
-showfps = true
+showfps = false
-- Set this to run the game in full-screen mode. The default behavior is
-- to run the game in a window.
-fullscreen = true
+fullscreen = false
-- If the game is running in a window, set this to also make the window
-- resizable. This has no effective if the fullscreen option is true.
-- default behavior is to pick a native resolution. Otherwise, the game
-- window will default to 800x600.
---videomode = {800, 600}
+videomode = {800, 600}
-- Set this to make the cursor remain visible as you mouse over the view of
-- the game.
swapcontrol = true
+-- Set the level of log detail that will be printed to the console.
+-- Possible values are:
+-- 0 print nothing
+-- 1 errors only
+-- 2 include warnings
+-- 3 print everything, including debug messages
+
+loglevel = 2
+
}
-#if YOINK_LOGLEVEL >= 3
- Mf::Log::setLevel(Mf::Log::INFO);
-#elif YOINK_LOGLEVEL >= 2
- Mf::Log::setLevel(Mf::Log::WARNING);
-#elif YOINK_LOGLEVEL >= 1
- Mf::Log::setLevel(Mf::Log::ERROR);
-#elif YOINK_LOGLEVEL
- Mf::Log::setLevel(Mf::Log::NONE);
-#endif
-
-
// Add search paths; they should be searched in this order:
// 1. YOINK_DATADIR (environment)
// 2. YOINK_DATADIR (configure)
// 3. $HOME/.yoinkrc
// 4. YOINKRC (environment)
- std::string configFiles;
-
- configFiles += Mf::Resource::getPath("yoinkrc");
+ std::string configFiles = Mf::Resource::getPath("yoinkrc");
#if !defined(_WIN32) && !defined(__WIN32__)
configFiles += ":/etc/yoinkrc";
#endif
Mf::Settings& settings = Mf::Settings::getInstance();
settings.loadFromFile(configFiles);
settings.parseArgs(argc, argv);
+
+ Mf::Log::Level logLevel;
+ if (settings.get("loglevel", logLevel)) Mf::Log::setLevel(logLevel);
+
Mf::engine.initWithSettings(settings);
std::string iconFile = Mf::Resource::getPath(PACKAGE".png");
// on win32, creating a new context via SDL_SetVideoMode will wipe
// out the GL state, so we gotta notify everyone to reload their
// state after the change
- Engine::getInstance().dispatch("video.newcontext");
+ engine.dispatch("video.newcontext");
logInfo("video context recreated");
#endif