Skip to content

Commit

Permalink
remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiangreffrath committed May 1, 2024
1 parent fc6a734 commit ec8fd68
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 96 deletions.
94 changes: 0 additions & 94 deletions rott/rt_sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,54 +368,6 @@ int SD_Play3D ( int sndnum, int angle, int distance )

}

//***************************************************************************
//
// SD_PlayPositionedSound - Play a positioned sample
//
//***************************************************************************

int SD_PlayPositionedSound ( int sndnum, int px, int py, int x, int y )
{
int voice;
int angle;
int distance;
int dx;
int dy;
int pitch;

if ( SD_SoundOkay ( sndnum ) == false )
return 0;

dx=(x-px);
dy=(py-y);

distance=FindDistance(dx,dy) >> SD_DISTANCESHIFT;

if (distance>255)
return 0;

if (distance!=0)
{
angle = ( atan2_appx(dx,dy) & (FINEANGLES-1) ) >> 6;
}
else
{
angle=0;
}

pitch = 0;

if ( !( sounds[ sndnum ].flags & SD_PITCHSHIFTOFF ) )
{
pitch = PitchOffset();
}

voice = SD_PlayIt ( sndnum, angle, distance, pitch );

return voice;

}

//***************************************************************************
//
// SD_PlaySoundRTP - Play a positioned sample relative to the player
Expand Down Expand Up @@ -577,52 +529,6 @@ void SD_SetPan ( int handle, int vol, int left, int right )
}
}

//***************************************************************************
//
// SD_PanPositioned Sound - pan a positioned sample
//
//***************************************************************************

void SD_PanPositionedSound ( int handle, int px, int py, int x, int y )
{
int angle;
int distance;
int dx;
int dy;
int status;

if (SD_Started==false)
return;

if (!FX_SoundActive(handle))
return;

dx=(x-px);
dy=(py-y);

distance=FindDistance(dx,dy) >> SD_DISTANCESHIFT;

if (distance>255)
return;

if (distance!=0)
{
angle = ( atan2_appx(dx,dy) & (FINEANGLES-1) ) >> 6;
}
else
{
angle = 0;
}

status=FX_Pan3D( handle, angle, distance );

if (status != FX_Ok)
{
//TODO: This code does nothing.
}
}


//***************************************************************************
//
// SD_StopSound - Stop the current sound from playing
Expand Down
2 changes: 0 additions & 2 deletions rott/rt_sound.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,7 @@ int SD_Startup ( boolean bombonerror );
int SD_Play ( int sndnum );
void SD_Shutdown (void);

int SD_PlayPositionedSound ( int sndnum, int px, int py, int x, int y );
int SD_PlaySoundRTP ( int sndnum, int x, int y );
void SD_PanPositionedSound ( int handle, int px, int py, int x, int y );
void SD_PanRTP ( int handle, int x, int y );
void SD_SetPan ( int handle, int vol, int left, int right );
int SD_Play3D ( int sndnum, int angle, int distance );
Expand Down

0 comments on commit ec8fd68

Please sign in to comment.