[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src globals.cxx,1.12,1.13 globals.hxx,1.
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src globals.cxx,1.12,1.13 globals.hxx,1.15,1.16 pingus_main.cxx,1.81,1.82 |
Date: |
15 Apr 2003 10:33:17 -0000 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv15076
Modified Files:
globals.cxx globals.hxx pingus_main.cxx
Log Message:
- added config flag for the controller
- replaced setlocale (LC_CTYPE, ) by bind_textdomain_codeset(PACKAGE,
ISO-8859-1);
Index: globals.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/globals.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- globals.cxx 12 Apr 2003 16:14:31 -0000 1.12
+++ globals.cxx 15 Apr 2003 10:33:15 -0000 1.13
@@ -51,6 +51,8 @@
int min_frame_skip = 1;
int max_frame_skip = 5;
+std::string controller_file;
+
std::string global_username;
std::string global_email;
std::string default_language = "en";
Index: globals.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/globals.hxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- globals.hxx 13 Apr 2003 23:33:19 -0000 1.15
+++ globals.hxx 15 Apr 2003 10:33:15 -0000 1.16
@@ -49,7 +49,10 @@
extern int screen_height; ///<
extern bool draw_collision_map; ///<
extern bool swcursor_enabled; ///< --enable-swcursor
+
extern std::string config_file; ///< --config-file
+extern std::string controller_file; ///< --controller
+
extern bool max_cpu_usage; ///< --max-cpu-usage
extern bool use_opengl; ///< --use-opengl
extern bool action_help; ///< --action-help
Index: pingus_main.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- pingus_main.cxx 14 Apr 2003 17:56:36 -0000 1.81
+++ pingus_main.cxx 15 Apr 2003 10:33:15 -0000 1.82
@@ -225,6 +225,7 @@
{"max-frame-skip", required_argument, 0, 155},
{"frame-skip", required_argument, 0, 157},
{"cheat", required_argument, 0, 156},
+ {"controller", required_argument, 0, 160},
#ifdef HAVE_LIBCLANGL
{"use-opengl", no_argument, 0, 'G'},
#endif
@@ -478,6 +479,10 @@
Cheat::activate(optarg);
break;
+ case 160:
+ controller_file = optarg;
+ break;
+
default:
if (verbose) std::cout << _("Unknow char: ") << c << std::endl <<
std::endl;
std::cout << _("Usage: ") << argv[0] << _(" [OPTIONS]... [LEVELFILE]")
<< std::endl;
@@ -511,6 +516,8 @@
<< "\n --no-cfg-file " << _("Don't read ~/.pingus/config")
<< "\n --config-file " << _("FILE ") << _("Read config from
FILE (default: ~/.pingus/config)")
<< "\n " << _("reduce CPU usage, might
speed up the game on slower machines")
+ << "\n --controller FILE " << _("Uses the controller given in
FILE")
+
<< "\n\n" << _("Debugging and experimental stuff:")
<< "\n --maintainer-mode " << _("Enables some features, only
interesting programmers")
<< "\n --debug OPTION " << _("Enable the output of
debugging infos, possible")
@@ -524,14 +531,13 @@
<< "\n --tile-size INT " << _("Set the size of the map
tiles (default: 32)")
<< "\n --fast-mode " << _("Disable some cpu intensive
features")
<< "\n --min-cpu-usage " << _("Reduces the CPU usage by
issuing sleep()")
- << "\n"
- << "\nDemo playing and recording:"
+
+ << "\n\n" << _("Demo playing and recording:")
<< "\n -p, --play-demo " << _("FILE ") << _("Plays a demo
session from FILE")
<< "\n -r, --disable-demo-recording"
<< "\n " << _("Record demos for each played
level")
- << "\n"
- << "\n"
- << _("Sound:")
+
+ << "\n\n" << _("Sound:")
<< "\n -s, --disable-sound " << _("Disable sound")
<< "\n -m, --disable-music " << _("Disable music")
<< "\n"
@@ -675,20 +681,15 @@
std::cout << "setlocale returned '" << ret << "'" << std::endl;
}
- if ((ret = setlocale (LC_CTYPE, "")) == NULL)
- {
- std::cout << "ERROR: setlocale LC_CTYPE failed!" << std::endl;
- }
- else
- {
- if (maintainer_mode)
- std::cout << "setlocale returned '" << ret << "'" << std::endl;
- }
-
- bindtextdomain (PACKAGE, (path_manager.get_base_path () +
"/../../locale/").c_str());
+ bindtextdomain(PACKAGE, (path_manager.get_base_path () +
"/../../locale/").c_str());
// We use another LOCALEDIR to make static binaries possible
// bindtextdomain (PACKAGE, LOCALEDIR);
- textdomain (PACKAGE);
+ textdomain(PACKAGE);
+
+ // Forcing codeset to ISO-8859-1, since usage of
+ // setlocate(LC_CTYPE,"") causes all sorts of throuble
+ bind_textdomain_codeset(PACKAGE, "ISO-8859-1");
+
#endif
if (maintainer_mode)
std::cout << "BasePath: " << path_manager.get_base_path () << std::endl;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src globals.cxx,1.12,1.13 globals.hxx,1.15,1.16 pingus_main.cxx,1.81,1.82,
grumbel <=