rnd-19980918
[rocksndiamonds.git] / src / game.c
index 0561c22c2afbc7d07601ec8378a241641b99f11e..384d7431d4b14e611113d302da44945d288b0089 100644 (file)
@@ -2041,7 +2041,7 @@ void AmoebeWaechst(int x, int y)
   {
     MovDelay[x][y] = 7;
 
-    if (DelayReached(&sound_delay,sound_delay_value))
+    if (DelayReached(&sound_delay, sound_delay_value))
     {
       PlaySoundLevel(x,y,SND_AMOEBE);
       sound_delay_value = 30;
@@ -2597,8 +2597,8 @@ void GameActions()
   if (PlayerMovPos)
     ScrollFigure(0);
 
-  while(!DelayReached(&action_delay, action_delay_value))
-    Delay(5);
+  /* main game synchronization point */
+  WaitUntilDelayReached(&action_delay, action_delay_value);
 
   if (tape.pausing || (tape.playing && !TapePlayDelay()))
     return;
@@ -2727,7 +2727,7 @@ void GameActions()
     }
   }
 
-  if (TimeLeft>0 && TimeFrames>=(100/GameSpeed) && !tape.pausing)
+  if (TimeLeft>0 && TimeFrames>=(1000/GameSpeed) && !tape.pausing)
   {
     TimeFrames = 0;
     TimeLeft--;