Make "cd play" progress tracks

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@291 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
stevenaaus 2010-08-24 00:35:22 +00:00
parent 30b71faa55
commit a8de20a97d
5 changed files with 28 additions and 8 deletions

View File

@ -33,6 +33,14 @@ void CDAudio_Stop(void)
{
}
void CDAudio_Next(void)
{
}
void CDAudio_Prev(void)
{
}
void CDAudio_Pause(void)
{
}

View File

@ -90,9 +90,6 @@ void CDAudio_Play(byte track, qboolean looping)
return;
}
if (track == 0)
track = 1;
track = remap[track];
if (track < 1 || track > cd_handle->numtracks)
@ -231,7 +228,7 @@ void CDAudio_Resume(void)
static void CD_f (void)
{
const char *command;
const char *command,*arg2;
int ret, n;
if (Cmd_Argc() < 2)
@ -297,13 +294,21 @@ static void CD_f (void)
if (Q_strcasecmp(command, "play") == 0)
{
CDAudio_Play((byte)atoi(Cmd_Argv (2)), false);
arg2 = Cmd_Argv (2);
if (*arg2)
CDAudio_Play((byte)atoi(Cmd_Argv (2)), false);
else
CDAudio_Play((byte)1, false);
return;
}
if (Q_strcasecmp(command, "loop") == 0)
{
CDAudio_Play((byte)atoi(Cmd_Argv (2)), true);
arg2 = Cmd_Argv (2);
if (*arg2)
CDAudio_Play((byte)atoi(Cmd_Argv (2)), true);
else
CDAudio_Play((byte)1, true);
return;
}
@ -431,10 +436,11 @@ void CDAudio_Update(void)
curstat = SDL_CDStatus(cd_handle);
if (curstat != CD_PLAYING && curstat != CD_PAUSED)
{
playing = false;
endOfTrack = -1.0;
if (playLooping)
CDAudio_Play(playTrack, true);
else
CDAudio_Next();
}
}
}

View File

@ -127,7 +127,8 @@ The process is not for the faint hearted.</P>
<LI> Small fix to Sound Block/Unblock on win32</LI>
<LI> Lots of code fixes (some from uhexen2)</LI>
<LI> Sys_Error calls Host_Shutdown</LI>
<LI> Added MS Visual Studio support
<LI> Added MS Visual Studio support</LI>
<LI> Add a "-cd" option to let the CD Player work in dedicated mode, and some other CD tweaks.
</LI>
</UL>
</P>

View File

@ -84,6 +84,7 @@ The process is not for the faint hearted.
<item> Lots of code fixes (some from uhexen2)
<item> Sys_Error calls Host_Shutdown
<item> Added MS Visual Studio support
<item> Add a "-cd" option to let the CD Player work in dedicated mode, and some other CD tweaks.
</itemize>

View File

@ -136,6 +136,9 @@
o Added MS Visual Studio support
o Add a "-cd" option to let the CD Player work in dedicated mode, and
some other CD tweaks.
5.2. 0.85.2
@ -188,6 +191,7 @@
o Remove confirm quit dialog
o Don't spam the console with PackFile seek requests
o Default to window mode