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:
Bill Currie 2010-11-23 14:09:30 +09:00
parent 92f84e97a4
commit 8c4fe2f844
88 changed files with 409 additions and 331 deletions

View file

@ -69,7 +69,6 @@ void Sys_SetErrPrintf (sys_printf_t func);
void Sys_Print (FILE *stream, const char *fmt, va_list args);
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_Quit (void) __attribute__((noreturn));
void Sys_Shutdown (void);
@ -77,6 +76,10 @@ void Sys_RegisterShutdown (void (*func) (void));
double Sys_DoubleTime (void);
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);
const char *Sys_ConsoleInput (void);

View file

@ -89,7 +89,7 @@ I_CDAudio_CloseDoor (void)
return; // no cd init'd
if (ioctl (cdfile, CDROMCLOSETRAY) == -1)
Sys_DPrintf ("CDAudio: ioctl cdromclosetray failed\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromclosetray failed\n");
}
static void
@ -99,7 +99,7 @@ I_CDAudio_Eject (void)
return; // no cd init'd
if (ioctl (cdfile, CDROMEJECT) == -1)
Sys_DPrintf ("CDAudio: ioctl cdromeject failed\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromeject failed\n");
}
static int
@ -110,12 +110,12 @@ I_CDAudio_GetAudioDiskInfo (void)
cdValid = false;
if (ioctl (cdfile, CDROMREADTOCHDR, &tochdr) == -1) {
Sys_DPrintf ("CDAudio: ioctl cdromreadtochdr failed\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromreadtochdr failed\n");
return -1;
}
if (tochdr.cdth_trk0 < 1) {
Sys_DPrintf ("CDAudio: no music tracks\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: no music tracks\n");
return -1;
}
@ -135,7 +135,7 @@ I_CDAudio_Pause (void)
return;
if (ioctl (cdfile, CDROMPAUSE) == -1)
Sys_DPrintf ("CDAudio: ioctl cdrompause failed\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdrompause failed\n");
wasPlaying = playing;
playing = false;
@ -151,7 +151,8 @@ I_CDAudio_Stop (void)
return;
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;
playing = false;
@ -188,7 +189,7 @@ I_CDAudio_Play (int track, qboolean looping)
entry0.cdte_track = track;
entry0.cdte_format = CDROM_MSF;
if (ioctl (cdfile, CDROMREADTOCENTRY, &entry0) == -1) {
Sys_DPrintf ("CDAudio: ioctl cdromreadtocentry failed\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromreadtocentry failed\n");
return;
}
entry1.cdte_track = track + 1;
@ -197,7 +198,7 @@ I_CDAudio_Play (int track, qboolean looping)
entry1.cdte_track = CDROM_LEADOUT;
}
if (ioctl (cdfile, CDROMREADTOCENTRY, &entry1) == -1) {
Sys_DPrintf ("CDAudio: ioctl cdromreadtocentry failed\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromreadtocentry failed\n");
return;
}
if (entry0.cdte_ctrl == CDROM_DATA_TRACK) {
@ -219,14 +220,15 @@ I_CDAudio_Play (int track, qboolean looping)
msf.cdmsf_sec1 = entry1.cdte_addr.msf.second;
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_sec0,
msf.cdmsf_frame0,
msf.cdmsf_min1, msf.cdmsf_sec1, msf.cdmsf_frame1);
if (ioctl (cdfile, CDROMPLAYMSF, &msf) == -1) {
Sys_DPrintf ("CDAudio: ioctl cdromplaytrkind failed (%s)\n",
Sys_MaskPrintf (SYS_DEV,
"CDAudio: ioctl cdromplaytrkind failed (%s)\n",
strerror (errno));
return;
}
@ -252,7 +254,7 @@ I_CDAudio_Resume (void)
return;
if (ioctl (cdfile, CDROMRESUME) == -1)
Sys_DPrintf ("CDAudio: ioctl cdromresume failed\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromresume failed\n");
playing = true;
}
@ -397,7 +399,7 @@ I_CDAudio_Update (void)
lastchk = time (NULL) + 2; // two seconds between chks
subchnl.cdsc_format = CDROM_MSF;
if (ioctl (cdfile, CDROMSUBCHNL, &subchnl) == -1) {
Sys_DPrintf ("CDAudio: ioctl cdromsubchnl failed\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: ioctl cdromsubchnl failed\n");
playing = false;
return;
}
@ -422,7 +424,8 @@ Mus_CDChange (cvar_t *mus_cdaudio)
cdfile = open (mus_cdaudio->string, O_RDONLY | O_NONBLOCK);
if (cdfile == -1) {
Sys_DPrintf ("Mus_CDInit: open of device \"%s\" failed (error %i)\n",
Sys_MaskPrintf (SYS_DEV,
"Mus_CDInit: open device \"%s\" failed (error %i)\n",
mus_cdaudio->string, errno);
return;
}

View file

@ -75,7 +75,7 @@ I_CDAudio_Eject (void)
return;
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
@ -87,7 +87,7 @@ I_CDAudio_Pause (void)
return;
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
@ -102,7 +102,7 @@ I_CDAudio_Stop (void)
return;
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
@ -135,7 +135,8 @@ I_CDAudio_Play (int track, qboolean looping)
if (SDL_CDPlay (cd_id, cd_id->track[track].offset,
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;
}
playLooping = looping;
@ -150,7 +151,7 @@ I_CDAudio_Resume (void)
return;
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

View file

@ -73,7 +73,7 @@ I_SGI_Eject (void)
return; // no cd init'd
if (CDeject (cdp) == 0)
Sys_DPrintf ("I_SGI_Eject: CDeject failed\n");
Sys_MaskPrintf (SYS_DEV, "I_SGI_Eject: CDeject failed\n");
}
static int
@ -85,7 +85,7 @@ I_SGI_GetState (void)
return -1; // no cd init'd
if (CDgetstatus (cdp, &cds) == 0) {
Sys_DPrintf ("CDAudio_GetStatus: CDgetstatus failed\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio_GetStatus: CDgetstatus failed\n");
return -1;
}
@ -101,7 +101,7 @@ I_SGI_MaxTrack (void)
return -1; // no cd init'd
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;
}
@ -115,7 +115,7 @@ I_SGI_Pause (void)
return;
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
@ -133,7 +133,8 @@ I_SGI_Play (int track, qboolean looping)
}
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;
}
@ -172,7 +173,7 @@ I_SGI_Play (int track, qboolean looping)
}
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;
}
@ -187,7 +188,8 @@ I_SGI_Resume (void)
return;
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
@ -209,7 +211,7 @@ I_SGI_Stop (void)
return;
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

View file

@ -77,7 +77,8 @@ I_CDAudio_CloseDoor (void)
dwReturn =
mciSendCommand (wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD_PTR) NULL);
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,
(DWORD_PTR) NULL);
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,
(DWORD_PTR) (LPVOID) & mciStatusParms);
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;
}
if (!mciStatusParms.dwReturn) {
Sys_DPrintf ("CDAudio: drive not ready\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: drive not ready\n");
return -1;
}
@ -119,11 +121,11 @@ I_CDAudio_GetAudioDiskInfo (void)
mciSendCommand (wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT,
(DWORD_PTR) (LPVOID) & mciStatusParms);
if (dwReturn) {
Sys_DPrintf ("CDAudio: get tracks - status failed\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: get tracks - status failed\n");
return -1;
}
if (mciStatusParms.dwReturn < 1) {
Sys_DPrintf ("CDAudio: no music tracks\n");
Sys_MaskPrintf (SYS_DEV, "CDAudio: no music tracks\n");
return -1;
}
@ -154,13 +156,14 @@ static I_CDAudio_MessageHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
break;
case MCI_NOTIFY_FAILURE:
Sys_DPrintf ("MCI_NOTIFY_FAILURE\n");
Sys_MaskPrintf (SYS_DEV, "MCI_NOTIFY_FAILURE\n");
I_CDAudio_Stop ();
cdValid = false;
break;
default:
Sys_DPrintf ("Unexpected MM_MCINOTIFY type (%i)\n", wParam);
Sys_MaskPrintf (SYS_DEV, "Unexpected MM_MCINOTIFY type (%i)\n",
wParam);
return 1;
}
@ -184,7 +187,7 @@ I_CDAudio_Pause (void)
mciSendCommand (wDeviceID, MCI_PAUSE, 0,
(DWORD_PTR) (LPVOID) & mciGenericParms);
if (dwReturn) {
Sys_DPrintf ("MCI_PAUSE failed (%li)", dwReturn);
Sys_MaskPrintf (SYS_DEV, "MCI_PAUSE failed (%li)", dwReturn);
}
wasPlaying = playing;
@ -225,7 +228,7 @@ I_CDAudio_Play (int track, qboolean looping)
MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT,
(DWORD_PTR) (LPVOID) & mciStatusParms);
if (dwReturn) {
Sys_DPrintf ("MCI_STATUS failed (%li)\n", dwReturn);
Sys_MaskPrintf (SYS_DEV, "MCI_STATUS failed (%li)\n", dwReturn);
return;
}
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,
(DWORD_PTR) (LPVOID) & mciStatusParms);
if (dwReturn) {
Sys_DPrintf ("MCI_STATUS failed (%li)\n", dwReturn);
Sys_MaskPrintf (SYS_DEV, "MCI_STATUS failed (%li)\n", dwReturn);
return;
}
@ -257,7 +260,7 @@ I_CDAudio_Play (int track, qboolean looping)
mciSendCommand (wDeviceID, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO,
(DWORD_PTR) (LPVOID) & mciPlayParms);
if (dwReturn) {
Sys_DPrintf ("CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
Sys_MaskPrintf (SYS_DEV, "CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
return;
}
@ -289,7 +292,7 @@ I_CDAudio_Resume (void)
mciSendCommand (wDeviceID, MCI_PLAY, MCI_TO | MCI_NOTIFY,
(DWORD_PTR) (LPVOID) & mciPlayParms);
if (dwReturn) {
Sys_DPrintf ("CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
Sys_MaskPrintf (SYS_DEV, "CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
return;
}
playing = true;
@ -302,7 +305,7 @@ I_CDAudio_Shutdown (void)
return;
I_CDAudio_Stop ();
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
@ -317,7 +320,7 @@ I_CDAudio_Stop (void)
dwReturn = mciSendCommand (wDeviceID, MCI_STOP, 0, (DWORD_PTR) NULL);
if (dwReturn) {
Sys_DPrintf ("MCI_STOP failed (%li)", dwReturn);
Sys_MaskPrintf (SYS_DEV, "MCI_STOP failed (%li)", dwReturn);
}
wasPlaying = false;

View file

@ -152,7 +152,7 @@ I_XMMS_Running (void)
break;
case -1: // ICH!
// inform user
Sys_DPrintf ("XMMSAudio: error, can't fork!?\n");
Sys_MaskPrintf (SYS_DEV, "XMMSAudio: error, can't fork!?\n");
break;
default: // Parent
// don't need now :/

View file

@ -412,7 +412,7 @@ flac_get_info (flacfile_t *ff)
vc = &ff->vorbis_info->data.vorbis_comment;
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) {
char *str = alloca (ve->length + 1);
strncpy (str, (char *) ve->entry, ve->length);
@ -463,10 +463,10 @@ SND_LoadFLAC (QFile *file, sfx_t *sfx, char *realname)
return -1;
}
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);
} else {
Sys_DPrintf ("stream %s\n", realname);
Sys_MaskPrintf (SYS_DEV, "stream %s\n", realname);
flac_stream (sfx, realname, ff, info);
}
return 0;

View file

@ -198,7 +198,7 @@ SND_LoadMidi (QFile *file, sfx_t *sfx, char *realname)
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
SND_SFX_Stream (sfx, realname, info, midi_stream_open);

View file

@ -149,7 +149,7 @@ SND_ScanChannels (int wait)
return;
if (wait) {
Sys_DPrintf ("scanning channels...\n");
Sys_MaskPrintf (SYS_DEV, "scanning channels...\n");
do {
count = 0;
for (i = 0; i < MAX_CHANNELS; i++) {
@ -159,12 +159,12 @@ SND_ScanChannels (int wait)
ch->stop = 1;
count++;
}
Sys_DPrintf ("count = %d\n", count);
Sys_MaskPrintf (SYS_DEV, "count = %d\n", count);
#ifdef HAVE_USLEEP
usleep (1000);
#endif
} while (count);
Sys_DPrintf ("scanning done.\n");
Sys_MaskPrintf (SYS_DEV, "scanning done.\n");
} else {
for (i = 0; i < MAX_CHANNELS; i++) {
ch = &snd_channels[i];

View file

@ -324,7 +324,7 @@ SND_Load (sfx_t *sfx)
Qseek (file, 0, SEEK_SET);
#ifdef HAVE_VORBIS
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)
goto bail;
return 0;
@ -332,7 +332,7 @@ SND_Load (sfx_t *sfx)
#endif
#ifdef HAVE_FLAC
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)
goto bail;
return 0;
@ -340,14 +340,14 @@ SND_Load (sfx_t *sfx)
#endif
#ifdef HAVE_WILDMIDI
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)
goto bail;
return 0;
}
#endif
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)
goto bail;
return 0;

View file

@ -103,7 +103,7 @@ vorbis_get_info (OggVorbis_File *vf)
samples = ov_pcm_total (vf, -1);
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) {
sscanf (*ptr + 9, "%d %d", &sample_start, &sample_count);
}
@ -304,10 +304,10 @@ SND_LoadOgg (QFile *file, sfx_t *sfx, char *realname)
return -1;
}
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);
} else {
Sys_DPrintf ("stream %s\n", realname);
Sys_MaskPrintf (SYS_DEV, "stream %s\n", realname);
vorbis_stream (sfx, realname, &vf, info);
}
return 0;

View file

@ -280,10 +280,10 @@ SND_LoadWav (QFile *file, sfx_t *sfx, char *realname)
}
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);
} else {
Sys_DPrintf ("stream %s\n", realname);
Sys_MaskPrintf (SYS_DEV, "stream %s\n", realname);
wav_stream (sfx, realname, file, info);
}
return 0;

View file

@ -315,7 +315,7 @@ SNDDMA_Submit (void)
// find which sound blocks have completed
while (1) {
if (snd_completed == snd_sent) {
Sys_DPrintf ("Sound overrun\n");
Sys_MaskPrintf (SYS_DEV, "Sound overrun\n");
break;
}

View file

@ -206,7 +206,8 @@ PR_RelocateBuiltins (progs_t *pr)
ind = pr->bi_map (pr, ind);
bi = PR_FindBuiltinNum (pr, ind);
if (!bi || !(proc = bi->proc)) {
Sys_DPrintf ("WARNING: Bad builtin call number: %s = #%d\n",
Sys_MaskPrintf (SYS_DEV,
"WARNING: Bad builtin call number: %s = #%d\n",
bi_name, -desc->first_statement);
proc = bi_no_function;
}

View file

@ -161,7 +161,7 @@ PR_LoadProgsFile (progs_t *pr, QFile *file, int size, int edicts, int zone)
// size of progs themselves
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)
// this ensures that pointers in the engine data area are always
// properly aligned

View file

@ -75,13 +75,13 @@ void
GIB_Tree_Ref (gib_tree_t ** tp)
{
(*tp)->refs++;
// Sys_DPrintf ("Ref: %p %u\n", *tp, (*tp)->refs);
// Sys_MaskPrintf (SYS_DEV, "Ref: %p %u\n", *tp, (*tp)->refs);
}
void
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)) {
GIB_Tree_Free_Recursive (*tp);
*tp = 0;

View file

@ -235,7 +235,7 @@ skip_colormap (TargaHeader *targa, byte *data)
int bpe;
if (!targa->colormap_type)
return data;
Sys_DPrintf ("LoadTGA: skipping colormap\n");
Sys_MaskPrintf (SYS_DEV, "LoadTGA: skipping colormap\n");
bpe = (targa->pixel_size +7) / 8;
return data + bpe * targa->colormap_length;
}

View file

@ -322,8 +322,8 @@ BuildTris (void)
add_command (0); // end of list marker
Sys_DPrintf ("%3i tri %3i vert %3i cmd\n", pheader->mdl.numtris, numorder,
numcommands);
Sys_MaskPrintf (SYS_DEV, "%3i tri %3i vert %3i cmd\n",
pheader->mdl.numtris, numorder, numcommands);
allverts += numorder;
alltris += pheader->mdl.numtris;
@ -434,7 +434,7 @@ Mod_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr, void *_m, int _s, i
}
if (remesh) {
// build it from scratch
Sys_DPrintf ("meshing %s...\n", m->name);
Sys_MaskPrintf (SYS_DEV, "meshing %s...\n", m->name);
BuildTris (); // trifans or lists

View file

@ -102,7 +102,7 @@ Mod_FloodFillSkin (byte * skin, int skinwidth, int skinheight)
}
// can't fill to filled color or transparent color (used as visited marker)
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);
return;
}

View file

@ -157,13 +157,14 @@ Mod_LoadLighting (bsp_t *bsp)
&& data[3] == 'T') {
ver = LittleLong (((int32_t *) data)[1]);
if (ver == 1) {
Sys_DPrintf ("%s loaded", litfilename->str);
Sys_MaskPrintf (SYS_DEV, "%s loaded", litfilename->str);
loadmodel->lightdata = data + 8;
return;
} else
Sys_DPrintf ("Unknown .lit file version (%d)\n", ver);
Sys_MaskPrintf (SYS_DEV,
"Unknown .lit file version (%d)\n", ver);
} 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

View file

@ -76,7 +76,7 @@ Mod_Fullbright (byte *skin, int width, int height, char *name)
// Check for fullbright 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);
}

View file

@ -272,7 +272,7 @@ Mod_ForName (const char *name, qboolean crash)
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);
}

View file

@ -205,7 +205,7 @@ MOD_TraceLine (hull_t *hull, int num,
frac = (start_dist + offset) / (start_dist - end_dist);
} else {
// get here only when offset is non-zero
Sys_DPrintf ("foo\n");
Sys_MaskPrintf (SYS_DEV, "foo\n");
frac = 1;
side = start_dist < end_dist;
}

View file

@ -888,9 +888,9 @@ NET_Init (void)
}
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)
Sys_DPrintf ("TCP/IP address %s\n", my_tcpip_address);
Sys_MaskPrintf (SYS_DEV, "TCP/IP address %s\n", my_tcpip_address);
}
/*

View file

@ -343,14 +343,14 @@ Datagram_GetMessage (qsocket_t * sock)
if (flags & NETFLAG_UNRELIABLE) {
if (sequence < sock->unreliableReceiveSequence) {
Sys_DPrintf ("Got a stale datagram\n");
Sys_MaskPrintf (SYS_DEV, "Got a stale datagram\n");
ret = 0;
break;
}
if (sequence != sock->unreliableReceiveSequence) {
count = sequence - sock->unreliableReceiveSequence;
droppedDatagrams += count;
Sys_DPrintf ("Dropped %u datagram(s)\n", count);
Sys_MaskPrintf (SYS_DEV, "Dropped %u datagram(s)\n", count);
}
sock->unreliableReceiveSequence = sequence + 1;
@ -365,15 +365,15 @@ Datagram_GetMessage (qsocket_t * sock)
if (flags & NETFLAG_ACK) {
if (sequence != (sock->sendSequence - 1)) {
Sys_DPrintf ("Stale ACK received\n");
Sys_MaskPrintf (SYS_DEV, "Stale ACK received\n");
continue;
}
if (sequence == sock->ackSequence) {
sock->ackSequence++;
if (sock->ackSequence != sock->sendSequence)
Sys_DPrintf ("ack sequencing error\n");
Sys_MaskPrintf (SYS_DEV, "ack sequencing error\n");
} else {
Sys_DPrintf ("Duplicate ACK received\n");
Sys_MaskPrintf (SYS_DEV, "Duplicate ACK received\n");
continue;
}
sock->sendMessageLength -= MAX_DATAGRAM;

View file

@ -141,7 +141,7 @@ get_address (int sock)
if (ioctl (sock, SIOCGIFADDR, &ifr[i]) == -1)
continue;
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));
addr = *(unsigned *)&in_addr->sin_addr;
if (addr != htonl (0x7f000001)) {

View file

@ -202,7 +202,7 @@ WINS_Init (void)
// determine my name
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)
pWSACleanup ();
return -1;

View file

@ -51,9 +51,10 @@ Garbage_Do_Mark (Object *root)
if (!root->marked) {
ObjRefs_t *allrefs;
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)
for (allrefs = methodCall(root, allRefs); allrefs; allrefs = allrefs->next) {
for (allrefs = methodCall(root, allRefs); allrefs;
allrefs = allrefs->next) {
unsigned int i;
for (i = 0; i < allrefs->count; i++)
Garbage_Do_Mark (allrefs->objs[i]);
@ -81,7 +82,9 @@ Garbage_Do_Sweep (Object **allobjs)
obj->next = junk;
junk = obj;
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
*prevNext = obj->next;
@ -108,7 +111,8 @@ Garbage_Dispose (Object **allobjs, unsigned int amount)
junk->next = *allobjs;
*allobjs = junk;
} 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);
junked--;
}

View file

@ -50,7 +50,8 @@ PushBackbuf (backbuf_t *rel)
{
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;
memset (&rel->backbuf, 0, sizeof (rel->backbuf));
rel->backbuf.allowoverflow = true;
@ -268,7 +269,7 @@ MSG_Reliable_Send (backbuf_t *rel)
return;
// will it fit?
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
SZ_Write (msg, data, *size);

View file

@ -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 = class->methods;
}
Sys_DPrintf (" %d %d %d\n", meta->class_pointer, meta->super_class,
class->super_class);
Sys_MaskPrintf (SYS_DEV, " %d %d %d\n", meta->class_pointer,
meta->super_class, class->super_class);
}
//====================================================================

View file

@ -147,7 +147,8 @@ Cmd_AddCommand (const char *cmd_name, xcommand_t function,
// fail if the command already exists
cmd = (cmd_function_t *) Hash_Find (cmd_hash, cmd_name);
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;
}

View file

@ -237,7 +237,8 @@ Cvar_Set (cvar_t *var, const char *value)
return;
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;
}
@ -352,7 +353,8 @@ set_cvar (const char *cmd, int orflags)
if (var) {
if (var->flags & CVAR_ROM) {
Sys_DPrintf ("Cvar \"%s\" is read-only, cannot modify\n",
Sys_MaskPrintf (SYS_DEV,
"Cvar \"%s\" is read-only, cannot modify\n",
var_name);
} else {
Cvar_Set (var, value);

View file

@ -341,7 +341,7 @@ PI_LoadPlugin (const char *type, const char *name)
// try to reopen
if (!(dlhand = pi_open_lib (realname, 1))) {
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;
}
@ -387,7 +387,8 @@ PI_UnloadPlugin (plugin_t *plugin)
&& plugin->functions->general->p_Shutdown) {
plugin->functions->general->p_Shutdown ();
} else {
Sys_DPrintf ("Warning: No shutdown function for type %d plugin!\n",
Sys_MaskPrintf (SYS_DEV,
"Warning: No shutdown function for type %d plugin!\n",
plugin->type);
}

View file

@ -549,15 +549,15 @@ qfs_build_gamedir (const char **list)
gamedir->dir.maps = nva ("%s/maps", gamedir->dir.def);
qfs_gamedir = gamedir;
Sys_DPrintf ("%s\n", qfs_gamedir->name);
Sys_DPrintf (" gamedir : %s\n", qfs_gamedir->gamedir);
Sys_DPrintf (" path : %s\n", qfs_gamedir->path);
Sys_DPrintf (" gamecode: %s\n", qfs_gamedir->gamecode);
Sys_DPrintf (" def : %s\n", qfs_gamedir->dir.def);
Sys_DPrintf (" skins : %s\n", qfs_gamedir->dir.skins);
Sys_DPrintf (" models : %s\n", qfs_gamedir->dir.models);
Sys_DPrintf (" sound : %s\n", qfs_gamedir->dir.sound);
Sys_DPrintf (" maps : %s\n", qfs_gamedir->dir.maps);
Sys_MaskPrintf (SYS_DEV, "%s\n", qfs_gamedir->name);
Sys_MaskPrintf (SYS_DEV, " gamedir : %s\n", qfs_gamedir->gamedir);
Sys_MaskPrintf (SYS_DEV, " path : %s\n", qfs_gamedir->path);
Sys_MaskPrintf (SYS_DEV, " gamecode: %s\n", qfs_gamedir->gamecode);
Sys_MaskPrintf (SYS_DEV, " def : %s\n", qfs_gamedir->dir.def);
Sys_MaskPrintf (SYS_DEV, " skins : %s\n", qfs_gamedir->dir.skins);
Sys_MaskPrintf (SYS_DEV, " models : %s\n", qfs_gamedir->dir.models);
Sys_MaskPrintf (SYS_DEV, " sound : %s\n", qfs_gamedir->dir.sound);
Sys_MaskPrintf (SYS_DEV, " maps : %s\n", qfs_gamedir->dir.maps);
qfs_process_path (qfs_gamedir->path, dir);
free (path);
Hash_DelTable (dirs);
@ -575,7 +575,8 @@ qfs_load_config (void)
if (*fs_dirconf->string) {
dirconf = Sys_ExpandSquiggle (fs_dirconf->string);
if (!(f = Qopen (dirconf, "rt")))
Sys_DPrintf ("Could not load `%s', using builtin defaults\n",
Sys_MaskPrintf (SYS_DEV,
"Could not load `%s', using builtin defaults\n",
dirconf);
free (dirconf);
}
@ -826,8 +827,8 @@ open_file (searchpath_t *search, const char *filename, QFile **gzfile,
packfile = pack_find_file (search->pack, filename);
if (packfile) {
Sys_DPrintf ("PackFile: %s : %s\n", search->pack->filename,
packfile->name);
Sys_MaskPrintf (SYS_DEV, "PackFile: %s : %s\n",
search->pack->filename, packfile->name);
// open a new file on the pakfile
if (foundname) {
dstring_clearstr (foundname);
@ -852,7 +853,7 @@ open_file (searchpath_t *search, const char *filename, QFile **gzfile,
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);
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
path = QFS_CompressPath (filename);
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;
}
@ -916,7 +919,7 @@ _QFS_FOpenFile (const char *filename, QFile **gzfile,
goto ok;
}
Sys_DPrintf ("FindFile: can't find %s\n", filename);
Sys_MaskPrintf (SYS_DEV, "FindFile: can't find %s\n", filename);
error:
*gzfile = NULL;
qfs_filesize = -1;
@ -1027,7 +1030,7 @@ qfs_load_pakfile (char *packfile)
pack_t *pack = pack_open (packfile);
if (pack)
Sys_DPrintf ("Added packfile %s (%i files)\n",
Sys_MaskPrintf (SYS_DEV, "Added packfile %s (%i files)\n",
packfile, pack->numfiles);
return pack;
}
@ -1077,7 +1080,7 @@ qfs_load_gamedir (const char *dir)
char **pakfiles = NULL;
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 *));
@ -1185,7 +1188,8 @@ qfs_add_gamedir (const char *dir)
Sys_Printf ("dropping bad directory %s\n", dir);
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);
}
@ -1194,7 +1198,7 @@ qfs_add_gamedir (const char *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);
dstring_delete (f_dir);
@ -1409,7 +1413,7 @@ QFS_Open (const char *path, const char *mode)
int write = 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++)
if (*m == 'w' || *m == '+' || *m == 'a')
write = 1;

View file

@ -266,11 +266,11 @@ Sys_Printf (const char *fmt, ...)
}
VISIBLE void
Sys_DPrintf (const char *fmt, ...)
Sys_MaskPrintf (int mask, const char *fmt, ...)
{
va_list args;
if (!developer || !developer->int_val)
if (!developer || !(developer->int_val & mask))
return;
va_start (args, fmt);
sys_std_printf_function (fmt, args);

View file

@ -592,7 +592,7 @@ Cache_Move (cache_system_t * c)
// we are clearing up space at the bottom, so allocate it late
new = Cache_TryAlloc (c->size, true);
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));
new->user = c->user;
@ -600,7 +600,7 @@ Cache_Move (cache_system_t * c)
Cache_Free (c->user);
new->user->data = (void *) (new + 1);
} else {
Sys_DPrintf ("cache_move failed\n");
Sys_MaskPrintf (SYS_DEV, "cache_move failed\n");
Cache_Free (c->user); // tough luck...
}
@ -856,7 +856,7 @@ Cache_Free (cache_user_t *c)
if (cs->readlock)
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);
@ -919,7 +919,7 @@ Cache_Alloc (cache_user_t *c, int size, const char *name)
VISIBLE 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_low_used) / (float) (1024 * 1024));
}

View file

@ -134,7 +134,8 @@ Draw_InitText (void)
tVAsize = 0;
if (tVAsize) {
Sys_DPrintf ("Text: %i maximum vertex elements.\n", tVAsize);
Sys_MaskPrintf (SYS_DEV, "Text: %i maximum vertex elements.\n",
tVAsize);
if (textVertices)
free (textVertices);
@ -152,7 +153,7 @@ Draw_InitText (void)
for (i = 0; i < tVAsize; i++)
tVAindices[i] = i;
} else {
Sys_DPrintf ("Text: Vertex Array use disabled.\n");
Sys_MaskPrintf (SYS_DEV, "Text: Vertex Array use disabled.\n");
}
}

View file

@ -161,7 +161,9 @@ R_InitParticles (void)
else
pVAsize = 0;
if (pVAsize) {
Sys_DPrintf ("Particles: %i maximum vertex elements.\n", pVAsize);
Sys_MaskPrintf (SYS_DEV,
"Particles: %i maximum vertex elements.\n",
pVAsize);
if (particleVertexArray)
free (particleVertexArray);
@ -175,7 +177,8 @@ R_InitParticles (void)
for (i = 0; i < pVAsize; i++)
pVAindices[i] = i;
} else {
Sys_DPrintf ("Particles: Vertex Array use disabled.\n");
Sys_MaskPrintf (SYS_DEV,
"Particles: Vertex Array use disabled.\n");
}
} else {
if (particleVertexArray) {
@ -212,7 +215,7 @@ R_ReadPointFile_f (void)
return;
}
Sys_DPrintf ("Reading %s...\n", name);
Sys_MaskPrintf (SYS_DEV, "Reading %s...\n", name);
c = 0;
for (;;) {
char buf[64];
@ -224,7 +227,7 @@ R_ReadPointFile_f (void)
c++;
if (numparticles >= r_maxparticles) {
Sys_DPrintf ("Not enough free particles\n");
Sys_MaskPrintf (SYS_DEV, "Not enough free particles\n");
break;
} else {
particle_new (pt_static, part_tex_dot, org, 1.5, vec3_origin,
@ -232,7 +235,7 @@ R_ReadPointFile_f (void)
}
}
Qclose (f);
Sys_DPrintf ("%i points read\n", c);
Sys_MaskPrintf (SYS_DEV, "%i points read\n", c);
}
static void
@ -1547,7 +1550,8 @@ R_ParticlePhysics (particle_t *part)
part->scale -= time2;
break;
default:
Sys_DPrintf ("unhandled particle type %d\n", part->type);
Sys_MaskPrintf (SYS_DEV, "unhandled particle type %d\n",
part->type);
break;
}
}

View file

@ -257,7 +257,8 @@ GL_GetAliasFrameVerts16 (int frame, aliashdr_t *paliashdr, entity_t *e)
if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
if (developer->int_val)
Sys_DPrintf ("R_AliasSetupFrame: no such frame %d %s\n", frame,
Sys_MaskPrintf (SYS_DEV,
"R_AliasSetupFrame: no such frame %d %s\n", frame,
currententity->model->name);
frame = 0;
}
@ -363,7 +364,8 @@ GL_GetAliasFrameVerts (int frame, aliashdr_t *paliashdr, entity_t *e)
if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
if (developer->int_val)
Sys_DPrintf ("R_AliasSetupFrame: no such frame %d %s\n", frame,
Sys_MaskPrintf (SYS_DEV,
"R_AliasSetupFrame: no such frame %d %s\n", frame,
currententity->model->name);
frame = 0;
}
@ -466,7 +468,8 @@ R_AliasGetSkindesc (int skinnum, aliashdr_t *ahdr)
maliasskingroup_t *paliasskingroup;
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;
}

View file

@ -74,7 +74,7 @@ R_GetSpriteFrame (entity_t *currententity)
frame = currententity->frame;
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;
}
@ -260,7 +260,8 @@ R_InitSprites (void)
#else
sVAsize = 4;
#endif
Sys_DPrintf ("Sprites: %i maximum vertex elements.\n", sVAsize);
Sys_MaskPrintf (SYS_DEV, "Sprites: %i maximum vertex elements.\n",
sVAsize);
if (spriteVertexArray)
free (spriteVertexArray);

View file

@ -807,15 +807,15 @@ R_InitFishEyeOnce (void)
if (fisheye_init_once_completed)
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")) {
qfglGetIntegerv (GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB,
&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);
gl_cube_map_capable = true;
} else {
Sys_DPrintf ("not found.\n");
Sys_MaskPrintf (SYS_DEV, "not found.\n");
gl_cube_map_capable = false;
}
fisheye_init_once_completed = true;

View file

@ -232,7 +232,7 @@ R_TimeRefresh_f (void)
stop = Sys_DoubleTime ();
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

View file

@ -263,7 +263,7 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs)
if (r_speeds->int_val) {
// qfglFinish ();
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,
c_alias_polys, numparticles);
}

View file

@ -221,7 +221,7 @@ Skin_Do_Translation_Model (model_t *model, int skinnum, int slot, skin_t *skin)
paliashdr = Cache_Get (&model->cache);
if (skinnum < 0
|| 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 = 0;
}

View file

@ -129,11 +129,11 @@ R_LoadSkys (const char *skyname)
targa = LoadImage (name = va ("env/%s%s", skyname, suf[i]));
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
targa = LoadImage (name = va ("gfx/env/%s%s", skyname, suf[i]));
if (!targa) {
Sys_DPrintf ("Couldn't load %s\n", name);
Sys_MaskPrintf (SYS_DEV, "Couldn't load %s\n", name);
skyloaded = false;
continue;
}

View file

@ -84,7 +84,7 @@ bi_Draw_CachePic (progs_t *pr)
qpic_res_t *rpic = Hash_Find (res->pic_hash, path);
if (!pic) {
Sys_DPrintf ("can't load %s\n", path);
Sys_MaskPrintf (SYS_DEV, "can't load %s\n", path);
R_INT (pr) = 0;
return;
}

View file

@ -101,7 +101,7 @@ D_ClearCacheGuard (void)
void
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_base = (surfcache_t *) buffer;

View file

@ -113,7 +113,7 @@ R_AliasCheckBBox (void)
frame = currententity->frame;
// TODO: don't repeat this check when drawing?
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;
}
@ -558,7 +558,8 @@ R_AliasSetupSkin (void)
skinnum = currententity->skinnum;
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;
}
@ -651,7 +652,8 @@ R_AliasSetupFrame (void)
frame = currententity->frame;
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;
}

View file

@ -832,7 +832,8 @@ R_DrawParticles (void)
p->vel[2] -= grav;
break;
default:
Sys_DPrintf ("unhandled particle type %d\n", p->type);
Sys_MaskPrintf (SYS_DEV, "unhandled particle type %d\n",
p->type);
break;
}
}

View file

@ -107,7 +107,7 @@ D_ClearCacheGuard (void)
void
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_base = (surfcache_t *) buffer;

View file

@ -113,7 +113,7 @@ R_AliasCheckBBox (void)
frame = currententity->frame;
// TODO: don't repeat this check when drawing?
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;
}
@ -553,7 +553,8 @@ R_AliasSetupSkin (void)
skinnum = currententity->skinnum;
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;
}
@ -646,7 +647,8 @@ R_AliasSetupFrame (void)
frame = currententity->frame;
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;
}

View file

@ -842,7 +842,8 @@ R_DrawParticles (void)
p->vel[2] -= grav;
break;
default:
Sys_DPrintf ("unhandled particle type %d\n", p->type);
Sys_MaskPrintf (SYS_DEV, "unhandled particle type %d\n",
p->type);
break;
}
}

View file

@ -128,7 +128,9 @@ configure_notify (XEvent *event)
if (vidmode_active)
X11_ForceViewPort ();
#endif
Sys_DPrintf ("ConfigureNotify: %ld %d %ld %ld %d,%d (%d,%d) %d %ld %d\n",
Sys_MaskPrintf (SYS_DEV,
"ConfigureNotify: %ld %d %ld %ld %d,%d (%d,%d) "
"%d %ld %d\n",
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);
@ -138,7 +140,8 @@ qboolean
X11_AddEvent (int event, void (*event_handler) (XEvent *))
{
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;
}
@ -428,7 +431,7 @@ X11_SetVidMode (int width, int height)
}
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);
XF86VidModeSwitchToMode (x_disp, x_screen,

View file

@ -97,11 +97,11 @@ VID_CheckDGA (Display * dpy, int *maj_ver, int *min_ver, int *hasvideo)
}
if ((!maj_ver) || (*maj_ver != XDGA_MAJOR_VERSION)) {
Sys_DPrintf ("VID: Incorrect DGA version: %d.%d, \n", *maj_ver,
*min_ver);
Sys_MaskPrintf (SYS_DEV, "VID: Incorrect DGA version: %d.%d, \n",
*maj_ver, *min_ver);
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)
hasvideo = &dummy_video;
@ -151,12 +151,13 @@ VID_CheckVMode (Display * dpy, int *maj_ver, int *min_ver)
return false;
if ((!maj_ver) || (*maj_ver != XF86VIDMODE_MAJOR_VERSION)) {
Sys_DPrintf ("VID: Incorrect VidMode version: %d.%d\n", *maj_ver,
*min_ver);
Sys_MaskPrintf (SYS_DEV, "VID: Incorrect VidMode version: %d.%d\n",
*maj_ver, *min_ver);
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;
#else
return false;

View file

@ -135,7 +135,7 @@ IN_Shutdown (void)
{
JOY_Shutdown ();
Sys_DPrintf ("IN_Shutdown\n");
Sys_MaskPrintf (SYS_DEV, "IN_Shutdown\n");
IN_LL_Shutdown ();
IE_Shutdown ();

View file

@ -115,7 +115,7 @@ keyhandler (int scancode, int state)
default:
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_Event (key, ascii, press);
}
@ -386,14 +386,15 @@ IN_InitMouse (void)
mouserate = atoi (com_argv[COM_CheckParm ("-mrate") + 1]);
}
#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);
#endif
//FIXME: vga_init() opens the mouse automoatically
// closing it to ensure its opened how we want it
mouse_close();
if (mouse_init ((char *)mousedev, mtype, mouserate)) {
Sys_DPrintf ("No mouse found. Check your libvga.conf mouse settings"
Sys_MaskPrintf (SYS_DEV,
"No mouse found. Check your libvga.conf mouse settings"
" and that the mouse\n"
"device has appropriate permission settings.\n");
UseMouse = 0;
@ -406,7 +407,7 @@ IN_InitMouse (void)
void
IN_LL_Shutdown (void)
{
Sys_DPrintf ("IN_LL_Shutdown\n");
Sys_MaskPrintf (SYS_DEV, "IN_LL_Shutdown\n");
if (UseMouse)
mouse_close ();

View file

@ -680,7 +680,8 @@ MapKey (unsigned int keycode, int press, int *k, int *u)
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",
keycode, press, scan, shifts,
key, uc > 32 && uc < 127 ? uc : '#');
*k = key;
*u = uc;

View file

@ -712,7 +712,7 @@ IN_LL_ProcessEvents (void)
void
IN_LL_Shutdown (void)
{
Sys_DPrintf ("IN_LL_Shutdown\n");
Sys_MaskPrintf (SYS_DEV, "IN_LL_Shutdown\n");
in_mouse_avail = 0;
if (x_disp) {
XAutoRepeatOn (x_disp);

View file

@ -155,7 +155,7 @@ JOY_Init (void)
int i;
if (JOY_Open () == -1) {
Sys_DPrintf ("JOY: Joystick not found.\n");
Sys_MaskPrintf (SYS_DEV, "JOY: Joystick not found.\n");
joy_found = false;
joy_active = false;
return;
@ -164,12 +164,12 @@ JOY_Init (void)
joy_found = true;
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_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
for (i = 0; i < JOY_MAX_BUTTONS; i++) {

View file

@ -99,8 +99,8 @@ JOY_Close (void)
i = close (joy_handle);
if (i) {
Sys_DPrintf ("JOY: Failed to close joystick device!\n");
Sys_MaskPrintf (SYS_DEV, "JOY: Failed to close joystick device!\n");
} else {
Sys_DPrintf ("JOY_Shutdown\n");
Sys_MaskPrintf (SYS_DEV, "JOY_Shutdown\n");
}
}

View file

@ -71,14 +71,14 @@ QFGL_ProcAddress (void *handle, const char *name, qboolean crit)
{
void *glfunc = NULL;
Sys_DPrintf ("DEBUG: Finding symbol %s ... ", name);
Sys_MaskPrintf (SYS_DEV, "DEBUG: Finding symbol %s ... ", name);
glfunc = QFGL_GetProcAddress (handle, name);
if (glfunc) {
Sys_DPrintf ("found [%p]\n", glfunc);
Sys_MaskPrintf (SYS_DEV, "found [%p]\n", glfunc);
return glfunc;
}
Sys_DPrintf ("not found\n");
Sys_MaskPrintf (SYS_DEV, "not found\n");
if (crit) {
if (strncmp ("fxMesa", name, 6) == 0) {

View file

@ -203,13 +203,13 @@ VID_UpdateGamma (cvar_t *vid_gamma)
vid.recalc_refdef = 1; // force a surface cache flush
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_SetGamma (gamma);
memcpy (vid.palette, vid.basepal, 256 * 3);
} else { // We have to hack the palette
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);
for (i = 0; i < 256 * 3; i++)
vid.palette[i] = gammatable[vid.basepal[i]];

View file

@ -176,20 +176,20 @@ GL_Init (void)
if (!(dither_select = QFGL_ExtensionAddress ("gl3DfxSetDitherModeEXT")))
return;
Sys_DPrintf ("Dithering: ");
Sys_MaskPrintf (SYS_DEV, "Dithering: ");
if ((p = COM_CheckParm ("-dither")) && p < com_argc) {
if (strequal (com_argv[p+1], "2x2")) {
dither_select (GR_DITHER_2x2);
Sys_DPrintf ("2x2.\n");
Sys_MaskPrintf (SYS_DEV, "2x2.\n");
}
if (strequal (com_argv[p+1], "4x4")) {
dither_select (GR_DITHER_4x4);
Sys_DPrintf ("4x4.\n");
Sys_MaskPrintf (SYS_DEV, "4x4.\n");
}
} else {
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;
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
}

View file

@ -197,7 +197,8 @@ gl_multitexture_f (cvar_t *var)
qfglDisable (GL_TEXTURE_2D);
} else {
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 {
@ -247,8 +248,10 @@ gl_anisotropy_f (cvar_t * var)
} else {
aniso = 1.0;
if (var)
Sys_DPrintf ("Anisotropy (GL_EXT_texture_filter_anisotropic) is "
"not supported by your hardware and/or drivers.\n");
Sys_MaskPrintf (SYS_DEV,
"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 {
tess = 0;
if (var)
Sys_DPrintf ("TruForm (GL_ATI_pn_triangles) is not supported by "
"your hardware and/or drivers.\n");
Sys_MaskPrintf (SYS_DEV,
"TruForm (GL_ATI_pn_triangles) is not supported "
"by your hardware and/or drivers.\n");
}
}
@ -334,14 +338,14 @@ CheckGLVersionString (void)
} else {
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);
Sys_DPrintf ("GL_VENDOR: %s\n", gl_vendor);
Sys_MaskPrintf (SYS_DEV, "GL_VENDOR: %s\n", gl_vendor);
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);
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"))
gl_feature_mach64 = true;
@ -376,15 +380,17 @@ CheckCombineExtensions (void)
{
if (gl_major >= 1 && gl_minor >= 3) {
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")) {
gl_combine_capable = true;
Sys_DPrintf ("COMBINE_ARB active, multitextured doublebright "
"enabled.\n");
Sys_MaskPrintf (SYS_DEV, "COMBINE_ARB active, multitextured "
"doublebright enabled.\n");
} else {
gl_combine_capable = false;
Sys_DPrintf ("GL_ARB_texture_env_combine not found. gl_doublebright "
"will have no effect with gl_multitexture on.\n");
Sys_MaskPrintf (SYS_DEV, "GL_ARB_texture_env_combine not found. "
"gl_doublebright will have no effect with "
"gl_multitexture on.\n");
}
}
@ -396,15 +402,15 @@ CheckCombineExtensions (void)
static void
CheckMultiTextureExtensions (void)
{
Sys_DPrintf ("Checking for multitexture: ");
Sys_MaskPrintf (SYS_DEV, "Checking for multitexture: ");
if (COM_CheckParm ("-nomtex")) {
Sys_DPrintf ("disabled.\n");
Sys_MaskPrintf (SYS_DEV, "disabled.\n");
return;
}
if (gl_major >= 1 && gl_minor >= 3) {
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS, &gl_mtex_tmus);
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 =
QFGL_ExtensionAddress ("glMultiTexCoord2f");
qglMultiTexCoord2fv =
@ -414,15 +420,16 @@ CheckMultiTextureExtensions (void)
if (qglMultiTexCoord2f && gl_mtex_enum)
gl_mtex_capable = true;
else
Sys_DPrintf ("Multitexture disabled, could not find required "
"functions\n");
Sys_MaskPrintf (SYS_DEV, "Multitexture disabled, could not "
"find required functions\n");
} 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")) {
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS_ARB, &gl_mtex_tmus);
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 =
QFGL_ExtensionAddress ("glMultiTexCoord2fARB");
qglMultiTexCoord2fv =
@ -432,13 +439,14 @@ CheckMultiTextureExtensions (void)
if (qglMultiTexCoord2f && gl_mtex_enum)
gl_mtex_capable = true;
else
Sys_DPrintf ("Multitexture disabled, could not find required "
"functions\n");
Sys_MaskPrintf (SYS_DEV, "Multitexture disabled, could not "
"find required functions\n");
} else {
Sys_DPrintf ("Multitexture disabled, not enough TMUs.\n");
Sys_MaskPrintf (SYS_DEV,
"Multitexture disabled, not enough TMUs.\n");
}
} 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};
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);
qfglLightModelfv (GL_LIGHT_MODEL_AMBIENT, dark);
@ -516,7 +524,7 @@ VID_SetPalette (unsigned char *palette)
QFile *f;
// 8 8 8 encoding
Sys_DPrintf ("Converting 8to24\n");
Sys_MaskPrintf (SYS_DEV, "Converting 8to24\n");
pal = palette;
table = d_8to24table;
@ -635,11 +643,11 @@ Tdfx_Init8bitPalette (void)
if (!(qgl3DfxSetPaletteEXT =
QFGL_ExtensionAddress ("gl3DfxSetPaletteEXT"))) {
Sys_DPrintf ("3DFX_set_global_palette not found.\n");
Sys_MaskPrintf (SYS_DEV, "3DFX_set_global_palette not found.\n");
return;
}
Sys_DPrintf ("3DFX_set_global_palette.\n");
Sys_MaskPrintf (SYS_DEV, "3DFX_set_global_palette.\n");
oldpal = (char *) d_8to24table; // d_8to24table3dfx;
for (i = 0; i < 256; i++) {
@ -653,7 +661,7 @@ Tdfx_Init8bitPalette (void)
qgl3DfxSetPaletteEXT ((GLuint *) table);
is8bit = true;
} 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 (!(qglColorTableEXT = QFGL_ExtensionAddress ("glColorTableEXT"))) {
Sys_DPrintf ("glColorTableEXT not found.\n");
Sys_MaskPrintf (SYS_DEV, "glColorTableEXT not found.\n");
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);
oldPalette = (GLubyte *) d_8to24table; // d_8to24table3dfx;
@ -697,21 +705,22 @@ Shared_Init8bitPalette (void)
GL_UNSIGNED_BYTE, (GLvoid *) thePalette);
is8bit = true;
} else {
Sys_DPrintf ("\n GL_EXT_shared_texture_palette not found.");
Sys_MaskPrintf (SYS_DEV,
"\n GL_EXT_shared_texture_palette not found.");
}
}
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) {
Tdfx_Init8bitPalette ();
Shared_Init8bitPalette ();
if (!is8bit)
Sys_DPrintf ("\n 8-bit extension not found.\n");
Sys_MaskPrintf (SYS_DEV, "\n 8-bit extension not found.\n");
} else {
Sys_DPrintf ("disabled.\n");
Sys_MaskPrintf (SYS_DEV, "disabled.\n");
}
}

View file

@ -215,7 +215,7 @@ static struct fb_var_screeninfo orig_var;
void
VID_Shutdown (void)
{
Sys_DPrintf ("VID_Shutdown\n");
Sys_MaskPrintf (SYS_DEV, "VID_Shutdown\n");
if (!fbdev_inited)
return;

View file

@ -154,7 +154,7 @@ QFGL_LoadLibrary (void)
void
VID_Shutdown (void)
{
Sys_DPrintf ("VID_Shutdown\n");
Sys_MaskPrintf (SYS_DEV, "VID_Shutdown\n");
X11_CloseDisplay ();
}
@ -242,7 +242,8 @@ VID_Init (unsigned char *palette)
VID_Init8bitPalette ();
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;

View file

@ -176,7 +176,8 @@ success:
VID_SetPalette (vid.palette);
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;

View file

@ -245,7 +245,7 @@ get_mode (int width, int height, int depth)
void
VID_Shutdown (void)
{
Sys_DPrintf ("VID_Shutdown\n");
Sys_MaskPrintf (SYS_DEV, "VID_Shutdown\n");
if (!svgalib_inited)
return;

View file

@ -346,7 +346,7 @@ ResetSharedFrameBuffers (void)
// attach to the shared memory segment
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_framebuffer[frm]->data = x_shminfo[frm].shmaddr;
@ -448,10 +448,12 @@ VID_Init (unsigned char *palette)
x_vis = x_visinfo->visual;
if (num_visuals > 1) {
Sys_DPrintf ("Found more than one visual id at depth %d:\n",
Sys_MaskPrintf (SYS_DEV,
"Found more than one visual id at depth %d:\n",
template.depth);
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 {
if (num_visuals == 0) {
if (template_mask == VisualIDMask) {
@ -463,15 +465,21 @@ VID_Init (unsigned char *palette)
}
if (verbose) {
Sys_DPrintf ("Using visualid %d:\n", (int) x_visinfo->visualid);
Sys_DPrintf (" class %d\n", x_visinfo->class);
Sys_DPrintf (" screen %d\n", x_visinfo->screen);
Sys_DPrintf (" depth %d\n", x_visinfo->depth);
Sys_DPrintf (" red_mask 0x%x\n", (int) x_visinfo->red_mask);
Sys_DPrintf (" green_mask 0x%x\n", (int) x_visinfo->green_mask);
Sys_DPrintf (" blue_mask 0x%x\n", (int) x_visinfo->blue_mask);
Sys_DPrintf (" colormap_size %d\n", x_visinfo->colormap_size);
Sys_DPrintf (" bits_per_rgb %d\n", x_visinfo->bits_per_rgb);
Sys_MaskPrintf (SYS_DEV, "Using visualid %d:\n",
(int) x_visinfo->visualid);
Sys_MaskPrintf (SYS_DEV, " class %d\n", x_visinfo->class);
Sys_MaskPrintf (SYS_DEV, " screen %d\n", x_visinfo->screen);
Sys_MaskPrintf (SYS_DEV, " depth %d\n", x_visinfo->depth);
Sys_MaskPrintf (SYS_DEV, " red_mask 0x%x\n",
(int) x_visinfo->red_mask);
Sys_MaskPrintf (SYS_DEV, " green_mask 0x%x\n",
(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 */
@ -575,7 +583,7 @@ VID_SetPalette (unsigned char *palette)
void
VID_Shutdown (void)
{
Sys_DPrintf ("VID_Shutdown\n");
Sys_MaskPrintf (SYS_DEV, "VID_Shutdown\n");
X11_CloseDisplay ();
}

View file

@ -219,7 +219,7 @@ CL_Disconnect (void)
if (cls.demorecording)
CL_Stop_f ();
Sys_DPrintf ("Sending clc_disconnect\n");
Sys_MaskPrintf (SYS_DEV, "Sending clc_disconnect\n");
SZ_Clear (&cls.message);
MSG_WriteByte (&cls.message, clc_disconnect);
NET_SendUnreliableMessage (cls.netcon, &cls.message);
@ -262,7 +262,8 @@ CL_EstablishConnection (const char *host)
cls.netcon = NET_Connect (host);
if (!cls.netcon)
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
CL_SetState (ca_connected);
@ -282,7 +283,7 @@ CL_SignonReply (void)
{
char str[8192];
Sys_DPrintf ("CL_SignonReply: %i\n", cls.signon);
Sys_MaskPrintf (SYS_DEV, "CL_SignonReply: %i\n", cls.signon);
switch (cls.signon) {
case 1:
@ -698,7 +699,7 @@ CL_SendCmd (void)
return; // no message at all
if (!NET_CanSendMessage (cls.netcon)) {
Sys_DPrintf ("CL_WriteToServer: can't send\n");
Sys_MaskPrintf (SYS_DEV, "CL_WriteToServer: can't send\n");
return;
}

View file

@ -265,7 +265,7 @@ CL_ParseServerInfo (void)
const char *str;
int nummodels, numsounds, i;
Sys_DPrintf ("Serverinfo packet received.\n");
Sys_MaskPrintf (SYS_DEV, "Serverinfo packet received.\n");
S_BlockSound ();
S_StopAllSounds ();

View file

@ -146,7 +146,7 @@ Host_EndGame (const char *message, ...)
va_start (argptr, message);
dvsprintf (str, message, 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)
Host_ShutdownServer (false);
@ -512,7 +512,7 @@ Host_ShutdownServer (qboolean crash)
void
Host_ClearMemory (void)
{
Sys_DPrintf ("Clearing memory\n");
Sys_MaskPrintf (SYS_DEV, "Clearing memory\n");
D_FlushCaches ();
Mod_ClearAll ();
if (host_hunklevel)

View file

@ -64,7 +64,7 @@ SV_CheckStuck (edict_t *ent)
VectorCopy (SVvector (ent, origin), org);
VectorCopy (SVvector (ent, oldorigin), SVvector (ent, origin));
if (!SV_TestEntityPosition (ent)) {
Sys_DPrintf ("Unstuck.\n");
Sys_MaskPrintf (SYS_DEV, "Unstuck.\n");
SV_LinkEdict (ent, true);
return;
}
@ -76,14 +76,14 @@ SV_CheckStuck (edict_t *ent)
SVvector (ent, origin)[1] = org[1] + j;
SVvector (ent, origin)[2] = org[2] + z;
if (!SV_TestEntityPosition (ent)) {
Sys_DPrintf ("Unstuck.\n");
Sys_MaskPrintf (SYS_DEV, "Unstuck.\n");
SV_LinkEdict (ent, true);
return;
}
}
VectorCopy (org, SVvector (ent, origin));
Sys_DPrintf ("player is stuck.\n");
Sys_MaskPrintf (SYS_DEV, "player is stuck.\n");
}
static qboolean
@ -206,7 +206,7 @@ SV_TryUnstick (edict_t *ent, vec3_t oldvel)
if (fabs (oldorg[1] - SVvector (ent, origin)[1]) > 4
|| fabs (oldorg[0] - SVvector (ent, origin)[0]) > 4) {
// Sys_DPrintf ("unstuck!\n");
// Sys_MaskPrintf (SYS_DEV, "unstuck!\n");
return clip;
}
// go back to the original pos and try again

View file

@ -247,7 +247,8 @@ SV_ConnectClient (int 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;
@ -908,7 +909,7 @@ SV_SpawnServer (const char *server)
if (hostname->string[0] == 0)
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
// 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)
SV_SendServerinfo (host_client);
Sys_DPrintf ("Server spawned.\n");
Sys_MaskPrintf (SYS_DEV, "Server spawned.\n");
S_UnblockSound ();
}

View file

@ -486,7 +486,7 @@ SV_LoadProgs (void)
sv_range = PR_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_funcs, 0, sizeof (sv_funcs));

View file

@ -540,7 +540,8 @@ SV_ReadClientMessage (void)
else if (ret == 1)
Cmd_ExecuteString (s, src_client);
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;
case clc_disconnect:

View file

@ -581,8 +581,9 @@ client_parse_message (client_t *cl)
MSG_GetReadCount (net_message) -
checksumIndex - 1, seq_hash);
if (calculatedChecksum != checksum) {
Sys_DPrintf
("Failed command checksum for %s(%d) (%d != %d)\n",
Sys_MaskPrintf (SYS_DEV,
"Failed command checksum for %s(%d) "
"(%d != %d)\n",
Info_ValueForKey (cl->userinfo, "name"),
cl->netchan.incoming_sequence, checksum,
calculatedChecksum);

View file

@ -262,7 +262,7 @@ FlushEntityPacket (void)
entity_state_t olde, newe;
int word;
Sys_DPrintf ("FlushEntityPacket\n");
Sys_MaskPrintf (SYS_DEV, "FlushEntityPacket\n");
memset (&olde, 0, sizeof (olde));
@ -303,7 +303,7 @@ CL_ParsePacketEntities (qboolean delta)
if (cls.demoplayback2)
from = oldpacket = (cls.netchan.incoming_sequence - 1);
if ((from & UPDATE_MASK) != (oldpacket & UPDATE_MASK))
Sys_DPrintf ("WARNING: from mismatch\n");
Sys_MaskPrintf (SYS_DEV, "WARNING: from mismatch\n");
} else
oldpacket = -1;
@ -1078,11 +1078,11 @@ CL_SetUpPlayerPrediction (qboolean dopred)
msec = 500 * (playertime - state->state_time);
if (msec <= 0 || !dopred) {
VectorCopy (state->pls.origin, pplayer->origin);
// Sys_DPrintf ("nopredict\n");
// Sys_MaskPrintf (SYS_DEV, "nopredict\n");
} else {
// predict players movement
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);
VectorCopy (exact.pls.origin, pplayer->origin);

View file

@ -416,7 +416,7 @@ CL_ClearState (void)
CL_Init_Entity (&cl.viewent);
Sys_DPrintf ("Clearing memory\n");
Sys_MaskPrintf (SYS_DEV, "Clearing memory\n");
D_FlushCaches ();
Mod_ClearAll ();
if (host_hunklevel) // FIXME: check this...
@ -603,10 +603,11 @@ CL_FullServerinfo_f (void)
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);
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 (server_version == NULL)
@ -1046,7 +1047,8 @@ CL_ReadPackets (void)
// packet from server
if (!cls.demoplayback &&
!NET_CompareAdr (net_from, cls.netchan.remote_address)) {
Sys_DPrintf ("%s:sequenced packet without connection\n",
Sys_MaskPrintf (SYS_DEV,
"%s:sequenced packet without connection\n",
NET_AdrToString (net_from));
continue;
}
@ -1143,7 +1145,7 @@ CL_SetState (cactive_t 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;
if (old_state != state) {
if (old_state == ca_active) {

View file

@ -414,7 +414,7 @@ CL_RequestNextDownload (void)
break;
case dl_none:
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);
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)
return;
@ -672,7 +672,7 @@ CL_StartUpload (byte * data, int size)
if (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);
memcpy (upload_data, data, size);
@ -723,7 +723,7 @@ CL_ParseServerData (void)
int protover;
qboolean cflag = false;
Sys_DPrintf ("Serverdata packet received.\n");
Sys_MaskPrintf (SYS_DEV, "Serverdata packet received.\n");
// wipe the client_state_t struct
CL_ClearState ();
@ -1116,7 +1116,7 @@ CL_SetInfo (void)
strncpy (value, MSG_ReadString (net_message), sizeof (value) - 1);
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)
player->userinfo = Info_ParseString ("", MAX_INFO_STRING, 0);
@ -1138,7 +1138,7 @@ CL_ServerInfo (void)
strncpy (value, MSG_ReadString (net_message), sizeof (value) - 1);
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);
if (strequal (key, "chase")) {
@ -1333,15 +1333,16 @@ CL_ParseServerMessage (void)
s = MSG_ReadString (net_message);
if (s[strlen (s) - 1] == '\n') {
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);
dstring_clearstr (stuffbuf);
} else {
Sys_DPrintf ("stufftext: %s\n", s);
Sys_MaskPrintf (SYS_DEV, "stufftext: %s\n", s);
}
Cbuf_AddText (cl_stbuf, s);
} else {
Sys_DPrintf ("partial stufftext: %s\n", s);
Sys_MaskPrintf (SYS_DEV, "partial stufftext: %s\n", s);
if (!stuffbuf)
stuffbuf = dstring_newstr ();
dstring_appendstr (stuffbuf, s);
@ -1471,21 +1472,21 @@ CL_ParseServerMessage (void)
break;
case svc_intermission:
Sys_DPrintf ("svc_intermission\n");
Sys_MaskPrintf (SYS_DEV, "svc_intermission\n");
cl.intermission = 1;
r_force_fullscreen = 1;
cl.completed_time = realtime;
vid.recalc_refdef = true; // go to full screen
Sys_DPrintf ("intermission simorg: ");
Sys_MaskPrintf (SYS_DEV, "intermission simorg: ");
MSG_ReadCoordV (net_message, cl.simorg);
for (i = 0; i < 3; i++)
Sys_DPrintf ("%f ", cl.simorg[i]);
Sys_DPrintf ("\nintermission simangles: ");
Sys_MaskPrintf (SYS_DEV, "%f ", cl.simorg[i]);
Sys_MaskPrintf (SYS_DEV, "\nintermission simangles: ");
MSG_ReadAngleV (net_message, cl.simangles);
for (i = 0; i < 3; i++)
Sys_DPrintf ("%f ", cl.simangles[i]);
Sys_DPrintf ("\n");
Sys_MaskPrintf (SYS_DEV, "%f ", cl.simangles[i]);
Sys_MaskPrintf (SYS_DEV, "\n");
VectorZero (cl.simvel);
// automatic fraglogging (by elmex)

View file

@ -184,8 +184,8 @@ CF_CloseAllFiles ()
for (i = 0; i < cf_filepcount; i++)
if (cf_filep[i].file) {
Sys_DPrintf ("Warning: closing Crude File %d left over from last "
"map\n", i);
Sys_MaskPrintf (SYS_DEV, "Warning: closing Crude File %d left "
"over from last map\n", i);
CF_Close (i);
}
}

View file

@ -720,7 +720,7 @@ NudgePosition (void)
}
}
VectorCopy (base, pmove.origin);
// Sys_DPrintf ("NudgePosition: stuck\n");
// Sys_MaskPrintf (SYS_DEV, "NudgePosition: stuck\n");
}
static void

View file

@ -309,7 +309,7 @@ SV_SpawnServer (const char *server)
int i;
struct recorder_s *recorders;
Sys_DPrintf ("SpawnServer: %s\n", server);
Sys_MaskPrintf (SYS_DEV, "SpawnServer: %s\n", server);
SV_SaveSpawnparms ();
@ -449,7 +449,7 @@ SV_SpawnServer (const char *server)
sv.signon_buffer_size[sv.num_signon_buffers - 1] = sv.signon.cursize;
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)
GIB_Event_Callback (sv_map_e, 1, server);
}

View file

@ -633,7 +633,7 @@ SVC_Log (void)
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));
// snprintf (data, sizeof (data), "stdlog %i\n", svs.logsequence - 1);
@ -1794,7 +1794,8 @@ SV_ReadPackets (void)
if (cl->netchan.qport != qport)
continue;
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;
}
if (Netchan_Process (&cl->netchan)) {

View file

@ -751,7 +751,7 @@ do_precache (progs_t *pr, const char **cache, int max, const char *name,
char *c = Hunk_Alloc (strlen (s) + 1);
strcpy (c, s);
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;
}
if (!strcmp (cache[i], s))

View file

@ -498,7 +498,7 @@ SV_LoadProgs (void)
sv_range = PR_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_funcs, 0, sizeof (sv_funcs));

View file

@ -436,7 +436,8 @@ SV_qtvPacket (int qport)
if (proxies[i].netchan.qport != qport)
continue;
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;
}
if (Netchan_Process (&proxies[i].netchan)) {

View file

@ -325,7 +325,7 @@ SV_PreSpawn_f (void *unused)
// should be three numbers following containing checksums
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 &&
check != sv.worldmodel->checksum2) {
@ -678,7 +678,7 @@ SV_NextUpload (void)
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) {
MSG_ReliableWrite_Begin (&host_client->backbuf, svc_stufftext, 8);
@ -1925,10 +1925,11 @@ SV_ExecuteClientMessage (client_t *cl)
checksumIndex - 1, seq_hash);
if (calculatedChecksum != checksum) {
Sys_DPrintf
("Failed command checksum for %s(%d) (%d != %d)\n",
cl->name, cl->netchan.incoming_sequence, checksum,
calculatedChecksum);
Sys_MaskPrintf (SYS_DEV,
"Failed command checksum for %s(%d) "
"(%d != %d)\n",
cl->name, cl->netchan.incoming_sequence,
checksum, calculatedChecksum);
return;
}