mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Refactor I_MusicType MusicPlaying and MusicPaused -> I_SongType ...
This commit is contained in:
parent
cf065e106f
commit
4b82de9e54
3 changed files with 16 additions and 16 deletions
|
@ -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
|
||||
|
|
|
@ -1371,22 +1371,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);
|
||||
|
@ -1515,10 +1515,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);
|
||||
|
@ -1543,7 +1543,7 @@ void S_StopMusic(void)
|
|||
//
|
||||
void S_PauseAudio(void)
|
||||
{
|
||||
if (I_MusicPlaying() && !I_MusicPaused())
|
||||
if (I_SongPlaying() && !I_SongPaused())
|
||||
I_PauseSong();
|
||||
|
||||
// pause cd music
|
||||
|
@ -1556,7 +1556,7 @@ void S_PauseAudio(void)
|
|||
|
||||
void S_ResumeAudio(void)
|
||||
{
|
||||
if (I_MusicPlaying() && I_MusicPaused())
|
||||
if (I_SongPlaying() && I_SongPaused())
|
||||
I_ResumeSong();
|
||||
|
||||
// resume cd music
|
||||
|
@ -1584,7 +1584,7 @@ void S_SetMusicVolume(INT32 digvolume, INT32 seqvolume)
|
|||
digvolume = seqvolume = 31;
|
||||
#endif
|
||||
|
||||
switch(I_MusicType())
|
||||
switch(I_SongType())
|
||||
{
|
||||
case MU_MID:
|
||||
case MU_MOD:
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue