rnd-19981217-3
[rocksndiamonds.git] / src / init.c
index 321875dc2aba3f1a5b042f160a56aee319b2fddf..f2e48bf0b82f5a66d5e173892df1067721b8ddb7 100644 (file)
@@ -17,6 +17,7 @@
 #include "misc.h"
 #include "sound.h"
 #include "screens.h"
+#include "editor.h"
 #include "tools.h"
 #include "files.h"
 #include "joystick.h"
@@ -66,6 +67,7 @@ void OpenAll(int argc, char *argv[])
   InitSoundServer();
   InitJoysticks();
   InitRND(NEW_RANDOMIZE);
+  InitLevelEditorGadgets();
 
   signal(SIGINT, CloseAllAndExit);
   signal(SIGTERM, CloseAllAndExit);
@@ -172,8 +174,9 @@ void InitSound()
   for(i=0; i<NUM_SOUNDS; i++)
   {
 #ifdef MSDOS
-  sprintf(sound_name[i], "%d", i+1);
+    sprintf(sound_name[i], "%d", i + 1);
 #endif
+
     Sound[i].name = sound_name[i];
     if (!LoadSound(&Sound[i]))
     {
@@ -188,10 +191,7 @@ void InitSoundServer()
   if (sound_status == SOUND_OFF)
     return;
 
-#ifdef MSDOS
-  SoundServer();
-  return;
-#endif
+#ifndef MSDOS
 
   if (pipe(sound_pipe)<0)
   {
@@ -216,6 +216,12 @@ void InitSoundServer()
   }
   else                         /* we are parent */
     close(sound_pipe[0]);      /* no reading from pipe needed */
+
+#else /* MSDOS */
+
+  SoundServer();
+
+#endif /* MSDOS */
 }
 
 void InitJoysticks()