diff --git a/src/cdspan.c b/src/cdspan.c index 978ec1314..3905578d6 100644 --- a/src/cdspan.c +++ b/src/cdspan.c @@ -1,184 +1,18 @@ /* Handles the two CD issue */ /* Alex McLean */ +/* seems to be responsible for playing music in-game, + * move that to somewhere else + */ + #include "frame.h" -#include "piedef.h" -#include "piefunc.h" -#include "piemode.h" -#include "piestate.h" -#include "text.h" -#include "displaydef.h" -#include "rendmode.h" -#include "hci.h" -#include "intdisplay.h" + #include "audio.h" -#include "cdaudio.h" +#include "track.h" #include "cdspan.h" -// turn on/off checks -#if 1 -#define DONTTEST -#endif - -// labels -#define LABEL1 "Wz2100" -#define LABEL2 "Wz2100b" - -// Declarations for the positioning of the box */ -#define CDSPAN_BOX_WIDTH (300) -#define CDSPAN_BOX_DEPTH (60) -#define CDLEFT (D_W + (CDSPAN_BOX_WIDTH/2)) -#define CDRIGHT (DISP_WIDTH - D_W - (CDSPAN_BOX_WIDTH/2)) -#define TOP ((DISP_HEIGHT - CDSPAN_BOX_DEPTH)/2) -#define BOTTOM ((DISP_HEIGHT + CDSPAN_BOX_DEPTH)/2) - -#define MAX_VOL_NAMES 5 - -// ----------------------------------------------------------------------- -// Static variables -/* Which CD is required */ -static CD_INDEX g_CDrequired = DISC_INVALID; - -/* CD validated callbacks */ -static CDSPAN_CALLBACK g_fpOKCallback = NULL; -static CDSPAN_CALLBACK g_fpCancelCallback = NULL; - -static BOOL g_bBoxVisible = FALSE; -static W_SCREEN *g_psCurWScreen = NULL; - static STRING g_szCurDriveName[MAX_STR] = ""; -// ----------------------------------------------------------------------- -// Functions. -// ----------------------------------------------------------------------- - -BOOL -cdspan_GetDriveName( BOOL bCheckAny, STRING szDriveName[], ... ) -{ //I use WIN321 to disable these for now -Q -#ifdef WIN321 //Neither linux nor win32 uses this, but maybe sometime in future? --QAMLY - UINT uiRet; - STRING szDrives[MAX_STR], - szVolNameList[MAX_VOL_NAMES][MAX_STR], - seps[] = " ,\t\n", - *token = NULL; - SDWORD i, j, iLabels; - BOOL bFound = FALSE; - va_list vArgList; - char szVolName[MAX_STR], szSysName[MAX_STR]; - DWORD dwVolSerialNum, dwFlags, dwMaxlen; - - /* get list of volume names */ - iLabels = -1; - va_start( vArgList, szDriveName ); - do - { - iLabels++; - strcpy( szVolNameList[iLabels], va_arg( vArgList, STRING * ) ); - } - while ( strcmp( szVolNameList[iLabels], "" ) != 0 ); - va_end( vArgList ); - - /* check no labels entered */ - if ( bCheckAny == FALSE && iLabels == 0 ) - { - return FALSE; - } - - /* check all drives for CDROMs with matching labels */ - if ( GetLogicalDriveStrings( MAX_STR, szDrives ) ) - { - /* go through string and remove single NULLs */ - for ( i=0; i