fix some non-windows builds.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4496 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-10-08 16:29:54 +00:00
parent ae84691b38
commit b5dcabb9f5
4 changed files with 22 additions and 15 deletions

View file

@ -85,7 +85,7 @@ int CDAudio_GetAudioDiskInfo(void)
} }
void CDAudio_Play(int track, qboolean looping) void CDAudio_Play(int track)
{ {
struct cdrom_tocentry entry; struct cdrom_tocentry entry;
struct cdrom_ti ti; struct cdrom_ti ti;
@ -121,6 +121,8 @@ void CDAudio_Play(int track, qboolean looping)
if ( ioctl(cdfile, CDROMRESUME) == -1 ) if ( ioctl(cdfile, CDROMRESUME) == -1 )
Con_DPrintf("ioctl cdromresume failed\n"); Con_DPrintf("ioctl cdromresume failed\n");
playing = true;
if (!bgmvolume.value) if (!bgmvolume.value)
CDAudio_Pause (); CDAudio_Pause ();
} }
@ -185,9 +187,6 @@ qboolean CDAudio_Startup(void)
if (cdfile != -1) if (cdfile != -1)
return true; return true;
if (!bgmvolume.value)
return false;
if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1) if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1)
{ {
Q_strncpyz(cd_dev, com_argv[i + 1], sizeof(cd_dev)); Q_strncpyz(cd_dev, com_argv[i + 1], sizeof(cd_dev));

View file

@ -5700,8 +5700,11 @@ void CLQW_ParseServerMessage (void)
break; break;
case svc_cdtrack: case svc_cdtrack:
cl.cdtrack = MSG_ReadByte (); {
Media_NumberedTrack ((qbyte)cl.cdtrack, (qbyte)cl.cdtrack); unsigned int firsttrack;
firsttrack = MSG_ReadByte ();
Media_NumberedTrack (firsttrack, firsttrack);
}
break; break;
case svc_intermission: case svc_intermission:
@ -6350,10 +6353,13 @@ void CLNQ_ParseServerMessage (void)
break; break;
case svc_cdtrack: case svc_cdtrack:
cl.cdtrack = MSG_ReadByte (); {
MSG_ReadByte (); unsigned int firsttrack;
unsigned int looptrack;
Media_NumberedTrack ((qbyte)cl.cdtrack, (qbyte)cl.cdtrack); firsttrack = MSG_ReadByte ();
looptrack = MSG_ReadByte ();
Media_NumberedTrack (firsttrack, looptrack);
}
break; break;
case svc_setview: case svc_setview:

View file

@ -1458,9 +1458,13 @@ int CLHL_ParseGamePacket(void)
cl.intermission = true; cl.intermission = true;
break; break;
case svc_cdtrack: case svc_cdtrack:
cl.cdtrack = MSG_ReadByte(); {
MSG_ReadByte(); unsigned int firsttrack;
CDAudio_Play ((qbyte)cl.cdtrack, (qbyte)cl.cdtrack); unsigned int looptrack;
firsttrack = MSG_ReadByte ();
looptrack = MSG_ReadByte ();
Media_NumberedTrack (firsttrack, looptrack);
}
break; break;
case 35: //svc_weaponanimation: case 35: //svc_weaponanimation:

View file

@ -705,8 +705,6 @@ typedef struct
int num_entities; // stored bottom up in cl_entities array int num_entities; // stored bottom up in cl_entities array
int num_statics; // stored top down in cl_entitiers int num_statics; // stored top down in cl_entitiers
int cdtrack; // cd audio
// all player information // all player information
unsigned int allocated_client_slots; unsigned int allocated_client_slots;
player_info_t players[MAX_CLIENTS]; player_info_t players[MAX_CLIENTS];