mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
I_SetInternalMusicVolume implementation
This commit is contained in:
parent
51228b328c
commit
d5dfde240d
4 changed files with 16 additions and 0 deletions
|
@ -247,6 +247,8 @@ UINT32 I_GetMusicPosition(void);
|
|||
|
||||
boolean I_SetSongTrack(INT32 track);
|
||||
|
||||
void I_SetInternalMusicVolume(UINT8 volume);
|
||||
|
||||
/** \brief The I_StartDigSong function
|
||||
|
||||
\param musicname music lump name
|
||||
|
|
|
@ -1476,6 +1476,11 @@ void S_StopMusic(void)
|
|||
}
|
||||
}
|
||||
|
||||
void S_SetInternalMusicVolume(INT32 volume)
|
||||
{
|
||||
I_SetInternalMusicVolume(min(max(volume, 0), 100));
|
||||
}
|
||||
|
||||
void S_SetDigMusicVolume(INT32 volume)
|
||||
{
|
||||
if (volume < 0 || volume > 31)
|
||||
|
|
|
@ -180,6 +180,7 @@ void S_UpdateSounds(void);
|
|||
|
||||
FUNCMATH fixed_t S_CalculateSoundDistance(fixed_t px1, fixed_t py1, fixed_t pz1, fixed_t px2, fixed_t py2, fixed_t pz2);
|
||||
|
||||
void S_SetInternalMusicVolume(INT32 volume);
|
||||
void S_SetDigMusicVolume(INT32 volume);
|
||||
void S_SetMIDIMusicVolume(INT32 volume);
|
||||
void S_SetSfxVolume(INT32 volume);
|
||||
|
|
|
@ -1160,6 +1160,14 @@ boolean I_SetSongTrack(int track)
|
|||
return false;
|
||||
}
|
||||
|
||||
void I_SetInternalMusicVolume(UINT8 volume)
|
||||
{
|
||||
internal_volume = volume;
|
||||
if (!music)
|
||||
return;
|
||||
Mix_VolumeMusic(get_real_volume(midimode ? midi_volume : music_volume));
|
||||
}
|
||||
|
||||
void I_StopFadingMusic()
|
||||
{
|
||||
if (fading_id)
|
||||
|
|
Loading…
Reference in a new issue