Refactor I_MusicType MusicPlaying and MusicPaused -> I_SongType ...
(cherry picked from commit 4b82de9e54
)
This commit is contained in:
parent
d535c14fc6
commit
eacf0ba00b
|
@ -136,9 +136,9 @@ void I_ShutdownMusic(void);
|
||||||
// MUSIC PROPERTIES
|
// MUSIC PROPERTIES
|
||||||
/// ------------------------
|
/// ------------------------
|
||||||
|
|
||||||
musictype_t I_MusicType(void);
|
musictype_t I_SongType(void);
|
||||||
boolean I_MusicPlaying(void);
|
boolean I_SongPlaying(void);
|
||||||
boolean I_MusicPaused(void);
|
boolean I_SongPaused(void);
|
||||||
|
|
||||||
/// ------------------------
|
/// ------------------------
|
||||||
// MUSIC EFFECTS
|
// MUSIC EFFECTS
|
||||||
|
|
|
@ -1239,22 +1239,22 @@ boolean S_MusicDisabled(void)
|
||||||
|
|
||||||
boolean S_MusicPlaying(void)
|
boolean S_MusicPlaying(void)
|
||||||
{
|
{
|
||||||
return I_MusicPlaying();
|
return I_SongPlaying();
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean S_MusicPaused(void)
|
boolean S_MusicPaused(void)
|
||||||
{
|
{
|
||||||
return I_MusicPaused();
|
return I_SongPaused();
|
||||||
}
|
}
|
||||||
|
|
||||||
musictype_t S_MusicType(void)
|
musictype_t S_MusicType(void)
|
||||||
{
|
{
|
||||||
return I_MusicType();
|
return I_SongType();
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean S_MusicInfo(char *mname, UINT16 *mflags, boolean *looping)
|
boolean S_MusicInfo(char *mname, UINT16 *mflags, boolean *looping)
|
||||||
{
|
{
|
||||||
if (!I_MusicPlaying())
|
if (!I_SongPlaying())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
strncpy(mname, music_name, 7);
|
strncpy(mname, music_name, 7);
|
||||||
|
@ -1399,10 +1399,10 @@ void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping)
|
||||||
|
|
||||||
void S_StopMusic(void)
|
void S_StopMusic(void)
|
||||||
{
|
{
|
||||||
if (!I_MusicPlaying())
|
if (!I_SongPlaying())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (I_MusicPaused())
|
if (I_SongPaused())
|
||||||
I_ResumeSong();
|
I_ResumeSong();
|
||||||
|
|
||||||
S_SpeedMusic(1.0f);
|
S_SpeedMusic(1.0f);
|
||||||
|
@ -1421,7 +1421,7 @@ void S_StopMusic(void)
|
||||||
//
|
//
|
||||||
void S_PauseAudio(void)
|
void S_PauseAudio(void)
|
||||||
{
|
{
|
||||||
if (I_MusicPlaying() && !I_MusicPaused())
|
if (I_SongPlaying() && !I_SongPaused())
|
||||||
I_PauseSong();
|
I_PauseSong();
|
||||||
|
|
||||||
// pause cd music
|
// pause cd music
|
||||||
|
@ -1434,7 +1434,7 @@ void S_PauseAudio(void)
|
||||||
|
|
||||||
void S_ResumeAudio(void)
|
void S_ResumeAudio(void)
|
||||||
{
|
{
|
||||||
if (I_MusicPlaying() && I_MusicPaused())
|
if (I_SongPlaying() && I_SongPaused())
|
||||||
I_ResumeSong();
|
I_ResumeSong();
|
||||||
|
|
||||||
// resume cd music
|
// resume cd music
|
||||||
|
@ -1462,7 +1462,7 @@ void S_SetMusicVolume(INT32 digvolume, INT32 seqvolume)
|
||||||
digvolume = seqvolume = 31;
|
digvolume = seqvolume = 31;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch(I_MusicType())
|
switch(I_SongType())
|
||||||
{
|
{
|
||||||
case MU_MID:
|
case MU_MID:
|
||||||
case MU_MOD:
|
case MU_MOD:
|
||||||
|
|
|
@ -503,7 +503,7 @@ void I_ShutdownMusic(void)
|
||||||
/// Music Properties
|
/// Music Properties
|
||||||
/// ------------------------
|
/// ------------------------
|
||||||
|
|
||||||
musictype_t I_MusicType(void)
|
musictype_t I_SongType(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBGME
|
#ifdef HAVE_LIBGME
|
||||||
if (gme)
|
if (gme)
|
||||||
|
@ -522,12 +522,12 @@ musictype_t I_MusicType(void)
|
||||||
return (musictype_t)Mix_GetMusicType(music);
|
return (musictype_t)Mix_GetMusicType(music);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean I_MusicPlaying(void)
|
boolean I_SongPlaying(void)
|
||||||
{
|
{
|
||||||
return (boolean)music;
|
return (boolean)music;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean I_MusicPaused(void)
|
boolean I_SongPaused(void)
|
||||||
{
|
{
|
||||||
return songpaused;
|
return songpaused;
|
||||||
}
|
}
|
||||||
|
@ -772,7 +772,7 @@ void I_SetMusicVolume(UINT8 volume)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (I_MusicType() == MU_MID)
|
if (I_SongType() == MU_MID)
|
||||||
// HACK: Until we stop using native MIDI,
|
// HACK: Until we stop using native MIDI,
|
||||||
// disable volume changes
|
// disable volume changes
|
||||||
music_volume = 31;
|
music_volume = 31;
|
||||||
|
|
Loading…
Reference in New Issue