rnd-20100609-1-src
[rocksndiamonds.git] / src / files.c
index 52589dff17be7b69ca0a540e9c0070cf52788866..349d2d52806c2bcec427e55733f4e06a941e947b 100644 (file)
@@ -6551,7 +6551,7 @@ static void LoadLevelFromFileInfo_SB(struct LevelInfo *level,
   boolean load_xsb_to_ces = check_special_flags("load_xsb_to_ces");
   int file_level_nr = 0;
   int line_nr = 0;
-  int x, y;
+  int x = 0, y = 0;            /* initialized to make compilers happy */
 
 #if 0
   printf("::: looking for level number %d [%d]\n",
@@ -9067,8 +9067,12 @@ void SaveScore(int nr)
 #define SETUP_TOKEN_SHORTCUT_SOUND_SIMPLE      13
 #define SETUP_TOKEN_SHORTCUT_SOUND_LOOPS       14
 #define SETUP_TOKEN_SHORTCUT_SOUND_MUSIC       15
+#define SETUP_TOKEN_SHORTCUT_SNAP_LEFT         16
+#define SETUP_TOKEN_SHORTCUT_SNAP_RIGHT                17
+#define SETUP_TOKEN_SHORTCUT_SNAP_UP           18
+#define SETUP_TOKEN_SHORTCUT_SNAP_DOWN         19
 
-#define NUM_SHORTCUT_SETUP_TOKENS              16
+#define NUM_SHORTCUT_SETUP_TOKENS              20
 
 /* player setup */
 #define SETUP_TOKEN_PLAYER_USE_JOYSTICK                0
@@ -9221,6 +9225,10 @@ static struct TokenInfo shortcut_setup_tokens[] =
   { TYPE_KEY_X11, &ssi.sound_simple,   "shortcut.sound_simple"         },
   { TYPE_KEY_X11, &ssi.sound_loops,    "shortcut.sound_loops"          },
   { TYPE_KEY_X11, &ssi.sound_music,    "shortcut.sound_music"          },
+  { TYPE_KEY_X11, &ssi.snap_left,      "shortcut.snap_left"            },
+  { TYPE_KEY_X11, &ssi.snap_right,     "shortcut.snap_right"           },
+  { TYPE_KEY_X11, &ssi.snap_up,                "shortcut.snap_up"              },
+  { TYPE_KEY_X11, &ssi.snap_down,      "shortcut.snap_down"            },
 };
 
 static struct TokenInfo player_setup_tokens[] =
@@ -9347,6 +9355,11 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->shortcut.sound_loops     = DEFAULT_KEY_SOUND_LOOPS;
   si->shortcut.sound_music     = DEFAULT_KEY_SOUND_MUSIC;
 
+  si->shortcut.snap_left       = DEFAULT_KEY_SNAP_LEFT;
+  si->shortcut.snap_right      = DEFAULT_KEY_SNAP_RIGHT;
+  si->shortcut.snap_up         = DEFAULT_KEY_SNAP_UP;
+  si->shortcut.snap_down       = DEFAULT_KEY_SNAP_DOWN;
+
   for (i = 0; i < MAX_PLAYERS; i++)
   {
     si->input[i].use_joystick = FALSE;
@@ -9374,6 +9387,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->options.verbose = FALSE;
 
 #if defined(CREATE_SPECIAL_EDITION_RND_JUE)
+  si->toons = FALSE;
   si->handicap = FALSE;
   si->fullscreen = TRUE;
   si->override_level_graphics = AUTO;
@@ -10334,6 +10348,10 @@ void LoadMusicInfo()
     if (!music_info_listed(music_file_info, music->filename))
     {
       *new = get_music_file_info(music->filename, i);
+#if 0
+      if (*new != NULL)
+       printf(":1: adding '%s' ['%s'] ...\n", (*new)->title, music->filename);
+#endif
       if (*new != NULL)
        new = &(*new)->next;
     }
@@ -10379,6 +10397,10 @@ void LoadMusicInfo()
     if (!music_info_listed(music_file_info, basename))
     {
       *new = get_music_file_info(basename, MAP_NOCONF_MUSIC(num_music_noconf));
+#if 0
+      if (*new != NULL)
+       printf(":2: adding '%s' ['%s'] ...\n", (*new)->title, basename);
+#endif
       if (*new != NULL)
        new = &(*new)->next;
     }