rnd-20140211-1-src
[rocksndiamonds.git] / src / tape.c
index bc258b66fae809f9b53889abf9958a0048b38454..2ab6f4be8bbcdced5b641be9e27e10d2f5ca718b 100644 (file)
@@ -186,7 +186,7 @@ static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS];
 /* video display functions                                                   */
 /* ========================================================================= */
 
-void DrawVideoDisplay(unsigned long state, unsigned long value)
+void DrawVideoDisplay(unsigned int state, unsigned int value)
 {
   int i, j, k;
   static char *monatsname[12] =
@@ -409,18 +409,6 @@ void DrawVideoDisplay(unsigned long state, unsigned long value)
            video_pos[i][j].pos->y < 0)
          continue;
 
-#if 0
-       printf("::: %d: %d, %ld\n",
-              i,
-              video_pos[i][j].graphic,
-              graphic_info[video_pos[i][j].graphic].bitmap);
-#endif
-
-#if 0
-       if (i < 9)
-         continue;
-#endif
-
        if (state & (1 << (i * 2 + k)))
        {
          struct GraphicInfo *gfx_bg = &graphic_info[IMG_BACKGROUND_TAPE];
@@ -447,20 +435,6 @@ void DrawVideoDisplay(unsigned long state, unsigned long value)
            gd_y = gfx_bg->src_y + pos->y;
          }
 
-#if 0
-         printf("::: %d (%d): %d, %ld - %d [%d] [%d] [%d]\n",
-                i, k,
-                video_pos[i][j].graphic,
-                graphic_info[video_pos[i][j].graphic].bitmap,
-                gfx->bitmap,
-                gd_bitmap,
-                (gd_bitmap == NULL),
-                0);
-
-         if (gd_bitmap == NULL)
-           printf("::: gfx %d skipped\n", video_pos[i][j].graphic);
-#endif
-
          /* some tape graphics may be undefined -- only draw if defined */
          if (gd_bitmap != NULL)
            BlitBitmap(gd_bitmap, drawto, gd_x, gd_y, gfx->width, gfx->height,
@@ -703,12 +677,12 @@ static void TapeRewind()
   InitRND(tape.random_seed);
 }
 
-static void TapeSetRandomSeed(long random_seed)
+static void TapeSetRandomSeed(int random_seed)
 {
   tape.random_seed = InitRND(random_seed);
 }
 
-void TapeStartRecording(long random_seed)
+void TapeStartRecording(int random_seed)
 {
   if (!TAPE_IS_STOPPED(tape))
     TapeStop();
@@ -1105,7 +1079,7 @@ void TapeQuickSave()
 {
   if (game_status == GAME_MODE_MAIN)
   {
-    Request("No game that can be saved !", REQ_CONFIRM);
+    Request("No game that can be saved!", REQ_CONFIRM);
 
     return;
   }
@@ -1118,7 +1092,7 @@ void TapeQuickSave()
 
   if (TAPE_IS_EMPTY(tape))
   {
-    Request("No tape that can be saved !", REQ_CONFIRM);
+    Request("No tape that can be saved!", REQ_CONFIRM);
 
     return;
   }
@@ -1133,12 +1107,12 @@ void TapeQuickLoad()
 
   if (!fileExists(filename))
   {
-    Request("No tape for this level !", REQ_CONFIRM);
+    Request("No tape for this level!", REQ_CONFIRM);
 
     return;
   }
 
-  if (tape.recording && !Request("Stop recording and load tape ?",
+  if (tape.recording && !Request("Stop recording and load tape?",
                                 REQ_ASK | REQ_STAY_CLOSED))
   {
     OpenDoor(DOOR_OPEN_1 | DOOR_COPY_BACK);
@@ -1183,7 +1157,7 @@ void TapeQuickLoad()
   {
     int reopen_door = (game_status == GAME_MODE_PLAYING ? REQ_REOPEN : 0);
 
-    Request("No tape for this level !", REQ_CONFIRM | reopen_door);
+    Request("No tape for this level!", REQ_CONFIRM | reopen_door);
   }
 }
 
@@ -1195,7 +1169,7 @@ void InsertSolutionTape()
   LoadSolutionTape(level_nr);
 
   if (TAPE_IS_EMPTY(tape))
-    Request("No solution tape for this level !", REQ_CONFIRM);
+    Request("No solution tape for this level!", REQ_CONFIRM);
 
   DrawCompleteVideoDisplay();
 }
@@ -1214,7 +1188,9 @@ void AutoPlayTape()
   static int num_levels_solved = 0;
   static int num_tape_missing = 0;
   static boolean level_failed[MAX_TAPES_PER_SET];
+#if 0
   static boolean tape_missing[MAX_TAPES_PER_SET];
+#endif
   int i;
 
   if (autoplay_initialized)
@@ -1263,7 +1239,9 @@ void AutoPlayTape()
     for (i = 0; i < MAX_TAPES_PER_SET; i++)
     {
       level_failed[i] = FALSE;
+#if 0
       tape_missing[i] = FALSE;
+#endif
     }
 
     autoplay_initialized = TRUE;
@@ -1298,8 +1276,10 @@ void AutoPlayTape()
     if (tape.no_valid_file)
     {
       num_tape_missing++;
+#if 0
       if (level_nr >= 0 && level_nr < MAX_TAPES_PER_SET)
        tape_missing[level_nr] = TRUE;
+#endif
 
       printf("(no tape)\n");
       continue;
@@ -1478,7 +1458,7 @@ static void HandleTapeButtonsExt(int id)
        LoadTape(level_nr);
 
        if (TAPE_IS_EMPTY(tape))
-         Request("No tape for this level !", REQ_CONFIRM);
+         Request("No tape for this level!", REQ_CONFIRM);
       }
       else
       {