rnd-20010715-2-src
authorHolger Schemel <info@artsoft.org>
Sun, 15 Jul 2001 16:58:40 +0000 (18:58 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:36:01 +0000 (10:36 +0200)
CHANGES
src/files.c
src/game.c

diff --git a/CHANGES b/CHANGES
index 1f8ef0055d7bb2cc9a9524e77beb4d47f088ec79..a919d97c5fe24070385e5547a1acaa48a0630fe2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,8 @@ Release Version 2.0.1 [?? ??? 2001]
          + infotrons kill electrons and snik snaks and trigger orange disks
          + explosion chain reactions are now a bit slower than murphy
        - behaviour of robots adjusted to make them less aggressive
+        - icon for Windows executable added
+        - bug when selecting default level series fixed
 
 Release Version 2.0.0 [01 JAN 2001]
 -----------------------------------
index 226cab31face1b9965a5bcb0e3f4601a97bda121..d78ec4f16b1df20e4e3a9e6bdb5806ac6459e75e 100644 (file)
@@ -2077,7 +2077,7 @@ void LoadLevelSetup_LastSeries()
   struct SetupFileList *level_setup_list = NULL;
 
   /* always start with reliable default values */
-  leveldir_current = leveldir_first;
+  leveldir_current = getFirstValidLevelSeries(leveldir_first);
 
   /* ----------------------------------------------------------------------- */
   /* ~/.rocksndiamonds/levelsetup.conf                                       */
index 37608e5d5152f84946ad85f2d1c5e92a344d5606..3db4e1bc77d9d44717e3c7e1b913be7b625fbe07 100644 (file)
@@ -4292,51 +4292,6 @@ static void PlayerActions(struct PlayerInfo *player, byte player_action)
   }
 }
 
-static void sleep_milliseconds_x(unsigned long milliseconds_delay)
-{
-  boolean do_busy_waiting = (milliseconds_delay < 5 ? TRUE : FALSE);
-
-#if defined(PLATFORM_MSDOS)
-  /* don't use select() to perform waiting operations under DOS/Windows
-     environment; always use a busy loop for waiting instead */
-  do_busy_waiting = TRUE;
-#endif
-
-
-
-  do_busy_waiting = TRUE;
-
-
-
-  if (do_busy_waiting)
-  {
-    /* we want to wait only a few ms -- if we assume that we have a
-       kernel timer resolution of 10 ms, we would wait far to long;
-       therefore it's better to do a short interval of busy waiting
-       to get our sleeping time more accurate */
-
-    unsigned long base_counter = Counter(), actual_counter = Counter();
-
-    while (actual_counter < base_counter + milliseconds_delay &&
-          actual_counter >= base_counter)
-      actual_counter = Counter();
-  }
-  else
-  {
-#if defined(TARGET_SDL)
-    SDL_Delay(milliseconds_delay);
-#else
-    struct timeval delay;
-
-    delay.tv_sec  = milliseconds_delay / 1000;
-    delay.tv_usec = 1000 * (milliseconds_delay % 1000);
-
-    if (select(0, NULL, NULL, NULL, &delay) != 0)
-      Error(ERR_WARN, "sleep_milliseconds(): select() failed");
-#endif
-  }
-}
-
 void GameActions()
 {
   static unsigned long action_delay = 0;
@@ -4354,45 +4309,7 @@ void GameActions()
 
   /* ---------- main game synchronization point ---------- */
 
-
-
-#if 1
-    WaitUntilDelayReached(&action_delay, action_delay_value);
-#else
-  {
-    unsigned long count1 = SDL_GetTicks(), count2, current_ms, test;
-
-    /*
-    WaitUntilDelayReached(&action_delay, action_delay_value);
-    */
-
-    /*
-    SDL_Delay(20);
-    */
-
-    /*
-    sleep_milliseconds_x(20);
-    */
-
-    current_ms = SDL_GetTicks();
-    test = -1;
-    while (current_ms < count1 + 20)
-    {
-      current_ms = SDL_GetTicks();             /* busy wait! */
-
-      if (test != current_ms)
-      {
-       Error(ERR_RETURN, "current_ms == %ld", current_ms);
-       test = current_ms;
-      }
-    }
-
-    count2 = SDL_GetTicks();
-    Error(ERR_RETURN, "delay == %ld", count2 - count1);
-  }
-#endif
-
-
+  WaitUntilDelayReached(&action_delay, action_delay_value);
 
   if (network_playing && !network_player_action_received)
   {