- added a $musicalias command to SNDINFO that allows remapping of music tracks. Mapping to 'none' means that starting the remapped song will have no effect at all. There's one limitation though: If you load a WAD with the same music name after the one with the SNDINFO lump the mapping will be ignored. This is so that music resources can use this command without interfering with WADs that replace the music with their own.
SVN r3002 (trunk)
This commit is contained in:
parent
aa2e14b27f
commit
2fcf1af21b
3 changed files with 41 additions and 1 deletions
|
|
@ -2386,8 +2386,16 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
|
|||
int offset = 0, length = 0;
|
||||
int device = MDEV_DEFAULT;
|
||||
MusInfo *handle = NULL;
|
||||
FName musicasname = musicname;
|
||||
|
||||
int *devp = MidiDevices.CheckKey(FName(musicname));
|
||||
FName *aliasp = MusicAliases.CheckKey(musicasname);
|
||||
if (aliasp != NULL)
|
||||
{
|
||||
musicname = (musicasname = *aliasp).GetChars();
|
||||
if (musicasname == NAME_None) return true;
|
||||
}
|
||||
|
||||
int *devp = MidiDevices.CheckKey(musicasname);
|
||||
if (devp != NULL) device = *devp;
|
||||
|
||||
// Strip off any leading file:// component.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue