2007-01-15 12:09:25 -08:00
|
|
|
/*
|
|
|
|
This file is part of Warzone 2100.
|
|
|
|
Copyright (C) 1999-2004 Eidos Interactive
|
|
|
|
Copyright (C) 2005-2007 Warzone Resurrection Project
|
|
|
|
|
|
|
|
Warzone 2100 is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Warzone 2100 is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Warzone 2100; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
2007-06-28 10:47:08 -07:00
|
|
|
/* Handles the two CD issue */
|
|
|
|
/* Alex McLean */
|
|
|
|
|
2006-04-08 08:58:27 -07:00
|
|
|
/* seems to be responsible for playing music in-game,
|
|
|
|
* move that to somewhere else
|
|
|
|
*/
|
|
|
|
|
2006-05-27 09:37:17 -07:00
|
|
|
#include "lib/framework/frame.h"
|
2006-04-08 08:58:27 -07:00
|
|
|
|
2006-05-27 09:37:17 -07:00
|
|
|
#include "lib/sound/audio.h"
|
|
|
|
#include "lib/sound/track.h"
|
2007-06-28 10:47:08 -07:00
|
|
|
#include "cdspan.h"
|
|
|
|
|
2006-11-03 13:35:50 -08:00
|
|
|
static char g_szCurDriveName[MAX_STR] = "";
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
void
|
2006-11-03 13:35:50 -08:00
|
|
|
cdspan_PlayInGameAudio( char szFileName[], SDWORD iVol )
|
2007-06-28 10:47:08 -07:00
|
|
|
{
|
2006-11-03 13:35:50 -08:00
|
|
|
char szStream[MAX_STR];// szDrive[MAX_STR] = "",
|
2007-06-28 10:47:08 -07:00
|
|
|
BOOL bPlaying = FALSE;
|
|
|
|
|
|
|
|
audio_StopAll();
|
|
|
|
|
2006-09-08 13:01:09 -07:00
|
|
|
sprintf( szStream, "%s%s", g_szCurDriveName, szFileName );
|
2007-06-28 10:47:08 -07:00
|
|
|
bPlaying = audio_PlayStream( szStream, iVol, NULL );
|
|
|
|
|
|
|
|
/* try playing from hard disk */
|
|
|
|
if ( bPlaying == FALSE )
|
|
|
|
{
|
2006-10-07 07:13:47 -07:00
|
|
|
sprintf( szStream, "audio/%s", szFileName );
|
2007-06-28 10:47:08 -07:00
|
|
|
bPlaying = audio_PlayStream( szStream, iVol, NULL );
|
|
|
|
}
|
|
|
|
}
|