rnd-20000807-1-src
authorHolger Schemel <info@artsoft.org>
Mon, 7 Aug 2000 08:51:23 +0000 (10:51 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:34:46 +0000 (10:34 +0200)
src/init.c
src/main.h
src/screens.c
src/sound.c

index 92f52c568d337d766e2a69e22956caefdf048290..64f748019cac0e9050ef5048b0939bb616c9a7c1 100644 (file)
@@ -210,19 +210,8 @@ void InitSound()
 
   for(i=0; i<NUM_SOUNDS; i++)
   {
-#ifdef MSDOS
-    sprintf(sound_name[i], "%d", i + 1);
-#endif
-
-#ifdef USE_SDL_LIBRARY
-    {
-      char *str = getStringCopy(sound_name[i]);
-      sprintf(str, "%d", i + 1);
-      Sound[i].name = str;
-    }
-#else
     Sound[i].name = sound_name[i];
-#endif
+
     if (!LoadSound(&Sound[i]))
     {
       sound_status = SOUND_OFF;
index b21ac5d653cb1dfcd940cd6bec7a0e69758107ed..c46bf476c3c8c8ee56a9cdf4bb8598b2759d6c0d 100644 (file)
@@ -1653,7 +1653,7 @@ extern char               *element_info[];
 #define PROGRAM_TITLE_STRING   "Rocks'n'Diamonds"
 #define PROGRAM_AUTHOR_STRING  "Holger Schemel"
 #define WINDOW_TITLE_STRING    PROGRAM_TITLE_STRING " " PROGRAM_VERSION_STRING
-#define COPYRIGHT_STRING       "Copyright ^1995-99 by " PROGRAM_AUTHOR_STRING
+#define COPYRIGHT_STRING       "Copyright ^1995-2000 by " PROGRAM_AUTHOR_STRING
 
 /* default name for empty highscore entry */
 #define EMPTY_PLAYER_NAME      "no name"
index 948f1ceb73602a5bbdfda6c0c2161be133678c15..eb550cb9406818e3951927ce27bd262067302109 100644 (file)
@@ -686,7 +686,7 @@ void DrawHelpScreenCreditsText()
   DrawTextFCentered(100, FC_GREEN,
                    "Credits:");
   DrawTextFCentered(ystart + 0 * ystep, FC_YELLOW,
-                   "DOS/Windows port of the game:");
+                   "DOS port of the game:");
   DrawTextFCentered(ystart + 1 * ystep, FC_RED,
                    "Guido Schulz");
   DrawTextFCentered(ystart + 2 * ystep, FC_YELLOW,
@@ -716,13 +716,13 @@ void DrawHelpScreenContactText()
   DrawTextFCentered(ystart + 1 * ystep, FC_YELLOW,
                    "If you like it, send e-mail to:");
   DrawTextFCentered(ystart + 2 * ystep, FC_RED,
-                   "aeglos@valinor.owl.de");
+                   "info@artsoft.org");
   DrawTextFCentered(ystart + 3 * ystep, FC_YELLOW,
                    "or SnailMail to:");
   DrawTextFCentered(ystart + 4 * ystep + 0, FC_RED,
                    "Holger Schemel");
   DrawTextFCentered(ystart + 4 * ystep + 20, FC_RED,
-                   "Oststrasse 11a");
+                   "Detmolder Strasse 189");
   DrawTextFCentered(ystart + 4 * ystep + 40, FC_RED,
                    "33604 Bielefeld");
   DrawTextFCentered(ystart + 4 * ystep + 60, FC_RED,
@@ -2215,6 +2215,8 @@ void CalibrateJoystick(int player_nr)
 
       NextEvent(&event);
       HandleOtherEvents(&event);
+
+      Delay(10);
     }
   }
   return;
index e89a153fd665db256c4306e1c231632227e83446..d2cdbc724d0e9d781aa664bd7d03d8f60e199b4c 100644 (file)
@@ -830,17 +830,6 @@ void PlaySoundExt(int nr, int volume, int stereo, boolean loop)
 {
   struct SoundControl snd_ctrl = emptySoundControl;
 
-#ifdef USE_SDL_LIBRARY
-  Mix_PlayChannel(-1, Sound[nr].mix_chunk, 0);
-
-  /*
-  Mix_Volume(-1, SDL_MIX_MAXVOLUME / 4);
-  Mix_VolumeMusic(SDL_MIX_MAXVOLUME / 4);
-  */
-
-  return;
-#endif
-
   if (sound_status==SOUND_OFF || !setup.sound)
     return;
 
@@ -862,6 +851,14 @@ void PlaySoundExt(int nr, int volume, int stereo, boolean loop)
   snd_ctrl.data_ptr    = Sound[nr].data_ptr;
   snd_ctrl.data_len    = Sound[nr].data_len;
 
+#ifdef USE_SDL_LIBRARY
+
+  Mix_Volume(-1, SDL_MIX_MAXVOLUME / 4);
+  Mix_VolumeMusic(SDL_MIX_MAXVOLUME / 4);
+
+  Mix_PlayChannel(-1, Sound[nr].mix_chunk, (loop ? -1 : 0));
+
+#else
 #ifndef MSDOS
   if (write(sound_pipe[1], &snd_ctrl, sizeof(snd_ctrl))<0)
   {
@@ -872,6 +869,7 @@ void PlaySoundExt(int nr, int volume, int stereo, boolean loop)
 #else
   sound_handler(snd_ctrl);
 #endif
+#endif
 }
 
 void FadeSound(int nr)
@@ -898,11 +896,6 @@ void StopSoundExt(int nr, int method)
 {
   struct SoundControl snd_ctrl = emptySoundControl;
 
-#ifdef USE_SDL_LIBRARY
-  Mix_HaltMusic();
-  return;
-#endif
-
   if (sound_status==SOUND_OFF)
     return;
 
@@ -917,6 +910,20 @@ void StopSoundExt(int nr, int method)
     snd_ctrl.stop_sound = TRUE;
   }
 
+#ifdef USE_SDL_LIBRARY
+
+  if (SSND_FADING(method))
+  {
+    Mix_FadeOutChannel(-1, 1000);
+    Mix_FadeOutMusic(1000);
+  }
+  else
+  {
+    Mix_HaltChannel(-1);
+    Mix_HaltMusic();
+  }
+
+#else
 #ifndef MSDOS
   if (write(sound_pipe[1], &snd_ctrl, sizeof(snd_ctrl))<0)
   {
@@ -927,6 +934,7 @@ void StopSoundExt(int nr, int method)
 #else
   sound_handler(snd_ctrl);
 #endif
+#endif
 }
 
 void FreeSounds(int num_sounds)