From: Ricardo Cruz Date: Wed, 28 Jul 2004 21:47:43 +0000 (+0000) Subject: Added a --flip-levels argument, I guess it doesn't need any description of what it... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=aae9774f7f454eea1935c22ec705707665d162f1;p=supertux.git Added a --flip-levels argument, I guess it doesn't need any description of what it does. :) SVN-Revision: 1660 --- diff --git a/lib/app/globals.cpp b/lib/app/globals.cpp index e731b29fa..b363ec09c 100644 --- a/lib/app/globals.cpp +++ b/lib/app/globals.cpp @@ -55,6 +55,7 @@ int joystick_num = 0; char* level_startup_file = 0; bool launch_leveleditor_mode = false; bool launch_worldmap_mode = false; +bool flip_levels_mode = false; /* SuperTux directory ($HOME/.supertux) and save directory($HOME/.supertux/save) */ char *st_dir, *st_save_dir; diff --git a/lib/app/globals.h b/lib/app/globals.h index 6de62d678..2894b2b38 100644 --- a/lib/app/globals.h +++ b/lib/app/globals.h @@ -69,6 +69,7 @@ namespace SuperTux extern char* level_startup_file; extern bool launch_leveleditor_mode; extern bool launch_worldmap_mode; + extern bool flip_levels_mode; /* SuperTux directory ($HOME/.supertux) and save directory($HOME/.supertux/save) */ extern char* st_dir; diff --git a/lib/app/setup.cpp b/lib/app/setup.cpp index 22a23a6c1..0cbcb928d 100644 --- a/lib/app/setup.cpp +++ b/lib/app/setup.cpp @@ -715,6 +715,10 @@ void Setup::parseargs(int argc, char * argv[]) { launch_worldmap_mode = true; } + else if (strcmp(argv[i], "--flip-levels") == 0) + { + flip_levels_mode = true; + } else if (strcmp(argv[i], "--datadir") == 0 || strcmp(argv[i], "-d") == 0 ) { @@ -793,6 +797,7 @@ void Setup::parseargs(int argc, char * argv[]) " Define how joystick buttons and axis should be mapped\n" " --leveleditor Opens the leveleditor in a file.\n" " --worldmap Opens the specified worldmap file.\n" + " --flip-levels Flip levels upside-down.\n" " -d, --datadir DIR Load Game data from DIR (default: automatic)\n" " --debug Enables the debug mode, which is useful for developers.\n" " --help Display a help message summarizing command-line\n" @@ -833,7 +838,7 @@ void usage(char * prog, int ret) /* Display the usage message: */ - fprintf(fi, _("Usage: %s [--fullscreen] [--opengl] [--disable-sound] [--disable-music] [--debug] | [--usage | --help | --version] [--leveleditor] [--worldmap] FILENAME\n"), + fprintf(fi, _("Usage: %s [--fullscreen] [--opengl] [--disable-sound] [--disable-music] [--debug] | [--usage | --help | --version] [--leveleditor] [--worldmap] [--flip-levels] FILENAME\n"), prog); diff --git a/src/gameloop.cpp b/src/gameloop.cpp index 4d7c4dd29..d19461b59 100644 --- a/src/gameloop.cpp +++ b/src/gameloop.cpp @@ -77,7 +77,7 @@ GameSession::GameSession(const std::string& levelname_, int mode, bool flip_leve context = new DrawingContext(); - if(debug_mode) + if(flip_levels_mode) flip_level = true; restart_level();