shithub: rott

Download patch

ref: c645b7d68aa287db6eb9e193e2c0f67d4e8f1115
parent: 56730b276d5f608d57ad010a9bac168e1e68520b
author: Marc-Alexandre Espiaut <marcalexandre@member.fsf.org>
date: Tue Jun 5 08:17:25 EDT 2018

Removing obsolete *TEST and DEVELOPMENT code from rt_sound.c

--- a/rott/rt_sound.c
+++ b/rott/rt_sound.c
@@ -314,12 +314,6 @@
     int voice;
     byte * snd;
 
-#if (DEVELOPMENT == 1)
-#if (SOUNDTEST == 1)
-    SoftError("SOUND =%d \n",sndnum);
-#endif
-#endif
-
     if (!(sounds[sndnum].flags & SD_WRITE))
     {
         if (sounds[sndnum].count)
@@ -353,17 +347,6 @@
 
     if ( voice < FX_Ok )
     {
-#if (DEVELOPMENT == 1)
-        /*
-              if (MV_ErrorCode == MV_InvalidVOCFile)
-                 {
-                 Error("SD_PlayIt: Invalid VOC File snd=%p sndnum=%ld lump=%ld\n",snd,sndnum,SoundNumber(sndnum));
-                 }
-        */
-        NumBadSounds++;
-        SoftError("SD_PlayIt: Error/Warning %s\n",FX_ErrorString( FX_Error ));
-        SoftError("BadSoundNumber %ld time %ld\n",NumBadSounds,GetTicCount());
-#endif
         SD_MakeCacheable( sndnum );
 
         return 0;
@@ -565,14 +548,6 @@
 
     if (!FX_SoundActive(sndnum))
         return;
-
-    status=FX_SetPitch( sndnum, pitch );
-    if (status != FX_Ok)
-    {
-#if (DEVELOPMENT == 1)
-        SoftError("SD_SetSoundPitch : %s\n",FX_ErrorString( status ));
-#endif
-    }
 }
 
 //***************************************************************************
@@ -611,15 +586,6 @@
     {
         angle = 0;
     }
-
-    status = FX_Pan3D ( handle, angle, distance );
-
-    if (status != FX_Ok)
-    {
-#if (DEVELOPMENT == 1)
-        SoftError("SD_PanPositionedSound: %s\n",FX_ErrorString( status ));
-#endif
-    }
 }
 
 //***************************************************************************
@@ -637,15 +603,6 @@
 
     if (!FX_SoundActive(handle))
         return;
-
-    status=FX_SetPan( handle, vol, left, right );
-
-    if (status != FX_Ok)
-    {
-#if (DEVELOPMENT == 1)
-        SoftError("SD_SetPan: %s\n",FX_ErrorString( status ));
-#endif
-    }
 }
 
 //***************************************************************************
@@ -684,15 +641,6 @@
     {
         angle = 0;
     }
-
-    status=FX_Pan3D( handle, angle, distance );
-
-    if (status != FX_Ok)
-    {
-#if (DEVELOPMENT == 1)
-        SoftError("SD_PanPositionedSound: %s\n",FX_ErrorString( status ));
-#endif
-    }
 }
 
 
@@ -708,15 +656,6 @@
 
     if (SD_Started==false)
         return;
-
-    status=FX_StopSound( handle);
-
-    if (status != FX_Ok)
-    {
-#if (DEVELOPMENT == 1)
-        SoftError("SD_StopSound: %s\n",FX_ErrorString( status ));
-#endif
-    }
 }
 
 //***************************************************************************
@@ -731,15 +670,6 @@
 
     if (SD_Started==false)
         return;
-
-    status=FX_StopAllSounds();
-
-    if (status != FX_Ok)
-    {
-#if (DEVELOPMENT == 1)
-        SoftError("SD_StopAllSounds: %s\n",FX_ErrorString( status ));
-#endif
-    }
 }
 
 //***************************************************************************
@@ -1174,9 +1104,6 @@
         return;
     if (!MUSIC_SongPlaying())
     {
-#if (DEVELOPMENT == 1)
-        SoftError("Called FadeOut with no song playing\n");
-#endif
         return;
     }
     MUSIC_FadeVolume(0,time);