rnd-19981204-1
[rocksndiamonds.git] / src / game.c
index 8b5d2a79f7a5cc4bc6e2f5305540b9c45ad61c51..26cc84cc2a8a61d0e95a9cd347f74368a549ebff 100644 (file)
 /* to control special behaviour of certain game elements */
 int game_emulation = EMU_NONE;
 
-
-
-#ifdef DEBUG
-#if 0
-static unsigned int getStateCheckSum(int counter)
-{
-  int x, y;
-  unsigned int mult = 1;
-  unsigned int checksum = 0;
-  /*
-  static short lastFeld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-  */
-  static boolean first_game = TRUE;
-
-  for (y=0; y<lev_fieldy; y++) for(x=0; x<lev_fieldx; x++)
-  {
-    /*
-    if (counter == 3)
-    {
-      if (first_game)
-       lastFeld[x][y] = Feld[x][y];
-      else if (lastFeld[x][y] != Feld[x][y])
-       printf("DIFF: [%d][%d]: lastFeld == %d != %d == Feld\n",
-              x, y, lastFeld[x][y], Feld[x][y]);
-    }
-    */
-
-    checksum += mult++ * Ur[x][y];
-    checksum += mult++ * Feld[x][y];
-
-    /*
-    checksum += mult++ * MovPos[x][y];
-    checksum += mult++ * MovDir[x][y];
-    checksum += mult++ * MovDelay[x][y];
-    checksum += mult++ * Store[x][y];
-    checksum += mult++ * Store2[x][y];
-    checksum += mult++ * StorePlayer[x][y];
-    checksum += mult++ * Frame[x][y];
-    checksum += mult++ * AmoebaNr[x][y];
-    checksum += mult++ * JustHit[x][y];
-    checksum += mult++ * Stop[x][y];
-    */
-  }
-
-  if (counter == 3 && first_game)
-    first_game = FALSE;
-
-  return checksum;
-}
-#endif
-#endif
-
-
-
 void GetPlayerConfig()
 {
   if (sound_status == SOUND_OFF)
@@ -2421,8 +2367,8 @@ void AmoebeUmwandeln2(int ax, int ay, int new_element)
 
 void AmoebeWaechst(int x, int y)
 {
-  static long sound_delay = 0;
-  static int sound_delay_value = 0;
+  static unsigned long sound_delay = 0;
+  static unsigned long sound_delay_value = 0;
 
   if (!MovDelay[x][y])         /* start new growing cycle */
   {
@@ -3111,8 +3057,8 @@ static void PlayerActions(struct PlayerInfo *player, byte player_action)
 
 void GameActions()
 {
-  static long action_delay = 0;
-  long action_delay_value;
+  static unsigned long action_delay = 0;
+  unsigned long action_delay_value;
   int sieb_x = 0, sieb_y = 0;
   int i, x, y, element;
   byte *recorded_player_action;
@@ -3143,9 +3089,6 @@ void GameActions()
 #if 1
   WaitUntilDelayReached(&action_delay, action_delay_value);
 #else
-  /*
-  while (!DelayReached(&action_delay, action_delay_value));
-  */
 
   while (!DelayReached(&action_delay, action_delay_value))
   {
@@ -3157,7 +3100,6 @@ void GameActions()
   }
   print_debug("done");
 
-
 #endif
 
 
@@ -3742,7 +3684,7 @@ void ScrollFigure(struct PlayerInfo *player, int mode)
 
 void ScrollScreen(struct PlayerInfo *player, int mode)
 {
-  static long screen_frame_counter = 0;
+  static unsigned long screen_frame_counter = 0;
 
   if (mode == SCROLL_INIT)
   {