mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-20 00:11:19 +00:00
Minor reorganization
This commit is contained in:
parent
fd31c5cd5e
commit
c2a54acae3
2 changed files with 7 additions and 9 deletions
|
@ -2206,7 +2206,7 @@ static lumpnum_t S_GetMusicLumpNum(const char *mname)
|
||||||
|
|
||||||
if (PREFAVAILABLE(midipref, mname))
|
if (PREFAVAILABLE(midipref, mname))
|
||||||
return W_GetNumForName(va(midipref ? "d_%s":"o_%s", mname));
|
return W_GetNumForName(va(midipref ? "d_%s":"o_%s", mname));
|
||||||
else if (ELSEAVAILABLE(midipref, mname))
|
else if (PREFAVAILABLE(!midipref, mname))
|
||||||
return W_GetNumForName(va(midipref ? "o_%s":"d_%s", mname));
|
return W_GetNumForName(va(midipref ? "o_%s":"d_%s", mname));
|
||||||
else
|
else
|
||||||
return LUMPERROR;
|
return LUMPERROR;
|
||||||
|
|
|
@ -48,14 +48,6 @@ extern consvar_t cv_gamemidimusic;
|
||||||
extern consvar_t cv_gamesounds;
|
extern consvar_t cv_gamesounds;
|
||||||
extern consvar_t cv_musicpref;
|
extern consvar_t cv_musicpref;
|
||||||
|
|
||||||
#define PREFAVAILABLE(pref, music) (pref ? \
|
|
||||||
(!S_MIDIMusicDisabled() && S_MIDIExists(music)) : \
|
|
||||||
(!S_DigMusicDisabled() && S_DigExists(music)))
|
|
||||||
|
|
||||||
#define ELSEAVAILABLE(pref, music) (pref ? \
|
|
||||||
(!S_DigMusicDisabled() && S_DigExists(music)) : \
|
|
||||||
(!S_MIDIMusicDisabled() && S_MIDIExists(music)))
|
|
||||||
|
|
||||||
extern consvar_t cv_playmusicifunfocused;
|
extern consvar_t cv_playmusicifunfocused;
|
||||||
extern consvar_t cv_playsoundsifunfocused;
|
extern consvar_t cv_playsoundsifunfocused;
|
||||||
|
|
||||||
|
@ -191,6 +183,12 @@ boolean S_MusicExists(const char *mname, boolean checkMIDI, boolean checkDigi);
|
||||||
#define S_DigExists(a) S_MusicExists(a, false, true)
|
#define S_DigExists(a) S_MusicExists(a, false, true)
|
||||||
#define S_MIDIExists(a) S_MusicExists(a, true, false)
|
#define S_MIDIExists(a) S_MusicExists(a, true, false)
|
||||||
|
|
||||||
|
// Returns whether the preferred format a (true = MIDI, false = Digital)
|
||||||
|
// exists and is enabled for musicname b
|
||||||
|
#define PREFAVAILABLE(a, b) (a ? \
|
||||||
|
(!S_MIDIMusicDisabled() && S_MIDIExists(b)) : \
|
||||||
|
(!S_DigMusicDisabled() && S_DigExists(b)))
|
||||||
|
|
||||||
//
|
//
|
||||||
// Music Effects
|
// Music Effects
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue