]> cvs.zerfleddert.de Git - micropolis/blobdiff - src/sim/w_sound.c
add ugly sdl_helper to automagically find and enable SDL_mixer
[micropolis] / src / sim / w_sound.c
index f1641e8fdb9d6b89e15cb6621cb7d576caa4000f..1c112023a6f4fa8275cf40c89d989248f33eab18 100644 (file)
  * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY
  * NOT APPLY TO YOU.
  */
-#include <SDL/SDL.h>
-#include <SDL/SDL_mixer.h>
+#ifdef WITH_SDL_MIXER
+#include "SDL.h"
+#include "SDL_mixer.h"
+#endif
+
 #include "sim.h"
 
 
 struct sound {
   char *id;
   char *file;
+#ifdef WITH_SDL_MIXER
   Mix_Chunk *wave;
+#else
+  void *wave;
+#endif
 };
 
 struct sound sounds[SIM_NSOUNDS] = {
@@ -129,10 +136,12 @@ struct sound sounds[SIM_NSOUNDS] = {
   { "Zone",            "zone.wav",             NULL }
 };
 
+static int SoundInitialized = 0;
+
+#ifdef WITH_SDL_MIXER
 /* Sound routines */
 
 
-int SoundInitialized = 0;
 Mix_Chunk *rumble;
 
 
@@ -257,6 +266,32 @@ StopBulldozer(void)
   Mix_HaltChannel(DOZER_CHANNEL);
 }
 
+#else /* WITH_SDL_MIXER */
+InitializeSound()
+{
+}
+
+ShutDownSound()
+{
+}
+
+MakeSound(char *channel, char *id)
+{
+}
+
+MakeSoundOn(SimView *view, char *channel, char *id)
+{
+}
+
+StartBulldozer(void)
+{
+}
+
+StopBulldozer(void)
+{
+}
+#endif
+
 
 /* XXX comefrom: doKeyEvent */
 SoundOff(void)
Impressum, Datenschutz