[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] [pingus] 2 new revisions pushed by address@hidden on 2011-0
From: |
pingus |
Subject: |
[Pingus-CVS] [pingus] 2 new revisions pushed by address@hidden on 2011-09-28 16:26 GMT |
Date: |
Wed, 28 Sep 2011 16:43:56 +0000 |
2 new revisions:
Revision: e474175f6280
Author: Ingo Ruhnke <address@hidden>
Date: Wed Sep 28 09:24:47 2011
Log: Added kNone log level to disable all logging output
http://code.google.com/p/pingus/source/detail?r=e474175f6280
Revision: e99292d02b12
Author: Ingo Ruhnke <address@hidden>
Date: Wed Sep 28 09:26:33 2011
Log: Cleaned up some command line options, start with log level
kWarning un...
http://code.google.com/p/pingus/source/detail?r=e99292d02b12
==============================================================================
Revision: e474175f6280
Author: Ingo Ruhnke <address@hidden>
Date: Wed Sep 28 09:24:47 2011
Log: Added kNone log level to disable all logging output
http://code.google.com/p/pingus/source/detail?r=e474175f6280
Modified:
/src/util/log.cpp
/src/util/log.hpp
=======================================
--- /src/util/log.cpp Mon Sep 5 14:46:01 2011
+++ /src/util/log.cpp Wed Sep 28 09:24:47 2011
@@ -71,6 +71,7 @@
{
switch(level)
{
+ case kNone: std::cout << "[NONE] "; break;
case kError: std::cout << "[ERROR] "; break;
case kWarning: std::cout << "[WARN] "; break;
case kInfo: std::cout << "[INFO] "; break;
=======================================
--- /src/util/log.hpp Sun Sep 4 11:30:11 2011
+++ /src/util/log.hpp Wed Sep 28 09:24:47 2011
@@ -30,6 +30,9 @@
{
public:
enum LogLevel {
+ /** Used in set_log_level() to disable all output */
+ kNone,
+
/** things that shouldn't happen (i.e. a catched exceptions) */
kError,
==============================================================================
Revision: e99292d02b12
Author: Ingo Ruhnke <address@hidden>
Date: Wed Sep 28 09:26:33 2011
Log: Cleaned up some command line options, start with log level
kWarning unless --debug, --verbose or --quiet is given
http://code.google.com/p/pingus/source/detail?r=e99292d02b12
Modified:
/src/pingus/pingus_main.cpp
/src/pingus/pingus_options.hpp
=======================================
--- /src/pingus/pingus_main.cpp Wed Sep 28 08:15:30 2011
+++ /src/pingus/pingus_main.cpp Wed Sep 28 09:26:33 2011
@@ -164,11 +164,18 @@
argp.add_usage(_("[OPTIONS]... [FILE]"));
argp.add_doc(_("Pingus is a puzzle game where you need to guide a bunch
of little penguins around the world."));
+ argp.add_group(_("General Options:"));
argp.add_option('h', "help", "",
_("Displays this help"));
argp.add_option('v', "version", "",
_("Print version number and exit"));
-
+ argp.add_option('V', "verbose", "",
+ _("Enable info level log output"));
+ argp.add_option('D', "debug", "",
+ _("Enable debug level log output"));
+ argp.add_option('Q', "quiet", "",
+ _("Disable all log output"));
+
argp.add_group(_("Display:"));
argp.add_option('w', "window", "",
_("Start in Window Mode"));
@@ -176,10 +183,12 @@
_("Start in Fullscreen"));
argp.add_option('r', "renderer", "RENDERER",
_("Use the given renderer (default: delta)"));
- argp.add_option(346, "enable-swcursor", "",
- _("Enable software cursor"));
argp.add_option('g', "geometry", "{width}x{height}",
_("Set the resolution for pingus (default: 800x600)"));
+ argp.add_option(346, "enable-swcursor", "",
+ _("Enable software cursor"));
+ argp.add_option(337, "disable-auto-scrolling", "",
+ _("Disable automatic scrolling"));
argp.add_group(_("Sound:"));
argp.add_option('s', "disable-sound", "",
@@ -196,8 +205,6 @@
argp.add_group("Modes:");
argp.add_option('e', "editor", "",
_("Loads the level editor"));
- argp.add_option('S', "save", "FILENAME",
- _("Save the level given level to FILENAME and quit"));
argp.add_option(359, "credits", "",
_("Shows the credits"));
@@ -208,10 +215,6 @@
_("Set the path to load and save user files (savegames,
etc.) to PATH"));
argp.add_option('a', "addon", _("PATH"),
_("Add an addon path that is searched for datadir
content"));
-
- argp.add_group(_("Misc Options:"));
- argp.add_option(337, "disable-auto-scrolling", "",
- _("Disable automatic scrolling"));
argp.add_option(342, "no-cfg-file", "",
_("Don't read ~/.pingus/config"));
argp.add_option(347, "config-file", _("FILE"),
@@ -223,11 +226,6 @@
argp.add_group(_("Debugging and experimental stuff:"));
argp.add_option(334, "maintainer-mode", "",
_("Enables some features, only interesting to
programmers"));
-
- argp.add_option('D', "debug", "OPTION",
- _("Enable the output of debugging info, possible "
- "OPTIONs are tiles, gametime, actions, sound,
resources, gui, "
- "input, pathmgr"));
argp.add_option('t', "speed", "SPEED",
_("Set the game speed (0=fastest, >0=slower)"));
argp.add_option('k', "fps", "FPS",
@@ -276,10 +274,6 @@
}
break;
- case 359: // --credits
- cmd_options.credits.set(true);
- break;
-
case 'e': // -e, --editor
cmd_options.editor.set(true);
break;
@@ -296,10 +290,6 @@
cmd_options.disable_sound.set(true);
break;
- case 'S':
- cmd_options.save.set(argp.get_argument());
- break;
-
case 'm': // -m, --disable-music
cmd_options.disable_music.set(true);
break;
@@ -374,8 +364,17 @@
break;
case 'D':
+ g_logger.set_log_level(Logger::kDebug);
break;
+ case 'V':
+ g_logger.set_log_level(Logger::kInfo);
+ break;
+
+ case 'Q':
+ g_logger.set_log_level(Logger::kNone);
+ break;
+
case 360:
cmd_options.controller.set(argp.get_argument());
break;
@@ -491,27 +490,7 @@
{
ScreenManager screen_manager;
- if (cmd_options.save.is_set())
- { // Load a level and save it again, useful to convert it in a new format
- if (!cmd_options.rest.is_set())
- {
- std::cout << "Error: level argument required" << std::endl;
- }
- else
- {
- Pathname filename(cmd_options.rest.get(), Pathname::SYSTEM_PATH);
- Editor::EditorLevel level;
- std::cout << "Loading: " << filename.str() << std::endl;
- level.load_level(filename);
- std::cout << "Saving: " << cmd_options.save.get() << std::endl;
- level.save_level(cmd_options.save.get());
- }
- }
- else if (cmd_options.credits.is_set() && cmd_options.credits.get())
- { // just show the credits screen
- screen_manager.push_screen(new Credits());
- }
- else if (cmd_options.editor.is_set() && cmd_options.editor.get())
+ if (cmd_options.editor.is_set() && cmd_options.editor.get())
{ // Editor
Editor::EditorScreen* editor = new Editor::EditorScreen();
// optionally load a map in the editor if it was given
@@ -552,7 +531,7 @@
int
PingusMain::run(int argc, char** argv)
{
- g_logger.set_log_level(Logger::kTemp);
+ g_logger.set_log_level(Logger::kWarning);
tinygettext::Log::set_log_info_callback(0);
=======================================
--- /src/pingus/pingus_options.hpp Wed Nov 4 10:34:19 2009
+++ /src/pingus/pingus_options.hpp Wed Sep 28 09:26:33 2011
@@ -61,9 +61,7 @@
// Modes
Value<bool> list_languages;
Value<bool> editor;
- Value<bool> credits;
Value<bool> font;
- Value<std::string> save;
// Display
Value<bool> fullscreen;
@@ -96,9 +94,7 @@
rest(),
list_languages(),
editor(),
- credits(),
font(),
- save(),
fullscreen(),
resize(),
swcursor(),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] [pingus] 2 new revisions pushed by address@hidden on 2011-09-28 16:26 GMT,
pingus <=