rnd-20100313-1-src
[rocksndiamonds.git] / src / game_sp / Sound.c
index 3965e752ac3692399de8f49d72bce60e59f54c27..1284e58c30988017e6e0a98e72ee4867d5bd301b 100644 (file)
@@ -4,12 +4,15 @@
 
 #include "Sound.h"
 
-static char *VB_Name = "modSound";
+// static char *VB_Name = "modSound";
+
 // --- Option Explicit
 
 int MusicOnFlag;
 int FXOnFlag;
 
+#if 0
+
 DirectSoundBuffer ZonkFX[1 + 1];
 DirectSoundBuffer InfotronFX[1 + 1];
 DirectSoundBuffer BugFX[1 + 1];
@@ -18,10 +21,13 @@ DirectSoundBuffer PushFX;
 DirectSoundBuffer ExitFX;
 DirectSoundBuffer BaseFX;
 
-#if 0
+#endif
 
 void LoadSoundFX()
 {
+
+#if 0
+
   DSBUFFERDESC bufferDesc;
   WAVEFORMATEX waveFormat;
   char *FName;
@@ -47,12 +53,15 @@ void LoadSoundFX()
   ExitFX = DSound.CreateSoundBufferFromFile(CAT(FName, "Exit.wav"), bufferDesc, waveFormat);
   PushFX = DSound.CreateSoundBufferFromFile(CAT(FName, "Push.wav"), bufferDesc, waveFormat);
   //  FXOnFlag = 0
-}
 
 #endif
 
+}
+
 void subSoundFXZonk()
 {
+#if 0
+
   int i;
 
   if (FXOnFlag == 0)
@@ -69,10 +78,14 @@ void subSoundFXZonk()
       }
     }
   }
+
+#endif
 }
 
 void subSoundFXBug()
 {
+#if 0
+
   int i;
 
   if (FXOnFlag == 0)
@@ -89,10 +102,14 @@ void subSoundFXBug()
       }
     }
   }
+
+#endif
 }
 
 void subSoundFXInfotron()
 {
+#if 0
+
   int i;
 
   if (FXOnFlag == 0)
@@ -109,10 +126,14 @@ void subSoundFXInfotron()
       }
     }
   }
+
+#endif
 }
 
 void subSoundFXExplosion()
 {
+#if 0
+
   int i;
 
   if (FXOnFlag == 0)
@@ -129,10 +150,14 @@ void subSoundFXExplosion()
       }
     }
   }
+
+#endif
 }
 
 void subSoundFXBase()
 {
+#if 0
+
   if (FXOnFlag == 0)
     return;
 
@@ -143,10 +168,14 @@ void subSoundFXBase()
   {
     BaseFX.Play DSBPLAY_DEFAULT;
   }
+
+#endif
 }
 
 void subSoundFXPush()
 {
+#if 0
+
   if (FXOnFlag == 0)
     return;
 
@@ -157,10 +186,14 @@ void subSoundFXPush()
   {
     PushFX.Play DSBPLAY_DEFAULT;
   }
+
+#endif
 }
 
 void subSoundFXExit()
 {
+#if 0
+
   if (FXOnFlag == 0)
     return;
 
@@ -171,6 +204,16 @@ void subSoundFXExit()
   {
     ExitFX.Play DSBPLAY_DEFAULT;
   }
+
+#endif
+}
+
+void subSoundFX(int si, int element, int action)
+{
+  int x = GetX(si);
+  int y = GetY(si);
+
+  PlayLevelSound_SP(x, y, element, action);
 }
 
 void subMusicInit()