From 0221c58370ad1fa5925873155de6f93560a6e694 Mon Sep 17 00:00:00 2001 From: sezero Date: Wed, 12 Jan 2011 10:02:16 +0000 Subject: [PATCH] removed the cdplayer facility added in 0.85.3 git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@394 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/cd_sdl.c | 76 ++++++-------------------------------------------- Quake/host.c | 12 -------- 2 files changed, 9 insertions(+), 79 deletions(-) diff --git a/Quake/cd_sdl.c b/Quake/cd_sdl.c index 9653842d..0c99c767 100644 --- a/Quake/cd_sdl.c +++ b/Quake/cd_sdl.c @@ -158,40 +158,6 @@ void CDAudio_Stop(void) 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) { if (!cd_handle || !enabled) @@ -228,15 +194,15 @@ void CDAudio_Resume(void) static void CD_f (void) { - const char *command,*arg2; + const char *command; int ret, n; if (Cmd_Argc() < 2) { - Con_Printf("commands:\n"); - Con_Printf(" on, off, reset, remap, \n"); - Con_Printf(" play, stop, next, prev, loop,\n"); - Con_Printf(" pause, resume, eject, info\n"); + Con_Printf("commands:"); + Con_Printf("on, off, reset, remap, \n"); + Con_Printf("play, stop, loop, pause, resume\n"); + Con_Printf("eject, info\n"); return; } @@ -294,21 +260,13 @@ static void CD_f (void) if (Q_strcasecmp(command, "play") == 0) { - arg2 = Cmd_Argv (2); - if (*arg2) - CDAudio_Play((byte)atoi(Cmd_Argv (2)), false); - else - CDAudio_Play((byte)1, false); + CDAudio_Play((byte)atoi(Cmd_Argv (2)), false); return; } if (Q_strcasecmp(command, "loop") == 0) { - arg2 = Cmd_Argv (2); - if (*arg2) - CDAudio_Play((byte)atoi(Cmd_Argv (2)), true); - else - CDAudio_Play((byte)1, true); + CDAudio_Play((byte)atoi(Cmd_Argv (2)), true); return; } @@ -330,18 +288,6 @@ static void CD_f (void) 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 (playing) @@ -377,7 +323,6 @@ static void CD_f (void) return; } - Con_Printf ("cd: no such command. Use \"cd\" for help.\n"); } static qboolean CD_GetVolume (void *unused) @@ -434,13 +379,10 @@ void CDAudio_Update(void) curstat = SDL_CDStatus(cd_handle); if (curstat != CD_PLAYING && curstat != CD_PAUSED) { + playing = false; endOfTrack = -1.0; - if (playLooping) { - playing = false; + if (playLooping) CDAudio_Play(playTrack, true); - } - else - CDAudio_Next(); } } } diff --git a/Quake/host.c b/Quake/host.c index fedcd06f..70d1e29f 100644 --- a/Quake/host.c +++ b/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. 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-"); 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 VID_Shutdown(); } - else if (COM_CheckParm ("-cd")) - { - CDAudio_Shutdown (); - S_Shutdown (); - } LOG_Close (); }