#include "globals.h"
#include "setup.h"
#include "screen/screen.h"
-#include "screen/texture.h"
+#include "screen/surface.h"
#include "menu.h"
#include "gameloop.h"
#include "configfile.h"
blue_text = new Font(datadir + "/images/fonts/blue.png", Font::TEXT, 16,18,3);
white_text = new Font(datadir + "/images/fonts/white.png",
Font::TEXT, 16,18);
+ gray_text = new Font(datadir + "/images/fonts/gray.png",
+ Font::TEXT, 16,18);
white_small_text = new Font(datadir + "/images/fonts/white-small.png",
Font::TEXT, 8,9, 1);
white_big_text = new Font(datadir + "/images/fonts/white-big.png",
{
fprintf(stderr,
"\nWarning: I could not set up fullscreen video for "
- "640x480 mode.\n"
+ "800x600 mode.\n"
"The Simple DirectMedia error that occured was:\n"
"%s\n\n", SDL_GetError());
use_fullscreen = false;
if (screen == NULL)
{
fprintf(stderr,
- "\nError: I could not set up video for 640x480 mode.\n"
+ "\nError: I could not set up video for 800x600 mode.\n"
"The Simple DirectMedia error that occured was:\n"
"%s\n\n", SDL_GetError());
exit(1);
/* Open joystick: */
if (SDL_NumJoysticks() <= 0)
{
- fprintf(stderr, "Warning: No joysticks are available.\n");
+ fprintf(stderr, "Info: No joysticks were found.\n");
use_joystick = false;
}
if (strcmp(argv[i], "--fullscreen") == 0 ||
strcmp(argv[i], "-f") == 0)
{
- /* Use full screen: */
-
use_fullscreen = true;
}
+ else if (strcmp(argv[i], "--window") == 0 ||
+ strcmp(argv[i], "-w") == 0)
+ {
+ use_fullscreen = false;
+ }
else if (strcmp(argv[i], "--joystick") == 0 || strcmp(argv[i], "-j") == 0)
{
assert(i+1 < argc);
" Please see the file \"README.txt\" for more details.\n"));
printf(_("Usage: %s [OPTIONS] FILENAME\n\n"), argv[0]);
puts(_("Display Options:\n"
- " --fullscreen Run in fullscreen mode.\n"
+ " -f, --fullscreen Run in fullscreen mode.\n"
+ " -w, --window Run in window mode.\n"
" --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"
exit(ret);
}
+std::vector<std::string> read_directory(const std::string& pathname)
+{
+ std::vector<std::string> dirnames;
+
+ DIR* dir = opendir(pathname.c_str());
+ if (dir)
+ {
+ struct dirent *direntp;
+
+ while((direntp = readdir(dir)))
+ {
+ dirnames.push_back(direntp->d_name);
+ }
+
+ closedir(dir);
+ }
+
+ return dirnames;
+}
+
+/* EOF */