datadir = exedir + "./data/"; // SuperTux run from source dir
if (access(datadir.c_str(), F_OK) != 0)
{
- datadir = exedir + "../../data/"; //SuperTux run from source dir (with libtool script)
+ datadir = exedir + "../../../../data/"; //SuperTux run from source dir (with libtool script)
if (access(datadir.c_str(), F_OK) != 0)
{
glViewport(0, 0, screen->w, screen->h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
- glOrtho(0, screen->w, screen->h, 0, -1.0, 1.0);
+ glOrtho(0, 800, 600, 0, -1.0, 1.0);
+ //glOrtho(0, 800SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
{
use_fullscreen = false;
}
+ else if (strcmp(argv[i], "--geometry") == 0 ||
+ strcmp(argv[i], "-g") == 0)
+ {
+ assert(i+1 < argc);
+ if (sscanf(argv[++i],
+ "%dx%d", &screen_width, &screen_height) != 2)
+ {
+ puts("Warning: Invalid geometry spec, should be \"WIDTHxHEIGHT\"");
+ }
+ }
else if (strcmp(argv[i], "--joystick") == 0 || strcmp(argv[i], "-j") == 0)
{
assert(i+1 < argc);
" --opengl If OpenGL support was compiled in, this will tell\n"
" SuperTux to make use of it.\n"
" --sdl Use the SDL software graphical renderer\n"
+ " --geometry WIDTHxHEIGHT Run SuperTux in the given resolution\n"
"\n"
"Sound Options:\n"
" --disable-sound If sound support was compiled in, this will\n"
/* Display the usage message: */
- fprintf(fi, _("Usage: %s [--fullscreen] [--opengl] [--disable-sound] [--disable-music] [--debug] | [--usage | --help | --version] [--leveleditor] [--worldmap] [--flip-levels] FILENAME\n"),
+ fprintf(fi, _("Usage: %s [--fullscreen] [--opengl] [--geometry WIDTHxHEIGHT] [--disable-sound] [--disable-music] [--debug] | [--usage | --help | --version] [--leveleditor] [--worldmap] [--flip-levels] FILENAME\n"),
prog);