mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
removed the cdplayer facility added in 0.85.3
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@394 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
cf9e285285
commit
f641321f97
2 changed files with 9 additions and 79 deletions
|
@ -158,40 +158,6 @@ void CDAudio_Stop(void)
|
||||||
endOfTrack = -1.0;
|
endOfTrack = -1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CDAudio_Next(void)
|
|
||||||
{
|
|
||||||
byte track;
|
|
||||||
|
|
||||||
if (!cd_handle || !enabled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!playing)
|
|
||||||
return;
|
|
||||||
|
|
||||||
track = playTrack + 1; /* cd_handle->track[cd_handle->cur_track].id + 1; */
|
|
||||||
if (track > cd_handle->numtracks)
|
|
||||||
track = 1;
|
|
||||||
|
|
||||||
CDAudio_Play (track, playLooping);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void CDAudio_Prev(void)
|
|
||||||
{
|
|
||||||
byte track;
|
|
||||||
|
|
||||||
if (!cd_handle || !enabled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!playing)
|
|
||||||
return;
|
|
||||||
|
|
||||||
track = playTrack - 1;
|
|
||||||
if (track < 1)
|
|
||||||
track = cd_handle->numtracks;
|
|
||||||
|
|
||||||
CDAudio_Play (track, playLooping);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CDAudio_Pause(void)
|
void CDAudio_Pause(void)
|
||||||
{
|
{
|
||||||
if (!cd_handle || !enabled)
|
if (!cd_handle || !enabled)
|
||||||
|
@ -228,15 +194,15 @@ void CDAudio_Resume(void)
|
||||||
|
|
||||||
static void CD_f (void)
|
static void CD_f (void)
|
||||||
{
|
{
|
||||||
const char *command,*arg2;
|
const char *command;
|
||||||
int ret, n;
|
int ret, n;
|
||||||
|
|
||||||
if (Cmd_Argc() < 2)
|
if (Cmd_Argc() < 2)
|
||||||
{
|
{
|
||||||
Con_Printf("commands:\n");
|
Con_Printf("commands:");
|
||||||
Con_Printf(" on, off, reset, remap, \n");
|
Con_Printf("on, off, reset, remap, \n");
|
||||||
Con_Printf(" play, stop, next, prev, loop,\n");
|
Con_Printf("play, stop, loop, pause, resume\n");
|
||||||
Con_Printf(" pause, resume, eject, info\n");
|
Con_Printf("eject, info\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,21 +260,13 @@ static void CD_f (void)
|
||||||
|
|
||||||
if (Q_strcasecmp(command, "play") == 0)
|
if (Q_strcasecmp(command, "play") == 0)
|
||||||
{
|
{
|
||||||
arg2 = Cmd_Argv (2);
|
CDAudio_Play((byte)atoi(Cmd_Argv (2)), false);
|
||||||
if (*arg2)
|
|
||||||
CDAudio_Play((byte)atoi(Cmd_Argv (2)), false);
|
|
||||||
else
|
|
||||||
CDAudio_Play((byte)1, false);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Q_strcasecmp(command, "loop") == 0)
|
if (Q_strcasecmp(command, "loop") == 0)
|
||||||
{
|
{
|
||||||
arg2 = Cmd_Argv (2);
|
CDAudio_Play((byte)atoi(Cmd_Argv (2)), true);
|
||||||
if (*arg2)
|
|
||||||
CDAudio_Play((byte)atoi(Cmd_Argv (2)), true);
|
|
||||||
else
|
|
||||||
CDAudio_Play((byte)1, true);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,18 +288,6 @@ static void CD_f (void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Q_strcasecmp(command, "next") == 0)
|
|
||||||
{
|
|
||||||
CDAudio_Next();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Q_strcasecmp(command, "prev") == 0)
|
|
||||||
{
|
|
||||||
CDAudio_Prev();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Q_strcasecmp(command, "eject") == 0)
|
if (Q_strcasecmp(command, "eject") == 0)
|
||||||
{
|
{
|
||||||
if (playing)
|
if (playing)
|
||||||
|
@ -377,7 +323,6 @@ static void CD_f (void)
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Con_Printf ("cd: no such command. Use \"cd\" for help.\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static qboolean CD_GetVolume (void *unused)
|
static qboolean CD_GetVolume (void *unused)
|
||||||
|
@ -434,13 +379,10 @@ void CDAudio_Update(void)
|
||||||
curstat = SDL_CDStatus(cd_handle);
|
curstat = SDL_CDStatus(cd_handle);
|
||||||
if (curstat != CD_PLAYING && curstat != CD_PAUSED)
|
if (curstat != CD_PLAYING && curstat != CD_PAUSED)
|
||||||
{
|
{
|
||||||
|
playing = false;
|
||||||
endOfTrack = -1.0;
|
endOfTrack = -1.0;
|
||||||
if (playLooping) {
|
if (playLooping)
|
||||||
playing = false;
|
|
||||||
CDAudio_Play(playTrack, true);
|
CDAudio_Play(playTrack, true);
|
||||||
}
|
|
||||||
else
|
|
||||||
CDAudio_Next();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
12
Quake/host.c
12
Quake/host.c
|
@ -864,13 +864,6 @@ void Host_Init (quakeparms_t *parms)
|
||||||
// note: two leading newlines because the command buffer swallows one of them.
|
// note: two leading newlines because the command buffer swallows one of them.
|
||||||
Cbuf_AddText ("\n\nvid_unlock\n");
|
Cbuf_AddText ("\n\nvid_unlock\n");
|
||||||
}
|
}
|
||||||
else if (COM_CheckParm ("-cd"))
|
|
||||||
{
|
|
||||||
// Allow "qs -dedicated -cd" to work as a standalone cd player ;>
|
|
||||||
// Useful, because of ubiquitous nature of SDL
|
|
||||||
S_Init ();
|
|
||||||
CDAudio_Init ();
|
|
||||||
}
|
|
||||||
|
|
||||||
Hunk_AllocName (0, "-HOST_HUNKLEVEL-");
|
Hunk_AllocName (0, "-HOST_HUNKLEVEL-");
|
||||||
host_hunklevel = Hunk_LowMark ();
|
host_hunklevel = Hunk_LowMark ();
|
||||||
|
@ -926,11 +919,6 @@ void Host_Shutdown(void)
|
||||||
IN_Shutdown (); // input is only initialized in Host_Init if we're not dedicated -- kristian
|
IN_Shutdown (); // input is only initialized in Host_Init if we're not dedicated -- kristian
|
||||||
VID_Shutdown();
|
VID_Shutdown();
|
||||||
}
|
}
|
||||||
else if (COM_CheckParm ("-cd"))
|
|
||||||
{
|
|
||||||
CDAudio_Shutdown ();
|
|
||||||
S_Shutdown ();
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG_Close ();
|
LOG_Close ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue