rnd-20030428-1-src
[rocksndiamonds.git] / src / tape.c
index d90026054cc15fe006085ed99d0b843fc84e5b42..40a5126b160dbcff66f561b2c847e1bc91f81fa6 100644 (file)
@@ -50,7 +50,7 @@ static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS];
 #define VIDEO_DATE_LABEL_YPOS  (VIDEO_DISPLAY1_YPOS)
 #define VIDEO_DATE_LABEL_XSIZE (VIDEO_DISPLAY_XSIZE)
 #define VIDEO_DATE_LABEL_YSIZE (VIDEO_DISPLAY_YSIZE)
-#define VIDEO_DATE_XPOS                (VIDEO_DISPLAY1_XPOS + 1)
+#define VIDEO_DATE_XPOS                (VIDEO_DISPLAY1_XPOS + 2)
 #define VIDEO_DATE_YPOS                (VIDEO_DISPLAY1_YPOS + 14)
 #define VIDEO_DATE_XSIZE       (VIDEO_DISPLAY_XSIZE)
 #define VIDEO_DATE_YSIZE       16
@@ -78,7 +78,7 @@ static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS];
 #define VIDEO_PAUSE_SYMBOL_YPOS        (VIDEO_DISPLAY2_YPOS)
 #define VIDEO_PAUSE_SYMBOL_XSIZE 17
 #define VIDEO_PAUSE_SYMBOL_YSIZE 13
-#define VIDEO_TIME_XPOS                (VIDEO_DISPLAY2_XPOS + 38)
+#define VIDEO_TIME_XPOS                (VIDEO_DISPLAY2_XPOS + 39)
 #define VIDEO_TIME_YPOS                (VIDEO_DISPLAY2_YPOS + 14)
 #define VIDEO_TIME_XSIZE       50
 #define VIDEO_TIME_YSIZE       16
@@ -302,6 +302,9 @@ void TapeErase()
   tape.length = 0;
   tape.counter = 0;
 
+  if (leveldir_current)
+    setString(&tape.level_identifier, leveldir_current->identifier);
+
   tape.level_nr = level_nr;
   tape.pos[tape.counter].delay = 0;
   tape.changed = TRUE;
@@ -363,7 +366,7 @@ static void TapeStartGameRecording()
   else
 #endif
   {
-    game_status = PLAYING;
+    game_status = GAME_MODE_PLAYING;
     StopAnimation();
     InitGame();
   }
@@ -508,7 +511,7 @@ static void TapeStartGamePlaying()
 {
   TapeStartPlaying();
 
-  game_status = PLAYING;
+  game_status = GAME_MODE_PLAYING;
   StopAnimation();
   InitGame();
 }
@@ -588,8 +591,10 @@ void TapeStop()
     DrawVideoDisplay(VIDEO_STATE_TIME_ON, tape.length_seconds);
   }
 
+#if 0
   if (tape.auto_play)
     AutoPlayTape();    /* continue automatically playing next tape */
+#endif
 }
 
 unsigned int GetTapeLength()
@@ -643,7 +648,7 @@ static void TapeSingleStep()
 
 void TapeQuickSave()
 {
-  if (game_status == PLAYING)
+  if (game_status == GAME_MODE_PLAYING)
   {
     if (tape.recording)
       TapeHaltRecording();     /* prepare tape for saving on-the-fly */
@@ -653,13 +658,13 @@ void TapeQuickSave()
     else
       SaveTape(tape.level_nr);
   }
-  else if (game_status == MAINMENU)
+  else if (game_status == GAME_MODE_MAIN)
     Request("No game that can be saved !", REQ_CONFIRM);
 }
 
 void TapeQuickLoad()
 {
-  if (game_status == PLAYING || game_status == MAINMENU)
+  if (game_status == GAME_MODE_PLAYING || game_status == GAME_MODE_MAIN)
   {
     TapeStop();
     TapeErase();
@@ -940,7 +945,7 @@ static void HandleTapeButtons(struct GadgetInfo *gi)
 {
   int id = gi->custom_id;
 
-  if (game_status != MAINMENU && game_status != PLAYING)
+  if (game_status != GAME_MODE_MAIN && game_status != GAME_MODE_PLAYING)
     return;
 
   switch (id)