mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 23:52:22 +00:00
Rename Sys_DPrintf to Sys_MaskPrintf.
We now have finer runtime control over what gets printed. Need to do a SYS_DEV audit, creating new masks as apropriate.
This commit is contained in:
parent
92f84e97a4
commit
8c4fe2f844
88 changed files with 409 additions and 331 deletions
|
@ -69,7 +69,6 @@ void Sys_SetErrPrintf (sys_printf_t func);
|
||||||
|
|
||||||
void Sys_Print (FILE *stream, const char *fmt, va_list args);
|
void Sys_Print (FILE *stream, const char *fmt, va_list args);
|
||||||
void Sys_Printf (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
void Sys_Printf (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||||
void Sys_DPrintf (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
|
||||||
void Sys_Error (const char *error, ...) __attribute__((format(printf,1,2), noreturn));
|
void Sys_Error (const char *error, ...) __attribute__((format(printf,1,2), noreturn));
|
||||||
void Sys_Quit (void) __attribute__((noreturn));
|
void Sys_Quit (void) __attribute__((noreturn));
|
||||||
void Sys_Shutdown (void);
|
void Sys_Shutdown (void);
|
||||||
|
@ -77,6 +76,10 @@ void Sys_RegisterShutdown (void (*func) (void));
|
||||||
double Sys_DoubleTime (void);
|
double Sys_DoubleTime (void);
|
||||||
void Sys_TimeOfDay(date_t *date);
|
void Sys_TimeOfDay(date_t *date);
|
||||||
|
|
||||||
|
void Sys_MaskPrintf (int mask, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||||
|
#define SYS_DEV 1
|
||||||
|
#define SYS_WARN 3 // bit 0 so developer 1 will pick it up
|
||||||
|
|
||||||
int Sys_CheckInput (int idle, int net_socket);
|
int Sys_CheckInput (int idle, int net_socket);
|
||||||
const char *Sys_ConsoleInput (void);
|
const char *Sys_ConsoleInput (void);
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ I_CDAudio_CloseDoor (void)
|
||||||
return; // no cd init'd
|
return; // no cd init'd
|
||||||
|
|
||||||
if (ioctl (cdfile, CDROMCLOSETRAY) == -1)
|
if (ioctl (cdfile, CDROMCLOSETRAY) == -1)
|
||||||
Sys_DPrintf ("CDAudio: ioctl cdromclosetray failed\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromclosetray failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -99,7 +99,7 @@ I_CDAudio_Eject (void)
|
||||||
return; // no cd init'd
|
return; // no cd init'd
|
||||||
|
|
||||||
if (ioctl (cdfile, CDROMEJECT) == -1)
|
if (ioctl (cdfile, CDROMEJECT) == -1)
|
||||||
Sys_DPrintf ("CDAudio: ioctl cdromeject failed\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromeject failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -110,12 +110,12 @@ I_CDAudio_GetAudioDiskInfo (void)
|
||||||
cdValid = false;
|
cdValid = false;
|
||||||
|
|
||||||
if (ioctl (cdfile, CDROMREADTOCHDR, &tochdr) == -1) {
|
if (ioctl (cdfile, CDROMREADTOCHDR, &tochdr) == -1) {
|
||||||
Sys_DPrintf ("CDAudio: ioctl cdromreadtochdr failed\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromreadtochdr failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tochdr.cdth_trk0 < 1) {
|
if (tochdr.cdth_trk0 < 1) {
|
||||||
Sys_DPrintf ("CDAudio: no music tracks\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: no music tracks\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ I_CDAudio_Pause (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ioctl (cdfile, CDROMPAUSE) == -1)
|
if (ioctl (cdfile, CDROMPAUSE) == -1)
|
||||||
Sys_DPrintf ("CDAudio: ioctl cdrompause failed\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdrompause failed\n");
|
||||||
|
|
||||||
wasPlaying = playing;
|
wasPlaying = playing;
|
||||||
playing = false;
|
playing = false;
|
||||||
|
@ -151,7 +151,8 @@ I_CDAudio_Stop (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ioctl (cdfile, CDROMSTOP) == -1)
|
if (ioctl (cdfile, CDROMSTOP) == -1)
|
||||||
Sys_DPrintf ("CDAudio: ioctl cdromstop failed (%d)\n", errno);
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromstop failed (%d)\n",
|
||||||
|
errno);
|
||||||
|
|
||||||
wasPlaying = false;
|
wasPlaying = false;
|
||||||
playing = false;
|
playing = false;
|
||||||
|
@ -188,7 +189,7 @@ I_CDAudio_Play (int track, qboolean looping)
|
||||||
entry0.cdte_track = track;
|
entry0.cdte_track = track;
|
||||||
entry0.cdte_format = CDROM_MSF;
|
entry0.cdte_format = CDROM_MSF;
|
||||||
if (ioctl (cdfile, CDROMREADTOCENTRY, &entry0) == -1) {
|
if (ioctl (cdfile, CDROMREADTOCENTRY, &entry0) == -1) {
|
||||||
Sys_DPrintf ("CDAudio: ioctl cdromreadtocentry failed\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromreadtocentry failed\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
entry1.cdte_track = track + 1;
|
entry1.cdte_track = track + 1;
|
||||||
|
@ -197,7 +198,7 @@ I_CDAudio_Play (int track, qboolean looping)
|
||||||
entry1.cdte_track = CDROM_LEADOUT;
|
entry1.cdte_track = CDROM_LEADOUT;
|
||||||
}
|
}
|
||||||
if (ioctl (cdfile, CDROMREADTOCENTRY, &entry1) == -1) {
|
if (ioctl (cdfile, CDROMREADTOCENTRY, &entry1) == -1) {
|
||||||
Sys_DPrintf ("CDAudio: ioctl cdromreadtocentry failed\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromreadtocentry failed\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (entry0.cdte_ctrl == CDROM_DATA_TRACK) {
|
if (entry0.cdte_ctrl == CDROM_DATA_TRACK) {
|
||||||
|
@ -219,15 +220,16 @@ I_CDAudio_Play (int track, qboolean looping)
|
||||||
msf.cdmsf_sec1 = entry1.cdte_addr.msf.second;
|
msf.cdmsf_sec1 = entry1.cdte_addr.msf.second;
|
||||||
msf.cdmsf_frame1 = entry1.cdte_addr.msf.frame;
|
msf.cdmsf_frame1 = entry1.cdte_addr.msf.frame;
|
||||||
|
|
||||||
Sys_DPrintf ("%2d:%02d:%02d %2d:%02d:%02d\n",
|
Sys_MaskPrintf (SYS_DEV, "%2d:%02d:%02d %2d:%02d:%02d\n",
|
||||||
msf.cdmsf_min0,
|
msf.cdmsf_min0,
|
||||||
msf.cdmsf_sec0,
|
msf.cdmsf_sec0,
|
||||||
msf.cdmsf_frame0,
|
msf.cdmsf_frame0,
|
||||||
msf.cdmsf_min1, msf.cdmsf_sec1, msf.cdmsf_frame1);
|
msf.cdmsf_min1, msf.cdmsf_sec1, msf.cdmsf_frame1);
|
||||||
|
|
||||||
if (ioctl (cdfile, CDROMPLAYMSF, &msf) == -1) {
|
if (ioctl (cdfile, CDROMPLAYMSF, &msf) == -1) {
|
||||||
Sys_DPrintf ("CDAudio: ioctl cdromplaytrkind failed (%s)\n",
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
strerror (errno));
|
"CDAudio: ioctl cdromplaytrkind failed (%s)\n",
|
||||||
|
strerror (errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +254,7 @@ I_CDAudio_Resume (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ioctl (cdfile, CDROMRESUME) == -1)
|
if (ioctl (cdfile, CDROMRESUME) == -1)
|
||||||
Sys_DPrintf ("CDAudio: ioctl cdromresume failed\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromresume failed\n");
|
||||||
playing = true;
|
playing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -397,7 +399,7 @@ I_CDAudio_Update (void)
|
||||||
lastchk = time (NULL) + 2; // two seconds between chks
|
lastchk = time (NULL) + 2; // two seconds between chks
|
||||||
subchnl.cdsc_format = CDROM_MSF;
|
subchnl.cdsc_format = CDROM_MSF;
|
||||||
if (ioctl (cdfile, CDROMSUBCHNL, &subchnl) == -1) {
|
if (ioctl (cdfile, CDROMSUBCHNL, &subchnl) == -1) {
|
||||||
Sys_DPrintf ("CDAudio: ioctl cdromsubchnl failed\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromsubchnl failed\n");
|
||||||
playing = false;
|
playing = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -422,8 +424,9 @@ Mus_CDChange (cvar_t *mus_cdaudio)
|
||||||
|
|
||||||
cdfile = open (mus_cdaudio->string, O_RDONLY | O_NONBLOCK);
|
cdfile = open (mus_cdaudio->string, O_RDONLY | O_NONBLOCK);
|
||||||
if (cdfile == -1) {
|
if (cdfile == -1) {
|
||||||
Sys_DPrintf ("Mus_CDInit: open of device \"%s\" failed (error %i)\n",
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
mus_cdaudio->string, errno);
|
"Mus_CDInit: open device \"%s\" failed (error %i)\n",
|
||||||
|
mus_cdaudio->string, errno);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ I_CDAudio_Eject (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (SDL_CDEject (cd_id))
|
if (SDL_CDEject (cd_id))
|
||||||
Sys_DPrintf ("Unable to eject CD-ROM tray.\n");
|
Sys_MaskPrintf (SYS_DEV, "Unable to eject CD-ROM tray.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -87,7 +87,7 @@ I_CDAudio_Pause (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (SDL_CDPause (cd_id))
|
if (SDL_CDPause (cd_id))
|
||||||
Sys_DPrintf ("CDAudio_Pause: Failed to pause track.\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio_Pause: Failed to pause track.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -102,7 +102,7 @@ I_CDAudio_Stop (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (SDL_CDStop (cd_id))
|
if (SDL_CDStop (cd_id))
|
||||||
Sys_DPrintf ("CDAudio_Stop: Failed to stop track.\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio_Stop: Failed to stop track.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -135,7 +135,8 @@ I_CDAudio_Play (int track, qboolean looping)
|
||||||
|
|
||||||
if (SDL_CDPlay (cd_id, cd_id->track[track].offset,
|
if (SDL_CDPlay (cd_id, cd_id->track[track].offset,
|
||||||
cd_id->track[track].length)) {
|
cd_id->track[track].length)) {
|
||||||
Sys_DPrintf ("CDAudio_Play: Unable to play track: %d\n", track + 1);
|
Sys_MaskPrintf (SYS_DEV, "CDAudio_Play: Unable to play track: %d\n",
|
||||||
|
track + 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
playLooping = looping;
|
playLooping = looping;
|
||||||
|
@ -150,7 +151,7 @@ I_CDAudio_Resume (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (SDL_CDResume (cd_id))
|
if (SDL_CDResume (cd_id))
|
||||||
Sys_DPrintf ("CDAudio_Resume: Failed tp resume track.\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio_Resume: Failed tp resume track.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -73,7 +73,7 @@ I_SGI_Eject (void)
|
||||||
return; // no cd init'd
|
return; // no cd init'd
|
||||||
|
|
||||||
if (CDeject (cdp) == 0)
|
if (CDeject (cdp) == 0)
|
||||||
Sys_DPrintf ("I_SGI_Eject: CDeject failed\n");
|
Sys_MaskPrintf (SYS_DEV, "I_SGI_Eject: CDeject failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -85,7 +85,7 @@ I_SGI_GetState (void)
|
||||||
return -1; // no cd init'd
|
return -1; // no cd init'd
|
||||||
|
|
||||||
if (CDgetstatus (cdp, &cds) == 0) {
|
if (CDgetstatus (cdp, &cds) == 0) {
|
||||||
Sys_DPrintf ("CDAudio_GetStatus: CDgetstatus failed\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio_GetStatus: CDgetstatus failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ I_SGI_MaxTrack (void)
|
||||||
return -1; // no cd init'd
|
return -1; // no cd init'd
|
||||||
|
|
||||||
if (CDgetstatus (cdp, &cds) == 0) {
|
if (CDgetstatus (cdp, &cds) == 0) {
|
||||||
Sys_DPrintf ("I_SGI_MaxTrack: CDgetstatus failed\n");
|
Sys_MaskPrintf (SYS_DEV, "I_SGI_MaxTrack: CDgetstatus failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ I_SGI_Pause (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (CDtogglepause (cdp) == 0)
|
if (CDtogglepause (cdp) == 0)
|
||||||
Sys_DPrintf ("CDAudio_PAUSE: CDtogglepause failed (%d)\n", errno);
|
Sys_MaskPrintf (SYS_DEV, "CDAudio_PAUSE: CDtogglepause failed (%d)\n", errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -133,7 +133,8 @@ I_SGI_Play (int track, qboolean looping)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxtrack < 0) {
|
if (maxtrack < 0) {
|
||||||
Sys_DPrintf ("CDAudio_Play: Error getting maximum track number\n");
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"CDAudio_Play: Error getting maximum track number\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +173,7 @@ I_SGI_Play (int track, qboolean looping)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CDplaytrack (cdp, track, cdvolume == 0.0 ? 0 : 1) == 0) {
|
if (CDplaytrack (cdp, track, cdvolume == 0.0 ? 0 : 1) == 0) {
|
||||||
Sys_DPrintf ("CDAudio_Play: CDplay failed (%d)\n", errno);
|
Sys_MaskPrintf (SYS_DEV, "CDAudio_Play: CDplay failed (%d)\n", errno);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +188,8 @@ I_SGI_Resume (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (CDtogglepause (cdp) == 0)
|
if (CDtogglepause (cdp) == 0)
|
||||||
Sys_DPrintf ("CDAudio_Resume: CDtogglepause failed (%d)\n", errno);
|
Sys_MaskPrintf (SYS_DEV, "CDAudio_Resume: CDtogglepause failed (%d)\n",
|
||||||
|
errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -209,7 +211,7 @@ I_SGI_Stop (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (CDstop (cdp) == 0)
|
if (CDstop (cdp) == 0)
|
||||||
Sys_DPrintf ("I_SGI_Stop: CDStop failed (%d)\n", errno);
|
Sys_MaskPrintf (SYS_DEV, "I_SGI_Stop: CDStop failed (%d)\n", errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -77,7 +77,8 @@ I_CDAudio_CloseDoor (void)
|
||||||
dwReturn =
|
dwReturn =
|
||||||
mciSendCommand (wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD_PTR) NULL);
|
mciSendCommand (wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD_PTR) NULL);
|
||||||
if (dwReturn) {
|
if (dwReturn) {
|
||||||
Sys_DPrintf ("MCI_SET_DOOR_CLOSED failed (%li)\n", dwReturn);
|
Sys_MaskPrintf (SYS_DEV, "MCI_SET_DOOR_CLOSED failed (%li)\n",
|
||||||
|
dwReturn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +90,7 @@ I_CDAudio_Eject (void)
|
||||||
dwReturn = mciSendCommand (wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN,
|
dwReturn = mciSendCommand (wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN,
|
||||||
(DWORD_PTR) NULL);
|
(DWORD_PTR) NULL);
|
||||||
if (dwReturn) {
|
if (dwReturn) {
|
||||||
Sys_DPrintf ("MCI_SET_DOOR_OPEN failed (%li)\n", dwReturn);
|
Sys_MaskPrintf (SYS_DEV, "MCI_SET_DOOR_OPEN failed (%li)\n", dwReturn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,11 +107,12 @@ I_CDAudio_GetAudioDiskInfo (void)
|
||||||
mciSendCommand (wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT,
|
mciSendCommand (wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT,
|
||||||
(DWORD_PTR) (LPVOID) & mciStatusParms);
|
(DWORD_PTR) (LPVOID) & mciStatusParms);
|
||||||
if (dwReturn) {
|
if (dwReturn) {
|
||||||
Sys_DPrintf ("CDAudio: drive ready test - get status failed\n");
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"CDAudio: drive ready test - get status failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!mciStatusParms.dwReturn) {
|
if (!mciStatusParms.dwReturn) {
|
||||||
Sys_DPrintf ("CDAudio: drive not ready\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: drive not ready\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,11 +121,11 @@ I_CDAudio_GetAudioDiskInfo (void)
|
||||||
mciSendCommand (wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT,
|
mciSendCommand (wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT,
|
||||||
(DWORD_PTR) (LPVOID) & mciStatusParms);
|
(DWORD_PTR) (LPVOID) & mciStatusParms);
|
||||||
if (dwReturn) {
|
if (dwReturn) {
|
||||||
Sys_DPrintf ("CDAudio: get tracks - status failed\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: get tracks - status failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (mciStatusParms.dwReturn < 1) {
|
if (mciStatusParms.dwReturn < 1) {
|
||||||
Sys_DPrintf ("CDAudio: no music tracks\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: no music tracks\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,13 +156,14 @@ static I_CDAudio_MessageHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MCI_NOTIFY_FAILURE:
|
case MCI_NOTIFY_FAILURE:
|
||||||
Sys_DPrintf ("MCI_NOTIFY_FAILURE\n");
|
Sys_MaskPrintf (SYS_DEV, "MCI_NOTIFY_FAILURE\n");
|
||||||
I_CDAudio_Stop ();
|
I_CDAudio_Stop ();
|
||||||
cdValid = false;
|
cdValid = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Sys_DPrintf ("Unexpected MM_MCINOTIFY type (%i)\n", wParam);
|
Sys_MaskPrintf (SYS_DEV, "Unexpected MM_MCINOTIFY type (%i)\n",
|
||||||
|
wParam);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +187,7 @@ I_CDAudio_Pause (void)
|
||||||
mciSendCommand (wDeviceID, MCI_PAUSE, 0,
|
mciSendCommand (wDeviceID, MCI_PAUSE, 0,
|
||||||
(DWORD_PTR) (LPVOID) & mciGenericParms);
|
(DWORD_PTR) (LPVOID) & mciGenericParms);
|
||||||
if (dwReturn) {
|
if (dwReturn) {
|
||||||
Sys_DPrintf ("MCI_PAUSE failed (%li)", dwReturn);
|
Sys_MaskPrintf (SYS_DEV, "MCI_PAUSE failed (%li)", dwReturn);
|
||||||
}
|
}
|
||||||
|
|
||||||
wasPlaying = playing;
|
wasPlaying = playing;
|
||||||
|
@ -225,7 +228,7 @@ I_CDAudio_Play (int track, qboolean looping)
|
||||||
MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT,
|
MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT,
|
||||||
(DWORD_PTR) (LPVOID) & mciStatusParms);
|
(DWORD_PTR) (LPVOID) & mciStatusParms);
|
||||||
if (dwReturn) {
|
if (dwReturn) {
|
||||||
Sys_DPrintf ("MCI_STATUS failed (%li)\n", dwReturn);
|
Sys_MaskPrintf (SYS_DEV, "MCI_STATUS failed (%li)\n", dwReturn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mciStatusParms.dwReturn != MCI_CDA_TRACK_AUDIO) {
|
if (mciStatusParms.dwReturn != MCI_CDA_TRACK_AUDIO) {
|
||||||
|
@ -240,7 +243,7 @@ I_CDAudio_Play (int track, qboolean looping)
|
||||||
MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT,
|
MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT,
|
||||||
(DWORD_PTR) (LPVOID) & mciStatusParms);
|
(DWORD_PTR) (LPVOID) & mciStatusParms);
|
||||||
if (dwReturn) {
|
if (dwReturn) {
|
||||||
Sys_DPrintf ("MCI_STATUS failed (%li)\n", dwReturn);
|
Sys_MaskPrintf (SYS_DEV, "MCI_STATUS failed (%li)\n", dwReturn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +260,7 @@ I_CDAudio_Play (int track, qboolean looping)
|
||||||
mciSendCommand (wDeviceID, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO,
|
mciSendCommand (wDeviceID, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO,
|
||||||
(DWORD_PTR) (LPVOID) & mciPlayParms);
|
(DWORD_PTR) (LPVOID) & mciPlayParms);
|
||||||
if (dwReturn) {
|
if (dwReturn) {
|
||||||
Sys_DPrintf ("CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,7 +292,7 @@ I_CDAudio_Resume (void)
|
||||||
mciSendCommand (wDeviceID, MCI_PLAY, MCI_TO | MCI_NOTIFY,
|
mciSendCommand (wDeviceID, MCI_PLAY, MCI_TO | MCI_NOTIFY,
|
||||||
(DWORD_PTR) (LPVOID) & mciPlayParms);
|
(DWORD_PTR) (LPVOID) & mciPlayParms);
|
||||||
if (dwReturn) {
|
if (dwReturn) {
|
||||||
Sys_DPrintf ("CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
|
Sys_MaskPrintf (SYS_DEV, "CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
playing = true;
|
playing = true;
|
||||||
|
@ -302,7 +305,7 @@ I_CDAudio_Shutdown (void)
|
||||||
return;
|
return;
|
||||||
I_CDAudio_Stop ();
|
I_CDAudio_Stop ();
|
||||||
if (mciSendCommand (wDeviceID, MCI_CLOSE, MCI_WAIT, (DWORD_PTR) NULL))
|
if (mciSendCommand (wDeviceID, MCI_CLOSE, MCI_WAIT, (DWORD_PTR) NULL))
|
||||||
Sys_DPrintf ("CDAudio_Shutdown: MCI_CLOSE failed\n");
|
Sys_MaskPrintf (SYS_DEV, "CDAudio_Shutdown: MCI_CLOSE failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -317,7 +320,7 @@ I_CDAudio_Stop (void)
|
||||||
|
|
||||||
dwReturn = mciSendCommand (wDeviceID, MCI_STOP, 0, (DWORD_PTR) NULL);
|
dwReturn = mciSendCommand (wDeviceID, MCI_STOP, 0, (DWORD_PTR) NULL);
|
||||||
if (dwReturn) {
|
if (dwReturn) {
|
||||||
Sys_DPrintf ("MCI_STOP failed (%li)", dwReturn);
|
Sys_MaskPrintf (SYS_DEV, "MCI_STOP failed (%li)", dwReturn);
|
||||||
}
|
}
|
||||||
|
|
||||||
wasPlaying = false;
|
wasPlaying = false;
|
||||||
|
|
|
@ -152,7 +152,7 @@ I_XMMS_Running (void)
|
||||||
break;
|
break;
|
||||||
case -1: // ICH!
|
case -1: // ICH!
|
||||||
// inform user
|
// inform user
|
||||||
Sys_DPrintf ("XMMSAudio: error, can't fork!?\n");
|
Sys_MaskPrintf (SYS_DEV, "XMMSAudio: error, can't fork!?\n");
|
||||||
break;
|
break;
|
||||||
default: // Parent
|
default: // Parent
|
||||||
// don't need now :/
|
// don't need now :/
|
||||||
|
|
|
@ -412,7 +412,7 @@ flac_get_info (flacfile_t *ff)
|
||||||
vc = &ff->vorbis_info->data.vorbis_comment;
|
vc = &ff->vorbis_info->data.vorbis_comment;
|
||||||
|
|
||||||
for (i = 0, ve = vc->comments; i < vc->num_comments; ve++, i++) {
|
for (i = 0, ve = vc->comments; i < vc->num_comments; ve++, i++) {
|
||||||
Sys_DPrintf ("%.*s\n", ve->length, ve->entry);
|
Sys_MaskPrintf (SYS_DEV, "%.*s\n", ve->length, ve->entry);
|
||||||
if (strncmp ("CUEPOINT=", (char *) ve->entry, 9) == 0) {
|
if (strncmp ("CUEPOINT=", (char *) ve->entry, 9) == 0) {
|
||||||
char *str = alloca (ve->length + 1);
|
char *str = alloca (ve->length + 1);
|
||||||
strncpy (str, (char *) ve->entry, ve->length);
|
strncpy (str, (char *) ve->entry, ve->length);
|
||||||
|
@ -463,10 +463,10 @@ SND_LoadFLAC (QFile *file, sfx_t *sfx, char *realname)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (info.frames / info.rate < 3) {
|
if (info.frames / info.rate < 3) {
|
||||||
Sys_DPrintf ("cache %s\n", realname);
|
Sys_MaskPrintf (SYS_DEV, "cache %s\n", realname);
|
||||||
flac_cache (sfx, realname, ff, info);
|
flac_cache (sfx, realname, ff, info);
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("stream %s\n", realname);
|
Sys_MaskPrintf (SYS_DEV, "stream %s\n", realname);
|
||||||
flac_stream (sfx, realname, ff, info);
|
flac_stream (sfx, realname, ff, info);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -198,7 +198,7 @@ SND_LoadMidi (QFile *file, sfx_t *sfx, char *realname)
|
||||||
|
|
||||||
WildMidi_Close (handle);
|
WildMidi_Close (handle);
|
||||||
|
|
||||||
Sys_DPrintf ("stream %s\n", realname);
|
Sys_MaskPrintf (SYS_DEV, "stream %s\n", realname);
|
||||||
|
|
||||||
// we init stream here cause we will only ever stream
|
// we init stream here cause we will only ever stream
|
||||||
SND_SFX_Stream (sfx, realname, info, midi_stream_open);
|
SND_SFX_Stream (sfx, realname, info, midi_stream_open);
|
||||||
|
|
|
@ -149,7 +149,7 @@ SND_ScanChannels (int wait)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (wait) {
|
if (wait) {
|
||||||
Sys_DPrintf ("scanning channels...\n");
|
Sys_MaskPrintf (SYS_DEV, "scanning channels...\n");
|
||||||
do {
|
do {
|
||||||
count = 0;
|
count = 0;
|
||||||
for (i = 0; i < MAX_CHANNELS; i++) {
|
for (i = 0; i < MAX_CHANNELS; i++) {
|
||||||
|
@ -159,12 +159,12 @@ SND_ScanChannels (int wait)
|
||||||
ch->stop = 1;
|
ch->stop = 1;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
Sys_DPrintf ("count = %d\n", count);
|
Sys_MaskPrintf (SYS_DEV, "count = %d\n", count);
|
||||||
#ifdef HAVE_USLEEP
|
#ifdef HAVE_USLEEP
|
||||||
usleep (1000);
|
usleep (1000);
|
||||||
#endif
|
#endif
|
||||||
} while (count);
|
} while (count);
|
||||||
Sys_DPrintf ("scanning done.\n");
|
Sys_MaskPrintf (SYS_DEV, "scanning done.\n");
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < MAX_CHANNELS; i++) {
|
for (i = 0; i < MAX_CHANNELS; i++) {
|
||||||
ch = &snd_channels[i];
|
ch = &snd_channels[i];
|
||||||
|
|
|
@ -324,7 +324,7 @@ SND_Load (sfx_t *sfx)
|
||||||
Qseek (file, 0, SEEK_SET);
|
Qseek (file, 0, SEEK_SET);
|
||||||
#ifdef HAVE_VORBIS
|
#ifdef HAVE_VORBIS
|
||||||
if (strnequal ("OggS", buf, 4)) {
|
if (strnequal ("OggS", buf, 4)) {
|
||||||
Sys_DPrintf ("SND_Load: ogg file\n");
|
Sys_MaskPrintf (SYS_DEV, "SND_Load: ogg file\n");
|
||||||
if (SND_LoadOgg (file, sfx, realname) == -1)
|
if (SND_LoadOgg (file, sfx, realname) == -1)
|
||||||
goto bail;
|
goto bail;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -332,7 +332,7 @@ SND_Load (sfx_t *sfx)
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_FLAC
|
#ifdef HAVE_FLAC
|
||||||
if (strnequal ("fLaC", buf, 4)) {
|
if (strnequal ("fLaC", buf, 4)) {
|
||||||
Sys_DPrintf ("SND_Load: flac file\n");
|
Sys_MaskPrintf (SYS_DEV, "SND_Load: flac file\n");
|
||||||
if (SND_LoadFLAC (file, sfx, realname) == -1)
|
if (SND_LoadFLAC (file, sfx, realname) == -1)
|
||||||
goto bail;
|
goto bail;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -340,14 +340,14 @@ SND_Load (sfx_t *sfx)
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WILDMIDI
|
#ifdef HAVE_WILDMIDI
|
||||||
if (strnequal ("MThd", buf, 4)) {
|
if (strnequal ("MThd", buf, 4)) {
|
||||||
Sys_DPrintf ("SND_Load: midi file\n");
|
Sys_MaskPrintf (SYS_DEV, "SND_Load: midi file\n");
|
||||||
if (SND_LoadMidi (file, sfx, realname) == -1)
|
if (SND_LoadMidi (file, sfx, realname) == -1)
|
||||||
goto bail;
|
goto bail;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (strnequal ("RIFF", buf, 4)) {
|
if (strnequal ("RIFF", buf, 4)) {
|
||||||
Sys_DPrintf ("SND_Load: wav file\n");
|
Sys_MaskPrintf (SYS_DEV, "SND_Load: wav file\n");
|
||||||
if (SND_LoadWav (file, sfx, realname) == -1)
|
if (SND_LoadWav (file, sfx, realname) == -1)
|
||||||
goto bail;
|
goto bail;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -103,7 +103,7 @@ vorbis_get_info (OggVorbis_File *vf)
|
||||||
samples = ov_pcm_total (vf, -1);
|
samples = ov_pcm_total (vf, -1);
|
||||||
|
|
||||||
for (ptr = ov_comment (vf, -1)->user_comments; *ptr; ptr++) {
|
for (ptr = ov_comment (vf, -1)->user_comments; *ptr; ptr++) {
|
||||||
Sys_DPrintf ("%s\n", *ptr);
|
Sys_MaskPrintf (SYS_DEV, "%s\n", *ptr);
|
||||||
if (strncmp ("CUEPOINT=", *ptr, 9) == 0) {
|
if (strncmp ("CUEPOINT=", *ptr, 9) == 0) {
|
||||||
sscanf (*ptr + 9, "%d %d", &sample_start, &sample_count);
|
sscanf (*ptr + 9, "%d %d", &sample_start, &sample_count);
|
||||||
}
|
}
|
||||||
|
@ -304,10 +304,10 @@ SND_LoadOgg (QFile *file, sfx_t *sfx, char *realname)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (info.frames / info.rate < 3) {
|
if (info.frames / info.rate < 3) {
|
||||||
Sys_DPrintf ("cache %s\n", realname);
|
Sys_MaskPrintf (SYS_DEV, "cache %s\n", realname);
|
||||||
vorbis_cache (sfx, realname, &vf, info);
|
vorbis_cache (sfx, realname, &vf, info);
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("stream %s\n", realname);
|
Sys_MaskPrintf (SYS_DEV, "stream %s\n", realname);
|
||||||
vorbis_stream (sfx, realname, &vf, info);
|
vorbis_stream (sfx, realname, &vf, info);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -280,10 +280,10 @@ SND_LoadWav (QFile *file, sfx_t *sfx, char *realname)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.frames / info.rate < 3) {
|
if (info.frames / info.rate < 3) {
|
||||||
Sys_DPrintf ("cache %s\n", realname);
|
Sys_MaskPrintf (SYS_DEV, "cache %s\n", realname);
|
||||||
wav_cache (sfx, realname, file, info);
|
wav_cache (sfx, realname, file, info);
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("stream %s\n", realname);
|
Sys_MaskPrintf (SYS_DEV, "stream %s\n", realname);
|
||||||
wav_stream (sfx, realname, file, info);
|
wav_stream (sfx, realname, file, info);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -315,7 +315,7 @@ SNDDMA_Submit (void)
|
||||||
// find which sound blocks have completed
|
// find which sound blocks have completed
|
||||||
while (1) {
|
while (1) {
|
||||||
if (snd_completed == snd_sent) {
|
if (snd_completed == snd_sent) {
|
||||||
Sys_DPrintf ("Sound overrun\n");
|
Sys_MaskPrintf (SYS_DEV, "Sound overrun\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -206,8 +206,9 @@ PR_RelocateBuiltins (progs_t *pr)
|
||||||
ind = pr->bi_map (pr, ind);
|
ind = pr->bi_map (pr, ind);
|
||||||
bi = PR_FindBuiltinNum (pr, ind);
|
bi = PR_FindBuiltinNum (pr, ind);
|
||||||
if (!bi || !(proc = bi->proc)) {
|
if (!bi || !(proc = bi->proc)) {
|
||||||
Sys_DPrintf ("WARNING: Bad builtin call number: %s = #%d\n",
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
bi_name, -desc->first_statement);
|
"WARNING: Bad builtin call number: %s = #%d\n",
|
||||||
|
bi_name, -desc->first_statement);
|
||||||
proc = bi_no_function;
|
proc = bi_no_function;
|
||||||
}
|
}
|
||||||
func->first_statement = desc->first_statement;
|
func->first_statement = desc->first_statement;
|
||||||
|
|
|
@ -161,7 +161,7 @@ PR_LoadProgsFile (progs_t *pr, QFile *file, int size, int edicts, int zone)
|
||||||
|
|
||||||
// size of progs themselves
|
// size of progs themselves
|
||||||
pr->progs_size = size + offset_tweak;
|
pr->progs_size = size + offset_tweak;
|
||||||
Sys_DPrintf ("Programs occupy %iK.\n", size / 1024);
|
Sys_MaskPrintf (SYS_DEV, "Programs occupy %iK.\n", size / 1024);
|
||||||
// round off to next highest whole word address (esp for Alpha)
|
// round off to next highest whole word address (esp for Alpha)
|
||||||
// this ensures that pointers in the engine data area are always
|
// this ensures that pointers in the engine data area are always
|
||||||
// properly aligned
|
// properly aligned
|
||||||
|
|
|
@ -75,13 +75,13 @@ void
|
||||||
GIB_Tree_Ref (gib_tree_t ** tp)
|
GIB_Tree_Ref (gib_tree_t ** tp)
|
||||||
{
|
{
|
||||||
(*tp)->refs++;
|
(*tp)->refs++;
|
||||||
// Sys_DPrintf ("Ref: %p %u\n", *tp, (*tp)->refs);
|
// Sys_MaskPrintf (SYS_DEV, "Ref: %p %u\n", *tp, (*tp)->refs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GIB_Tree_Unref (gib_tree_t ** tp)
|
GIB_Tree_Unref (gib_tree_t ** tp)
|
||||||
{
|
{
|
||||||
// Sys_DPrintf ("Unref: %p %u\n", *tp, (*tp)->refs - 1);
|
// Sys_MaskPrintf (SYS_DEV, "Unref: %p %u\n", *tp, (*tp)->refs - 1);
|
||||||
if (!(--(*tp)->refs)) {
|
if (!(--(*tp)->refs)) {
|
||||||
GIB_Tree_Free_Recursive (*tp);
|
GIB_Tree_Free_Recursive (*tp);
|
||||||
*tp = 0;
|
*tp = 0;
|
||||||
|
|
|
@ -235,7 +235,7 @@ skip_colormap (TargaHeader *targa, byte *data)
|
||||||
int bpe;
|
int bpe;
|
||||||
if (!targa->colormap_type)
|
if (!targa->colormap_type)
|
||||||
return data;
|
return data;
|
||||||
Sys_DPrintf ("LoadTGA: skipping colormap\n");
|
Sys_MaskPrintf (SYS_DEV, "LoadTGA: skipping colormap\n");
|
||||||
bpe = (targa->pixel_size +7) / 8;
|
bpe = (targa->pixel_size +7) / 8;
|
||||||
return data + bpe * targa->colormap_length;
|
return data + bpe * targa->colormap_length;
|
||||||
}
|
}
|
||||||
|
|
|
@ -322,8 +322,8 @@ BuildTris (void)
|
||||||
|
|
||||||
add_command (0); // end of list marker
|
add_command (0); // end of list marker
|
||||||
|
|
||||||
Sys_DPrintf ("%3i tri %3i vert %3i cmd\n", pheader->mdl.numtris, numorder,
|
Sys_MaskPrintf (SYS_DEV, "%3i tri %3i vert %3i cmd\n",
|
||||||
numcommands);
|
pheader->mdl.numtris, numorder, numcommands);
|
||||||
|
|
||||||
allverts += numorder;
|
allverts += numorder;
|
||||||
alltris += pheader->mdl.numtris;
|
alltris += pheader->mdl.numtris;
|
||||||
|
@ -434,7 +434,7 @@ Mod_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr, void *_m, int _s, i
|
||||||
}
|
}
|
||||||
if (remesh) {
|
if (remesh) {
|
||||||
// build it from scratch
|
// build it from scratch
|
||||||
Sys_DPrintf ("meshing %s...\n", m->name);
|
Sys_MaskPrintf (SYS_DEV, "meshing %s...\n", m->name);
|
||||||
|
|
||||||
BuildTris (); // trifans or lists
|
BuildTris (); // trifans or lists
|
||||||
|
|
||||||
|
|
|
@ -102,8 +102,8 @@ Mod_FloodFillSkin (byte * skin, int skinwidth, int skinheight)
|
||||||
}
|
}
|
||||||
// can't fill to filled color or transparent color (used as visited marker)
|
// can't fill to filled color or transparent color (used as visited marker)
|
||||||
if ((fillcolor == filledcolor) || (fillcolor == 255)) {
|
if ((fillcolor == filledcolor) || (fillcolor == 255)) {
|
||||||
Sys_DPrintf ("not filling skin from %d to %d\n",
|
Sys_MaskPrintf (SYS_DEV, "not filling skin from %d to %d\n",
|
||||||
fillcolor, filledcolor);
|
fillcolor, filledcolor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,13 +157,14 @@ Mod_LoadLighting (bsp_t *bsp)
|
||||||
&& data[3] == 'T') {
|
&& data[3] == 'T') {
|
||||||
ver = LittleLong (((int32_t *) data)[1]);
|
ver = LittleLong (((int32_t *) data)[1]);
|
||||||
if (ver == 1) {
|
if (ver == 1) {
|
||||||
Sys_DPrintf ("%s loaded", litfilename->str);
|
Sys_MaskPrintf (SYS_DEV, "%s loaded", litfilename->str);
|
||||||
loadmodel->lightdata = data + 8;
|
loadmodel->lightdata = data + 8;
|
||||||
return;
|
return;
|
||||||
} else
|
} else
|
||||||
Sys_DPrintf ("Unknown .lit file version (%d)\n", ver);
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"Unknown .lit file version (%d)\n", ver);
|
||||||
} else
|
} else
|
||||||
Sys_DPrintf ("Corrupt .lit file (old version?), ignoring\n");
|
Sys_MaskPrintf (SYS_DEV, "Corrupt .lit file (old version?)\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// LordHavoc: oh well, expand the white lighting data
|
// LordHavoc: oh well, expand the white lighting data
|
||||||
|
|
|
@ -76,7 +76,7 @@ Mod_Fullbright (byte *skin, int width, int height, char *name)
|
||||||
|
|
||||||
// Check for fullbright pixels
|
// Check for fullbright pixels
|
||||||
if (Mod_CalcFullbright (skin, ptexels, pixels)) {
|
if (Mod_CalcFullbright (skin, ptexels, pixels)) {
|
||||||
Sys_DPrintf ("FB Model ID: '%s'\n", name);
|
Sys_MaskPrintf (SYS_DEV, "FB Model ID: '%s'\n", name);
|
||||||
texnum = GL_LoadTexture (name, width, height, ptexels, true, true, 1);
|
texnum = GL_LoadTexture (name, width, height, ptexels, true, true, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -272,7 +272,7 @@ Mod_ForName (const char *name, qboolean crash)
|
||||||
|
|
||||||
mod = Mod_FindName (name);
|
mod = Mod_FindName (name);
|
||||||
|
|
||||||
Sys_DPrintf ("Mod_ForName: %s, %p\n", name, mod);
|
Sys_MaskPrintf (SYS_DEV, "Mod_ForName: %s, %p\n", name, mod);
|
||||||
return Mod_LoadModel (mod, crash);
|
return Mod_LoadModel (mod, crash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,7 @@ MOD_TraceLine (hull_t *hull, int num,
|
||||||
frac = (start_dist + offset) / (start_dist - end_dist);
|
frac = (start_dist + offset) / (start_dist - end_dist);
|
||||||
} else {
|
} else {
|
||||||
// get here only when offset is non-zero
|
// get here only when offset is non-zero
|
||||||
Sys_DPrintf ("foo\n");
|
Sys_MaskPrintf (SYS_DEV, "foo\n");
|
||||||
frac = 1;
|
frac = 1;
|
||||||
side = start_dist < end_dist;
|
side = start_dist < end_dist;
|
||||||
}
|
}
|
||||||
|
|
|
@ -888,9 +888,9 @@ NET_Init (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*my_ipx_address)
|
if (*my_ipx_address)
|
||||||
Sys_DPrintf ("IPX address %s\n", my_ipx_address);
|
Sys_MaskPrintf (SYS_DEV, "IPX address %s\n", my_ipx_address);
|
||||||
if (*my_tcpip_address)
|
if (*my_tcpip_address)
|
||||||
Sys_DPrintf ("TCP/IP address %s\n", my_tcpip_address);
|
Sys_MaskPrintf (SYS_DEV, "TCP/IP address %s\n", my_tcpip_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -343,14 +343,14 @@ Datagram_GetMessage (qsocket_t * sock)
|
||||||
|
|
||||||
if (flags & NETFLAG_UNRELIABLE) {
|
if (flags & NETFLAG_UNRELIABLE) {
|
||||||
if (sequence < sock->unreliableReceiveSequence) {
|
if (sequence < sock->unreliableReceiveSequence) {
|
||||||
Sys_DPrintf ("Got a stale datagram\n");
|
Sys_MaskPrintf (SYS_DEV, "Got a stale datagram\n");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (sequence != sock->unreliableReceiveSequence) {
|
if (sequence != sock->unreliableReceiveSequence) {
|
||||||
count = sequence - sock->unreliableReceiveSequence;
|
count = sequence - sock->unreliableReceiveSequence;
|
||||||
droppedDatagrams += count;
|
droppedDatagrams += count;
|
||||||
Sys_DPrintf ("Dropped %u datagram(s)\n", count);
|
Sys_MaskPrintf (SYS_DEV, "Dropped %u datagram(s)\n", count);
|
||||||
}
|
}
|
||||||
sock->unreliableReceiveSequence = sequence + 1;
|
sock->unreliableReceiveSequence = sequence + 1;
|
||||||
|
|
||||||
|
@ -365,15 +365,15 @@ Datagram_GetMessage (qsocket_t * sock)
|
||||||
|
|
||||||
if (flags & NETFLAG_ACK) {
|
if (flags & NETFLAG_ACK) {
|
||||||
if (sequence != (sock->sendSequence - 1)) {
|
if (sequence != (sock->sendSequence - 1)) {
|
||||||
Sys_DPrintf ("Stale ACK received\n");
|
Sys_MaskPrintf (SYS_DEV, "Stale ACK received\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (sequence == sock->ackSequence) {
|
if (sequence == sock->ackSequence) {
|
||||||
sock->ackSequence++;
|
sock->ackSequence++;
|
||||||
if (sock->ackSequence != sock->sendSequence)
|
if (sock->ackSequence != sock->sendSequence)
|
||||||
Sys_DPrintf ("ack sequencing error\n");
|
Sys_MaskPrintf (SYS_DEV, "ack sequencing error\n");
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("Duplicate ACK received\n");
|
Sys_MaskPrintf (SYS_DEV, "Duplicate ACK received\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sock->sendMessageLength -= MAX_DATAGRAM;
|
sock->sendMessageLength -= MAX_DATAGRAM;
|
||||||
|
|
|
@ -141,7 +141,7 @@ get_address (int sock)
|
||||||
if (ioctl (sock, SIOCGIFADDR, &ifr[i]) == -1)
|
if (ioctl (sock, SIOCGIFADDR, &ifr[i]) == -1)
|
||||||
continue;
|
continue;
|
||||||
in_addr = (struct sockaddr_in *)&ifr[i].ifr_addr;
|
in_addr = (struct sockaddr_in *)&ifr[i].ifr_addr;
|
||||||
Sys_DPrintf ("%s: %s\n", ifr[i].ifr_name,
|
Sys_MaskPrintf (SYS_DEV, "%s: %s\n", ifr[i].ifr_name,
|
||||||
inet_ntoa (in_addr->sin_addr));
|
inet_ntoa (in_addr->sin_addr));
|
||||||
addr = *(unsigned *)&in_addr->sin_addr;
|
addr = *(unsigned *)&in_addr->sin_addr;
|
||||||
if (addr != htonl (0x7f000001)) {
|
if (addr != htonl (0x7f000001)) {
|
||||||
|
|
|
@ -202,7 +202,7 @@ WINS_Init (void)
|
||||||
|
|
||||||
// determine my name
|
// determine my name
|
||||||
if (pgethostname (buff, MAXHOSTNAMELEN) == SOCKET_ERROR) {
|
if (pgethostname (buff, MAXHOSTNAMELEN) == SOCKET_ERROR) {
|
||||||
Sys_DPrintf ("Winsock TCP/IP Initialization failed.\n");
|
Sys_MaskPrintf (SYS_DEV, "Winsock TCP/IP Initialization failed.\n");
|
||||||
if (--winsock_initialized == 0)
|
if (--winsock_initialized == 0)
|
||||||
pWSACleanup ();
|
pWSACleanup ();
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -51,9 +51,10 @@ Garbage_Do_Mark (Object *root)
|
||||||
if (!root->marked) {
|
if (!root->marked) {
|
||||||
ObjRefs_t *allrefs;
|
ObjRefs_t *allrefs;
|
||||||
root->marked = true;
|
root->marked = true;
|
||||||
Sys_DPrintf ("GC: Marked %s@%p.\n", root->cl->name, root);
|
Sys_MaskPrintf (SYS_DEV, "GC: Marked %s@%p.\n", root->cl->name, root);
|
||||||
if (root->allRefs)
|
if (root->allRefs)
|
||||||
for (allrefs = methodCall(root, allRefs); allrefs; allrefs = allrefs->next) {
|
for (allrefs = methodCall(root, allRefs); allrefs;
|
||||||
|
allrefs = allrefs->next) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 0; i < allrefs->count; i++)
|
for (i = 0; i < allrefs->count; i++)
|
||||||
Garbage_Do_Mark (allrefs->objs[i]);
|
Garbage_Do_Mark (allrefs->objs[i]);
|
||||||
|
@ -81,7 +82,9 @@ Garbage_Do_Sweep (Object **allobjs)
|
||||||
obj->next = junk;
|
obj->next = junk;
|
||||||
junk = obj;
|
junk = obj;
|
||||||
junked++;
|
junked++;
|
||||||
Sys_DPrintf ("GC: %s@%p is ready for disposal...\n", obj->cl->name, obj);
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"GC: %s@%p is ready for disposal...\n",
|
||||||
|
obj->cl->name, obj);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
*prevNext = obj->next;
|
*prevNext = obj->next;
|
||||||
|
@ -108,7 +111,8 @@ Garbage_Dispose (Object **allobjs, unsigned int amount)
|
||||||
junk->next = *allobjs;
|
junk->next = *allobjs;
|
||||||
*allobjs = junk;
|
*allobjs = junk;
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("GC: Disposing of %s@%p...\n", junk->cl->name, junk);
|
Sys_MaskPrintf (SYS_DEV, "GC: Disposing of %s@%p...\n",
|
||||||
|
junk->cl->name, junk);
|
||||||
Object_Delete (junk);
|
Object_Delete (junk);
|
||||||
junked--;
|
junked--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,8 @@ PushBackbuf (backbuf_t *rel)
|
||||||
{
|
{
|
||||||
int tail_backbuf;
|
int tail_backbuf;
|
||||||
|
|
||||||
Sys_DPrintf ("backbuffering %d %s\n", rel->num_backbuf, rel->name);
|
Sys_MaskPrintf (SYS_DEV, "backbuffering %d %s\n", rel->num_backbuf,
|
||||||
|
rel->name);
|
||||||
tail_backbuf = (rel->head_backbuf + rel->num_backbuf) % MAX_BACK_BUFFERS;
|
tail_backbuf = (rel->head_backbuf + rel->num_backbuf) % MAX_BACK_BUFFERS;
|
||||||
memset (&rel->backbuf, 0, sizeof (rel->backbuf));
|
memset (&rel->backbuf, 0, sizeof (rel->backbuf));
|
||||||
rel->backbuf.allowoverflow = true;
|
rel->backbuf.allowoverflow = true;
|
||||||
|
@ -268,7 +269,7 @@ MSG_Reliable_Send (backbuf_t *rel)
|
||||||
return;
|
return;
|
||||||
// will it fit?
|
// will it fit?
|
||||||
if (msg->cursize + *size < msg->maxsize) {
|
if (msg->cursize + *size < msg->maxsize) {
|
||||||
Sys_DPrintf ("%s: backbuf %d bytes\n", rel->name, *size);
|
Sys_MaskPrintf (SYS_DEV, "%s: backbuf %d bytes\n", rel->name, *size);
|
||||||
// it'll fit
|
// it'll fit
|
||||||
SZ_Write (msg, data, *size);
|
SZ_Write (msg, data, *size);
|
||||||
|
|
||||||
|
|
|
@ -376,8 +376,8 @@ finish_class (progs_t *pr, pr_class_t *class, pointer_t object_ptr)
|
||||||
ml = &G_STRUCT (pr, pr_method_list_t, *ml).method_next;
|
ml = &G_STRUCT (pr, pr_method_list_t, *ml).method_next;
|
||||||
*ml = class->methods;
|
*ml = class->methods;
|
||||||
}
|
}
|
||||||
Sys_DPrintf (" %d %d %d\n", meta->class_pointer, meta->super_class,
|
Sys_MaskPrintf (SYS_DEV, " %d %d %d\n", meta->class_pointer,
|
||||||
class->super_class);
|
meta->super_class, class->super_class);
|
||||||
}
|
}
|
||||||
|
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
|
|
@ -147,7 +147,8 @@ Cmd_AddCommand (const char *cmd_name, xcommand_t function,
|
||||||
// fail if the command already exists
|
// fail if the command already exists
|
||||||
cmd = (cmd_function_t *) Hash_Find (cmd_hash, cmd_name);
|
cmd = (cmd_function_t *) Hash_Find (cmd_hash, cmd_name);
|
||||||
if (cmd) {
|
if (cmd) {
|
||||||
Sys_DPrintf ("Cmd_AddCommand: %s already defined\n", cmd_name);
|
Sys_MaskPrintf (SYS_DEV, "Cmd_AddCommand: %s already defined\n",
|
||||||
|
cmd_name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -237,7 +237,8 @@ Cvar_Set (cvar_t *var, const char *value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (var->flags & CVAR_ROM) {
|
if (var->flags & CVAR_ROM) {
|
||||||
Sys_DPrintf ("Cvar \"%s\" is read-only, cannot modify\n", var->name);
|
Sys_MaskPrintf (SYS_DEV, "Cvar \"%s\" is read-only, cannot modify\n",
|
||||||
|
var->name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,8 +353,9 @@ set_cvar (const char *cmd, int orflags)
|
||||||
|
|
||||||
if (var) {
|
if (var) {
|
||||||
if (var->flags & CVAR_ROM) {
|
if (var->flags & CVAR_ROM) {
|
||||||
Sys_DPrintf ("Cvar \"%s\" is read-only, cannot modify\n",
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
var_name);
|
"Cvar \"%s\" is read-only, cannot modify\n",
|
||||||
|
var_name);
|
||||||
} else {
|
} else {
|
||||||
Cvar_Set (var, value);
|
Cvar_Set (var, value);
|
||||||
Cvar_SetFlags (var, var->flags | orflags);
|
Cvar_SetFlags (var, var->flags | orflags);
|
||||||
|
|
|
@ -341,7 +341,7 @@ PI_LoadPlugin (const char *type, const char *name)
|
||||||
// try to reopen
|
// try to reopen
|
||||||
if (!(dlhand = pi_open_lib (realname, 1))) {
|
if (!(dlhand = pi_open_lib (realname, 1))) {
|
||||||
Sys_Printf ("Error reopening plugin \"%s\".\n", realname);
|
Sys_Printf ("Error reopening plugin \"%s\".\n", realname);
|
||||||
Sys_DPrintf ("Reason: \"%s\".\n", pi_error);
|
Sys_MaskPrintf (SYS_DEV, "Reason: \"%s\".\n", pi_error);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -387,8 +387,9 @@ PI_UnloadPlugin (plugin_t *plugin)
|
||||||
&& plugin->functions->general->p_Shutdown) {
|
&& plugin->functions->general->p_Shutdown) {
|
||||||
plugin->functions->general->p_Shutdown ();
|
plugin->functions->general->p_Shutdown ();
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("Warning: No shutdown function for type %d plugin!\n",
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
plugin->type);
|
"Warning: No shutdown function for type %d plugin!\n",
|
||||||
|
plugin->type);
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove from the table of loaded plugins
|
// remove from the table of loaded plugins
|
||||||
|
|
|
@ -549,15 +549,15 @@ qfs_build_gamedir (const char **list)
|
||||||
gamedir->dir.maps = nva ("%s/maps", gamedir->dir.def);
|
gamedir->dir.maps = nva ("%s/maps", gamedir->dir.def);
|
||||||
|
|
||||||
qfs_gamedir = gamedir;
|
qfs_gamedir = gamedir;
|
||||||
Sys_DPrintf ("%s\n", qfs_gamedir->name);
|
Sys_MaskPrintf (SYS_DEV, "%s\n", qfs_gamedir->name);
|
||||||
Sys_DPrintf (" gamedir : %s\n", qfs_gamedir->gamedir);
|
Sys_MaskPrintf (SYS_DEV, " gamedir : %s\n", qfs_gamedir->gamedir);
|
||||||
Sys_DPrintf (" path : %s\n", qfs_gamedir->path);
|
Sys_MaskPrintf (SYS_DEV, " path : %s\n", qfs_gamedir->path);
|
||||||
Sys_DPrintf (" gamecode: %s\n", qfs_gamedir->gamecode);
|
Sys_MaskPrintf (SYS_DEV, " gamecode: %s\n", qfs_gamedir->gamecode);
|
||||||
Sys_DPrintf (" def : %s\n", qfs_gamedir->dir.def);
|
Sys_MaskPrintf (SYS_DEV, " def : %s\n", qfs_gamedir->dir.def);
|
||||||
Sys_DPrintf (" skins : %s\n", qfs_gamedir->dir.skins);
|
Sys_MaskPrintf (SYS_DEV, " skins : %s\n", qfs_gamedir->dir.skins);
|
||||||
Sys_DPrintf (" models : %s\n", qfs_gamedir->dir.models);
|
Sys_MaskPrintf (SYS_DEV, " models : %s\n", qfs_gamedir->dir.models);
|
||||||
Sys_DPrintf (" sound : %s\n", qfs_gamedir->dir.sound);
|
Sys_MaskPrintf (SYS_DEV, " sound : %s\n", qfs_gamedir->dir.sound);
|
||||||
Sys_DPrintf (" maps : %s\n", qfs_gamedir->dir.maps);
|
Sys_MaskPrintf (SYS_DEV, " maps : %s\n", qfs_gamedir->dir.maps);
|
||||||
qfs_process_path (qfs_gamedir->path, dir);
|
qfs_process_path (qfs_gamedir->path, dir);
|
||||||
free (path);
|
free (path);
|
||||||
Hash_DelTable (dirs);
|
Hash_DelTable (dirs);
|
||||||
|
@ -575,8 +575,9 @@ qfs_load_config (void)
|
||||||
if (*fs_dirconf->string) {
|
if (*fs_dirconf->string) {
|
||||||
dirconf = Sys_ExpandSquiggle (fs_dirconf->string);
|
dirconf = Sys_ExpandSquiggle (fs_dirconf->string);
|
||||||
if (!(f = Qopen (dirconf, "rt")))
|
if (!(f = Qopen (dirconf, "rt")))
|
||||||
Sys_DPrintf ("Could not load `%s', using builtin defaults\n",
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
dirconf);
|
"Could not load `%s', using builtin defaults\n",
|
||||||
|
dirconf);
|
||||||
free (dirconf);
|
free (dirconf);
|
||||||
}
|
}
|
||||||
if (!f)
|
if (!f)
|
||||||
|
@ -826,8 +827,8 @@ open_file (searchpath_t *search, const char *filename, QFile **gzfile,
|
||||||
|
|
||||||
packfile = pack_find_file (search->pack, filename);
|
packfile = pack_find_file (search->pack, filename);
|
||||||
if (packfile) {
|
if (packfile) {
|
||||||
Sys_DPrintf ("PackFile: %s : %s\n", search->pack->filename,
|
Sys_MaskPrintf (SYS_DEV, "PackFile: %s : %s\n",
|
||||||
packfile->name);
|
search->pack->filename, packfile->name);
|
||||||
// open a new file on the pakfile
|
// open a new file on the pakfile
|
||||||
if (foundname) {
|
if (foundname) {
|
||||||
dstring_clearstr (foundname);
|
dstring_clearstr (foundname);
|
||||||
|
@ -852,7 +853,7 @@ open_file (searchpath_t *search, const char *filename, QFile **gzfile,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_DPrintf ("FindFile: %s\n", netpath->str);
|
Sys_MaskPrintf (SYS_DEV, "FindFile: %s\n", netpath->str);
|
||||||
|
|
||||||
*gzfile = qfs_openread (netpath->str, -1, -1, zip);
|
*gzfile = qfs_openread (netpath->str, -1, -1, zip);
|
||||||
dstring_delete (netpath);
|
dstring_delete (netpath);
|
||||||
|
@ -881,7 +882,9 @@ _QFS_FOpenFile (const char *filename, QFile **gzfile,
|
||||||
// make sure they're not trying to do weird stuff with our private files
|
// make sure they're not trying to do weird stuff with our private files
|
||||||
path = QFS_CompressPath (filename);
|
path = QFS_CompressPath (filename);
|
||||||
if (qfs_contains_updir(path, 1)) {
|
if (qfs_contains_updir(path, 1)) {
|
||||||
Sys_DPrintf ("FindFile: %s: attempt to escape directory tree!\n", path);
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"FindFile: %s: attempt to escape directory tree!\n",
|
||||||
|
path);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -916,7 +919,7 @@ _QFS_FOpenFile (const char *filename, QFile **gzfile,
|
||||||
goto ok;
|
goto ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_DPrintf ("FindFile: can't find %s\n", filename);
|
Sys_MaskPrintf (SYS_DEV, "FindFile: can't find %s\n", filename);
|
||||||
error:
|
error:
|
||||||
*gzfile = NULL;
|
*gzfile = NULL;
|
||||||
qfs_filesize = -1;
|
qfs_filesize = -1;
|
||||||
|
@ -1027,7 +1030,7 @@ qfs_load_pakfile (char *packfile)
|
||||||
pack_t *pack = pack_open (packfile);
|
pack_t *pack = pack_open (packfile);
|
||||||
|
|
||||||
if (pack)
|
if (pack)
|
||||||
Sys_DPrintf ("Added packfile %s (%i files)\n",
|
Sys_MaskPrintf (SYS_DEV, "Added packfile %s (%i files)\n",
|
||||||
packfile, pack->numfiles);
|
packfile, pack->numfiles);
|
||||||
return pack;
|
return pack;
|
||||||
}
|
}
|
||||||
|
@ -1077,7 +1080,7 @@ qfs_load_gamedir (const char *dir)
|
||||||
char **pakfiles = NULL;
|
char **pakfiles = NULL;
|
||||||
int i = 0, bufsize = 0, count = 0;
|
int i = 0, bufsize = 0, count = 0;
|
||||||
|
|
||||||
Sys_DPrintf ("qfs_load_gamedir (\"%s\")\n", dir);
|
Sys_MaskPrintf (SYS_DEV, "qfs_load_gamedir (\"%s\")\n", dir);
|
||||||
|
|
||||||
pakfiles = calloc (1, FBLOCK_SIZE * sizeof (char *));
|
pakfiles = calloc (1, FBLOCK_SIZE * sizeof (char *));
|
||||||
|
|
||||||
|
@ -1185,7 +1188,8 @@ qfs_add_gamedir (const char *dir)
|
||||||
Sys_Printf ("dropping bad directory %s\n", dir);
|
Sys_Printf ("dropping bad directory %s\n", dir);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Sys_DPrintf ("qfs_add_gamedir (\"%s\")\n", f_dir->str);
|
Sys_MaskPrintf (SYS_DEV, "qfs_add_gamedir (\"%s\")\n",
|
||||||
|
f_dir->str);
|
||||||
|
|
||||||
qfs_add_dir (f_dir->str);
|
qfs_add_dir (f_dir->str);
|
||||||
}
|
}
|
||||||
|
@ -1194,7 +1198,7 @@ qfs_add_gamedir (const char *dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
qfs_expand_userpath (f_dir, dir);
|
qfs_expand_userpath (f_dir, dir);
|
||||||
Sys_DPrintf ("qfs_add_gamedir (\"%s\")\n", f_dir->str);
|
Sys_MaskPrintf (SYS_DEV, "qfs_add_gamedir (\"%s\")\n", f_dir->str);
|
||||||
qfs_add_dir (f_dir->str);
|
qfs_add_dir (f_dir->str);
|
||||||
|
|
||||||
dstring_delete (f_dir);
|
dstring_delete (f_dir);
|
||||||
|
@ -1409,7 +1413,7 @@ QFS_Open (const char *path, const char *mode)
|
||||||
int write = 0;
|
int write = 0;
|
||||||
|
|
||||||
if (qfs_expand_userpath (full_path, path) == 0) {
|
if (qfs_expand_userpath (full_path, path) == 0) {
|
||||||
Sys_DPrintf ("QFS_Open: %s %s\n", full_path->str, mode);
|
Sys_MaskPrintf (SYS_DEV, "QFS_Open: %s %s\n", full_path->str, mode);
|
||||||
for (m = mode; *m; m++)
|
for (m = mode; *m; m++)
|
||||||
if (*m == 'w' || *m == '+' || *m == 'a')
|
if (*m == 'w' || *m == '+' || *m == 'a')
|
||||||
write = 1;
|
write = 1;
|
||||||
|
|
|
@ -266,11 +266,11 @@ Sys_Printf (const char *fmt, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
VISIBLE void
|
VISIBLE void
|
||||||
Sys_DPrintf (const char *fmt, ...)
|
Sys_MaskPrintf (int mask, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
if (!developer || !developer->int_val)
|
if (!developer || !(developer->int_val & mask))
|
||||||
return;
|
return;
|
||||||
va_start (args, fmt);
|
va_start (args, fmt);
|
||||||
sys_std_printf_function (fmt, args);
|
sys_std_printf_function (fmt, args);
|
||||||
|
|
|
@ -592,7 +592,7 @@ Cache_Move (cache_system_t * c)
|
||||||
// we are clearing up space at the bottom, so allocate it late
|
// we are clearing up space at the bottom, so allocate it late
|
||||||
new = Cache_TryAlloc (c->size, true);
|
new = Cache_TryAlloc (c->size, true);
|
||||||
if (new) {
|
if (new) {
|
||||||
Sys_DPrintf ("cache_move ok\n");
|
Sys_MaskPrintf (SYS_DEV, "cache_move ok\n");
|
||||||
|
|
||||||
memcpy (new + 1, c + 1, c->size - sizeof (cache_system_t));
|
memcpy (new + 1, c + 1, c->size - sizeof (cache_system_t));
|
||||||
new->user = c->user;
|
new->user = c->user;
|
||||||
|
@ -600,7 +600,7 @@ Cache_Move (cache_system_t * c)
|
||||||
Cache_Free (c->user);
|
Cache_Free (c->user);
|
||||||
new->user->data = (void *) (new + 1);
|
new->user->data = (void *) (new + 1);
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("cache_move failed\n");
|
Sys_MaskPrintf (SYS_DEV, "cache_move failed\n");
|
||||||
|
|
||||||
Cache_Free (c->user); // tough luck...
|
Cache_Free (c->user); // tough luck...
|
||||||
}
|
}
|
||||||
|
@ -856,7 +856,7 @@ Cache_Free (cache_user_t *c)
|
||||||
if (cs->readlock)
|
if (cs->readlock)
|
||||||
Sys_Error ("Cache_Free: attempt to free locked block");
|
Sys_Error ("Cache_Free: attempt to free locked block");
|
||||||
|
|
||||||
Sys_DPrintf ("Cache_Free: freeing '%s' %p\n", cs->name, cs);
|
Sys_MaskPrintf (SYS_DEV, "Cache_Free: freeing '%s' %p\n", cs->name, cs);
|
||||||
|
|
||||||
Cache_UnlinkLRU (cs);
|
Cache_UnlinkLRU (cs);
|
||||||
|
|
||||||
|
@ -919,9 +919,9 @@ Cache_Alloc (cache_user_t *c, int size, const char *name)
|
||||||
VISIBLE void
|
VISIBLE void
|
||||||
Cache_Report (void)
|
Cache_Report (void)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("%4.1f megabyte data cache\n",
|
Sys_MaskPrintf (SYS_DEV, "%4.1f megabyte data cache\n",
|
||||||
(hunk_size - hunk_high_used -
|
(hunk_size - hunk_high_used -
|
||||||
hunk_low_used) / (float) (1024 * 1024));
|
hunk_low_used) / (float) (1024 * 1024));
|
||||||
}
|
}
|
||||||
|
|
||||||
VISIBLE void
|
VISIBLE void
|
||||||
|
|
|
@ -134,7 +134,8 @@ Draw_InitText (void)
|
||||||
tVAsize = 0;
|
tVAsize = 0;
|
||||||
|
|
||||||
if (tVAsize) {
|
if (tVAsize) {
|
||||||
Sys_DPrintf ("Text: %i maximum vertex elements.\n", tVAsize);
|
Sys_MaskPrintf (SYS_DEV, "Text: %i maximum vertex elements.\n",
|
||||||
|
tVAsize);
|
||||||
|
|
||||||
if (textVertices)
|
if (textVertices)
|
||||||
free (textVertices);
|
free (textVertices);
|
||||||
|
@ -152,7 +153,7 @@ Draw_InitText (void)
|
||||||
for (i = 0; i < tVAsize; i++)
|
for (i = 0; i < tVAsize; i++)
|
||||||
tVAindices[i] = i;
|
tVAindices[i] = i;
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("Text: Vertex Array use disabled.\n");
|
Sys_MaskPrintf (SYS_DEV, "Text: Vertex Array use disabled.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,9 @@ R_InitParticles (void)
|
||||||
else
|
else
|
||||||
pVAsize = 0;
|
pVAsize = 0;
|
||||||
if (pVAsize) {
|
if (pVAsize) {
|
||||||
Sys_DPrintf ("Particles: %i maximum vertex elements.\n", pVAsize);
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"Particles: %i maximum vertex elements.\n",
|
||||||
|
pVAsize);
|
||||||
|
|
||||||
if (particleVertexArray)
|
if (particleVertexArray)
|
||||||
free (particleVertexArray);
|
free (particleVertexArray);
|
||||||
|
@ -175,7 +177,8 @@ R_InitParticles (void)
|
||||||
for (i = 0; i < pVAsize; i++)
|
for (i = 0; i < pVAsize; i++)
|
||||||
pVAindices[i] = i;
|
pVAindices[i] = i;
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("Particles: Vertex Array use disabled.\n");
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"Particles: Vertex Array use disabled.\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (particleVertexArray) {
|
if (particleVertexArray) {
|
||||||
|
@ -212,7 +215,7 @@ R_ReadPointFile_f (void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_DPrintf ("Reading %s...\n", name);
|
Sys_MaskPrintf (SYS_DEV, "Reading %s...\n", name);
|
||||||
c = 0;
|
c = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char buf[64];
|
char buf[64];
|
||||||
|
@ -224,7 +227,7 @@ R_ReadPointFile_f (void)
|
||||||
c++;
|
c++;
|
||||||
|
|
||||||
if (numparticles >= r_maxparticles) {
|
if (numparticles >= r_maxparticles) {
|
||||||
Sys_DPrintf ("Not enough free particles\n");
|
Sys_MaskPrintf (SYS_DEV, "Not enough free particles\n");
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
particle_new (pt_static, part_tex_dot, org, 1.5, vec3_origin,
|
particle_new (pt_static, part_tex_dot, org, 1.5, vec3_origin,
|
||||||
|
@ -232,7 +235,7 @@ R_ReadPointFile_f (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Qclose (f);
|
Qclose (f);
|
||||||
Sys_DPrintf ("%i points read\n", c);
|
Sys_MaskPrintf (SYS_DEV, "%i points read\n", c);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1547,7 +1550,8 @@ R_ParticlePhysics (particle_t *part)
|
||||||
part->scale -= time2;
|
part->scale -= time2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Sys_DPrintf ("unhandled particle type %d\n", part->type);
|
Sys_MaskPrintf (SYS_DEV, "unhandled particle type %d\n",
|
||||||
|
part->type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,8 +257,9 @@ GL_GetAliasFrameVerts16 (int frame, aliashdr_t *paliashdr, entity_t *e)
|
||||||
|
|
||||||
if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
|
if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
|
||||||
if (developer->int_val)
|
if (developer->int_val)
|
||||||
Sys_DPrintf ("R_AliasSetupFrame: no such frame %d %s\n", frame,
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
currententity->model->name);
|
"R_AliasSetupFrame: no such frame %d %s\n", frame,
|
||||||
|
currententity->model->name);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,8 +364,9 @@ GL_GetAliasFrameVerts (int frame, aliashdr_t *paliashdr, entity_t *e)
|
||||||
|
|
||||||
if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
|
if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
|
||||||
if (developer->int_val)
|
if (developer->int_val)
|
||||||
Sys_DPrintf ("R_AliasSetupFrame: no such frame %d %s\n", frame,
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
currententity->model->name);
|
"R_AliasSetupFrame: no such frame %d %s\n", frame,
|
||||||
|
currententity->model->name);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,7 +468,8 @@ R_AliasGetSkindesc (int skinnum, aliashdr_t *ahdr)
|
||||||
maliasskingroup_t *paliasskingroup;
|
maliasskingroup_t *paliasskingroup;
|
||||||
|
|
||||||
if ((skinnum >= ahdr->mdl.numskins) || (skinnum < 0)) {
|
if ((skinnum >= ahdr->mdl.numskins) || (skinnum < 0)) {
|
||||||
Sys_DPrintf ("R_AliasSetupSkin: no such skin # %d\n", skinnum);
|
Sys_MaskPrintf (SYS_DEV, "R_AliasSetupSkin: no such skin # %d\n",
|
||||||
|
skinnum);
|
||||||
skinnum = 0;
|
skinnum = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ R_GetSpriteFrame (entity_t *currententity)
|
||||||
frame = currententity->frame;
|
frame = currententity->frame;
|
||||||
|
|
||||||
if ((frame >= psprite->numframes) || (frame < 0)) {
|
if ((frame >= psprite->numframes) || (frame < 0)) {
|
||||||
Sys_DPrintf ("R_DrawSprite: no such frame %d\n", frame);
|
Sys_MaskPrintf (SYS_DEV, "R_DrawSprite: no such frame %d\n", frame);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +260,8 @@ R_InitSprites (void)
|
||||||
#else
|
#else
|
||||||
sVAsize = 4;
|
sVAsize = 4;
|
||||||
#endif
|
#endif
|
||||||
Sys_DPrintf ("Sprites: %i maximum vertex elements.\n", sVAsize);
|
Sys_MaskPrintf (SYS_DEV, "Sprites: %i maximum vertex elements.\n",
|
||||||
|
sVAsize);
|
||||||
|
|
||||||
if (spriteVertexArray)
|
if (spriteVertexArray)
|
||||||
free (spriteVertexArray);
|
free (spriteVertexArray);
|
||||||
|
|
|
@ -807,15 +807,15 @@ R_InitFishEyeOnce (void)
|
||||||
|
|
||||||
if (fisheye_init_once_completed)
|
if (fisheye_init_once_completed)
|
||||||
return 1;
|
return 1;
|
||||||
Sys_DPrintf ("GL_ARB_texture_cube_map ");
|
Sys_MaskPrintf (SYS_DEV, "GL_ARB_texture_cube_map ");
|
||||||
if (QFGL_ExtensionPresent ("GL_ARB_texture_cube_map")) {
|
if (QFGL_ExtensionPresent ("GL_ARB_texture_cube_map")) {
|
||||||
qfglGetIntegerv (GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB,
|
qfglGetIntegerv (GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB,
|
||||||
&gl_cube_map_maxtex);
|
&gl_cube_map_maxtex);
|
||||||
Sys_DPrintf ("present, max texture size %d.\n",
|
Sys_MaskPrintf (SYS_DEV, "present, max texture size %d.\n",
|
||||||
(int) gl_cube_map_maxtex);
|
(int) gl_cube_map_maxtex);
|
||||||
gl_cube_map_capable = true;
|
gl_cube_map_capable = true;
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("not found.\n");
|
Sys_MaskPrintf (SYS_DEV, "not found.\n");
|
||||||
gl_cube_map_capable = false;
|
gl_cube_map_capable = false;
|
||||||
}
|
}
|
||||||
fisheye_init_once_completed = true;
|
fisheye_init_once_completed = true;
|
||||||
|
|
|
@ -232,7 +232,7 @@ R_TimeRefresh_f (void)
|
||||||
|
|
||||||
stop = Sys_DoubleTime ();
|
stop = Sys_DoubleTime ();
|
||||||
time = stop - start;
|
time = stop - start;
|
||||||
Sys_DPrintf ("%f seconds (%f fps)\n", time, 128 / time);
|
Sys_MaskPrintf (SYS_DEV, "%f seconds (%f fps)\n", time, 128 / time);
|
||||||
}
|
}
|
||||||
|
|
||||||
VISIBLE void
|
VISIBLE void
|
||||||
|
|
|
@ -263,9 +263,9 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs)
|
||||||
if (r_speeds->int_val) {
|
if (r_speeds->int_val) {
|
||||||
// qfglFinish ();
|
// qfglFinish ();
|
||||||
time2 = Sys_DoubleTime ();
|
time2 = Sys_DoubleTime ();
|
||||||
Sys_DPrintf ("%3i ms %4i wpoly %4i epoly %4i parts\n",
|
Sys_MaskPrintf (SYS_DEV, "%3i ms %4i wpoly %4i epoly %4i parts\n",
|
||||||
(int) ((time2 - time1) * 1000), c_brush_polys,
|
(int) ((time2 - time1) * 1000), c_brush_polys,
|
||||||
c_alias_polys, numparticles);
|
c_alias_polys, numparticles);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL_FlushText ();
|
GL_FlushText ();
|
||||||
|
|
|
@ -221,8 +221,8 @@ Skin_Do_Translation_Model (model_t *model, int skinnum, int slot, skin_t *skin)
|
||||||
paliashdr = Cache_Get (&model->cache);
|
paliashdr = Cache_Get (&model->cache);
|
||||||
if (skinnum < 0
|
if (skinnum < 0
|
||||||
|| skinnum >= paliashdr->mdl.numskins) {
|
|| skinnum >= paliashdr->mdl.numskins) {
|
||||||
Sys_DPrintf ("(%d): Invalid player skin #%d\n", slot,
|
Sys_MaskPrintf (SYS_DEV, "(%d): Invalid player skin #%d\n", slot,
|
||||||
skinnum);
|
skinnum);
|
||||||
skinnum = 0;
|
skinnum = 0;
|
||||||
}
|
}
|
||||||
pskindesc = ((maliasskindesc_t *)
|
pskindesc = ((maliasskindesc_t *)
|
||||||
|
|
|
@ -129,11 +129,11 @@ R_LoadSkys (const char *skyname)
|
||||||
|
|
||||||
targa = LoadImage (name = va ("env/%s%s", skyname, suf[i]));
|
targa = LoadImage (name = va ("env/%s%s", skyname, suf[i]));
|
||||||
if (!targa || targa->format < 3) { // FIXME Can't do PCX right now
|
if (!targa || targa->format < 3) { // FIXME Can't do PCX right now
|
||||||
Sys_DPrintf ("Couldn't load %s\n", name);
|
Sys_MaskPrintf (SYS_DEV, "Couldn't load %s\n", name);
|
||||||
// also look in gfx/env, where Darkplaces looks for skies
|
// also look in gfx/env, where Darkplaces looks for skies
|
||||||
targa = LoadImage (name = va ("gfx/env/%s%s", skyname, suf[i]));
|
targa = LoadImage (name = va ("gfx/env/%s%s", skyname, suf[i]));
|
||||||
if (!targa) {
|
if (!targa) {
|
||||||
Sys_DPrintf ("Couldn't load %s\n", name);
|
Sys_MaskPrintf (SYS_DEV, "Couldn't load %s\n", name);
|
||||||
skyloaded = false;
|
skyloaded = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ bi_Draw_CachePic (progs_t *pr)
|
||||||
qpic_res_t *rpic = Hash_Find (res->pic_hash, path);
|
qpic_res_t *rpic = Hash_Find (res->pic_hash, path);
|
||||||
|
|
||||||
if (!pic) {
|
if (!pic) {
|
||||||
Sys_DPrintf ("can't load %s\n", path);
|
Sys_MaskPrintf (SYS_DEV, "can't load %s\n", path);
|
||||||
R_INT (pr) = 0;
|
R_INT (pr) = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ D_ClearCacheGuard (void)
|
||||||
void
|
void
|
||||||
D_InitCaches (void *buffer, int size)
|
D_InitCaches (void *buffer, int size)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("D_InitCaches: %ik surface cache\n", size/1024);
|
Sys_MaskPrintf (SYS_DEV, "D_InitCaches: %ik surface cache\n", size/1024);
|
||||||
|
|
||||||
sc_size = size - GUARDSIZE;
|
sc_size = size - GUARDSIZE;
|
||||||
sc_base = (surfcache_t *) buffer;
|
sc_base = (surfcache_t *) buffer;
|
||||||
|
|
|
@ -113,7 +113,7 @@ R_AliasCheckBBox (void)
|
||||||
frame = currententity->frame;
|
frame = currententity->frame;
|
||||||
// TODO: don't repeat this check when drawing?
|
// TODO: don't repeat this check when drawing?
|
||||||
if ((frame >= pmdl->numframes) || (frame < 0)) {
|
if ((frame >= pmdl->numframes) || (frame < 0)) {
|
||||||
Sys_DPrintf ("No such frame %d %s\n", frame, pmodel->name);
|
Sys_MaskPrintf (SYS_DEV, "No such frame %d %s\n", frame, pmodel->name);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -558,7 +558,8 @@ R_AliasSetupSkin (void)
|
||||||
|
|
||||||
skinnum = currententity->skinnum;
|
skinnum = currententity->skinnum;
|
||||||
if ((skinnum >= pmdl->numskins) || (skinnum < 0)) {
|
if ((skinnum >= pmdl->numskins) || (skinnum < 0)) {
|
||||||
Sys_DPrintf ("R_AliasSetupSkin: no such skin # %d\n", skinnum);
|
Sys_MaskPrintf (SYS_DEV, "R_AliasSetupSkin: no such skin # %d\n",
|
||||||
|
skinnum);
|
||||||
skinnum = 0;
|
skinnum = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -651,7 +652,8 @@ R_AliasSetupFrame (void)
|
||||||
|
|
||||||
frame = currententity->frame;
|
frame = currententity->frame;
|
||||||
if ((frame >= pmdl->numframes) || (frame < 0)) {
|
if ((frame >= pmdl->numframes) || (frame < 0)) {
|
||||||
Sys_DPrintf ("R_AliasSetupFrame: no such frame %d\n", frame);
|
Sys_MaskPrintf (SYS_DEV, "R_AliasSetupFrame: no such frame %d\n",
|
||||||
|
frame);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -832,7 +832,8 @@ R_DrawParticles (void)
|
||||||
p->vel[2] -= grav;
|
p->vel[2] -= grav;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Sys_DPrintf ("unhandled particle type %d\n", p->type);
|
Sys_MaskPrintf (SYS_DEV, "unhandled particle type %d\n",
|
||||||
|
p->type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ D_ClearCacheGuard (void)
|
||||||
void
|
void
|
||||||
D_InitCaches (void *buffer, int size)
|
D_InitCaches (void *buffer, int size)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("D_InitCaches: %ik surface cache\n", size/1024);
|
Sys_MaskPrintf (SYS_DEV, "D_InitCaches: %ik surface cache\n", size/1024);
|
||||||
|
|
||||||
sc_size = size - GUARDSIZE;
|
sc_size = size - GUARDSIZE;
|
||||||
sc_base = (surfcache_t *) buffer;
|
sc_base = (surfcache_t *) buffer;
|
||||||
|
|
|
@ -113,7 +113,7 @@ R_AliasCheckBBox (void)
|
||||||
frame = currententity->frame;
|
frame = currententity->frame;
|
||||||
// TODO: don't repeat this check when drawing?
|
// TODO: don't repeat this check when drawing?
|
||||||
if ((frame >= pmdl->numframes) || (frame < 0)) {
|
if ((frame >= pmdl->numframes) || (frame < 0)) {
|
||||||
Sys_DPrintf ("No such frame %d %s\n", frame, pmodel->name);
|
Sys_MaskPrintf (SYS_DEV, "No such frame %d %s\n", frame, pmodel->name);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,7 +553,8 @@ R_AliasSetupSkin (void)
|
||||||
|
|
||||||
skinnum = currententity->skinnum;
|
skinnum = currententity->skinnum;
|
||||||
if ((skinnum >= pmdl->numskins) || (skinnum < 0)) {
|
if ((skinnum >= pmdl->numskins) || (skinnum < 0)) {
|
||||||
Sys_DPrintf ("R_AliasSetupSkin: no such skin # %d\n", skinnum);
|
Sys_MaskPrintf (SYS_DEV, "R_AliasSetupSkin: no such skin # %d\n",
|
||||||
|
skinnum);
|
||||||
skinnum = 0;
|
skinnum = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,7 +647,8 @@ R_AliasSetupFrame (void)
|
||||||
|
|
||||||
frame = currententity->frame;
|
frame = currententity->frame;
|
||||||
if ((frame >= pmdl->numframes) || (frame < 0)) {
|
if ((frame >= pmdl->numframes) || (frame < 0)) {
|
||||||
Sys_DPrintf ("R_AliasSetupFrame: no such frame %d\n", frame);
|
Sys_MaskPrintf (SYS_DEV, "R_AliasSetupFrame: no such frame %d\n",
|
||||||
|
frame);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -842,7 +842,8 @@ R_DrawParticles (void)
|
||||||
p->vel[2] -= grav;
|
p->vel[2] -= grav;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Sys_DPrintf ("unhandled particle type %d\n", p->type);
|
Sys_MaskPrintf (SYS_DEV, "unhandled particle type %d\n",
|
||||||
|
p->type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,17 +128,20 @@ configure_notify (XEvent *event)
|
||||||
if (vidmode_active)
|
if (vidmode_active)
|
||||||
X11_ForceViewPort ();
|
X11_ForceViewPort ();
|
||||||
#endif
|
#endif
|
||||||
Sys_DPrintf ("ConfigureNotify: %ld %d %ld %ld %d,%d (%d,%d) %d %ld %d\n",
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
c->serial, c->send_event, c->event, c->window, c->x, c->y,
|
"ConfigureNotify: %ld %d %ld %ld %d,%d (%d,%d) "
|
||||||
c->width, c->height, c->border_width, c->above,
|
"%d %ld %d\n",
|
||||||
c->override_redirect);
|
c->serial, c->send_event, c->event, c->window, c->x, c->y,
|
||||||
|
c->width, c->height, c->border_width, c->above,
|
||||||
|
c->override_redirect);
|
||||||
}
|
}
|
||||||
|
|
||||||
qboolean
|
qboolean
|
||||||
X11_AddEvent (int event, void (*event_handler) (XEvent *))
|
X11_AddEvent (int event, void (*event_handler) (XEvent *))
|
||||||
{
|
{
|
||||||
if (event >= LASTEvent) {
|
if (event >= LASTEvent) {
|
||||||
Sys_DPrintf ("event: %d, LASTEvent: %d\n", event, LASTEvent);
|
Sys_MaskPrintf (SYS_DEV, "event: %d, LASTEvent: %d\n", event,
|
||||||
|
LASTEvent);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,8 +431,8 @@ X11_SetVidMode (int width, int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (found_mode) {
|
if (found_mode) {
|
||||||
Sys_DPrintf ("VID: Chose video mode: %dx%d\n",
|
Sys_MaskPrintf (SYS_DEV, "VID: Chose video mode: %dx%d\n",
|
||||||
vid.width, vid.height);
|
vid.width, vid.height);
|
||||||
|
|
||||||
XF86VidModeSwitchToMode (x_disp, x_screen,
|
XF86VidModeSwitchToMode (x_disp, x_screen,
|
||||||
vidmodes[best_mode]);
|
vidmodes[best_mode]);
|
||||||
|
|
|
@ -97,11 +97,11 @@ VID_CheckDGA (Display * dpy, int *maj_ver, int *min_ver, int *hasvideo)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!maj_ver) || (*maj_ver != XDGA_MAJOR_VERSION)) {
|
if ((!maj_ver) || (*maj_ver != XDGA_MAJOR_VERSION)) {
|
||||||
Sys_DPrintf ("VID: Incorrect DGA version: %d.%d, \n", *maj_ver,
|
Sys_MaskPrintf (SYS_DEV, "VID: Incorrect DGA version: %d.%d, \n",
|
||||||
*min_ver);
|
*maj_ver, *min_ver);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Sys_DPrintf ("VID: DGA version: %d.%d\n", *maj_ver, *min_ver);
|
Sys_MaskPrintf (SYS_DEV, "VID: DGA version: %d.%d\n", *maj_ver, *min_ver);
|
||||||
|
|
||||||
if (!hasvideo)
|
if (!hasvideo)
|
||||||
hasvideo = &dummy_video;
|
hasvideo = &dummy_video;
|
||||||
|
@ -151,12 +151,13 @@ VID_CheckVMode (Display * dpy, int *maj_ver, int *min_ver)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ((!maj_ver) || (*maj_ver != XF86VIDMODE_MAJOR_VERSION)) {
|
if ((!maj_ver) || (*maj_ver != XF86VIDMODE_MAJOR_VERSION)) {
|
||||||
Sys_DPrintf ("VID: Incorrect VidMode version: %d.%d\n", *maj_ver,
|
Sys_MaskPrintf (SYS_DEV, "VID: Incorrect VidMode version: %d.%d\n",
|
||||||
*min_ver);
|
*maj_ver, *min_ver);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_DPrintf ("VID: VidMode version: %d.%d\n", *maj_ver, *min_ver);
|
Sys_MaskPrintf (SYS_DEV, "VID: VidMode version: %d.%d\n",
|
||||||
|
*maj_ver, *min_ver);
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -135,7 +135,7 @@ IN_Shutdown (void)
|
||||||
{
|
{
|
||||||
JOY_Shutdown ();
|
JOY_Shutdown ();
|
||||||
|
|
||||||
Sys_DPrintf ("IN_Shutdown\n");
|
Sys_MaskPrintf (SYS_DEV, "IN_Shutdown\n");
|
||||||
IN_LL_Shutdown ();
|
IN_LL_Shutdown ();
|
||||||
|
|
||||||
IE_Shutdown ();
|
IE_Shutdown ();
|
||||||
|
|
|
@ -115,7 +115,7 @@ keyhandler (int scancode, int state)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//Sys_DPrintf ("%d %02x %02lx %04x %c\n", sc, press, shifts,
|
//Sys_MaskPrintf (SYS_DEV, "%d %02x %02lx %04x %c\n", sc, press, shifts,
|
||||||
// key, ascii > 32 && ascii < 127 ? ascii : '#');
|
// key, ascii > 32 && ascii < 127 ? ascii : '#');
|
||||||
Key_Event (key, ascii, press);
|
Key_Event (key, ascii, press);
|
||||||
}
|
}
|
||||||
|
@ -386,16 +386,17 @@ IN_InitMouse (void)
|
||||||
mouserate = atoi (com_argv[COM_CheckParm ("-mrate") + 1]);
|
mouserate = atoi (com_argv[COM_CheckParm ("-mrate") + 1]);
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
Sys_DPrintf ("Mouse: dev=%s,type=%s,speed=%d\n",
|
Sys_MaskPrintf (SYS_DEV, "Mouse: dev=%s,type=%s,speed=%d\n",
|
||||||
mousedev, mice[mtype].name, mouserate);
|
mousedev, mice[mtype].name, mouserate);
|
||||||
#endif
|
#endif
|
||||||
//FIXME: vga_init() opens the mouse automoatically
|
//FIXME: vga_init() opens the mouse automoatically
|
||||||
// closing it to ensure its opened how we want it
|
// closing it to ensure its opened how we want it
|
||||||
mouse_close();
|
mouse_close();
|
||||||
if (mouse_init ((char *)mousedev, mtype, mouserate)) {
|
if (mouse_init ((char *)mousedev, mtype, mouserate)) {
|
||||||
Sys_DPrintf ("No mouse found. Check your libvga.conf mouse settings"
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
" and that the mouse\n"
|
"No mouse found. Check your libvga.conf mouse settings"
|
||||||
"device has appropriate permission settings.\n");
|
" and that the mouse\n"
|
||||||
|
"device has appropriate permission settings.\n");
|
||||||
UseMouse = 0;
|
UseMouse = 0;
|
||||||
} else {
|
} else {
|
||||||
mouse_seteventhandler ((void *) mousehandler);
|
mouse_seteventhandler ((void *) mousehandler);
|
||||||
|
@ -406,7 +407,7 @@ IN_InitMouse (void)
|
||||||
void
|
void
|
||||||
IN_LL_Shutdown (void)
|
IN_LL_Shutdown (void)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("IN_LL_Shutdown\n");
|
Sys_MaskPrintf (SYS_DEV, "IN_LL_Shutdown\n");
|
||||||
|
|
||||||
if (UseMouse)
|
if (UseMouse)
|
||||||
mouse_close ();
|
mouse_close ();
|
||||||
|
|
|
@ -680,8 +680,9 @@ MapKey (unsigned int keycode, int press, int *k, int *u)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_DPrintf ("%08x %d %02x %02lx %04x %c\n", keycode, press, scan, shifts,
|
Sys_MaskPrintf (SYS_DEV, "%08x %d %02x %02lx %04x %c\n",
|
||||||
key, uc > 32 && uc < 127 ? uc : '#');
|
keycode, press, scan, shifts,
|
||||||
|
key, uc > 32 && uc < 127 ? uc : '#');
|
||||||
*k = key;
|
*k = key;
|
||||||
*u = uc;
|
*u = uc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -712,7 +712,7 @@ IN_LL_ProcessEvents (void)
|
||||||
void
|
void
|
||||||
IN_LL_Shutdown (void)
|
IN_LL_Shutdown (void)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("IN_LL_Shutdown\n");
|
Sys_MaskPrintf (SYS_DEV, "IN_LL_Shutdown\n");
|
||||||
in_mouse_avail = 0;
|
in_mouse_avail = 0;
|
||||||
if (x_disp) {
|
if (x_disp) {
|
||||||
XAutoRepeatOn (x_disp);
|
XAutoRepeatOn (x_disp);
|
||||||
|
|
|
@ -155,7 +155,7 @@ JOY_Init (void)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (JOY_Open () == -1) {
|
if (JOY_Open () == -1) {
|
||||||
Sys_DPrintf ("JOY: Joystick not found.\n");
|
Sys_MaskPrintf (SYS_DEV, "JOY: Joystick not found.\n");
|
||||||
joy_found = false;
|
joy_found = false;
|
||||||
joy_active = false;
|
joy_active = false;
|
||||||
return;
|
return;
|
||||||
|
@ -164,12 +164,12 @@ JOY_Init (void)
|
||||||
joy_found = true;
|
joy_found = true;
|
||||||
|
|
||||||
if (!joy_enable->int_val) {
|
if (!joy_enable->int_val) {
|
||||||
Sys_DPrintf ("JOY: Joystick found, but not enabled.\n");
|
Sys_MaskPrintf (SYS_DEV, "JOY: Joystick found, but not enabled.\n");
|
||||||
joy_active = false;
|
joy_active = false;
|
||||||
JOY_Close ();
|
JOY_Close ();
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_DPrintf ("JOY: Joystick found and activated.\n");
|
Sys_MaskPrintf (SYS_DEV, "JOY: Joystick found and activated.\n");
|
||||||
|
|
||||||
// Initialize joystick if found and enabled
|
// Initialize joystick if found and enabled
|
||||||
for (i = 0; i < JOY_MAX_BUTTONS; i++) {
|
for (i = 0; i < JOY_MAX_BUTTONS; i++) {
|
||||||
|
|
|
@ -99,8 +99,8 @@ JOY_Close (void)
|
||||||
|
|
||||||
i = close (joy_handle);
|
i = close (joy_handle);
|
||||||
if (i) {
|
if (i) {
|
||||||
Sys_DPrintf ("JOY: Failed to close joystick device!\n");
|
Sys_MaskPrintf (SYS_DEV, "JOY: Failed to close joystick device!\n");
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("JOY_Shutdown\n");
|
Sys_MaskPrintf (SYS_DEV, "JOY_Shutdown\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,14 +71,14 @@ QFGL_ProcAddress (void *handle, const char *name, qboolean crit)
|
||||||
{
|
{
|
||||||
void *glfunc = NULL;
|
void *glfunc = NULL;
|
||||||
|
|
||||||
Sys_DPrintf ("DEBUG: Finding symbol %s ... ", name);
|
Sys_MaskPrintf (SYS_DEV, "DEBUG: Finding symbol %s ... ", name);
|
||||||
|
|
||||||
glfunc = QFGL_GetProcAddress (handle, name);
|
glfunc = QFGL_GetProcAddress (handle, name);
|
||||||
if (glfunc) {
|
if (glfunc) {
|
||||||
Sys_DPrintf ("found [%p]\n", glfunc);
|
Sys_MaskPrintf (SYS_DEV, "found [%p]\n", glfunc);
|
||||||
return glfunc;
|
return glfunc;
|
||||||
}
|
}
|
||||||
Sys_DPrintf ("not found\n");
|
Sys_MaskPrintf (SYS_DEV, "not found\n");
|
||||||
|
|
||||||
if (crit) {
|
if (crit) {
|
||||||
if (strncmp ("fxMesa", name, 6) == 0) {
|
if (strncmp ("fxMesa", name, 6) == 0) {
|
||||||
|
|
|
@ -203,13 +203,13 @@ VID_UpdateGamma (cvar_t *vid_gamma)
|
||||||
vid.recalc_refdef = 1; // force a surface cache flush
|
vid.recalc_refdef = 1; // force a surface cache flush
|
||||||
|
|
||||||
if (vid_gamma_avail && vid_system_gamma->int_val) { // Have system, use it
|
if (vid_gamma_avail && vid_system_gamma->int_val) { // Have system, use it
|
||||||
Sys_DPrintf ("Setting hardware gamma to %g\n", gamma);
|
Sys_MaskPrintf (SYS_DEV, "Setting hardware gamma to %g\n", gamma);
|
||||||
VID_BuildGammaTable (1.0); // hardware gamma wants a linear palette
|
VID_BuildGammaTable (1.0); // hardware gamma wants a linear palette
|
||||||
VID_SetGamma (gamma);
|
VID_SetGamma (gamma);
|
||||||
memcpy (vid.palette, vid.basepal, 256 * 3);
|
memcpy (vid.palette, vid.basepal, 256 * 3);
|
||||||
} else { // We have to hack the palette
|
} else { // We have to hack the palette
|
||||||
int i;
|
int i;
|
||||||
Sys_DPrintf ("Setting software gamma to %g\n", gamma);
|
Sys_MaskPrintf (SYS_DEV, "Setting software gamma to %g\n", gamma);
|
||||||
VID_BuildGammaTable (gamma);
|
VID_BuildGammaTable (gamma);
|
||||||
for (i = 0; i < 256 * 3; i++)
|
for (i = 0; i < 256 * 3; i++)
|
||||||
vid.palette[i] = gammatable[vid.basepal[i]];
|
vid.palette[i] = gammatable[vid.basepal[i]];
|
||||||
|
|
|
@ -176,20 +176,20 @@ GL_Init (void)
|
||||||
if (!(dither_select = QFGL_ExtensionAddress ("gl3DfxSetDitherModeEXT")))
|
if (!(dither_select = QFGL_ExtensionAddress ("gl3DfxSetDitherModeEXT")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Sys_DPrintf ("Dithering: ");
|
Sys_MaskPrintf (SYS_DEV, "Dithering: ");
|
||||||
|
|
||||||
if ((p = COM_CheckParm ("-dither")) && p < com_argc) {
|
if ((p = COM_CheckParm ("-dither")) && p < com_argc) {
|
||||||
if (strequal (com_argv[p+1], "2x2")) {
|
if (strequal (com_argv[p+1], "2x2")) {
|
||||||
dither_select (GR_DITHER_2x2);
|
dither_select (GR_DITHER_2x2);
|
||||||
Sys_DPrintf ("2x2.\n");
|
Sys_MaskPrintf (SYS_DEV, "2x2.\n");
|
||||||
}
|
}
|
||||||
if (strequal (com_argv[p+1], "4x4")) {
|
if (strequal (com_argv[p+1], "4x4")) {
|
||||||
dither_select (GR_DITHER_4x4);
|
dither_select (GR_DITHER_4x4);
|
||||||
Sys_DPrintf ("4x4.\n");
|
Sys_MaskPrintf (SYS_DEV, "4x4.\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qfglDisable (GL_DITHER);
|
qfglDisable (GL_DITHER);
|
||||||
Sys_DPrintf ("disabled.\n");
|
Sys_MaskPrintf (SYS_DEV, "disabled.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,7 +326,8 @@ VID_Init (unsigned char *palette)
|
||||||
|
|
||||||
vid.initialized = true;
|
vid.initialized = true;
|
||||||
|
|
||||||
Sys_DPrintf ("Video mode %dx%d initialized.\n", vid.width, vid.height);
|
Sys_MaskPrintf (SYS_DEV, "Video mode %dx%d initialized.\n",
|
||||||
|
vid.width, vid.height);
|
||||||
|
|
||||||
vid.recalc_refdef = 1; // force a surface cache flush
|
vid.recalc_refdef = 1; // force a surface cache flush
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,7 +197,8 @@ gl_multitexture_f (cvar_t *var)
|
||||||
qfglDisable (GL_TEXTURE_2D);
|
qfglDisable (GL_TEXTURE_2D);
|
||||||
} else {
|
} else {
|
||||||
gl_mtex_fullbright = false;
|
gl_mtex_fullbright = false;
|
||||||
Sys_DPrintf ("Not enough TMUs for BSP fullbrights.\n");
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"Not enough TMUs for BSP fullbrights.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -247,8 +248,10 @@ gl_anisotropy_f (cvar_t * var)
|
||||||
} else {
|
} else {
|
||||||
aniso = 1.0;
|
aniso = 1.0;
|
||||||
if (var)
|
if (var)
|
||||||
Sys_DPrintf ("Anisotropy (GL_EXT_texture_filter_anisotropic) is "
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
"not supported by your hardware and/or drivers.\n");
|
"Anisotropy (GL_EXT_texture_filter_anisotropic) "
|
||||||
|
"is not supported by your hardware and/or "
|
||||||
|
"drivers.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,8 +267,9 @@ gl_tessellate_f (cvar_t * var)
|
||||||
} else {
|
} else {
|
||||||
tess = 0;
|
tess = 0;
|
||||||
if (var)
|
if (var)
|
||||||
Sys_DPrintf ("TruForm (GL_ATI_pn_triangles) is not supported by "
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
"your hardware and/or drivers.\n");
|
"TruForm (GL_ATI_pn_triangles) is not supported "
|
||||||
|
"by your hardware and/or drivers.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,14 +338,14 @@ CheckGLVersionString (void)
|
||||||
} else {
|
} else {
|
||||||
Sys_Error ("Malformed OpenGL version string!");
|
Sys_Error ("Malformed OpenGL version string!");
|
||||||
}
|
}
|
||||||
Sys_DPrintf ("GL_VERSION: %s\n", gl_version);
|
Sys_MaskPrintf (SYS_DEV, "GL_VERSION: %s\n", gl_version);
|
||||||
|
|
||||||
gl_vendor = (char *) qfglGetString (GL_VENDOR);
|
gl_vendor = (char *) qfglGetString (GL_VENDOR);
|
||||||
Sys_DPrintf ("GL_VENDOR: %s\n", gl_vendor);
|
Sys_MaskPrintf (SYS_DEV, "GL_VENDOR: %s\n", gl_vendor);
|
||||||
gl_renderer = (char *) qfglGetString (GL_RENDERER);
|
gl_renderer = (char *) qfglGetString (GL_RENDERER);
|
||||||
Sys_DPrintf ("GL_RENDERER: %s\n", gl_renderer);
|
Sys_MaskPrintf (SYS_DEV, "GL_RENDERER: %s\n", gl_renderer);
|
||||||
gl_extensions = (char *) qfglGetString (GL_EXTENSIONS);
|
gl_extensions = (char *) qfglGetString (GL_EXTENSIONS);
|
||||||
Sys_DPrintf ("GL_EXTENSIONS: %s\n", gl_extensions);
|
Sys_MaskPrintf (SYS_DEV, "GL_EXTENSIONS: %s\n", gl_extensions);
|
||||||
|
|
||||||
if (strstr (gl_renderer, "Mesa DRI Mach64"))
|
if (strstr (gl_renderer, "Mesa DRI Mach64"))
|
||||||
gl_feature_mach64 = true;
|
gl_feature_mach64 = true;
|
||||||
|
@ -376,15 +380,17 @@ CheckCombineExtensions (void)
|
||||||
{
|
{
|
||||||
if (gl_major >= 1 && gl_minor >= 3) {
|
if (gl_major >= 1 && gl_minor >= 3) {
|
||||||
gl_combine_capable = true;
|
gl_combine_capable = true;
|
||||||
Sys_DPrintf ("COMBINE active, multitextured doublebright enabled.\n");
|
Sys_MaskPrintf (SYS_DEV, "COMBINE active, multitextured doublebright "
|
||||||
|
"enabled.\n");
|
||||||
} else if (QFGL_ExtensionPresent ("GL_ARB_texture_env_combine")) {
|
} else if (QFGL_ExtensionPresent ("GL_ARB_texture_env_combine")) {
|
||||||
gl_combine_capable = true;
|
gl_combine_capable = true;
|
||||||
Sys_DPrintf ("COMBINE_ARB active, multitextured doublebright "
|
Sys_MaskPrintf (SYS_DEV, "COMBINE_ARB active, multitextured "
|
||||||
"enabled.\n");
|
"doublebright enabled.\n");
|
||||||
} else {
|
} else {
|
||||||
gl_combine_capable = false;
|
gl_combine_capable = false;
|
||||||
Sys_DPrintf ("GL_ARB_texture_env_combine not found. gl_doublebright "
|
Sys_MaskPrintf (SYS_DEV, "GL_ARB_texture_env_combine not found. "
|
||||||
"will have no effect with gl_multitexture on.\n");
|
"gl_doublebright will have no effect with "
|
||||||
|
"gl_multitexture on.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,15 +402,15 @@ CheckCombineExtensions (void)
|
||||||
static void
|
static void
|
||||||
CheckMultiTextureExtensions (void)
|
CheckMultiTextureExtensions (void)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("Checking for multitexture: ");
|
Sys_MaskPrintf (SYS_DEV, "Checking for multitexture: ");
|
||||||
if (COM_CheckParm ("-nomtex")) {
|
if (COM_CheckParm ("-nomtex")) {
|
||||||
Sys_DPrintf ("disabled.\n");
|
Sys_MaskPrintf (SYS_DEV, "disabled.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (gl_major >= 1 && gl_minor >= 3) {
|
if (gl_major >= 1 && gl_minor >= 3) {
|
||||||
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS, &gl_mtex_tmus);
|
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS, &gl_mtex_tmus);
|
||||||
if (gl_mtex_tmus >= 2) {
|
if (gl_mtex_tmus >= 2) {
|
||||||
Sys_DPrintf ("enabled, %d TMUs.\n", gl_mtex_tmus);
|
Sys_MaskPrintf (SYS_DEV, "enabled, %d TMUs.\n", gl_mtex_tmus);
|
||||||
qglMultiTexCoord2f =
|
qglMultiTexCoord2f =
|
||||||
QFGL_ExtensionAddress ("glMultiTexCoord2f");
|
QFGL_ExtensionAddress ("glMultiTexCoord2f");
|
||||||
qglMultiTexCoord2fv =
|
qglMultiTexCoord2fv =
|
||||||
|
@ -414,15 +420,16 @@ CheckMultiTextureExtensions (void)
|
||||||
if (qglMultiTexCoord2f && gl_mtex_enum)
|
if (qglMultiTexCoord2f && gl_mtex_enum)
|
||||||
gl_mtex_capable = true;
|
gl_mtex_capable = true;
|
||||||
else
|
else
|
||||||
Sys_DPrintf ("Multitexture disabled, could not find required "
|
Sys_MaskPrintf (SYS_DEV, "Multitexture disabled, could not "
|
||||||
"functions\n");
|
"find required functions\n");
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("Multitexture disabled, not enough TMUs.\n");
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"Multitexture disabled, not enough TMUs.\n");
|
||||||
}
|
}
|
||||||
} else if (QFGL_ExtensionPresent ("GL_ARB_multitexture")) {
|
} else if (QFGL_ExtensionPresent ("GL_ARB_multitexture")) {
|
||||||
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS_ARB, &gl_mtex_tmus);
|
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS_ARB, &gl_mtex_tmus);
|
||||||
if (gl_mtex_tmus >= 2) {
|
if (gl_mtex_tmus >= 2) {
|
||||||
Sys_DPrintf ("enabled, %d TMUs.\n", gl_mtex_tmus);
|
Sys_MaskPrintf (SYS_DEV, "enabled, %d TMUs.\n", gl_mtex_tmus);
|
||||||
qglMultiTexCoord2f =
|
qglMultiTexCoord2f =
|
||||||
QFGL_ExtensionAddress ("glMultiTexCoord2fARB");
|
QFGL_ExtensionAddress ("glMultiTexCoord2fARB");
|
||||||
qglMultiTexCoord2fv =
|
qglMultiTexCoord2fv =
|
||||||
|
@ -432,13 +439,14 @@ CheckMultiTextureExtensions (void)
|
||||||
if (qglMultiTexCoord2f && gl_mtex_enum)
|
if (qglMultiTexCoord2f && gl_mtex_enum)
|
||||||
gl_mtex_capable = true;
|
gl_mtex_capable = true;
|
||||||
else
|
else
|
||||||
Sys_DPrintf ("Multitexture disabled, could not find required "
|
Sys_MaskPrintf (SYS_DEV, "Multitexture disabled, could not "
|
||||||
"functions\n");
|
"find required functions\n");
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("Multitexture disabled, not enough TMUs.\n");
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"Multitexture disabled, not enough TMUs.\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("not found.\n");
|
Sys_MaskPrintf (SYS_DEV, "not found.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,7 +489,7 @@ CheckLights (void)
|
||||||
specular[4] = {0.1, 0.1, 0.1, 1.0};
|
specular[4] = {0.1, 0.1, 0.1, 1.0};
|
||||||
|
|
||||||
qfglGetIntegerv (GL_MAX_LIGHTS, &gl_max_lights);
|
qfglGetIntegerv (GL_MAX_LIGHTS, &gl_max_lights);
|
||||||
Sys_DPrintf ("Max GL Lights %d.\n", gl_max_lights);
|
Sys_MaskPrintf (SYS_DEV, "Max GL Lights %d.\n", gl_max_lights);
|
||||||
|
|
||||||
qfglEnable (GL_LIGHTING);
|
qfglEnable (GL_LIGHTING);
|
||||||
qfglLightModelfv (GL_LIGHT_MODEL_AMBIENT, dark);
|
qfglLightModelfv (GL_LIGHT_MODEL_AMBIENT, dark);
|
||||||
|
@ -516,7 +524,7 @@ VID_SetPalette (unsigned char *palette)
|
||||||
QFile *f;
|
QFile *f;
|
||||||
|
|
||||||
// 8 8 8 encoding
|
// 8 8 8 encoding
|
||||||
Sys_DPrintf ("Converting 8to24\n");
|
Sys_MaskPrintf (SYS_DEV, "Converting 8to24\n");
|
||||||
|
|
||||||
pal = palette;
|
pal = palette;
|
||||||
table = d_8to24table;
|
table = d_8to24table;
|
||||||
|
@ -635,11 +643,11 @@ Tdfx_Init8bitPalette (void)
|
||||||
|
|
||||||
if (!(qgl3DfxSetPaletteEXT =
|
if (!(qgl3DfxSetPaletteEXT =
|
||||||
QFGL_ExtensionAddress ("gl3DfxSetPaletteEXT"))) {
|
QFGL_ExtensionAddress ("gl3DfxSetPaletteEXT"))) {
|
||||||
Sys_DPrintf ("3DFX_set_global_palette not found.\n");
|
Sys_MaskPrintf (SYS_DEV, "3DFX_set_global_palette not found.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_DPrintf ("3DFX_set_global_palette.\n");
|
Sys_MaskPrintf (SYS_DEV, "3DFX_set_global_palette.\n");
|
||||||
|
|
||||||
oldpal = (char *) d_8to24table; // d_8to24table3dfx;
|
oldpal = (char *) d_8to24table; // d_8to24table3dfx;
|
||||||
for (i = 0; i < 256; i++) {
|
for (i = 0; i < 256; i++) {
|
||||||
|
@ -653,7 +661,7 @@ Tdfx_Init8bitPalette (void)
|
||||||
qgl3DfxSetPaletteEXT ((GLuint *) table);
|
qgl3DfxSetPaletteEXT ((GLuint *) table);
|
||||||
is8bit = true;
|
is8bit = true;
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("\n 3DFX_set_global_palette not found.");
|
Sys_MaskPrintf (SYS_DEV, "\n 3DFX_set_global_palette not found.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -678,11 +686,11 @@ Shared_Init8bitPalette (void)
|
||||||
|
|
||||||
if (QFGL_ExtensionPresent ("GL_EXT_shared_texture_palette")) {
|
if (QFGL_ExtensionPresent ("GL_EXT_shared_texture_palette")) {
|
||||||
if (!(qglColorTableEXT = QFGL_ExtensionAddress ("glColorTableEXT"))) {
|
if (!(qglColorTableEXT = QFGL_ExtensionAddress ("glColorTableEXT"))) {
|
||||||
Sys_DPrintf ("glColorTableEXT not found.\n");
|
Sys_MaskPrintf (SYS_DEV, "glColorTableEXT not found.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_DPrintf ("GL_EXT_shared_texture_palette\n");
|
Sys_MaskPrintf (SYS_DEV, "GL_EXT_shared_texture_palette\n");
|
||||||
|
|
||||||
qfglEnable (GL_SHARED_TEXTURE_PALETTE_EXT);
|
qfglEnable (GL_SHARED_TEXTURE_PALETTE_EXT);
|
||||||
oldPalette = (GLubyte *) d_8to24table; // d_8to24table3dfx;
|
oldPalette = (GLubyte *) d_8to24table; // d_8to24table3dfx;
|
||||||
|
@ -697,21 +705,22 @@ Shared_Init8bitPalette (void)
|
||||||
GL_UNSIGNED_BYTE, (GLvoid *) thePalette);
|
GL_UNSIGNED_BYTE, (GLvoid *) thePalette);
|
||||||
is8bit = true;
|
is8bit = true;
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("\n GL_EXT_shared_texture_palette not found.");
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"\n GL_EXT_shared_texture_palette not found.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
VID_Init8bitPalette (void)
|
VID_Init8bitPalette (void)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("Checking for 8-bit extension: ");
|
Sys_MaskPrintf (SYS_DEV, "Checking for 8-bit extension: ");
|
||||||
if (vid_use8bit->int_val) {
|
if (vid_use8bit->int_val) {
|
||||||
Tdfx_Init8bitPalette ();
|
Tdfx_Init8bitPalette ();
|
||||||
Shared_Init8bitPalette ();
|
Shared_Init8bitPalette ();
|
||||||
if (!is8bit)
|
if (!is8bit)
|
||||||
Sys_DPrintf ("\n 8-bit extension not found.\n");
|
Sys_MaskPrintf (SYS_DEV, "\n 8-bit extension not found.\n");
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("disabled.\n");
|
Sys_MaskPrintf (SYS_DEV, "disabled.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ static struct fb_var_screeninfo orig_var;
|
||||||
void
|
void
|
||||||
VID_Shutdown (void)
|
VID_Shutdown (void)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("VID_Shutdown\n");
|
Sys_MaskPrintf (SYS_DEV, "VID_Shutdown\n");
|
||||||
|
|
||||||
if (!fbdev_inited)
|
if (!fbdev_inited)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -154,7 +154,7 @@ QFGL_LoadLibrary (void)
|
||||||
void
|
void
|
||||||
VID_Shutdown (void)
|
VID_Shutdown (void)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("VID_Shutdown\n");
|
Sys_MaskPrintf (SYS_DEV, "VID_Shutdown\n");
|
||||||
X11_CloseDisplay ();
|
X11_CloseDisplay ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,7 +242,8 @@ VID_Init (unsigned char *palette)
|
||||||
VID_Init8bitPalette ();
|
VID_Init8bitPalette ();
|
||||||
VID_SetPalette (vid.palette);
|
VID_SetPalette (vid.palette);
|
||||||
|
|
||||||
Sys_DPrintf ("Video mode %dx%d initialized.\n", vid.width, vid.height);
|
Sys_MaskPrintf (SYS_DEV, "Video mode %dx%d initialized.\n",
|
||||||
|
vid.width, vid.height);
|
||||||
|
|
||||||
vid.initialized = true;
|
vid.initialized = true;
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,8 @@ success:
|
||||||
VID_SetPalette (vid.palette);
|
VID_SetPalette (vid.palette);
|
||||||
VID_Init8bitPalette (); // Check for 3DFX Extensions and initialize them.
|
VID_Init8bitPalette (); // Check for 3DFX Extensions and initialize them.
|
||||||
|
|
||||||
Sys_DPrintf ("Video mode %dx%d initialized.\n", vid.width, vid.height);
|
Sys_MaskPrintf (SYS_DEV, "Video mode %dx%d initialized.\n",
|
||||||
|
vid.width, vid.height);
|
||||||
|
|
||||||
vid.initialized = true;
|
vid.initialized = true;
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,7 @@ get_mode (int width, int height, int depth)
|
||||||
void
|
void
|
||||||
VID_Shutdown (void)
|
VID_Shutdown (void)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("VID_Shutdown\n");
|
Sys_MaskPrintf (SYS_DEV, "VID_Shutdown\n");
|
||||||
|
|
||||||
if (!svgalib_inited)
|
if (!svgalib_inited)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -346,8 +346,8 @@ ResetSharedFrameBuffers (void)
|
||||||
// attach to the shared memory segment
|
// attach to the shared memory segment
|
||||||
x_shminfo[frm].shmaddr = (void *) shmat (x_shminfo[frm].shmid, 0, 0);
|
x_shminfo[frm].shmaddr = (void *) shmat (x_shminfo[frm].shmid, 0, 0);
|
||||||
|
|
||||||
Sys_DPrintf ("VID: shared memory id=%d, addr=0x%lx\n",
|
Sys_MaskPrintf (SYS_DEV, "VID: shared memory id=%d, addr=0x%lx\n",
|
||||||
x_shminfo[frm].shmid, (long) x_shminfo[frm].shmaddr);
|
x_shminfo[frm].shmid, (long) x_shminfo[frm].shmaddr);
|
||||||
|
|
||||||
x_framebuffer[frm]->data = x_shminfo[frm].shmaddr;
|
x_framebuffer[frm]->data = x_shminfo[frm].shmaddr;
|
||||||
|
|
||||||
|
@ -448,10 +448,12 @@ VID_Init (unsigned char *palette)
|
||||||
x_vis = x_visinfo->visual;
|
x_vis = x_visinfo->visual;
|
||||||
|
|
||||||
if (num_visuals > 1) {
|
if (num_visuals > 1) {
|
||||||
Sys_DPrintf ("Found more than one visual id at depth %d:\n",
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
template.depth);
|
"Found more than one visual id at depth %d:\n",
|
||||||
|
template.depth);
|
||||||
for (i = 0; i < num_visuals; i++)
|
for (i = 0; i < num_visuals; i++)
|
||||||
Sys_DPrintf (" -visualid %d\n", (int) x_visinfo[i].visualid);
|
Sys_MaskPrintf (SYS_DEV, " -visualid %d\n",
|
||||||
|
(int) x_visinfo[i].visualid);
|
||||||
} else {
|
} else {
|
||||||
if (num_visuals == 0) {
|
if (num_visuals == 0) {
|
||||||
if (template_mask == VisualIDMask) {
|
if (template_mask == VisualIDMask) {
|
||||||
|
@ -463,15 +465,21 @@ VID_Init (unsigned char *palette)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
Sys_DPrintf ("Using visualid %d:\n", (int) x_visinfo->visualid);
|
Sys_MaskPrintf (SYS_DEV, "Using visualid %d:\n",
|
||||||
Sys_DPrintf (" class %d\n", x_visinfo->class);
|
(int) x_visinfo->visualid);
|
||||||
Sys_DPrintf (" screen %d\n", x_visinfo->screen);
|
Sys_MaskPrintf (SYS_DEV, " class %d\n", x_visinfo->class);
|
||||||
Sys_DPrintf (" depth %d\n", x_visinfo->depth);
|
Sys_MaskPrintf (SYS_DEV, " screen %d\n", x_visinfo->screen);
|
||||||
Sys_DPrintf (" red_mask 0x%x\n", (int) x_visinfo->red_mask);
|
Sys_MaskPrintf (SYS_DEV, " depth %d\n", x_visinfo->depth);
|
||||||
Sys_DPrintf (" green_mask 0x%x\n", (int) x_visinfo->green_mask);
|
Sys_MaskPrintf (SYS_DEV, " red_mask 0x%x\n",
|
||||||
Sys_DPrintf (" blue_mask 0x%x\n", (int) x_visinfo->blue_mask);
|
(int) x_visinfo->red_mask);
|
||||||
Sys_DPrintf (" colormap_size %d\n", x_visinfo->colormap_size);
|
Sys_MaskPrintf (SYS_DEV, " green_mask 0x%x\n",
|
||||||
Sys_DPrintf (" bits_per_rgb %d\n", x_visinfo->bits_per_rgb);
|
(int) x_visinfo->green_mask);
|
||||||
|
Sys_MaskPrintf (SYS_DEV, " blue_mask 0x%x\n",
|
||||||
|
(int) x_visinfo->blue_mask);
|
||||||
|
Sys_MaskPrintf (SYS_DEV, " colormap_size %d\n",
|
||||||
|
x_visinfo->colormap_size);
|
||||||
|
Sys_MaskPrintf (SYS_DEV, " bits_per_rgb %d\n",
|
||||||
|
x_visinfo->bits_per_rgb);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup attributes for main window */
|
/* Setup attributes for main window */
|
||||||
|
@ -575,7 +583,7 @@ VID_SetPalette (unsigned char *palette)
|
||||||
void
|
void
|
||||||
VID_Shutdown (void)
|
VID_Shutdown (void)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("VID_Shutdown\n");
|
Sys_MaskPrintf (SYS_DEV, "VID_Shutdown\n");
|
||||||
X11_CloseDisplay ();
|
X11_CloseDisplay ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ CL_Disconnect (void)
|
||||||
if (cls.demorecording)
|
if (cls.demorecording)
|
||||||
CL_Stop_f ();
|
CL_Stop_f ();
|
||||||
|
|
||||||
Sys_DPrintf ("Sending clc_disconnect\n");
|
Sys_MaskPrintf (SYS_DEV, "Sending clc_disconnect\n");
|
||||||
SZ_Clear (&cls.message);
|
SZ_Clear (&cls.message);
|
||||||
MSG_WriteByte (&cls.message, clc_disconnect);
|
MSG_WriteByte (&cls.message, clc_disconnect);
|
||||||
NET_SendUnreliableMessage (cls.netcon, &cls.message);
|
NET_SendUnreliableMessage (cls.netcon, &cls.message);
|
||||||
|
@ -262,7 +262,8 @@ CL_EstablishConnection (const char *host)
|
||||||
cls.netcon = NET_Connect (host);
|
cls.netcon = NET_Connect (host);
|
||||||
if (!cls.netcon)
|
if (!cls.netcon)
|
||||||
Host_Error ("CL_Connect: connect failed\n");
|
Host_Error ("CL_Connect: connect failed\n");
|
||||||
Sys_DPrintf ("CL_EstablishConnection: connected to %s\n", host);
|
Sys_MaskPrintf (SYS_DEV, "CL_EstablishConnection: connected to %s\n",
|
||||||
|
host);
|
||||||
|
|
||||||
cls.demonum = -1; // not in the demo loop now
|
cls.demonum = -1; // not in the demo loop now
|
||||||
CL_SetState (ca_connected);
|
CL_SetState (ca_connected);
|
||||||
|
@ -282,7 +283,7 @@ CL_SignonReply (void)
|
||||||
{
|
{
|
||||||
char str[8192];
|
char str[8192];
|
||||||
|
|
||||||
Sys_DPrintf ("CL_SignonReply: %i\n", cls.signon);
|
Sys_MaskPrintf (SYS_DEV, "CL_SignonReply: %i\n", cls.signon);
|
||||||
|
|
||||||
switch (cls.signon) {
|
switch (cls.signon) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -698,7 +699,7 @@ CL_SendCmd (void)
|
||||||
return; // no message at all
|
return; // no message at all
|
||||||
|
|
||||||
if (!NET_CanSendMessage (cls.netcon)) {
|
if (!NET_CanSendMessage (cls.netcon)) {
|
||||||
Sys_DPrintf ("CL_WriteToServer: can't send\n");
|
Sys_MaskPrintf (SYS_DEV, "CL_WriteToServer: can't send\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,7 @@ CL_ParseServerInfo (void)
|
||||||
const char *str;
|
const char *str;
|
||||||
int nummodels, numsounds, i;
|
int nummodels, numsounds, i;
|
||||||
|
|
||||||
Sys_DPrintf ("Serverinfo packet received.\n");
|
Sys_MaskPrintf (SYS_DEV, "Serverinfo packet received.\n");
|
||||||
|
|
||||||
S_BlockSound ();
|
S_BlockSound ();
|
||||||
S_StopAllSounds ();
|
S_StopAllSounds ();
|
||||||
|
|
|
@ -146,7 +146,7 @@ Host_EndGame (const char *message, ...)
|
||||||
va_start (argptr, message);
|
va_start (argptr, message);
|
||||||
dvsprintf (str, message, argptr);
|
dvsprintf (str, message, argptr);
|
||||||
va_end (argptr);
|
va_end (argptr);
|
||||||
Sys_DPrintf ("Host_EndGame: %s\n", str->str);
|
Sys_MaskPrintf (SYS_DEV, "Host_EndGame: %s\n", str->str);
|
||||||
|
|
||||||
if (sv.active)
|
if (sv.active)
|
||||||
Host_ShutdownServer (false);
|
Host_ShutdownServer (false);
|
||||||
|
@ -512,7 +512,7 @@ Host_ShutdownServer (qboolean crash)
|
||||||
void
|
void
|
||||||
Host_ClearMemory (void)
|
Host_ClearMemory (void)
|
||||||
{
|
{
|
||||||
Sys_DPrintf ("Clearing memory\n");
|
Sys_MaskPrintf (SYS_DEV, "Clearing memory\n");
|
||||||
D_FlushCaches ();
|
D_FlushCaches ();
|
||||||
Mod_ClearAll ();
|
Mod_ClearAll ();
|
||||||
if (host_hunklevel)
|
if (host_hunklevel)
|
||||||
|
|
|
@ -64,7 +64,7 @@ SV_CheckStuck (edict_t *ent)
|
||||||
VectorCopy (SVvector (ent, origin), org);
|
VectorCopy (SVvector (ent, origin), org);
|
||||||
VectorCopy (SVvector (ent, oldorigin), SVvector (ent, origin));
|
VectorCopy (SVvector (ent, oldorigin), SVvector (ent, origin));
|
||||||
if (!SV_TestEntityPosition (ent)) {
|
if (!SV_TestEntityPosition (ent)) {
|
||||||
Sys_DPrintf ("Unstuck.\n");
|
Sys_MaskPrintf (SYS_DEV, "Unstuck.\n");
|
||||||
SV_LinkEdict (ent, true);
|
SV_LinkEdict (ent, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -76,14 +76,14 @@ SV_CheckStuck (edict_t *ent)
|
||||||
SVvector (ent, origin)[1] = org[1] + j;
|
SVvector (ent, origin)[1] = org[1] + j;
|
||||||
SVvector (ent, origin)[2] = org[2] + z;
|
SVvector (ent, origin)[2] = org[2] + z;
|
||||||
if (!SV_TestEntityPosition (ent)) {
|
if (!SV_TestEntityPosition (ent)) {
|
||||||
Sys_DPrintf ("Unstuck.\n");
|
Sys_MaskPrintf (SYS_DEV, "Unstuck.\n");
|
||||||
SV_LinkEdict (ent, true);
|
SV_LinkEdict (ent, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorCopy (org, SVvector (ent, origin));
|
VectorCopy (org, SVvector (ent, origin));
|
||||||
Sys_DPrintf ("player is stuck.\n");
|
Sys_MaskPrintf (SYS_DEV, "player is stuck.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static qboolean
|
static qboolean
|
||||||
|
@ -206,7 +206,7 @@ SV_TryUnstick (edict_t *ent, vec3_t oldvel)
|
||||||
|
|
||||||
if (fabs (oldorg[1] - SVvector (ent, origin)[1]) > 4
|
if (fabs (oldorg[1] - SVvector (ent, origin)[1]) > 4
|
||||||
|| fabs (oldorg[0] - SVvector (ent, origin)[0]) > 4) {
|
|| fabs (oldorg[0] - SVvector (ent, origin)[0]) > 4) {
|
||||||
// Sys_DPrintf ("unstuck!\n");
|
// Sys_MaskPrintf (SYS_DEV, "unstuck!\n");
|
||||||
return clip;
|
return clip;
|
||||||
}
|
}
|
||||||
// go back to the original pos and try again
|
// go back to the original pos and try again
|
||||||
|
|
|
@ -247,7 +247,8 @@ SV_ConnectClient (int clientnum)
|
||||||
|
|
||||||
client = svs.clients + clientnum;
|
client = svs.clients + clientnum;
|
||||||
|
|
||||||
Sys_DPrintf ("Client %s connected\n", client->netconnection->address);
|
Sys_MaskPrintf (SYS_DEV, "Client %s connected\n",
|
||||||
|
client->netconnection->address);
|
||||||
|
|
||||||
edictnum = clientnum + 1;
|
edictnum = clientnum + 1;
|
||||||
|
|
||||||
|
@ -908,7 +909,7 @@ SV_SpawnServer (const char *server)
|
||||||
if (hostname->string[0] == 0)
|
if (hostname->string[0] == 0)
|
||||||
Cvar_Set (hostname, "UNNAMED");
|
Cvar_Set (hostname, "UNNAMED");
|
||||||
|
|
||||||
Sys_DPrintf ("SpawnServer: %s\n", server);
|
Sys_MaskPrintf (SYS_DEV, "SpawnServer: %s\n", server);
|
||||||
svs.changelevel_issued = false; // now safe to issue another
|
svs.changelevel_issued = false; // now safe to issue another
|
||||||
|
|
||||||
// tell all connected clients that we are going to a new level
|
// tell all connected clients that we are going to a new level
|
||||||
|
@ -1039,6 +1040,6 @@ SV_SpawnServer (const char *server)
|
||||||
if (host_client->active)
|
if (host_client->active)
|
||||||
SV_SendServerinfo (host_client);
|
SV_SendServerinfo (host_client);
|
||||||
|
|
||||||
Sys_DPrintf ("Server spawned.\n");
|
Sys_MaskPrintf (SYS_DEV, "Server spawned.\n");
|
||||||
S_UnblockSound ();
|
S_UnblockSound ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -486,7 +486,7 @@ SV_LoadProgs (void)
|
||||||
sv_range = PR_RANGE_NONE;
|
sv_range = PR_RANGE_NONE;
|
||||||
range = "None";
|
range = "None";
|
||||||
}
|
}
|
||||||
Sys_DPrintf ("Using %s builtin extention mapping\n", range);
|
Sys_MaskPrintf (SYS_DEV, "Using %s builtin extention mapping\n", range);
|
||||||
|
|
||||||
memset (&sv_globals, 0, sizeof (sv_funcs));
|
memset (&sv_globals, 0, sizeof (sv_funcs));
|
||||||
memset (&sv_funcs, 0, sizeof (sv_funcs));
|
memset (&sv_funcs, 0, sizeof (sv_funcs));
|
||||||
|
|
|
@ -540,7 +540,8 @@ SV_ReadClientMessage (void)
|
||||||
else if (ret == 1)
|
else if (ret == 1)
|
||||||
Cmd_ExecuteString (s, src_client);
|
Cmd_ExecuteString (s, src_client);
|
||||||
else
|
else
|
||||||
Sys_DPrintf ("%s tried to %s\n", host_client->name, s);
|
Sys_MaskPrintf (SYS_DEV, "%s tried to %s\n",
|
||||||
|
host_client->name, s);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case clc_disconnect:
|
case clc_disconnect:
|
||||||
|
|
|
@ -581,11 +581,12 @@ client_parse_message (client_t *cl)
|
||||||
MSG_GetReadCount (net_message) -
|
MSG_GetReadCount (net_message) -
|
||||||
checksumIndex - 1, seq_hash);
|
checksumIndex - 1, seq_hash);
|
||||||
if (calculatedChecksum != checksum) {
|
if (calculatedChecksum != checksum) {
|
||||||
Sys_DPrintf
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
("Failed command checksum for %s(%d) (%d != %d)\n",
|
"Failed command checksum for %s(%d) "
|
||||||
Info_ValueForKey (cl->userinfo, "name"),
|
"(%d != %d)\n",
|
||||||
cl->netchan.incoming_sequence, checksum,
|
Info_ValueForKey (cl->userinfo, "name"),
|
||||||
calculatedChecksum);
|
cl->netchan.incoming_sequence, checksum,
|
||||||
|
calculatedChecksum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if (!sv.paused) {
|
// if (!sv.paused) {
|
||||||
|
|
|
@ -262,7 +262,7 @@ FlushEntityPacket (void)
|
||||||
entity_state_t olde, newe;
|
entity_state_t olde, newe;
|
||||||
int word;
|
int word;
|
||||||
|
|
||||||
Sys_DPrintf ("FlushEntityPacket\n");
|
Sys_MaskPrintf (SYS_DEV, "FlushEntityPacket\n");
|
||||||
|
|
||||||
memset (&olde, 0, sizeof (olde));
|
memset (&olde, 0, sizeof (olde));
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ CL_ParsePacketEntities (qboolean delta)
|
||||||
if (cls.demoplayback2)
|
if (cls.demoplayback2)
|
||||||
from = oldpacket = (cls.netchan.incoming_sequence - 1);
|
from = oldpacket = (cls.netchan.incoming_sequence - 1);
|
||||||
if ((from & UPDATE_MASK) != (oldpacket & UPDATE_MASK))
|
if ((from & UPDATE_MASK) != (oldpacket & UPDATE_MASK))
|
||||||
Sys_DPrintf ("WARNING: from mismatch\n");
|
Sys_MaskPrintf (SYS_DEV, "WARNING: from mismatch\n");
|
||||||
} else
|
} else
|
||||||
oldpacket = -1;
|
oldpacket = -1;
|
||||||
|
|
||||||
|
@ -1078,11 +1078,11 @@ CL_SetUpPlayerPrediction (qboolean dopred)
|
||||||
msec = 500 * (playertime - state->state_time);
|
msec = 500 * (playertime - state->state_time);
|
||||||
if (msec <= 0 || !dopred) {
|
if (msec <= 0 || !dopred) {
|
||||||
VectorCopy (state->pls.origin, pplayer->origin);
|
VectorCopy (state->pls.origin, pplayer->origin);
|
||||||
// Sys_DPrintf ("nopredict\n");
|
// Sys_MaskPrintf (SYS_DEV, "nopredict\n");
|
||||||
} else {
|
} else {
|
||||||
// predict players movement
|
// predict players movement
|
||||||
state->pls.cmd.msec = msec = min (msec, 255);
|
state->pls.cmd.msec = msec = min (msec, 255);
|
||||||
// Sys_DPrintf ("predict: %i\n", msec);
|
// Sys_MaskPrintf (SYS_DEV, "predict: %i\n", msec);
|
||||||
|
|
||||||
CL_PredictUsercmd (state, &exact, &state->pls.cmd, false);
|
CL_PredictUsercmd (state, &exact, &state->pls.cmd, false);
|
||||||
VectorCopy (exact.pls.origin, pplayer->origin);
|
VectorCopy (exact.pls.origin, pplayer->origin);
|
||||||
|
|
|
@ -416,7 +416,7 @@ CL_ClearState (void)
|
||||||
|
|
||||||
CL_Init_Entity (&cl.viewent);
|
CL_Init_Entity (&cl.viewent);
|
||||||
|
|
||||||
Sys_DPrintf ("Clearing memory\n");
|
Sys_MaskPrintf (SYS_DEV, "Clearing memory\n");
|
||||||
D_FlushCaches ();
|
D_FlushCaches ();
|
||||||
Mod_ClearAll ();
|
Mod_ClearAll ();
|
||||||
if (host_hunklevel) // FIXME: check this...
|
if (host_hunklevel) // FIXME: check this...
|
||||||
|
@ -603,10 +603,11 @@ CL_FullServerinfo_f (void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_DPrintf ("Cmd_Argv (1): '%s'\n", Cmd_Argv (1));
|
Sys_MaskPrintf (SYS_DEV, "Cmd_Argv (1): '%s'\n", Cmd_Argv (1));
|
||||||
Info_Destroy (cl.serverinfo);
|
Info_Destroy (cl.serverinfo);
|
||||||
cl.serverinfo = Info_ParseString (Cmd_Argv (1), MAX_SERVERINFO_STRING, 0);
|
cl.serverinfo = Info_ParseString (Cmd_Argv (1), MAX_SERVERINFO_STRING, 0);
|
||||||
Sys_DPrintf ("cl.serverinfo: '%s'\n", Info_MakeString (cl.serverinfo, 0));
|
Sys_MaskPrintf (SYS_DEV, "cl.serverinfo: '%s'\n",
|
||||||
|
Info_MakeString (cl.serverinfo, 0));
|
||||||
|
|
||||||
if ((p = Info_ValueForKey (cl.serverinfo, "*qf_version")) && *p) {
|
if ((p = Info_ValueForKey (cl.serverinfo, "*qf_version")) && *p) {
|
||||||
if (server_version == NULL)
|
if (server_version == NULL)
|
||||||
|
@ -1046,8 +1047,9 @@ CL_ReadPackets (void)
|
||||||
// packet from server
|
// packet from server
|
||||||
if (!cls.demoplayback &&
|
if (!cls.demoplayback &&
|
||||||
!NET_CompareAdr (net_from, cls.netchan.remote_address)) {
|
!NET_CompareAdr (net_from, cls.netchan.remote_address)) {
|
||||||
Sys_DPrintf ("%s:sequenced packet without connection\n",
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
NET_AdrToString (net_from));
|
"%s:sequenced packet without connection\n",
|
||||||
|
NET_AdrToString (net_from));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!cls.demoplayback2) {
|
if (!cls.demoplayback2) {
|
||||||
|
@ -1143,7 +1145,7 @@ CL_SetState (cactive_t state)
|
||||||
};
|
};
|
||||||
cactive_t old_state = cls.state;
|
cactive_t old_state = cls.state;
|
||||||
|
|
||||||
Sys_DPrintf ("CL_SetState (%s)\n", state_names[state]);
|
Sys_MaskPrintf (SYS_DEV, "CL_SetState (%s)\n", state_names[state]);
|
||||||
cls.state = state;
|
cls.state = state;
|
||||||
if (old_state != state) {
|
if (old_state != state) {
|
||||||
if (old_state == ca_active) {
|
if (old_state == ca_active) {
|
||||||
|
|
|
@ -414,7 +414,7 @@ CL_RequestNextDownload (void)
|
||||||
break;
|
break;
|
||||||
case dl_none:
|
case dl_none:
|
||||||
default:
|
default:
|
||||||
Sys_DPrintf ("Unknown download type.\n");
|
Sys_MaskPrintf (SYS_DEV, "Unknown download type.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -650,7 +650,7 @@ CL_NextUpload (void)
|
||||||
MSG_WriteByte (&cls.netchan.message, percent);
|
MSG_WriteByte (&cls.netchan.message, percent);
|
||||||
SZ_Write (&cls.netchan.message, buffer, r);
|
SZ_Write (&cls.netchan.message, buffer, r);
|
||||||
|
|
||||||
Sys_DPrintf ("UPLOAD: %6d: %d written\n", upload_pos - r, r);
|
Sys_MaskPrintf (SYS_DEV, "UPLOAD: %6d: %d written\n", upload_pos - r, r);
|
||||||
|
|
||||||
if (upload_pos != upload_size)
|
if (upload_pos != upload_size)
|
||||||
return;
|
return;
|
||||||
|
@ -672,7 +672,7 @@ CL_StartUpload (byte * data, int size)
|
||||||
if (upload_data)
|
if (upload_data)
|
||||||
free (upload_data);
|
free (upload_data);
|
||||||
|
|
||||||
Sys_DPrintf ("Upload starting of %d...\n", size);
|
Sys_MaskPrintf (SYS_DEV, "Upload starting of %d...\n", size);
|
||||||
|
|
||||||
upload_data = malloc (size);
|
upload_data = malloc (size);
|
||||||
memcpy (upload_data, data, size);
|
memcpy (upload_data, data, size);
|
||||||
|
@ -723,7 +723,7 @@ CL_ParseServerData (void)
|
||||||
int protover;
|
int protover;
|
||||||
qboolean cflag = false;
|
qboolean cflag = false;
|
||||||
|
|
||||||
Sys_DPrintf ("Serverdata packet received.\n");
|
Sys_MaskPrintf (SYS_DEV, "Serverdata packet received.\n");
|
||||||
|
|
||||||
// wipe the client_state_t struct
|
// wipe the client_state_t struct
|
||||||
CL_ClearState ();
|
CL_ClearState ();
|
||||||
|
@ -1116,7 +1116,7 @@ CL_SetInfo (void)
|
||||||
strncpy (value, MSG_ReadString (net_message), sizeof (value) - 1);
|
strncpy (value, MSG_ReadString (net_message), sizeof (value) - 1);
|
||||||
key[sizeof (value) - 1] = 0;
|
key[sizeof (value) - 1] = 0;
|
||||||
|
|
||||||
Sys_DPrintf ("SETINFO %s: %s=%s\n", player->name, key, value);
|
Sys_MaskPrintf (SYS_DEV, "SETINFO %s: %s=%s\n", player->name, key, value);
|
||||||
|
|
||||||
if (!player->userinfo)
|
if (!player->userinfo)
|
||||||
player->userinfo = Info_ParseString ("", MAX_INFO_STRING, 0);
|
player->userinfo = Info_ParseString ("", MAX_INFO_STRING, 0);
|
||||||
|
@ -1138,7 +1138,7 @@ CL_ServerInfo (void)
|
||||||
strncpy (value, MSG_ReadString (net_message), sizeof (value) - 1);
|
strncpy (value, MSG_ReadString (net_message), sizeof (value) - 1);
|
||||||
key[sizeof (value) - 1] = 0;
|
key[sizeof (value) - 1] = 0;
|
||||||
|
|
||||||
Sys_DPrintf ("SERVERINFO: %s=%s\n", key, value);
|
Sys_MaskPrintf (SYS_DEV, "SERVERINFO: %s=%s\n", key, value);
|
||||||
|
|
||||||
Info_SetValueForKey (cl.serverinfo, key, value, 0);
|
Info_SetValueForKey (cl.serverinfo, key, value, 0);
|
||||||
if (strequal (key, "chase")) {
|
if (strequal (key, "chase")) {
|
||||||
|
@ -1333,15 +1333,16 @@ CL_ParseServerMessage (void)
|
||||||
s = MSG_ReadString (net_message);
|
s = MSG_ReadString (net_message);
|
||||||
if (s[strlen (s) - 1] == '\n') {
|
if (s[strlen (s) - 1] == '\n') {
|
||||||
if (stuffbuf && stuffbuf->str[0]) {
|
if (stuffbuf && stuffbuf->str[0]) {
|
||||||
Sys_DPrintf ("stufftext: %s%s\n", stuffbuf->str, s);
|
Sys_MaskPrintf (SYS_DEV, "stufftext: %s%s\n",
|
||||||
|
stuffbuf->str, s);
|
||||||
Cbuf_AddText (cl_stbuf, stuffbuf->str);
|
Cbuf_AddText (cl_stbuf, stuffbuf->str);
|
||||||
dstring_clearstr (stuffbuf);
|
dstring_clearstr (stuffbuf);
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("stufftext: %s\n", s);
|
Sys_MaskPrintf (SYS_DEV, "stufftext: %s\n", s);
|
||||||
}
|
}
|
||||||
Cbuf_AddText (cl_stbuf, s);
|
Cbuf_AddText (cl_stbuf, s);
|
||||||
} else {
|
} else {
|
||||||
Sys_DPrintf ("partial stufftext: %s\n", s);
|
Sys_MaskPrintf (SYS_DEV, "partial stufftext: %s\n", s);
|
||||||
if (!stuffbuf)
|
if (!stuffbuf)
|
||||||
stuffbuf = dstring_newstr ();
|
stuffbuf = dstring_newstr ();
|
||||||
dstring_appendstr (stuffbuf, s);
|
dstring_appendstr (stuffbuf, s);
|
||||||
|
@ -1471,21 +1472,21 @@ CL_ParseServerMessage (void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case svc_intermission:
|
case svc_intermission:
|
||||||
Sys_DPrintf ("svc_intermission\n");
|
Sys_MaskPrintf (SYS_DEV, "svc_intermission\n");
|
||||||
|
|
||||||
cl.intermission = 1;
|
cl.intermission = 1;
|
||||||
r_force_fullscreen = 1;
|
r_force_fullscreen = 1;
|
||||||
cl.completed_time = realtime;
|
cl.completed_time = realtime;
|
||||||
vid.recalc_refdef = true; // go to full screen
|
vid.recalc_refdef = true; // go to full screen
|
||||||
Sys_DPrintf ("intermission simorg: ");
|
Sys_MaskPrintf (SYS_DEV, "intermission simorg: ");
|
||||||
MSG_ReadCoordV (net_message, cl.simorg);
|
MSG_ReadCoordV (net_message, cl.simorg);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
Sys_DPrintf ("%f ", cl.simorg[i]);
|
Sys_MaskPrintf (SYS_DEV, "%f ", cl.simorg[i]);
|
||||||
Sys_DPrintf ("\nintermission simangles: ");
|
Sys_MaskPrintf (SYS_DEV, "\nintermission simangles: ");
|
||||||
MSG_ReadAngleV (net_message, cl.simangles);
|
MSG_ReadAngleV (net_message, cl.simangles);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
Sys_DPrintf ("%f ", cl.simangles[i]);
|
Sys_MaskPrintf (SYS_DEV, "%f ", cl.simangles[i]);
|
||||||
Sys_DPrintf ("\n");
|
Sys_MaskPrintf (SYS_DEV, "\n");
|
||||||
VectorZero (cl.simvel);
|
VectorZero (cl.simvel);
|
||||||
|
|
||||||
// automatic fraglogging (by elmex)
|
// automatic fraglogging (by elmex)
|
||||||
|
|
|
@ -184,8 +184,8 @@ CF_CloseAllFiles ()
|
||||||
|
|
||||||
for (i = 0; i < cf_filepcount; i++)
|
for (i = 0; i < cf_filepcount; i++)
|
||||||
if (cf_filep[i].file) {
|
if (cf_filep[i].file) {
|
||||||
Sys_DPrintf ("Warning: closing Crude File %d left over from last "
|
Sys_MaskPrintf (SYS_DEV, "Warning: closing Crude File %d left "
|
||||||
"map\n", i);
|
"over from last map\n", i);
|
||||||
CF_Close (i);
|
CF_Close (i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,7 +720,7 @@ NudgePosition (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VectorCopy (base, pmove.origin);
|
VectorCopy (base, pmove.origin);
|
||||||
// Sys_DPrintf ("NudgePosition: stuck\n");
|
// Sys_MaskPrintf (SYS_DEV, "NudgePosition: stuck\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -309,7 +309,7 @@ SV_SpawnServer (const char *server)
|
||||||
int i;
|
int i;
|
||||||
struct recorder_s *recorders;
|
struct recorder_s *recorders;
|
||||||
|
|
||||||
Sys_DPrintf ("SpawnServer: %s\n", server);
|
Sys_MaskPrintf (SYS_DEV, "SpawnServer: %s\n", server);
|
||||||
|
|
||||||
SV_SaveSpawnparms ();
|
SV_SaveSpawnparms ();
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ SV_SpawnServer (const char *server)
|
||||||
sv.signon_buffer_size[sv.num_signon_buffers - 1] = sv.signon.cursize;
|
sv.signon_buffer_size[sv.num_signon_buffers - 1] = sv.signon.cursize;
|
||||||
|
|
||||||
Info_SetValueForKey (svs.info, "map", sv.name, !sv_highchars->int_val);
|
Info_SetValueForKey (svs.info, "map", sv.name, !sv_highchars->int_val);
|
||||||
Sys_DPrintf ("Server spawned.\n");
|
Sys_MaskPrintf (SYS_DEV, "Server spawned.\n");
|
||||||
if (sv_map_e->func)
|
if (sv_map_e->func)
|
||||||
GIB_Event_Callback (sv_map_e, 1, server);
|
GIB_Event_Callback (sv_map_e, 1, server);
|
||||||
}
|
}
|
||||||
|
|
|
@ -633,8 +633,8 @@ SVC_Log (void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_DPrintf ("sending log %i to %s\n", svs.logsequence - 1,
|
Sys_MaskPrintf (SYS_DEV, "sending log %i to %s\n", svs.logsequence - 1,
|
||||||
NET_AdrToString (net_from));
|
NET_AdrToString (net_from));
|
||||||
|
|
||||||
// snprintf (data, sizeof (data), "stdlog %i\n", svs.logsequence - 1);
|
// snprintf (data, sizeof (data), "stdlog %i\n", svs.logsequence - 1);
|
||||||
// strncat (data, (char *) svs.log_buf[((svs.logsequence - 1) & 1)],
|
// strncat (data, (char *) svs.log_buf[((svs.logsequence - 1) & 1)],
|
||||||
|
@ -1794,7 +1794,8 @@ SV_ReadPackets (void)
|
||||||
if (cl->netchan.qport != qport)
|
if (cl->netchan.qport != qport)
|
||||||
continue;
|
continue;
|
||||||
if (cl->netchan.remote_address.port != net_from.port) {
|
if (cl->netchan.remote_address.port != net_from.port) {
|
||||||
Sys_DPrintf ("SV_ReadPackets: fixing up a translated port\n");
|
Sys_MaskPrintf (SYS_DEV, "SV_ReadPackets: fixing up a "
|
||||||
|
"translated port\n");
|
||||||
cl->netchan.remote_address.port = net_from.port;
|
cl->netchan.remote_address.port = net_from.port;
|
||||||
}
|
}
|
||||||
if (Netchan_Process (&cl->netchan)) {
|
if (Netchan_Process (&cl->netchan)) {
|
||||||
|
|
|
@ -751,7 +751,7 @@ do_precache (progs_t *pr, const char **cache, int max, const char *name,
|
||||||
char *c = Hunk_Alloc (strlen (s) + 1);
|
char *c = Hunk_Alloc (strlen (s) + 1);
|
||||||
strcpy (c, s);
|
strcpy (c, s);
|
||||||
cache[i] = c; // blah, const
|
cache[i] = c; // blah, const
|
||||||
Sys_DPrintf ("%s: %3d %s\n", func, i, s);
|
Sys_MaskPrintf (SYS_DEV, "%s: %3d %s\n", func, i, s);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!strcmp (cache[i], s))
|
if (!strcmp (cache[i], s))
|
||||||
|
|
|
@ -498,7 +498,7 @@ SV_LoadProgs (void)
|
||||||
sv_range = PR_RANGE_NONE;
|
sv_range = PR_RANGE_NONE;
|
||||||
range = "None";
|
range = "None";
|
||||||
}
|
}
|
||||||
Sys_DPrintf ("Using %s builtin extention mapping\n", range);
|
Sys_MaskPrintf (SYS_DEV, "Using %s builtin extention mapping\n", range);
|
||||||
|
|
||||||
memset (&sv_globals, 0, sizeof (sv_funcs));
|
memset (&sv_globals, 0, sizeof (sv_funcs));
|
||||||
memset (&sv_funcs, 0, sizeof (sv_funcs));
|
memset (&sv_funcs, 0, sizeof (sv_funcs));
|
||||||
|
|
|
@ -436,7 +436,8 @@ SV_qtvPacket (int qport)
|
||||||
if (proxies[i].netchan.qport != qport)
|
if (proxies[i].netchan.qport != qport)
|
||||||
continue;
|
continue;
|
||||||
if (proxies[i].netchan.remote_address.port != net_from.port) {
|
if (proxies[i].netchan.remote_address.port != net_from.port) {
|
||||||
Sys_DPrintf ("SV_ReadPackets: fixing up a translated port\n");
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
|
"SV_ReadPackets: fixing up a translated port\n");
|
||||||
proxies[i].netchan.remote_address.port = net_from.port;
|
proxies[i].netchan.remote_address.port = net_from.port;
|
||||||
}
|
}
|
||||||
if (Netchan_Process (&proxies[i].netchan)) {
|
if (Netchan_Process (&proxies[i].netchan)) {
|
||||||
|
|
|
@ -325,7 +325,7 @@ SV_PreSpawn_f (void *unused)
|
||||||
// should be three numbers following containing checksums
|
// should be three numbers following containing checksums
|
||||||
check = atoi (Cmd_Argv (3));
|
check = atoi (Cmd_Argv (3));
|
||||||
|
|
||||||
// Sys_DPrintf ("Client check = %d\n", check);
|
// Sys_MaskPrintf (SYS_DEV, , "Client check = %d\n", check);
|
||||||
|
|
||||||
if (sv_mapcheck->int_val && check != sv.worldmodel->checksum &&
|
if (sv_mapcheck->int_val && check != sv.worldmodel->checksum &&
|
||||||
check != sv.worldmodel->checksum2) {
|
check != sv.worldmodel->checksum2) {
|
||||||
|
@ -678,7 +678,7 @@ SV_NextUpload (void)
|
||||||
net_message->readcount, size);
|
net_message->readcount, size);
|
||||||
net_message->readcount += size;
|
net_message->readcount += size;
|
||||||
|
|
||||||
Sys_DPrintf ("UPLOAD: %d received\n", size);
|
Sys_MaskPrintf (SYS_DEV, "UPLOAD: %d received\n", size);
|
||||||
|
|
||||||
if (percent != 100) {
|
if (percent != 100) {
|
||||||
MSG_ReliableWrite_Begin (&host_client->backbuf, svc_stufftext, 8);
|
MSG_ReliableWrite_Begin (&host_client->backbuf, svc_stufftext, 8);
|
||||||
|
@ -1925,10 +1925,11 @@ SV_ExecuteClientMessage (client_t *cl)
|
||||||
checksumIndex - 1, seq_hash);
|
checksumIndex - 1, seq_hash);
|
||||||
|
|
||||||
if (calculatedChecksum != checksum) {
|
if (calculatedChecksum != checksum) {
|
||||||
Sys_DPrintf
|
Sys_MaskPrintf (SYS_DEV,
|
||||||
("Failed command checksum for %s(%d) (%d != %d)\n",
|
"Failed command checksum for %s(%d) "
|
||||||
cl->name, cl->netchan.incoming_sequence, checksum,
|
"(%d != %d)\n",
|
||||||
calculatedChecksum);
|
cl->name, cl->netchan.incoming_sequence,
|
||||||
|
checksum, calculatedChecksum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue