changed engine snapshots mode to be deactivated when auto-playing tapes
[rocksndiamonds.git] / src / files.c
index 47e26ffa6707a6e57a6433589209bba86ce6586d..df4887a079f8e681f270f62860887c807269e54a 100644 (file)
@@ -288,6 +288,11 @@ static struct LevelFileConfigInfo chunk_config_ELEM[] =
     TYPE_BOOLEAN,                      CONF_VALUE_8_BIT(12),
     &li.shifted_relocation,            FALSE
   },
+  {
+    EL_PLAYER_1,                       -1,
+    TYPE_BOOLEAN,                      CONF_VALUE_8_BIT(15),
+    &li.lazy_relocation,               FALSE
+  },
 
   /* (these values are different for each player) */
   {
@@ -3007,6 +3012,8 @@ static int LoadLevel_NOTE(File *file, int chunk_size, struct LevelInfo *level)
   int envelope_nr = element - EL_ENVELOPE_1;
   int real_chunk_size = 2;
 
+  xx_envelope = level->envelope[envelope_nr];  /* copy into temporary buffer */
+
   while (!checkEndOfFile(file))
   {
     real_chunk_size += LoadLevel_MicroChunk(file, chunk_config_NOTE,
@@ -3016,7 +3023,7 @@ static int LoadLevel_NOTE(File *file, int chunk_size, struct LevelInfo *level)
       break;
   }
 
-  level->envelope[envelope_nr] = xx_envelope;
+  level->envelope[envelope_nr] = xx_envelope;  /* copy from temporary buffer */
 
   return real_chunk_size;
 }
@@ -8209,7 +8216,7 @@ static struct TokenInfo internal_setup_tokens[] =
   { TYPE_STRING, &sxi.fallback_sounds_file,    "fallback_sounds_file"  },
   { TYPE_STRING, &sxi.fallback_music_file,     "fallback_music_file"   },
   { TYPE_STRING, &sxi.default_level_series,    "default_level_series"  },
-  { TYPE_STRING, &sxi.choose_from_top_leveldir,        "choose_from_top_leveldir" },
+  { TYPE_BOOLEAN,&sxi.choose_from_top_leveldir,        "choose_from_top_leveldir" },
 };
 
 static struct TokenInfo options_setup_tokens[] =
@@ -8788,9 +8795,36 @@ static void InitMenuDesignSettings_SpecialPreProcessing()
 
 static void InitMenuDesignSettings_SpecialPostProcessing()
 {
+  static struct
+  {
+    struct XY *dst, *src;
+  }
+  game_buttons_xy[] =
+  {
+    { &game.button.save,       &game.button.stop       },
+    { &game.button.pause2,     &game.button.pause      },
+    { &game.button.load,       &game.button.play       },
+    { &game.button.undo,       &game.button.stop       },
+    { &game.button.redo,       &game.button.play       },
+
+    { NULL,                    NULL                    }
+  };
+  int i;
+
   /* special case: initialize later added SETUP list size from LEVELS value */
   if (menu.list_size[GAME_MODE_SETUP] == -1)
     menu.list_size[GAME_MODE_SETUP] = menu.list_size[GAME_MODE_LEVELS];
+
+  /* set default position for snapshot buttons to stop/pause/play buttons */
+  for (i = 0; game_buttons_xy[i].dst != NULL; i++)
+  {
+    if ((*game_buttons_xy[i].dst).x == -1 &&
+       (*game_buttons_xy[i].dst).y == -1)
+    {
+      (*game_buttons_xy[i].dst).x = (*game_buttons_xy[i].src).x;
+      (*game_buttons_xy[i].dst).y = (*game_buttons_xy[i].src).y;
+    }
+  }
 }
 
 static void LoadMenuDesignSettingsFromFilename(char *filename)