rnd-20020803-1-src
[rocksndiamonds.git] / src / tools.c
index a300c84f9ba46c546ba0c694c023655221c06965..e5055eda6513d061b8f6eaab76c1922a3f4f6158 100644 (file)
@@ -1,7 +1,7 @@
 /***********************************************************
 * Rocks'n'Diamonds -- McDuffin Strikes Back!               *
 *----------------------------------------------------------*
-* (c) 1995-2001 Artsoft Entertainment                      *
+* (c) 1995-2002 Artsoft Entertainment                      *
 *               Holger Schemel                             *
 *               Detmolder Strasse 189                      *
 *               33604 Bielefeld                            *
 #include "network.h"
 #include "tape.h"
 
-#if defined(PLATFORM_MSDOS)
-extern boolean wait_for_vsync;
-#endif
-
 /* tool button identifiers */
 #define TOOL_CTRL_ID_YES       0
 #define TOOL_CTRL_ID_NO                1
@@ -2104,10 +2100,11 @@ unsigned int MoveDoor(unsigned int door_state)
   {
     if (!(door_state & DOOR_NO_DELAY))
     {
+      /* opening door sound has priority over simultaneously closing door */
       if (door_state & (DOOR_OPEN_1 | DOOR_OPEN_2))
-       PlaySoundStereo(SND_MENU_DOOR_OPENING, PSND_MAX_RIGHT);
-      if (door_state & (DOOR_CLOSE_1 | DOOR_CLOSE_2))
-       PlaySoundStereo(SND_MENU_DOOR_CLOSING, PSND_MAX_RIGHT);
+       PlaySoundStereo(SND_MENU_DOOR_OPENING, SOUND_MAX_RIGHT);
+      else if (door_state & (DOOR_CLOSE_1 | DOOR_CLOSE_2))
+       PlaySoundStereo(SND_MENU_DOOR_CLOSING, SOUND_MAX_RIGHT);
     }
 
     start = ((door_state & DOOR_NO_DELAY) ? DXSIZE : 0);