fixed fading complete screen if playfield viewport has changed
[rocksndiamonds.git] / src / tape.c
index abec7013f7b809c05a1eb6d29798b02a999e1c74..abcaf4817c4551e9d231671a4a5a235146cdcef4 100644 (file)
@@ -544,6 +544,8 @@ void TapeErase()
 
   tape.centered_player_nr_next = -1;
   tape.set_centered_player = FALSE;
+
+  tape.use_mouse = (level.game_engine_type == GAME_ENGINE_TYPE_MM);
 }
 
 static void TapeRewind()
@@ -709,7 +711,7 @@ void TapeRecordAction(byte action_raw[MAX_PLAYERS])
   for (i = 0; i < MAX_PLAYERS; i++)
     action[i] = action_raw[i];
 
-  if (tape.set_centered_player)
+  if (!tape.use_mouse && tape.set_centered_player)
   {
     for (i = 0; i < MAX_PLAYERS; i++)
       if (tape.centered_player_nr_next == i ||
@@ -887,16 +889,19 @@ byte *TapePlayAction()
   tape.set_centered_player = FALSE;
   tape.centered_player_nr_next = -999;
 
-  for (i = 0; i < MAX_PLAYERS; i++)
+  if (!tape.use_mouse)
   {
-    if (action[i] & KEY_SET_FOCUS)
+    for (i = 0; i < MAX_PLAYERS; i++)
     {
-      tape.set_centered_player = TRUE;
-      tape.centered_player_nr_next =
-       (tape.centered_player_nr_next == -999 ? i : -1);
-    }
+      if (action[i] & KEY_SET_FOCUS)
+      {
+       tape.set_centered_player = TRUE;
+       tape.centered_player_nr_next =
+         (tape.centered_player_nr_next == -999 ? i : -1);
+      }
 
-    action[i] &= ~KEY_SET_FOCUS;
+      action[i] &= ~KEY_SET_FOCUS;
+    }
   }
 
   tape.delay_played++;
@@ -1351,7 +1356,7 @@ void MapTapeButtons()
     MapTapeWarpButton();
 
   if (tape.show_game_buttons)
-    MapGameButtons();
+    MapGameButtonsOnTape();
 }
 
 void UnmapTapeButtons()
@@ -1362,7 +1367,7 @@ void UnmapTapeButtons()
     UnmapGadget(tape_gadget[i]);
 
   if (tape.show_game_buttons)
-    UnmapGameButtons();
+    UnmapGameButtonsOnTape();
 }
 
 void RedrawTapeButtons()
@@ -1373,7 +1378,7 @@ void RedrawTapeButtons()
     RedrawGadget(tape_gadget[i]);
 
   if (tape.show_game_buttons)
-    RedrawGameButtons();
+    RedrawGameButtonsOnTape();
 
   // RedrawGadget() may have set REDRAW_ALL if buttons are defined off-area
   redraw_mask &= ~REDRAW_ALL;