*** empty log message ***
[supertux.git] / src / setup.cpp
index 49d530d..15e6ba0 100644 (file)
 #include "menu.h"
 #include "gameloop.h"
 #include "configfile.h"
+#include "scene.h"
 
 #ifdef WIN32
 #define mkdir(dir, mode)    mkdir(dir)
 // on win32 we typically don't want LFS paths
 #undef DATA_PREFIX
-#define DATA_PREFIX "./data"
+#define DATA_PREFIX "./data/"
 #endif
 
 /* Local function prototypes: */
@@ -80,7 +81,7 @@ int fwriteable(const char *filename)
   return true;
 }
 
-/* Makes sure a directory is created in either the SuperTux base directory or the SuperTux base directory.*/
+/* Makes sure a directory is created in either the SuperTux home directory or the SuperTux base directory.*/
 int fcreatedir(const char* relative_dir)
 {
   char path[1024];
@@ -352,6 +353,7 @@ void st_menu(void)
 {
   main_menu      = new Menu();
   options_menu   = new Menu();
+  options_controls_menu   = new Menu();
   load_game_menu = new Menu();
   save_game_menu = new Menu();
   game_menu      = new Menu();
@@ -381,8 +383,15 @@ void st_menu(void)
       options_menu->additem(MN_DEACTIVE,"Music     ",use_music,0);
     }
   options_menu->additem(MN_TOGGLE,"Show FPS  ",show_fps,0);
+  options_menu->additem(MN_GOTO,"Controls  ",0,options_controls_menu);
   options_menu->additem(MN_HL,"",0,0);
   options_menu->additem(MN_BACK,"Back",0,0);
+  
+  options_controls_menu->additem(MN_LABEL,"Controls",0,0);
+  options_controls_menu->additem(MN_HL,"",0,0);
+  options_controls_menu->additem(MN_CONTROLFIELD,"Move Right",tux.keymap.right,0);
+  options_controls_menu->additem(MN_HL,"",0,0);
+  options_controls_menu->additem(MN_BACK,"Back",0,0);
 
   load_game_menu->additem(MN_LABEL,"Load Game",0,0);
   load_game_menu->additem(MN_HL,"",0,0);
@@ -536,6 +545,9 @@ void st_general_setup(void)
   texture_load(&arrow_left, datadir + "/images/icons/left.png", USE_ALPHA);
   texture_load(&arrow_right, datadir + "/images/icons/right.png", USE_ALPHA);
 
+  /* Load the mouse-cursor */
+  mouse_cursor = new MouseCursor( datadir + "/images/status/mousecursor.png",1);
+  
 }
 
 void st_general_free(void)
@@ -558,6 +570,9 @@ void st_general_free(void)
   texture_free(&arrow_left);
   texture_free(&arrow_right);
 
+  /* Free mouse-cursor */
+  delete mouse_cursor;
+  
   /* Free menus */
   delete main_menu;
   delete game_menu;
@@ -914,8 +929,11 @@ void parseargs(int argc, char * argv[])
 
           use_gl = true;
 #endif
-
         }
+      else if (strcmp(argv[i], "--sdl") == 0)
+          {
+            use_gl = false;
+          }
       else if (strcmp(argv[i], "--usage") == 0)
         {
           /* Show usage: */
@@ -956,6 +974,7 @@ void parseargs(int argc, char * argv[])
                "  --fullscreen        Run in fullscreen mode.\n"
                "  --opengl            If opengl support was compiled in, this will enable\n"
                "                      the EXPERIMENTAL OpenGL mode.\n"
+               "  --sdl               Use non-opengl renderer\n"
                "\n"
                "Sound Options:\n"
                "  --disable-sound     If sound support was compiled in,  this will\n"