Refactor I_MusicType MusicPlaying and MusicPaused -> I_SongType ...

(cherry picked from commit 4b82de9e540d6dc0651bbe8db8e5e15cba39f650)
This commit is contained in:
mazmazz 2018-08-23 20:14:46 -04:00
parent d535c14fc6
commit eacf0ba00b
3 changed files with 16 additions and 16 deletions

View File

@ -136,9 +136,9 @@ void I_ShutdownMusic(void);
// MUSIC PROPERTIES
/// ------------------------
musictype_t I_MusicType(void);
boolean I_MusicPlaying(void);
boolean I_MusicPaused(void);
musictype_t I_SongType(void);
boolean I_SongPlaying(void);
boolean I_SongPaused(void);
/// ------------------------
// MUSIC EFFECTS

View File

@ -1239,22 +1239,22 @@ boolean S_MusicDisabled(void)
boolean S_MusicPlaying(void)
{
return I_MusicPlaying();
return I_SongPlaying();
}
boolean S_MusicPaused(void)
{
return I_MusicPaused();
return I_SongPaused();
}
musictype_t S_MusicType(void)
{
return I_MusicType();
return I_SongType();
}
boolean S_MusicInfo(char *mname, UINT16 *mflags, boolean *looping)
{
if (!I_MusicPlaying())
if (!I_SongPlaying())
return false;
strncpy(mname, music_name, 7);
@ -1399,10 +1399,10 @@ void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping)
void S_StopMusic(void)
{
if (!I_MusicPlaying())
if (!I_SongPlaying())
return;
if (I_MusicPaused())
if (I_SongPaused())
I_ResumeSong();
S_SpeedMusic(1.0f);
@ -1421,7 +1421,7 @@ void S_StopMusic(void)
//
void S_PauseAudio(void)
{
if (I_MusicPlaying() && !I_MusicPaused())
if (I_SongPlaying() && !I_SongPaused())
I_PauseSong();
// pause cd music
@ -1434,7 +1434,7 @@ void S_PauseAudio(void)
void S_ResumeAudio(void)
{
if (I_MusicPlaying() && I_MusicPaused())
if (I_SongPlaying() && I_SongPaused())
I_ResumeSong();
// resume cd music
@ -1462,7 +1462,7 @@ void S_SetMusicVolume(INT32 digvolume, INT32 seqvolume)
digvolume = seqvolume = 31;
#endif
switch(I_MusicType())
switch(I_SongType())
{
case MU_MID:
case MU_MOD:

View File

@ -503,7 +503,7 @@ void I_ShutdownMusic(void)
/// Music Properties
/// ------------------------
musictype_t I_MusicType(void)
musictype_t I_SongType(void)
{
#ifdef HAVE_LIBGME
if (gme)
@ -522,12 +522,12 @@ musictype_t I_MusicType(void)
return (musictype_t)Mix_GetMusicType(music);
}
boolean I_MusicPlaying(void)
boolean I_SongPlaying(void)
{
return (boolean)music;
}
boolean I_MusicPaused(void)
boolean I_SongPaused(void)
{
return songpaused;
}
@ -772,7 +772,7 @@ void I_SetMusicVolume(UINT8 volume)
return;
#ifdef _WIN32
if (I_MusicType() == MU_MID)
if (I_SongType() == MU_MID)
// HACK: Until we stop using native MIDI,
// disable volume changes
music_volume = 31;