rnd-20061003-2-src
[rocksndiamonds.git] / src / game.c
index 7eb62bb5e561e858081b24affaa96ea72dec3edc..00dff5ed483e1e6b23e21934daf10c7915072d99 100644 (file)
         (e) == EL_TRIGGER_CE_SCORE ? (ch)->actual_trigger_ce_score  :  \
         (e) == EL_CURRENT_CE_VALUE ? (cv) :                            \
         (e) == EL_CURRENT_CE_SCORE ? (cs) :                            \
-        (e) >= EL_LAST_CE_8 && (e) <= EL_NEXT_CE_8 ?                   \
+        (e) >= EL_PREV_CE_8 && (e) <= EL_NEXT_CE_8 ?                   \
         RESOLVED_REFERENCE_ELEMENT(be, e) :                            \
         (e))
 
@@ -2445,6 +2445,13 @@ void InitGame()
     }
   }
 
+#if 1
+  UnmapAllGadgets();
+
+  MapGameButtons();
+  MapTapeButtons();
+#endif
+
   game.restart_level = FALSE;
 }
 
@@ -2793,7 +2800,11 @@ void GameEnd()
     TapeStop();
 #endif
 
+#if 1
+    SaveTapeChecked(tape.level_nr);    /* ask to save tape */
+#else
     SaveTape(tape.level_nr);           /* ask to save tape */
+#endif
   }
 
   if (level_editor_test_game)
@@ -12546,10 +12557,6 @@ static void SaveEngineSnapshotValues_RND()
       engine_snapshot_rnd.belt_anim_mode[i * 4 + j] = anim_mode;
     }
   }
-
-#if 0
-  printf("::: SAVE: %d RNDs\n", game.num_random_calls);
-#endif
 }
 
 static void LoadEngineSnapshotValues_RND()
@@ -12582,10 +12589,6 @@ static void LoadEngineSnapshotValues_RND()
     }
   }
 
-#if 0
-  printf("::: LOADING ... : %d RNDs\n", num_random_calls);
-#endif
-
   if (level.game_engine_type == GAME_ENGINE_TYPE_RND)
   {
     InitRND(tape.random_seed);
@@ -12600,10 +12603,6 @@ static void LoadEngineSnapshotValues_RND()
     Error(ERR_RETURN, "number of random calls is %d", game.num_random_calls);
     Error(ERR_EXIT, "this should not happen -- please debug");
   }
-
-#if 0
-  printf("::: LOADED: %d RNDs\n", num_random_calls);
-#endif
 }
 
 static void SaveEngineSnapshotBuffer(void *buffer, int size)