- some cleanup on music code.
* change the license of the main file because there is no more id-based code here licensed under the GPL. * moved VM interface definition out of the implementation. * moved idmus CCMD out of implementation because it is dependent on Doom level definitions. * moved s_music.cpp into the music folder with the rest of the music code.
This commit is contained in:
parent
56f2b2ac56
commit
4af96bab47
15 changed files with 196 additions and 225 deletions
|
|
@ -65,6 +65,8 @@
|
|||
#include "v_video.h"
|
||||
#include "md5.h"
|
||||
#include "findfile.h"
|
||||
#include "i_music.h"
|
||||
#include "s_music.h"
|
||||
|
||||
extern FILE *Logfile;
|
||||
extern bool insave;
|
||||
|
|
@ -1084,3 +1086,57 @@ CCMD(r_showcaps)
|
|||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD idmus
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
CCMD(idmus)
|
||||
{
|
||||
level_info_t* info;
|
||||
FString map;
|
||||
int l;
|
||||
|
||||
if (!nomusic)
|
||||
{
|
||||
if (argv.argc() > 1)
|
||||
{
|
||||
if (gameinfo.flags & GI_MAPxx)
|
||||
{
|
||||
l = atoi(argv[1]);
|
||||
if (l <= 99)
|
||||
{
|
||||
map = CalcMapName(0, l);
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf("%s\n", GStrings("STSTR_NOMUS"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
map = CalcMapName(argv[1][0] - '0', argv[1][1] - '0');
|
||||
}
|
||||
|
||||
if ((info = FindLevelInfo(map)))
|
||||
{
|
||||
if (info->Music.IsNotEmpty())
|
||||
{
|
||||
S_ChangeMusic(info->Music, info->musicorder);
|
||||
Printf("%s\n", GStrings("STSTR_MUS"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf("%s\n", GStrings("STSTR_NOMUS"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf("Music is disabled\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue