[util] Make developer flag names easier to manage

They're now an enum, and the flag part of the name is all lowercase, but
now the flag definitions and names list will never get out of sync.
This commit is contained in:
Bill Currie 2021-03-29 19:58:00 +09:00
parent 1068685677
commit 5f93c115ff
117 changed files with 526 additions and 494 deletions

View file

@ -83,23 +83,19 @@ double Sys_DoubleTime (void);
void Sys_TimeOfDay(date_t *date);
void Sys_MaskPrintf (int mask, const char *fmt, ...) __attribute__((format(PRINTF,2,3)));
// remember to update developer_flags in cvar.c
#define SYS_DEV (1|0)
#define SYS_WARN (1|2) // bit 0 so developer 1 will pick it up
#define SYS_VID (1|4)
#define SYS_FS_NF (1|8)
#define SYS_FS_F (1|16)
#define SYS_FS (1|32)
#define SYS_NET (1|64)
#define SYS_RUA_OBJ (1|128)
#define SYS_RUA_MSG (1|256)
#define SYS_SND (1|512)
#define SYS_GLT (1|1024)
#define SYS_GLSL (1|2048)
#define SYS_SKIN (1|4096)
#define SYS_MODEL (1|8192)
#define SYS_VULKAN (1|16384)
#define SYS_VULKAN_PARSE (1|32768)
#define SYS_DEVELOPER(developer) SYS_DeveloperID_##developer,
enum {
#include "QF/sys_developer.h"
};
// bit 0 so developer 1 will pick it up
#define SYS_DEVELOPER(developer) \
SYS_##developer = (SYS_dev | (1 << (SYS_DeveloperID_##developer + 1))),
enum {
SYS_dev = 1,
#include "QF/sys_developer.h"
};
int Sys_CheckInput (int idle, int net_socket);
const char *Sys_ConsoleInput (void);

View file

@ -0,0 +1,49 @@
/*
sys_developer.h
Developer flags
Copyright (C) 2021 Bill Currie <bill@taniwha.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
*/
#ifndef SYS_DEVELOPER
#define SYS_DEVELOPER(developer)
#endif
SYS_DEVELOPER (warn)
SYS_DEVELOPER (vid)
SYS_DEVELOPER (input)
SYS_DEVELOPER (fs_nf)
SYS_DEVELOPER (fs_f)
SYS_DEVELOPER (fs)
SYS_DEVELOPER (net)
SYS_DEVELOPER (rua_obj)
SYS_DEVELOPER (rua_msg)
SYS_DEVELOPER (snd)
SYS_DEVELOPER (glt)
SYS_DEVELOPER (glsl)
SYS_DEVELOPER (skin)
SYS_DEVELOPER (model)
SYS_DEVELOPER (vulkan)
SYS_DEVELOPER (vulkan_parse)
#undef SYS_DEVELOPER

View file

@ -88,7 +88,7 @@ I_CDAudio_CloseDoor (void)
return; // no cd init'd
if (ioctl (cdfile, CDROMCLOSETRAY) == -1)
Sys_MaskPrintf (SYS_SND, "CDAudio: ioctl cdromclosetray failed\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: ioctl cdromclosetray failed\n");
}
static void
@ -98,7 +98,7 @@ I_CDAudio_Eject (void)
return; // no cd init'd
if (ioctl (cdfile, CDROMEJECT) == -1)
Sys_MaskPrintf (SYS_SND, "CDAudio: ioctl cdromeject failed\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: ioctl cdromeject failed\n");
}
static int
@ -109,12 +109,12 @@ I_CDAudio_GetAudioDiskInfo (void)
cdValid = false;
if (ioctl (cdfile, CDROMREADTOCHDR, &tochdr) == -1) {
Sys_MaskPrintf (SYS_SND, "CDAudio: ioctl cdromreadtochdr failed\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: ioctl cdromreadtochdr failed\n");
return -1;
}
if (tochdr.cdth_trk0 < 1) {
Sys_MaskPrintf (SYS_SND, "CDAudio: no music tracks\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: no music tracks\n");
return -1;
}
@ -134,7 +134,7 @@ I_CDAudio_Pause (void)
return;
if (ioctl (cdfile, CDROMPAUSE) == -1)
Sys_MaskPrintf (SYS_SND, "CDAudio: ioctl cdrompause failed\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: ioctl cdrompause failed\n");
wasPlaying = playing;
playing = false;
@ -150,7 +150,7 @@ I_CDAudio_Stop (void)
return;
if (ioctl (cdfile, CDROMSTOP) == -1)
Sys_MaskPrintf (SYS_SND, "CDAudio: ioctl cdromstop failed (%d)\n",
Sys_MaskPrintf (SYS_snd, "CDAudio: ioctl cdromstop failed (%d)\n",
errno);
wasPlaying = false;
@ -188,7 +188,7 @@ I_CDAudio_Play (int track, qboolean looping)
entry0.cdte_track = track;
entry0.cdte_format = CDROM_MSF;
if (ioctl (cdfile, CDROMREADTOCENTRY, &entry0) == -1) {
Sys_MaskPrintf (SYS_SND, "CDAudio: ioctl cdromreadtocentry failed\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: ioctl cdromreadtocentry failed\n");
return;
}
entry1.cdte_track = track + 1;
@ -197,7 +197,7 @@ I_CDAudio_Play (int track, qboolean looping)
entry1.cdte_track = CDROM_LEADOUT;
}
if (ioctl (cdfile, CDROMREADTOCENTRY, &entry1) == -1) {
Sys_MaskPrintf (SYS_SND, "CDAudio: ioctl cdromreadtocentry failed\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: ioctl cdromreadtocentry failed\n");
return;
}
if (entry0.cdte_ctrl == CDROM_DATA_TRACK) {
@ -219,14 +219,14 @@ I_CDAudio_Play (int track, qboolean looping)
msf.cdmsf_sec1 = entry1.cdte_addr.msf.second;
msf.cdmsf_frame1 = entry1.cdte_addr.msf.frame;
Sys_MaskPrintf (SYS_SND, "%2d:%02d:%02d %2d:%02d:%02d\n",
Sys_MaskPrintf (SYS_snd, "%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_MaskPrintf (SYS_SND,
Sys_MaskPrintf (SYS_snd,
"CDAudio: ioctl cdromplaytrkind failed (%s)\n",
strerror (errno));
return;
@ -253,7 +253,7 @@ I_CDAudio_Resume (void)
return;
if (ioctl (cdfile, CDROMRESUME) == -1)
Sys_MaskPrintf (SYS_SND, "CDAudio: ioctl cdromresume failed\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: ioctl cdromresume failed\n");
playing = true;
}
@ -398,7 +398,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_MaskPrintf (SYS_SND, "CDAudio: ioctl cdromsubchnl failed\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: ioctl cdromsubchnl failed\n");
playing = false;
return;
}
@ -423,7 +423,7 @@ Mus_CDChange (cvar_t *mus_cdaudio)
cdfile = open (mus_cdaudio->string, O_RDONLY | O_NONBLOCK);
if (cdfile == -1) {
Sys_MaskPrintf (SYS_SND,
Sys_MaskPrintf (SYS_snd,
"Mus_CDInit: open device \"%s\" failed (error %i)\n",
mus_cdaudio->string, errno);
return;

View file

@ -74,7 +74,7 @@ I_CDAudio_Eject (void)
return;
if (SDL_CDEject (cd_id))
Sys_MaskPrintf (SYS_SND, "Unable to eject CD-ROM tray.\n");
Sys_MaskPrintf (SYS_snd, "Unable to eject CD-ROM tray.\n");
}
static void
@ -86,7 +86,7 @@ I_CDAudio_Pause (void)
return;
if (SDL_CDPause (cd_id))
Sys_MaskPrintf (SYS_SND, "CDAudio_Pause: Failed to pause track.\n");
Sys_MaskPrintf (SYS_snd, "CDAudio_Pause: Failed to pause track.\n");
}
static void
@ -101,7 +101,7 @@ I_CDAudio_Stop (void)
return;
if (SDL_CDStop (cd_id))
Sys_MaskPrintf (SYS_SND, "CDAudio_Stop: Failed to stop track.\n");
Sys_MaskPrintf (SYS_snd, "CDAudio_Stop: Failed to stop track.\n");
}
static void
@ -134,7 +134,7 @@ I_CDAudio_Play (int track, qboolean looping)
if (SDL_CDPlay (cd_id, cd_id->track[track].offset,
cd_id->track[track].length)) {
Sys_MaskPrintf (SYS_SND, "CDAudio_Play: Unable to play track: %d\n",
Sys_MaskPrintf (SYS_snd, "CDAudio_Play: Unable to play track: %d\n",
track + 1);
return;
}
@ -150,7 +150,7 @@ I_CDAudio_Resume (void)
return;
if (SDL_CDResume (cd_id))
Sys_MaskPrintf (SYS_SND, "CDAudio_Resume: Failed to resume track.\n");
Sys_MaskPrintf (SYS_snd, "CDAudio_Resume: Failed to resume track.\n");
}
static void

View file

@ -72,7 +72,7 @@ I_SGI_Eject (void)
return; // no cd init'd
if (CDeject (cdp) == 0)
Sys_MaskPrintf (SYS_SND, "I_SGI_Eject: CDeject failed\n");
Sys_MaskPrintf (SYS_snd, "I_SGI_Eject: CDeject failed\n");
}
static int
@ -84,7 +84,7 @@ I_SGI_GetState (void)
return -1; // no cd init'd
if (CDgetstatus (cdp, &cds) == 0) {
Sys_MaskPrintf (SYS_SND, "CDAudio_GetStatus: CDgetstatus failed\n");
Sys_MaskPrintf (SYS_snd, "CDAudio_GetStatus: CDgetstatus failed\n");
return -1;
}
@ -100,7 +100,7 @@ I_SGI_MaxTrack (void)
return -1; // no cd init'd
if (CDgetstatus (cdp, &cds) == 0) {
Sys_MaskPrintf (SYS_SND, "I_SGI_MaxTrack: CDgetstatus failed\n");
Sys_MaskPrintf (SYS_snd, "I_SGI_MaxTrack: CDgetstatus failed\n");
return -1;
}
@ -114,7 +114,7 @@ I_SGI_Pause (void)
return;
if (CDtogglepause (cdp) == 0)
Sys_MaskPrintf (SYS_SND, "CDAudio_PAUSE: CDtogglepause failed (%d)\n", errno);
Sys_MaskPrintf (SYS_snd, "CDAudio_PAUSE: CDtogglepause failed (%d)\n", errno);
}
void
@ -132,7 +132,7 @@ I_SGI_Play (int track, qboolean looping)
}
if (maxtrack < 0) {
Sys_MaskPrintf (SYS_SND,
Sys_MaskPrintf (SYS_snd,
"CDAudio_Play: Error getting maximum track number\n");
return;
}
@ -172,7 +172,7 @@ I_SGI_Play (int track, qboolean looping)
}
if (CDplaytrack (cdp, track, cdvolume == 0.0 ? 0 : 1) == 0) {
Sys_MaskPrintf (SYS_SND, "CDAudio_Play: CDplay failed (%d)\n", errno);
Sys_MaskPrintf (SYS_snd, "CDAudio_Play: CDplay failed (%d)\n", errno);
return;
}
@ -187,7 +187,7 @@ I_SGI_Resume (void)
return;
if (CDtogglepause (cdp) == 0)
Sys_MaskPrintf (SYS_SND, "CDAudio_Resume: CDtogglepause failed (%d)\n",
Sys_MaskPrintf (SYS_snd, "CDAudio_Resume: CDtogglepause failed (%d)\n",
errno);
}
@ -210,7 +210,7 @@ I_SGI_Stop (void)
return;
if (CDstop (cdp) == 0)
Sys_MaskPrintf (SYS_SND, "I_SGI_Stop: CDStop failed (%d)\n", errno);
Sys_MaskPrintf (SYS_snd, "I_SGI_Stop: CDStop failed (%d)\n", errno);
}
void

View file

@ -75,7 +75,7 @@ I_CDAudio_CloseDoor (void)
dwReturn =
mciSendCommand (wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD_PTR) NULL);
if (dwReturn) {
Sys_MaskPrintf (SYS_SND, "MCI_SET_DOOR_CLOSED failed (%li)\n",
Sys_MaskPrintf (SYS_snd, "MCI_SET_DOOR_CLOSED failed (%li)\n",
dwReturn);
}
}
@ -88,7 +88,7 @@ I_CDAudio_Eject (void)
dwReturn = mciSendCommand (wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN,
(DWORD_PTR) NULL);
if (dwReturn) {
Sys_MaskPrintf (SYS_SND, "MCI_SET_DOOR_OPEN failed (%li)\n", dwReturn);
Sys_MaskPrintf (SYS_snd, "MCI_SET_DOOR_OPEN failed (%li)\n", dwReturn);
}
}
@ -105,12 +105,12 @@ I_CDAudio_GetAudioDiskInfo (void)
mciSendCommand (wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT,
(DWORD_PTR) (LPVOID) & mciStatusParms);
if (dwReturn) {
Sys_MaskPrintf (SYS_SND,
Sys_MaskPrintf (SYS_snd,
"CDAudio: drive ready test - get status failed\n");
return -1;
}
if (!mciStatusParms.dwReturn) {
Sys_MaskPrintf (SYS_SND, "CDAudio: drive not ready\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: drive not ready\n");
return -1;
}
@ -119,11 +119,11 @@ I_CDAudio_GetAudioDiskInfo (void)
mciSendCommand (wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT,
(DWORD_PTR) (LPVOID) & mciStatusParms);
if (dwReturn) {
Sys_MaskPrintf (SYS_SND, "CDAudio: get tracks - status failed\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: get tracks - status failed\n");
return -1;
}
if (mciStatusParms.dwReturn < 1) {
Sys_MaskPrintf (SYS_SND, "CDAudio: no music tracks\n");
Sys_MaskPrintf (SYS_snd, "CDAudio: no music tracks\n");
return -1;
}
@ -154,13 +154,13 @@ static I_CDAudio_MessageHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
break;
case MCI_NOTIFY_FAILURE:
Sys_MaskPrintf (SYS_SND, "MCI_NOTIFY_FAILURE\n");
Sys_MaskPrintf (SYS_snd, "MCI_NOTIFY_FAILURE\n");
I_CDAudio_Stop ();
cdValid = false;
break;
default:
Sys_MaskPrintf (SYS_SND, "Unexpected MM_MCINOTIFY type (%i)\n",
Sys_MaskPrintf (SYS_snd, "Unexpected MM_MCINOTIFY type (%i)\n",
wParam);
return 1;
}
@ -185,7 +185,7 @@ I_CDAudio_Pause (void)
mciSendCommand (wDeviceID, MCI_PAUSE, 0,
(DWORD_PTR) (LPVOID) & mciGenericParms);
if (dwReturn) {
Sys_MaskPrintf (SYS_SND, "MCI_PAUSE failed (%li)", dwReturn);
Sys_MaskPrintf (SYS_snd, "MCI_PAUSE failed (%li)", dwReturn);
}
wasPlaying = playing;
@ -226,7 +226,7 @@ I_CDAudio_Play (int track, qboolean looping)
MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT,
(DWORD_PTR) (LPVOID) & mciStatusParms);
if (dwReturn) {
Sys_MaskPrintf (SYS_SND, "MCI_STATUS failed (%li)\n", dwReturn);
Sys_MaskPrintf (SYS_snd, "MCI_STATUS failed (%li)\n", dwReturn);
return;
}
if (mciStatusParms.dwReturn != MCI_CDA_TRACK_AUDIO) {
@ -241,7 +241,7 @@ I_CDAudio_Play (int track, qboolean looping)
MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT,
(DWORD_PTR) (LPVOID) & mciStatusParms);
if (dwReturn) {
Sys_MaskPrintf (SYS_SND, "MCI_STATUS failed (%li)\n", dwReturn);
Sys_MaskPrintf (SYS_snd, "MCI_STATUS failed (%li)\n", dwReturn);
return;
}
@ -258,7 +258,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_MaskPrintf (SYS_SND, "CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
Sys_MaskPrintf (SYS_snd, "CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
return;
}
@ -290,7 +290,7 @@ I_CDAudio_Resume (void)
mciSendCommand (wDeviceID, MCI_PLAY, MCI_TO | MCI_NOTIFY,
(DWORD_PTR) (LPVOID) & mciPlayParms);
if (dwReturn) {
Sys_MaskPrintf (SYS_SND, "CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
Sys_MaskPrintf (SYS_snd, "CDAudio: MCI_PLAY failed (%li)\n", dwReturn);
return;
}
playing = true;
@ -303,7 +303,7 @@ I_CDAudio_Shutdown (void)
return;
I_CDAudio_Stop ();
if (mciSendCommand (wDeviceID, MCI_CLOSE, MCI_WAIT, (DWORD_PTR) NULL))
Sys_MaskPrintf (SYS_SND, "CDAudio_Shutdown: MCI_CLOSE failed\n");
Sys_MaskPrintf (SYS_snd, "CDAudio_Shutdown: MCI_CLOSE failed\n");
}
static void
@ -318,7 +318,7 @@ I_CDAudio_Stop (void)
dwReturn = mciSendCommand (wDeviceID, MCI_STOP, 0, (DWORD_PTR) NULL);
if (dwReturn) {
Sys_MaskPrintf (SYS_SND, "MCI_STOP failed (%li)", dwReturn);
Sys_MaskPrintf (SYS_snd, "MCI_STOP failed (%li)", dwReturn);
}
wasPlaying = false;

View file

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

View file

@ -411,7 +411,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_MaskPrintf (SYS_DEV, "%.*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);
@ -432,12 +432,12 @@ flac_get_info (flacfile_t *ff)
info.dataofs = 0;
info.datalen = samples * info.channels * sizeof (float);
Sys_MaskPrintf (SYS_DEV, "\nBitstream is %d channel, %dHz\n",
Sys_MaskPrintf (SYS_dev, "\nBitstream is %d channel, %dHz\n",
info.channels, info.rate);
Sys_MaskPrintf (SYS_DEV, "\nDecoded length: %d samples (%d bytes)\n",
Sys_MaskPrintf (SYS_dev, "\nDecoded length: %d samples (%d bytes)\n",
info.frames, info.width);
if (vc) {
Sys_MaskPrintf (SYS_DEV, "Encoded by: %.*s\n\n",
Sys_MaskPrintf (SYS_dev, "Encoded by: %.*s\n\n",
vc->vendor_string.length, vc->vendor_string.entry);
}
@ -460,10 +460,10 @@ SND_LoadFLAC (QFile *file, sfx_t *sfx, char *realname)
return -1;
}
if (info.frames / info.rate < 3) {
Sys_MaskPrintf (SYS_DEV, "cache %s\n", realname);
Sys_MaskPrintf (SYS_dev, "cache %s\n", realname);
flac_cache (sfx, realname, ff, info);
} else {
Sys_MaskPrintf (SYS_DEV, "stream %s\n", realname);
Sys_MaskPrintf (SYS_dev, "stream %s\n", realname);
flac_stream (sfx, realname, ff, info);
}
return 0;

View file

@ -197,7 +197,7 @@ SND_LoadMidi (QFile *file, sfx_t *sfx, char *realname)
WildMidi_Close (handle);
Sys_MaskPrintf (SYS_DEV, "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

@ -104,7 +104,7 @@ SND_AllocChannel (void)
for (free = &free_channels; *free; free = &(*free)->next) {
num_free++;
}
Sys_MaskPrintf (SYS_WARN, "SND_AllocChannel: out of channels. %d\n",
Sys_MaskPrintf (SYS_warn, "SND_AllocChannel: out of channels. %d\n",
num_free);
return 0;
}
@ -147,7 +147,7 @@ SND_ScanChannels (int wait)
return;
if (wait) {
Sys_MaskPrintf (SYS_DEV, "scanning channels...\n");
Sys_MaskPrintf (SYS_dev, "scanning channels...\n");
do {
count = 0;
for (i = 0; i < MAX_CHANNELS; i++) {
@ -157,12 +157,12 @@ SND_ScanChannels (int wait)
ch->stop = 1;
count++;
}
Sys_MaskPrintf (SYS_DEV, "count = %d\n", count);
Sys_MaskPrintf (SYS_dev, "count = %d\n", count);
#ifdef HAVE_USLEEP
usleep (1000);
#endif
} while (count);
Sys_MaskPrintf (SYS_DEV, "scanning done.\n");
Sys_MaskPrintf (SYS_dev, "scanning done.\n");
} else {
for (i = 0; i < MAX_CHANNELS; i++) {
ch = &snd_channels[i];

View file

@ -150,7 +150,7 @@ s_jack_activate (void)
snd_shutdown = 0;
ports = jack_get_ports (jack_handle, 0, 0,
JackPortIsPhysical | JackPortIsInput);
if (developer->int_val & SYS_SND) {
if (developer->int_val & SYS_snd) {
for (i = 0; ports[i]; i++)
Sys_Printf ("%s\n", ports[i]);
}
@ -306,7 +306,7 @@ snd_jack_error (const char *desc)
static int
snd_jack_xrun (void *arg)
{
if (developer->int_val & SYS_SND) {
if (developer->int_val & SYS_snd) {
fprintf (stderr, "snd_jack: xrun\n");
}
return 0;

View file

@ -317,7 +317,7 @@ SND_Load (sfx_t *sfx)
Qseek (file, 0, SEEK_SET);
#ifdef HAVE_VORBIS
if (strnequal ("OggS", buf, 4)) {
Sys_MaskPrintf (SYS_DEV, "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;
@ -325,7 +325,7 @@ SND_Load (sfx_t *sfx)
#endif
#ifdef HAVE_FLAC
if (strnequal ("fLaC", buf, 4)) {
Sys_MaskPrintf (SYS_DEV, "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;
@ -333,14 +333,14 @@ SND_Load (sfx_t *sfx)
#endif
#ifdef HAVE_WILDMIDI
if (strnequal ("MThd", buf, 4)) {
Sys_MaskPrintf (SYS_DEV, "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_MaskPrintf (SYS_DEV, "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

@ -101,7 +101,7 @@ vorbis_get_info (OggVorbis_File *vf)
samples = ov_pcm_total (vf, -1);
for (ptr = ov_comment (vf, -1)->user_comments; *ptr; ptr++) {
Sys_MaskPrintf (SYS_DEV, "%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);
}
@ -118,11 +118,11 @@ vorbis_get_info (OggVorbis_File *vf)
info.dataofs = 0;
info.datalen = samples * info.channels * info.width;
Sys_MaskPrintf (SYS_DEV, "\nBitstream is %d channel, %dHz\n",
Sys_MaskPrintf (SYS_dev, "\nBitstream is %d channel, %dHz\n",
info.channels, info.rate);
Sys_MaskPrintf (SYS_DEV, "\nDecoded length: %d samples (%d bytes)\n",
Sys_MaskPrintf (SYS_dev, "\nDecoded length: %d samples (%d bytes)\n",
info.frames, info.width);
Sys_MaskPrintf (SYS_DEV, "Encoded by: %s\n\n",
Sys_MaskPrintf (SYS_dev, "Encoded by: %s\n\n",
ov_comment (vf, -1)->vendor);
return info;
@ -302,10 +302,10 @@ SND_LoadOgg (QFile *file, sfx_t *sfx, char *realname)
return -1;
}
if (info.frames / info.rate < 3) {
Sys_MaskPrintf (SYS_DEV, "cache %s\n", realname);
Sys_MaskPrintf (SYS_dev, "cache %s\n", realname);
vorbis_cache (sfx, realname, &vf, info);
} else {
Sys_MaskPrintf (SYS_DEV, "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_MaskPrintf (SYS_DEV, "cache %s\n", realname);
Sys_MaskPrintf (SYS_dev, "cache %s\n", realname);
wav_cache (sfx, realname, file, info);
} else {
Sys_MaskPrintf (SYS_DEV, "stream %s\n", realname);
Sys_MaskPrintf (SYS_dev, "stream %s\n", realname);
wav_stream (sfx, realname, file, info);
}
return 0;

View file

@ -241,12 +241,12 @@ retry_open:
err = qfsnd_pcm_hw_params_set_access (pcm, hw,
SND_PCM_ACCESS_MMAP_INTERLEAVED);
if (0 > err) {
Sys_MaskPrintf (SYS_SND, "ALSA: Failure to set interleaved PCM "
Sys_MaskPrintf (SYS_snd, "ALSA: Failure to set interleaved PCM "
"access. %s\n", qfsnd_strerror (err));
err = qfsnd_pcm_hw_params_set_access (pcm, hw,
SND_PCM_ACCESS_MMAP_NONINTERLEAVED);
if (0 > err) {
Sys_MaskPrintf (SYS_SND, "ALSA: Failure to set noninterleaved PCM "
Sys_MaskPrintf (SYS_snd, "ALSA: Failure to set noninterleaved PCM "
"access. %s\n", qfsnd_strerror (err));
// "default" did not work, so retry with "plughw". However do not
// second guess the user, even if the user specified "default".
@ -335,7 +335,7 @@ retry_open:
for (i = 0; rates[i]; i++) {
rate = rates[i];
Sys_MaskPrintf (SYS_SND, "ALSA: trying %dHz\n", rate);
Sys_MaskPrintf (SYS_snd, "ALSA: trying %dHz\n", rate);
err = qfsnd_pcm_hw_params_set_rate_near (pcm, hw,
&rate, 0);
if (0 <= err) {

View file

@ -257,7 +257,7 @@ try_open (int rw)
len = (len + sz - 1) & ~(sz - 1);
sn.buffer = (byte *) mmap (NULL, len, mmmode, mmflags, audio_fd, 0);
if (sn.buffer == MAP_FAILED) {
Sys_MaskPrintf (SYS_SND, "Could not mmap %s: %s\n", snd_dev,
Sys_MaskPrintf (SYS_snd, "Could not mmap %s: %s\n", snd_dev,
strerror (errno));
close (audio_fd);
return 0;

View file

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

View file

@ -370,7 +370,7 @@ process_input (void)
interrupted = 0;
#ifdef SIGWINCH
get_size (&screen_x, &screen_y);
Sys_MaskPrintf (SYS_DEV, "resizing to %d x %d\n", screen_x, screen_y);
Sys_MaskPrintf (SYS_dev, "resizing to %d x %d\n", screen_x, screen_y);
resizeterm (screen_y, screen_x);
con_linewidth = screen_x;
view_resize (sv_con_data.view, screen_x, screen_y);

View file

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

View file

@ -170,7 +170,7 @@ PR_LoadProgsFile (progs_t *pr, QFile *file, int size)
// size of progs themselves
pr->progs_size = size + offset_tweak;
Sys_MaskPrintf (SYS_DEV, "Programs occupy %iK.\n", size / 1024);
Sys_MaskPrintf (SYS_dev, "Programs occupy %iK.\n", size / 1024);
pr->progs_size = align_size (pr->progs_size);
pr->zone_size = align_size (pr->zone_size);

View file

@ -77,7 +77,7 @@ GIB_Exec_Override_f (void)
}
if (!Cvar_Command ()
&& (cmd_warncmd->int_val
|| (developer && developer->int_val & SYS_DEV)))
|| (developer && developer->int_val & SYS_dev)))
Sys_Printf ("execing %s\n", Cmd_Argv (1));
if ((strlen (Cmd_Argv (1)) >= 4
&& !strcmp (Cmd_Argv (1) + strlen (Cmd_Argv (1)) - 4, ".gib"))

View file

@ -72,13 +72,13 @@ void
GIB_Tree_Ref (gib_tree_t ** tp)
{
(*tp)->refs++;
// Sys_MaskPrintf (SYS_DEV, "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_MaskPrintf (SYS_DEV, "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

@ -232,7 +232,7 @@ skip_colormap (TargaHeader *targa, byte *data)
int bpe;
if (!targa->colormap_type)
return data;
Sys_MaskPrintf (SYS_DEV, "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

@ -82,7 +82,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_MaskPrintf (SYS_GLT, "not filling skin from %d to %d\n",
Sys_MaskPrintf (SYS_glt, "not filling skin from %d to %d\n",
fillcolor, filledcolor);
return;
}

View file

@ -321,7 +321,7 @@ BuildTris (mod_alias_ctx_t *alias_ctx)
add_command (0); // end of list marker
Sys_MaskPrintf (SYS_DEV, "%3i tri %3i vert %3i cmd\n",
Sys_MaskPrintf (SYS_dev, "%3i tri %3i vert %3i cmd\n",
header->mdl.numtris, numorder, numcommands);
allverts += numorder;
@ -432,7 +432,7 @@ gl_Mod_MakeAliasModelDisplayLists (mod_alias_ctx_t *alias_ctx, void *_m,
}
if (remesh) {
// build it from scratch
Sys_MaskPrintf (SYS_DEV, "meshing %s...\n", alias_ctx->mod->path);
Sys_MaskPrintf (SYS_dev, "meshing %s...\n", alias_ctx->mod->path);
BuildTris (alias_ctx); // trifans or lists

View file

@ -85,7 +85,7 @@ gl_Mod_LoadSkin (mod_alias_ctx_t *alias_ctx, byte *skin, int skinsize,
}
fb_texnum = Mod_Fullbright (pskin, header->mdl.skinwidth,
header->mdl.skinheight, name->str);
Sys_MaskPrintf (SYS_GLT, "%s %d\n", name->str, fb_texnum);
Sys_MaskPrintf (SYS_glt, "%s %d\n", name->str, fb_texnum);
}
if (group) {
dsprintf (name, "%s_%i_%i", modname, snum, gnum);
@ -94,7 +94,7 @@ gl_Mod_LoadSkin (mod_alias_ctx_t *alias_ctx, byte *skin, int skinsize,
}
texnum = GL_LoadTexture (name->str, header->mdl.skinwidth,
header->mdl.skinheight, pskin, true, false, 1);
Sys_MaskPrintf (SYS_GLT, "%s %d\n", name->str, texnum);
Sys_MaskPrintf (SYS_glt, "%s %d\n", name->str, texnum);
skindesc->texnum = texnum;
skindesc->fb_texnum = fb_texnum;
alias_ctx->mod->hasfullbrights = fb_texnum;

View file

@ -165,14 +165,14 @@ gl_Mod_LoadLighting (model_t *mod, bsp_t *bsp)
&& data[3] == 'T') {
ver = LittleLong (((int32_t *) data)[1]);
if (ver == 1) {
Sys_MaskPrintf (SYS_DEV, "%s loaded", litfilename->str);
Sys_MaskPrintf (SYS_dev, "%s loaded", litfilename->str);
brush->lightdata = data + 8;
return;
} else
Sys_MaskPrintf (SYS_DEV,
Sys_MaskPrintf (SYS_dev,
"Unknown .lit file version (%d)\n", ver);
} else
Sys_MaskPrintf (SYS_DEV, "Corrupt .lit file (old version?)\n");
Sys_MaskPrintf (SYS_dev, "Corrupt .lit file (old version?)\n");
}
}
// LordHavoc: oh well, expand the white lighting data

View file

@ -439,7 +439,7 @@ Mod_LoadSubmodels (model_t *mod, bsp_t *bsp)
}
if (out->visleafs > 8192)
Sys_MaskPrintf (SYS_WARN,
Sys_MaskPrintf (SYS_warn,
"%i visleafs exceeds standard limit of 8192.\n",
out->visleafs);
}
@ -579,7 +579,7 @@ Mod_LoadFaces (model_t *mod, bsp_t *bsp)
out = Hunk_AllocName (count * sizeof (*out), mod->name);
if (count > 32767) {
Sys_MaskPrintf (SYS_WARN,
Sys_MaskPrintf (SYS_warn,
"%i faces exceeds standard limit of 32767.\n", count);
}
@ -666,7 +666,7 @@ Mod_LoadNodes (model_t *mod, bsp_t *bsp)
out = Hunk_AllocName (count * sizeof (*out), mod->name);
if (count > 32767) {
Sys_MaskPrintf (SYS_WARN,
Sys_MaskPrintf (SYS_warn,
"%i nodes exceeds standard limit of 32767.\n", count);
}
@ -778,7 +778,7 @@ Mod_LoadClipnodes (model_t *mod, bsp_t *bsp)
out = Hunk_AllocName (count * sizeof (*out), mod->name);
if (count > 32767) {
Sys_MaskPrintf (SYS_WARN,
Sys_MaskPrintf (SYS_warn,
"%i clilpnodes exceeds standard limit of 32767.\n",
count);
}
@ -884,7 +884,7 @@ Mod_LoadMarksurfaces (model_t *mod, bsp_t *bsp)
out = Hunk_AllocName (count * sizeof (*out), mod->name);
if (count > 32767) {
Sys_MaskPrintf (SYS_WARN,
Sys_MaskPrintf (SYS_warn,
"%i marksurfaces exceeds standard limit of 32767.\n",
count);
}

View file

@ -417,14 +417,14 @@ Vulkan_Mod_LoadLighting (model_t *mod, bsp_t *bsp, vulkan_ctx_t *ctx)
&& data[3] == 'T') {
ver = LittleLong (((int32_t *) data)[1]);
if (ver == 1) {
Sys_MaskPrintf (SYS_DEV, "%s loaded", litfilename->str);
Sys_MaskPrintf (SYS_dev, "%s loaded", litfilename->str);
brush->lightdata = data + 8;
} else {
Sys_MaskPrintf (SYS_DEV,
Sys_MaskPrintf (SYS_dev,
"Unknown .lit file version (%d)\n", ver);
}
} else {
Sys_MaskPrintf (SYS_DEV, "Corrupt .lit file (old version?)\n");
Sys_MaskPrintf (SYS_dev, "Corrupt .lit file (old version?)\n");
}
}
dstring_delete (litfilename);

View file

@ -56,7 +56,7 @@ Mod_Fullbright (byte *skin, int width, int height, const char *name)
if (Mod_CalcFullbright (skin, texels, pixels)) {
//FIXME black should be transparent for fullbrights (or just fix
//fullbright rendering in gl)
Sys_MaskPrintf (SYS_DEV, "FB Model ID: '%s'\n", name);
Sys_MaskPrintf (SYS_dev, "FB Model ID: '%s'\n", name);
for (int i = 0; i < pixels; i++) {
if (!texels[i]) {
texels[i] = 255;

View file

@ -162,7 +162,7 @@ load_iqm_vertex_arrays (model_t *mod, const iqmheader *hdr, byte *buffer)
for (i = 0; i < hdr->num_vertexarrays; i++) {
va = vas + i;
Sys_MaskPrintf (SYS_MODEL, "%u %u %u %u %u %u\n", i, va->type, va->flags, va->format, va->size, va->offset);
Sys_MaskPrintf (SYS_model, "%u %u %u %u %u %u\n", i, va->type, va->flags, va->format, va->size, va->offset);
switch (va->type) {
case IQM_POSITION:
if (position)
@ -588,7 +588,7 @@ Mod_IQMBuildBlendPalette (iqm_t *iqm, int *size)
if (!bindices || !bweights) {
// Not necessarily an error: might be a static model with no bones
// Either way, no need to make a blend palette
Sys_MaskPrintf (SYS_MODEL, "bone index or weight array missing\n");
Sys_MaskPrintf (SYS_model, "bone index or weight array missing\n");
*size = 0;
return 0;
}

View file

@ -280,7 +280,7 @@ Mod_ForName (const char *name, qboolean crash)
mod = Mod_FindName (name);
Sys_MaskPrintf (SYS_DEV, "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

@ -84,7 +84,7 @@ Skin_SetTranslation (int cmap, int top, int bottom)
bottom = bound (0, bottom, 13) * 16;
if (cmap < 0 || cmap > MAX_TRANSLATIONS) {
Sys_MaskPrintf (SYS_SKIN, "invalid skin slot: %d\n", cmap);
Sys_MaskPrintf (SYS_skin, "invalid skin slot: %d\n", cmap);
cmap = 1;
}
@ -129,7 +129,7 @@ Skin_SetColormap (skin_t *skin, int cmap)
skin = new_skin ();
skin->colormap = 0;
if (cmap < 0 || cmap > MAX_TRANSLATIONS) {
Sys_MaskPrintf (SYS_SKIN, "invalid skin slot: %d\n", cmap);
Sys_MaskPrintf (SYS_skin, "invalid skin slot: %d\n", cmap);
cmap = 0;
}
if (cmap)

View file

@ -166,7 +166,7 @@ NetadrToSockadr (netadr_t *a, AF_address_t *s)
switch (a->family) {
case AF_INET: {
Sys_MaskPrintf (SYS_NET, "err, converting v4 to v6...\n");
Sys_MaskPrintf (SYS_net, "err, converting v4 to v6...\n");
s->ss.ss_family = AF_INET6;
s->s6.sin6_addr.s6_addr[10] = s->s6.sin6_addr.s6_addr[11] = 0xff;
memcpy (&s->s6.sin6_addr.s6_addr[12], &a->ip, sizeof (s->s4.sin_addr));
@ -186,7 +186,7 @@ NetadrToSockadr (netadr_t *a, AF_address_t *s)
break;
}
default:
Sys_MaskPrintf (SYS_NET, "%s: Unknown address family %d", __FUNCTION__, a->family);
Sys_MaskPrintf (SYS_net, "%s: Unknown address family %d", __FUNCTION__, a->family);
break;
}
}
@ -207,7 +207,7 @@ SockadrToNetadr (AF_address_t *s, netadr_t *a)
break;
}
default:
Sys_MaskPrintf (SYS_NET, "%s: Unknown address family 0x%x\n", __FUNCTION__, s->ss.ss_family);
Sys_MaskPrintf (SYS_net, "%s: Unknown address family 0x%x\n", __FUNCTION__, s->ss.ss_family);
break;
}
}
@ -387,7 +387,7 @@ NET_StringToAdr (const char *s, netadr_t *a)
freeaddrinfo (resultp);
SockadrToNetadr (&addr, a);
Sys_MaskPrintf (SYS_NET, "Raw address: %s\n", NET_BaseAdrToString (*a));
Sys_MaskPrintf (SYS_net, "Raw address: %s\n", NET_BaseAdrToString (*a));
return true;
}
@ -509,7 +509,7 @@ UDP_OpenSocket (int port)
} else {
Host = "::0";
}
Sys_MaskPrintf (SYS_NET, "Binding to IP address [%s]\n", Host);
Sys_MaskPrintf (SYS_net, "Binding to IP address [%s]\n", Host);
if (port == PORT_ANY)
Service = NULL;

View file

@ -488,7 +488,7 @@ NET_Close (qsocket_t *sock)
// call the driver_Close function
sfunc.Close (sock);
Sys_MaskPrintf (SYS_NET, "closing socket\n");
Sys_MaskPrintf (SYS_net, "closing socket\n");
NET_FreeQSocket (sock);
}
@ -522,7 +522,7 @@ NET_GetMessage (qsocket_t *sock)
// see if this connection has timed out
if (ret == 0 && sock->driver) {
if (net_time - sock->lastMessageTime > net_messagetimeout->value) {
Sys_MaskPrintf (SYS_NET, "socket timed out\n");
Sys_MaskPrintf (SYS_net, "socket timed out\n");
NET_Close (sock);
return -1;
}
@ -816,7 +816,7 @@ NET_Init (void)
}
if (*my_tcpip_address)
Sys_MaskPrintf (SYS_NET, "TCP/IP address %s\n", my_tcpip_address);
Sys_MaskPrintf (SYS_net, "TCP/IP address %s\n", my_tcpip_address);
}

View file

@ -342,14 +342,14 @@ Datagram_GetMessage (qsocket_t *sock)
if (flags & NETFLAG_UNRELIABLE) {
if (sequence < sock->unreliableReceiveSequence) {
Sys_MaskPrintf (SYS_NET, "Got a stale datagram\n");
Sys_MaskPrintf (SYS_net, "Got a stale datagram\n");
ret = 0;
break;
}
if (sequence != sock->unreliableReceiveSequence) {
count = sequence - sock->unreliableReceiveSequence;
droppedDatagrams += count;
Sys_MaskPrintf (SYS_NET, "Dropped %u datagram(s)\n", count);
Sys_MaskPrintf (SYS_net, "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_MaskPrintf (SYS_NET, "Stale ACK received\n");
Sys_MaskPrintf (SYS_net, "Stale ACK received\n");
continue;
}
if (sequence == sock->ackSequence) {
sock->ackSequence++;
if (sock->ackSequence != sock->sendSequence)
Sys_MaskPrintf (SYS_NET, "ack sequencing error\n");
Sys_MaskPrintf (SYS_net, "ack sequencing error\n");
} else {
Sys_MaskPrintf (SYS_NET, "Duplicate ACK received\n");
Sys_MaskPrintf (SYS_net, "Duplicate ACK received\n");
continue;
}
sock->sendMessageLength -= MAX_DATAGRAM;
@ -1021,7 +1021,7 @@ _Datagram_CheckNewConnections (void)
}
// it's somebody coming back in from a crash/disconnect
// so close the old qsocket and let their retry get them back in
Sys_MaskPrintf (SYS_NET, "closing stale socket %d %g\n", ret,
Sys_MaskPrintf (SYS_net, "closing stale socket %d %g\n", ret,
net_time - s->connecttime);
NET_Close (s);
return NULL;
@ -1048,13 +1048,13 @@ _Datagram_CheckNewConnections (void)
// allocate a network socket
newsock = dfunc.OpenSocket (0);
if (newsock == -1) {
Sys_MaskPrintf (SYS_NET, "failed to open socket");
Sys_MaskPrintf (SYS_net, "failed to open socket");
NET_FreeQSocket (sock);
return NULL;
}
// connect to the client
if (dfunc.Connect (newsock, &clientaddr) == -1) {
Sys_MaskPrintf (SYS_NET, "failed to connect client");
Sys_MaskPrintf (SYS_net, "failed to connect client");
dfunc.CloseSocket (newsock);
NET_FreeQSocket (sock);
return NULL;
@ -1269,11 +1269,11 @@ _Datagram_Connect (const char *host)
if (ret > 0) {
// is it from the right place?
if (sfunc.AddrCompare (&readaddr, &sendaddr) != 0) {
Sys_MaskPrintf (SYS_NET, "%2d ",
Sys_MaskPrintf (SYS_net, "%2d ",
sfunc.AddrCompare (&readaddr, &sendaddr));
Sys_MaskPrintf (SYS_NET, "%d %s ", readaddr.family,
Sys_MaskPrintf (SYS_net, "%d %s ", readaddr.family,
sfunc.AddrToString (&readaddr));
Sys_MaskPrintf (SYS_NET, "%d %s\n", sendaddr.family,
Sys_MaskPrintf (SYS_net, "%d %s\n", sendaddr.family,
sfunc.AddrToString (&sendaddr));
ret = 0;
continue;
@ -1363,7 +1363,7 @@ _Datagram_Connect (const char *host)
ErrorReturn:
// FIXME: MENUCODE - do something with reason
Sys_MaskPrintf (SYS_NET, "FIXME: MENUCODE - do something with reason\n");
Sys_MaskPrintf (SYS_net, "FIXME: MENUCODE - do something with reason\n");
NET_FreeQSocket (sock);
ErrorReturn2:
dfunc.CloseSocket (newsock);

View file

@ -203,7 +203,7 @@ get_iface_list (int sock)
num_ifaces = index;
}
ifaces = malloc (num_ifaces * sizeof (uint32_t));
Sys_MaskPrintf (SYS_NET, "%d interfaces\n", num_ifaces);
Sys_MaskPrintf (SYS_net, "%d interfaces\n", num_ifaces);
for (ifa = ifa_head; ifa; ifa = ifa->ifa_next) {
struct sockaddr_in *sa;
@ -214,7 +214,7 @@ get_iface_list (int sock)
index = if_nametoindex (ifa->ifa_name) - 1;
sa = (struct sockaddr_in *) ifa->ifa_addr;
memcpy (&ifaces[index], &sa->sin_addr, sizeof (uint32_t));
Sys_MaskPrintf (SYS_NET, " %-10s %s\n", ifa->ifa_name,
Sys_MaskPrintf (SYS_net, " %-10s %s\n", ifa->ifa_name,
inet_ntoa (sa->sin_addr));
if (!default_iface && ifaces[index] != htonl (0x7f000001))
default_iface = &ifaces[index];
@ -498,7 +498,7 @@ UDP_Read (int socket, byte *buf, int len, netadr_t *from)
return 0;
for (cmsg = CMSG_FIRSTHDR (&msghdr); cmsg;
cmsg = CMSG_NXTHDR (&msghdr, cmsg)) {
Sys_MaskPrintf (SYS_NET, "%d\n", cmsg->cmsg_type);
Sys_MaskPrintf (SYS_net, "%d\n", cmsg->cmsg_type);
if (cmsg->cmsg_type == IP_PKTINFO) {
info = (struct in_pktinfo *) CMSG_DATA (cmsg);
break;
@ -512,7 +512,7 @@ UDP_Read (int socket, byte *buf, int len, netadr_t *from)
last_iface = &ifaces[info->ipi_ifindex - 1];
}
SockadrToNetadr (&addr, from);
Sys_MaskPrintf (SYS_NET, "got %d bytes from %s on iface %d (%s)\n", ret,
Sys_MaskPrintf (SYS_net, "got %d bytes from %s on iface %d (%s)\n", ret,
UDP_AddrToString (from), info ? info->ipi_ifindex - 1 : -1,
last_iface ? inet_ntoa (info->ipi_addr) : "?");
#else
@ -524,7 +524,7 @@ UDP_Read (int socket, byte *buf, int len, netadr_t *from)
if (ret == -1 && (errno == EWOULDBLOCK || errno == ECONNREFUSED))
return 0;
SockadrToNetadr (&addr, from);
Sys_MaskPrintf (SYS_NET, "got %d bytes from %s\n", ret,
Sys_MaskPrintf (SYS_net, "got %d bytes from %s\n", ret,
UDP_AddrToString (from));
last_iface = default_iface;
#endif
@ -574,7 +574,7 @@ UDP_Write (int socket, byte *buf, int len, netadr_t *to)
SA_LEN (&addr.sa));
if (ret == -1 && errno == EWOULDBLOCK)
return 0;
Sys_MaskPrintf (SYS_NET, "sent %d bytes to %s\n", ret,
Sys_MaskPrintf (SYS_net, "sent %d bytes to %s\n", ret,
UDP_AddrToString (to));
return ret;
}

View file

@ -247,7 +247,7 @@ WINS_Init (void)
// determine my name
if (pgethostname (buff, MAXHOSTNAMELEN) == SOCKET_ERROR) {
Sys_MaskPrintf (SYS_NET, "Winsock TCP/IP Initialization failed.\n");
Sys_MaskPrintf (SYS_net, "Winsock TCP/IP Initialization failed.\n");
if (--winsock_initialized == 0)
pWSACleanup ();
return -1;

View file

@ -47,7 +47,7 @@ PushBackbuf (backbuf_t *rel)
{
int tail_backbuf;
Sys_MaskPrintf (SYS_DEV, "backbuffering %d %s\n", rel->num_backbuf,
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));
@ -266,7 +266,7 @@ MSG_Reliable_Send (backbuf_t *rel)
return;
// will it fit?
if (msg->cursize + *size < msg->maxsize) {
Sys_MaskPrintf (SYS_DEV, "%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

@ -456,7 +456,7 @@ finish_class (probj_t *probj, pr_class_t *class, pointer_t object_ptr)
ml = &G_STRUCT (pr, pr_method_list_t, *ml).method_next;
*ml = class->methods;
}
Sys_MaskPrintf (SYS_RUA_OBJ, " %x %x %x\n", meta->class_pointer,
Sys_MaskPrintf (SYS_rua_obj, " %x %x %x\n", meta->class_pointer,
meta->super_class, class->super_class);
}
@ -514,7 +514,7 @@ sel_register_typed_name (probj_t *probj, const char *name, const char *types,
}
}
} else {
Sys_MaskPrintf (SYS_RUA_OBJ, " Registering SEL %s %s\n",
Sys_MaskPrintf (SYS_rua_obj, " Registering SEL %s %s\n",
name, types);
index = add_sel_name (probj, name);
is_new = 1;
@ -533,7 +533,7 @@ sel_register_typed_name (probj_t *probj, const char *name, const char *types,
if (is_new)
Hash_Add (probj->selector_hash, (void *) index);
done:
Sys_MaskPrintf (SYS_RUA_OBJ, " %d @ %x\n",
Sys_MaskPrintf (SYS_rua_obj, " %d @ %x\n",
sel->sel_id, PR_SetPointer (pr, sel));
return sel;
}
@ -795,32 +795,32 @@ obj_find_message (probj_t *probj, pr_class_t *class, pr_sel_t *selector)
int dev = developer->int_val;
string_t *names;
if (dev & SYS_RUA_MSG) {
if (dev & SYS_rua_msg) {
names = probj->selector_names;
Sys_Printf ("Searching for %s\n",
PR_GetString (pr, names[selector->sel_id]));
}
while (c) {
if (dev & SYS_RUA_MSG)
if (dev & SYS_rua_msg)
Sys_Printf ("Checking class %s @ %x\n",
PR_GetString (pr, c->name),
PR_SetPointer (pr, c));
method_list = &G_STRUCT (pr, pr_method_list_t, c->methods);
while (method_list) {
if (dev & SYS_RUA_MSG) {
if (dev & SYS_rua_msg) {
Sys_Printf ("method list %x\n",
PR_SetPointer (pr, method_list));
}
for (i = 0, method = method_list->method_list;
i < method_list->method_count; i++, method++) {
sel = &G_STRUCT (pr, pr_sel_t, method->method_name);
if (developer->int_val & SYS_RUA_MSG) {
if (developer->int_val & SYS_rua_msg) {
names = probj->selector_names;
Sys_Printf (" %s\n",
PR_GetString (pr, names[sel->sel_id]));
}
if (sel->sel_id == selector->sel_id) {
if (dev & SYS_RUA_MSG) {
if (dev & SYS_rua_msg) {
names = probj->selector_names;
Sys_Printf ("found %s: %x\n",
PR_GetString (pr, names[selector->sel_id]),
@ -912,7 +912,7 @@ obj_install_dispatch_table_for_class (probj_t *probj, pr_class_t *class)
pr_class_t *super = &G_STRUCT (pr, pr_class_t, class->super_class);
dtable_t *dtable;
Sys_MaskPrintf (SYS_RUA_OBJ, " install dispatch for class %s %x %d\n",
Sys_MaskPrintf (SYS_rua_obj, " install dispatch for class %s %x %d\n",
PR_GetString (pr, class->name),
class->methods,
PR_CLS_ISMETA(class));
@ -1054,7 +1054,7 @@ obj_init_statics (probj_t *probj)
pointer_t *ptr;
pointer_t *inst;
Sys_MaskPrintf (SYS_RUA_OBJ, "Initializing statics\n");
Sys_MaskPrintf (SYS_rua_obj, "Initializing statics\n");
while (*cell) {
int initialized = 1;
@ -1063,7 +1063,7 @@ obj_init_statics (probj_t *probj)
const char *class_name = PR_GetString (pr, statics->class_name);
pr_class_t *class = Hash_Find (probj->classes, class_name);
Sys_MaskPrintf (SYS_RUA_OBJ, " %s %p\n", class_name, class);
Sys_MaskPrintf (SYS_rua_obj, " %s %p\n", class_name, class);
if (!class) {
initialized = 0;
continue;
@ -1107,7 +1107,7 @@ rua___obj_exec_class (progs_t *pr)
symtab = &G_STRUCT (pr, pr_symtab_t, module->symtab);
if (!symtab)
return;
Sys_MaskPrintf (SYS_RUA_OBJ, "Initializing %s module\n"
Sys_MaskPrintf (SYS_rua_obj, "Initializing %s module\n"
"symtab @ %x : %d selector%s @ %x, "
"%d class%s and %d categor%s\n"
"static instance lists: %s\n",
@ -1137,26 +1137,26 @@ rua___obj_exec_class (progs_t *pr)
pr_class_t *meta = &G_STRUCT (pr, pr_class_t, class->class_pointer);
const char *super_class = PR_GetString (pr, class->super_class);
Sys_MaskPrintf (SYS_RUA_OBJ, "Class %s @ %x\n",
Sys_MaskPrintf (SYS_rua_obj, "Class %s @ %x\n",
PR_GetString (pr, class->name), *ptr);
Sys_MaskPrintf (SYS_RUA_OBJ, " class pointer: %x\n",
Sys_MaskPrintf (SYS_rua_obj, " class pointer: %x\n",
class->class_pointer);
Sys_MaskPrintf (SYS_RUA_OBJ, " super class: %s\n",
Sys_MaskPrintf (SYS_rua_obj, " super class: %s\n",
PR_GetString (pr, class->super_class));
Sys_MaskPrintf (SYS_RUA_OBJ, " instance variables: %d @ %x\n",
Sys_MaskPrintf (SYS_rua_obj, " instance variables: %d @ %x\n",
class->instance_size,
class->ivars);
if (developer->int_val & SYS_RUA_OBJ)
if (developer->int_val & SYS_rua_obj)
dump_ivars (probj, class->ivars);
Sys_MaskPrintf (SYS_RUA_OBJ, " instance methods: %x\n",
Sys_MaskPrintf (SYS_rua_obj, " instance methods: %x\n",
class->methods);
Sys_MaskPrintf (SYS_RUA_OBJ, " protocols: %x\n", class->protocols);
Sys_MaskPrintf (SYS_rua_obj, " protocols: %x\n", class->protocols);
Sys_MaskPrintf (SYS_RUA_OBJ, " class methods: %x\n", meta->methods);
Sys_MaskPrintf (SYS_RUA_OBJ, " instance variables: %d @ %x\n",
Sys_MaskPrintf (SYS_rua_obj, " class methods: %x\n", meta->methods);
Sys_MaskPrintf (SYS_rua_obj, " instance variables: %d @ %x\n",
meta->instance_size,
meta->ivars);
if (developer->int_val & SYS_RUA_OBJ)
if (developer->int_val & SYS_rua_obj)
dump_ivars (probj, meta->ivars);
class->subclass_list = 0;
@ -1183,14 +1183,14 @@ rua___obj_exec_class (progs_t *pr)
const char *class_name = PR_GetString (pr, category->class_name);
pr_class_t *class = Hash_Find (probj->classes, class_name);
Sys_MaskPrintf (SYS_RUA_OBJ, "Category %s (%s) @ %x\n",
Sys_MaskPrintf (SYS_rua_obj, "Category %s (%s) @ %x\n",
PR_GetString (pr, category->class_name),
PR_GetString (pr, category->category_name), *ptr);
Sys_MaskPrintf (SYS_RUA_OBJ, " instance methods: %x\n",
Sys_MaskPrintf (SYS_rua_obj, " instance methods: %x\n",
category->instance_methods);
Sys_MaskPrintf (SYS_RUA_OBJ, " class methods: %x\n",
Sys_MaskPrintf (SYS_rua_obj, " class methods: %x\n",
category->class_methods);
Sys_MaskPrintf (SYS_RUA_OBJ, " protocols: %x\n",
Sys_MaskPrintf (SYS_rua_obj, " protocols: %x\n",
category->protocols);
if (class) {
@ -1202,7 +1202,7 @@ rua___obj_exec_class (progs_t *pr)
}
if (*ptr) {
Sys_MaskPrintf (SYS_RUA_OBJ, "Static instances lists: %x\n", *ptr);
Sys_MaskPrintf (SYS_rua_obj, "Static instances lists: %x\n", *ptr);
probj->uninitialized_statics
= list_cons (&G_STRUCT (pr, pointer_t, *ptr),
probj->uninitialized_statics);
@ -1232,10 +1232,10 @@ rua___obj_exec_class (progs_t *pr)
}
}
Sys_MaskPrintf (SYS_RUA_OBJ, "Finished initializing %s module\n",
Sys_MaskPrintf (SYS_rua_obj, "Finished initializing %s module\n",
PR_GetString (pr, module->name));
obj_send_load (probj);
Sys_MaskPrintf (SYS_RUA_OBJ, "Leaving %s module init\n",
Sys_MaskPrintf (SYS_rua_obj, "Leaving %s module init\n",
PR_GetString (pr, module->name));
}
@ -1989,7 +1989,7 @@ obj_protocol_conformsToProtocol (probj_t *probj, pr_protocol_t *proto,
}
proto_list = &G_STRUCT (pr, pr_protocol_list_t, proto->protocol_list);
while (proto_list) {
Sys_MaskPrintf (SYS_RUA_OBJ, "%x %x %d\n",
Sys_MaskPrintf (SYS_rua_obj, "%x %x %d\n",
PR_SetPointer (pr, proto_list), proto_list->next,
proto_list->count);
for (int i = 0; i < proto_list->count; i++) {
@ -2028,7 +2028,7 @@ rua__c_Object__conformsToProtocol_ (progs_t *pr)
}
proto_list = &G_STRUCT (pr, pr_protocol_list_t, class->protocols);
while (proto_list) {
Sys_MaskPrintf (SYS_RUA_OBJ, "%x %x %d\n",
Sys_MaskPrintf (SYS_rua_obj, "%x %x %d\n",
PR_SetPointer (pr, proto_list), proto_list->next,
proto_list->count);
for (int i = 0; i < proto_list->count; i++) {
@ -2043,11 +2043,11 @@ rua__c_Object__conformsToProtocol_ (progs_t *pr)
proto_list = &G_STRUCT (pr, pr_protocol_list_t, proto_list->next);
}
not_conforms:
Sys_MaskPrintf (SYS_RUA_OBJ, "does not conform\n");
Sys_MaskPrintf (SYS_rua_obj, "does not conform\n");
R_INT (pr) = 0;
return;
conforms:
Sys_MaskPrintf (SYS_RUA_OBJ, "conforms\n");
Sys_MaskPrintf (SYS_rua_obj, "conforms\n");
R_INT (pr) = 1;
return;
}

View file

@ -130,7 +130,7 @@ Cmd_Command (cbuf_args_t *args)
return 0;
if (cbuf_active->strict)
return -1;
else if (cmd_warncmd->int_val || developer->int_val & SYS_DEV)
else if (cmd_warncmd->int_val || developer->int_val & SYS_dev)
Sys_Printf ("Unknown command \"%s\"\n", Cmd_Argv (0));
return 0;
}
@ -145,7 +145,7 @@ add_command (const char *cmd_name, xcommand_t func, xdatacmd_t datafunc,
// fail if the command already exists
cmd = (cmd_function_t *) Hash_Find (cmd_hash, cmd_name);
if (cmd) {
Sys_MaskPrintf (SYS_DEV, "Cmd_AddCommand: %s already defined\n",
Sys_MaskPrintf (SYS_dev, "Cmd_AddCommand: %s already defined\n",
cmd_name);
return 0;
}
@ -516,7 +516,7 @@ Cmd_Exec_f (void)
}
if (!Cvar_Command ()
&& (cmd_warncmd->int_val
|| (developer && developer->int_val & SYS_DEV)))
|| (developer && developer->int_val & SYS_dev)))
Sys_Printf ("execing %s\n", Cmd_Argv (1));
Cbuf_InsertText (cbuf_active, f);
Hunk_FreeToLowMark (mark);

View file

@ -258,7 +258,7 @@ Cvar_Set (cvar_t *var, const char *value)
return;
if (var->flags & CVAR_ROM) {
Sys_MaskPrintf (SYS_DEV, "Cvar \"%s\" is read-only, cannot modify\n",
Sys_MaskPrintf (SYS_dev, "Cvar \"%s\" is read-only, cannot modify\n",
var->name);
return;
}
@ -330,23 +330,10 @@ Cvar_WriteVariables (QFile *f)
Qprintf (f, "seta %s \"%s\"\n", var->name, var->string);
}
// XXX make sure in sync with SYS_* in sys.h
#define SYS_DEVELOPER(developer) #developer,
static const char *developer_flags[] = {
"dev",
"warn",
"vid",
"fs_nf",
"fs_f",
"fs",
"net",
"rua_obj",
"rua_msg",
"snd",
"glt",
"glsl",
"skin",
"model",
"vulkan",
#include "QF/sys_developer.h"
0
};
@ -427,7 +414,7 @@ set_cvar (const char *cmd, int orflags)
if (var) {
if (var->flags & CVAR_ROM) {
Sys_MaskPrintf (SYS_DEV,
Sys_MaskPrintf (SYS_dev,
"Cvar \"%s\" is read-only, cannot modify\n",
var_name);
} else {

View file

@ -345,7 +345,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_MaskPrintf (SYS_DEV, "Reason: \"%s\".\n", pi_error);
Sys_MaskPrintf (SYS_dev, "Reason: \"%s\".\n", pi_error);
return NULL;
}
@ -391,7 +391,7 @@ PI_UnloadPlugin (plugin_t *plugin)
&& plugin->functions->general->p_Shutdown) {
plugin->functions->general->p_Shutdown ();
} else {
Sys_MaskPrintf (SYS_DEV,
Sys_MaskPrintf (SYS_dev,
"Warning: No shutdown function for type %d plugin!\n",
plugin->type);
}

View file

@ -625,16 +625,16 @@ qfs_build_gamedir (const char **list)
gamedir->dir.shots = strdup ("QF");
qfs_gamedir = gamedir;
Sys_MaskPrintf (SYS_FS, "%s\n", qfs_gamedir->name);
Sys_MaskPrintf (SYS_FS, " gamedir : %s\n", qfs_gamedir->gamedir);
Sys_MaskPrintf (SYS_FS, " path : %s\n", qfs_gamedir->path);
Sys_MaskPrintf (SYS_FS, " gamecode: %s\n", qfs_gamedir->gamecode);
Sys_MaskPrintf (SYS_FS, " hudtype : %s\n", qfs_gamedir->hudtype);
Sys_MaskPrintf (SYS_FS, " def : %s\n", qfs_gamedir->dir.def);
Sys_MaskPrintf (SYS_FS, " skins : %s\n", qfs_gamedir->dir.skins);
Sys_MaskPrintf (SYS_FS, " models : %s\n", qfs_gamedir->dir.models);
Sys_MaskPrintf (SYS_FS, " sound : %s\n", qfs_gamedir->dir.sound);
Sys_MaskPrintf (SYS_FS, " maps : %s\n", qfs_gamedir->dir.maps);
Sys_MaskPrintf (SYS_fs, "%s\n", qfs_gamedir->name);
Sys_MaskPrintf (SYS_fs, " gamedir : %s\n", qfs_gamedir->gamedir);
Sys_MaskPrintf (SYS_fs, " path : %s\n", qfs_gamedir->path);
Sys_MaskPrintf (SYS_fs, " gamecode: %s\n", qfs_gamedir->gamecode);
Sys_MaskPrintf (SYS_fs, " hudtype : %s\n", qfs_gamedir->hudtype);
Sys_MaskPrintf (SYS_fs, " def : %s\n", qfs_gamedir->dir.def);
Sys_MaskPrintf (SYS_fs, " skins : %s\n", qfs_gamedir->dir.skins);
Sys_MaskPrintf (SYS_fs, " models : %s\n", qfs_gamedir->dir.models);
Sys_MaskPrintf (SYS_fs, " sound : %s\n", qfs_gamedir->dir.sound);
Sys_MaskPrintf (SYS_fs, " maps : %s\n", qfs_gamedir->dir.maps);
qfs_process_path (qfs_gamedir->path, dir);
free (path);
Hash_DelTable (dirs);
@ -652,7 +652,7 @@ qfs_load_config (void)
if (*fs_dirconf->string) {
dirconf = Sys_ExpandSquiggle (fs_dirconf->string);
if (!(f = Qopen (dirconf, "rt")))
Sys_MaskPrintf (SYS_FS,
Sys_MaskPrintf (SYS_fs,
"Could not load `%s', using builtin defaults\n",
dirconf);
free (dirconf);
@ -831,7 +831,7 @@ qfs_findfile_search (const vpath_t *vpath, const searchpath_t *sp,
}
}
if (packfile) {
Sys_MaskPrintf (SYS_FS_F, "PackFile: %s : %s\n",
Sys_MaskPrintf (SYS_fs_f, "PackFile: %s : %s\n",
sp->pack->filename, packfile->name);
found.ff.vpath = vpath;
found.ff.in_pak = true;
@ -852,7 +852,7 @@ qfs_findfile_search (const vpath_t *vpath, const searchpath_t *sp,
continue;
}
Sys_MaskPrintf (SYS_FS_F, "FindFile: %s\n", path->str);
Sys_MaskPrintf (SYS_fs_f, "FindFile: %s\n", path->str);
found.ff.vpath = vpath;
found.ff.in_pak = false;
@ -1046,7 +1046,7 @@ _QFS_VOpenFile (const char *filename, int zip,
// 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_MaskPrintf (SYS_FS,
Sys_MaskPrintf (SYS_fs,
"FindFile: %s: attempt to escape directory tree!\n",
path);
goto error;
@ -1089,7 +1089,7 @@ _QFS_VOpenFile (const char *filename, int zip,
return gzfile;
}
Sys_MaskPrintf (SYS_FS_NF, "FindFile: can't find %s\n", filename);
Sys_MaskPrintf (SYS_fs_nf, "FindFile: can't find %s\n", filename);
error:
qfs_filesize = -1;
free (path);
@ -1191,7 +1191,7 @@ qfs_load_pakfile (char *packfile)
pack_t *pack = pack_open (packfile);
if (pack)
Sys_MaskPrintf (SYS_FS, "Added packfile %s (%i files)\n",
Sys_MaskPrintf (SYS_fs, "Added packfile %s (%i files)\n",
packfile, pack->numfiles);
return pack;
}
@ -1241,7 +1241,7 @@ qfs_load_gamedir (searchpath_t **searchpath, const char *dir)
char **pakfiles = NULL;
int i = 0, bufsize = 0, count = 0;
Sys_MaskPrintf (SYS_FS, "qfs_load_gamedir (\"%s\")\n", dir);
Sys_MaskPrintf (SYS_fs, "qfs_load_gamedir (\"%s\")\n", dir);
pakfiles = calloc (1, FBLOCK_SIZE * sizeof (char *));
@ -1347,7 +1347,7 @@ qfs_add_gamedir (vpath_t *vpath, const char *dir)
Sys_Printf ("dropping bad directory %s\n", dir);
break;
}
Sys_MaskPrintf (SYS_FS, "qfs_add_gamedir (\"%s\")\n",
Sys_MaskPrintf (SYS_fs, "qfs_add_gamedir (\"%s\")\n",
f_dir->str);
qfs_add_dir (&vpath->share, f_dir->str);
@ -1357,7 +1357,7 @@ qfs_add_gamedir (vpath_t *vpath, const char *dir)
}
qfs_expand_userpath (f_dir, dir);
Sys_MaskPrintf (SYS_FS, "qfs_add_gamedir (\"%s\")\n", f_dir->str);
Sys_MaskPrintf (SYS_fs, "qfs_add_gamedir (\"%s\")\n", f_dir->str);
qfs_add_dir (&vpath->user, f_dir->str);
dstring_delete (f_dir);
@ -1589,7 +1589,7 @@ QFS_Open (const char *path, const char *mode)
int write = 0;
if (qfs_expand_userpath (full_path, path) == 0) {
Sys_MaskPrintf (SYS_FS, "QFS_Open: %s %s\n", full_path->str, mode);
Sys_MaskPrintf (SYS_fs, "QFS_Open: %s %s\n", full_path->str, mode);
for (m = mode; *m; m++)
if (*m == 'w' || *m == '+' || *m == 'a')
write = 1;
@ -1625,7 +1625,7 @@ QFS_Rename (const char *old_path, const char *new_path)
if ((ret = qfs_expand_userpath (full_old, old_path)) != -1)
if ((ret = qfs_expand_userpath (full_new, new_path)) != -1)
if ((ret = Sys_CreatePath (full_new->str)) != -1) {
Sys_MaskPrintf (SYS_FS, "QFS_Rename %s %s\n", full_old->str,
Sys_MaskPrintf (SYS_fs, "QFS_Rename %s %s\n", full_old->str,
full_new->str);
ret = Qrename (full_old->str, full_new->str);
}

View file

@ -118,7 +118,7 @@ W_GetLumpinfo (const char *name)
return lump_p;
}
Sys_MaskPrintf (SYS_WARN, "W_GetLumpinfo: %s not found", name);
Sys_MaskPrintf (SYS_warn, "W_GetLumpinfo: %s not found", name);
return NULL;
}

View file

@ -205,7 +205,7 @@ Z_Malloc (memzone_t *zone, int size)
{
void *buf;
if (!developer || developer->int_val & SYS_DEV)
if (!developer || developer->int_val & SYS_dev)
Z_CheckHeap (zone); // DEBUG
buf = Z_TagMalloc (zone, size, 1);
if (!buf) {
@ -710,7 +710,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_MaskPrintf (SYS_DEV, "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;
@ -718,7 +718,7 @@ Cache_Move (cache_system_t * c)
Cache_Free (c->user);
new->user->data = (void *) (new + 1);
} else {
Sys_MaskPrintf (SYS_DEV, "cache_move failed\n");
Sys_MaskPrintf (SYS_dev, "cache_move failed\n");
Cache_Free (c->user); // tough luck...
}
@ -975,7 +975,7 @@ Cache_Free (cache_user_t *c)
if (cs->readlock)
Sys_Error ("Cache_Free: attempt to free locked block");
Sys_MaskPrintf (SYS_DEV, "Cache_Free: freeing '%.16s' %p\n", cs->name, cs);
Sys_MaskPrintf (SYS_dev, "Cache_Free: freeing '%.16s' %p\n", cs->name, cs);
Cache_UnlinkLRU (cs);
@ -1038,7 +1038,7 @@ Cache_Alloc (cache_user_t *c, int size, const char *name)
VISIBLE void
Cache_Report (void)
{
Sys_MaskPrintf (SYS_DEV, "%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

@ -116,14 +116,14 @@ Draw_InitText (void)
if (vaelements < 0) {
textUseVA = 0;
tVAsize = 2048;
Sys_MaskPrintf (SYS_DEV, "Text: Vertex Array use disabled.\n");
Sys_MaskPrintf (SYS_dev, "Text: Vertex Array use disabled.\n");
} else {
textUseVA = 1;
if (vaelements > 3)
tVAsize = vaelements - (vaelements % 4);
else
tVAsize = 2048;
Sys_MaskPrintf (SYS_DEV, "Text: %i maximum vertex elements.\n",
Sys_MaskPrintf (SYS_dev, "Text: %i maximum vertex elements.\n",
tVAsize);
}

View file

@ -160,7 +160,7 @@ gl_R_InitParticles (void)
if (vaelements) {
partUseVA = 0;
pVAsize = r_maxparticles * 4;
Sys_MaskPrintf (SYS_DEV,
Sys_MaskPrintf (SYS_dev,
"Particles: Vertex Array use disabled.\n");
} else {
if (vaelements > 3)
@ -168,7 +168,7 @@ gl_R_InitParticles (void)
r_maxparticles * 4);
else if (vaelements >= 0)
pVAsize = r_maxparticles * 4;
Sys_MaskPrintf (SYS_DEV,
Sys_MaskPrintf (SYS_dev,
"Particles: %i maximum vertex elements.\n",
pVAsize);
}
@ -220,7 +220,7 @@ gl_R_ReadPointFile_f (void)
return;
}
Sys_MaskPrintf (SYS_DEV, "Reading %s...\n", name);
Sys_MaskPrintf (SYS_dev, "Reading %s...\n", name);
c = 0;
for (;;) {
char buf[64];
@ -232,7 +232,7 @@ gl_R_ReadPointFile_f (void)
c++;
if (numparticles >= r_maxparticles) {
Sys_MaskPrintf (SYS_DEV, "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,
@ -240,7 +240,7 @@ gl_R_ReadPointFile_f (void)
}
}
Qclose (f);
Sys_MaskPrintf (SYS_DEV, "%i points read\n", c);
Sys_MaskPrintf (SYS_dev, "%i points read\n", c);
}
static void

View file

@ -71,7 +71,7 @@ R_GetSpriteFrame (entity_t *currententity)
frame = currententity->animation.frame;
if ((frame >= psprite->numframes) || (frame < 0)) {
Sys_MaskPrintf (SYS_DEV, "R_DrawSprite: no such frame %d\n", frame);
Sys_MaskPrintf (SYS_dev, "R_DrawSprite: no such frame %d\n", frame);
frame = 0;
}
@ -247,7 +247,7 @@ gl_R_InitSprites (void)
#else
sVAsize = 4;
#endif
Sys_MaskPrintf (SYS_DEV, "Sprites: %i maximum vertex elements.\n",
Sys_MaskPrintf (SYS_dev, "Sprites: %i maximum vertex elements.\n",
sVAsize);
if (gl_spriteVertexArray)

View file

@ -757,15 +757,15 @@ R_InitFishEyeOnce (void)
if (fisheye_init_once_completed)
return 1;
Sys_MaskPrintf (SYS_DEV, "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_MaskPrintf (SYS_DEV, "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_MaskPrintf (SYS_DEV, "not found.\n");
Sys_MaskPrintf (SYS_dev, "not found.\n");
gl_cube_map_capable = false;
}
fisheye_init_once_completed = true;

View file

@ -235,7 +235,7 @@ gl_R_RenderFrame (SCR_Func scr_3dfunc, SCR_Func *scr_funcs)
if (r_speeds->int_val) {
// qfglFinish ();
time2 = Sys_DoubleTime ();
Sys_MaskPrintf (SYS_DEV, "%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), gl_c_brush_polys,
gl_c_alias_polys, numparticles);
}

View file

@ -133,12 +133,12 @@ gl_R_LoadSkys (const char *skyname)
targa = LoadImage (name = va (0, "env/%s%s", skyname, suf[i]), 1);
if (!targa || targa->format < 3) { // FIXME Can't do PCX right now
Sys_MaskPrintf (SYS_DEV, "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 (0, "gfx/env/%s%s", skyname,
suf[i]), 1);
if (!targa) {
Sys_MaskPrintf (SYS_DEV, "Couldn't load %s\n", name);
Sys_MaskPrintf (SYS_dev, "Couldn't load %s\n", name);
gl_skyloaded = false;
continue;
}

View file

@ -218,7 +218,7 @@ gl_multitexture_f (cvar_t *var)
qfglDisable (GL_TEXTURE_2D);
} else {
gl_mtex_fullbright = false;
Sys_MaskPrintf (SYS_VID,
Sys_MaskPrintf (SYS_vid,
"Not enough TMUs for BSP fullbrights.\n");
}
}
@ -269,7 +269,7 @@ gl_anisotropy_f (cvar_t * var)
} else {
gl_aniso = 1.0;
if (var)
Sys_MaskPrintf (SYS_VID,
Sys_MaskPrintf (SYS_vid,
"Anisotropy (GL_EXT_texture_filter_anisotropic) "
"is not supported by your hardware and/or "
"drivers.\n");
@ -288,7 +288,7 @@ gl_tessellate_f (cvar_t * var)
} else {
gl_tess = 0;
if (var)
Sys_MaskPrintf (SYS_VID,
Sys_MaskPrintf (SYS_vid,
"TruForm (GL_ATI_pn_triangles) is not supported "
"by your hardware and/or drivers.\n");
}
@ -432,14 +432,14 @@ CheckGLVersionString (void)
} else {
Sys_Error ("Malformed OpenGL version string!");
}
Sys_MaskPrintf (SYS_VID, "GL_VERSION: %s\n", gl_version);
Sys_MaskPrintf (SYS_vid, "GL_VERSION: %s\n", gl_version);
gl_vendor = (char *) qfglGetString (GL_VENDOR);
Sys_MaskPrintf (SYS_VID, "GL_VENDOR: %s\n", gl_vendor);
Sys_MaskPrintf (SYS_vid, "GL_VENDOR: %s\n", gl_vendor);
gl_renderer = (char *) qfglGetString (GL_RENDERER);
Sys_MaskPrintf (SYS_VID, "GL_RENDERER: %s\n", gl_renderer);
Sys_MaskPrintf (SYS_vid, "GL_RENDERER: %s\n", gl_renderer);
gl_extensions = (char *) qfglGetString (GL_EXTENSIONS);
Sys_MaskPrintf (SYS_VID, "GL_EXTENSIONS: %s\n", gl_extensions);
Sys_MaskPrintf (SYS_vid, "GL_EXTENSIONS: %s\n", gl_extensions);
if (strstr (gl_renderer, "Mesa DRI Mach64"))
gl_feature_mach64 = true;
@ -474,15 +474,15 @@ CheckCombineExtensions (void)
{
if (gl_major >= 1 && gl_minor >= 3) {
gl_combine_capable = true;
Sys_MaskPrintf (SYS_VID, "COMBINE active, multitextured doublebright "
Sys_MaskPrintf (SYS_vid, "COMBINE active, multitextured doublebright "
"enabled.\n");
} else if (QFGL_ExtensionPresent ("GL_ARB_texture_env_combine")) {
gl_combine_capable = true;
Sys_MaskPrintf (SYS_VID, "COMBINE_ARB active, multitextured "
Sys_MaskPrintf (SYS_vid, "COMBINE_ARB active, multitextured "
"doublebright enabled.\n");
} else {
gl_combine_capable = false;
Sys_MaskPrintf (SYS_VID, "GL_ARB_texture_env_combine not found. "
Sys_MaskPrintf (SYS_vid, "GL_ARB_texture_env_combine not found. "
"gl_doublebright will have no effect with "
"gl_multitexture on.\n");
}
@ -496,15 +496,15 @@ CheckCombineExtensions (void)
static void
CheckMultiTextureExtensions (void)
{
Sys_MaskPrintf (SYS_VID, "Checking for multitexture: ");
Sys_MaskPrintf (SYS_vid, "Checking for multitexture: ");
if (COM_CheckParm ("-nomtex")) {
Sys_MaskPrintf (SYS_VID, "disabled.\n");
Sys_MaskPrintf (SYS_vid, "disabled.\n");
return;
}
if (gl_major >= 1 && gl_minor >= 3) {
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS, &gl_mtex_tmus);
if (gl_mtex_tmus >= 2) {
Sys_MaskPrintf (SYS_VID, "enabled, %d TMUs.\n", gl_mtex_tmus);
Sys_MaskPrintf (SYS_vid, "enabled, %d TMUs.\n", gl_mtex_tmus);
qglMultiTexCoord2f =
QFGL_ExtensionAddress ("glMultiTexCoord2f");
qglMultiTexCoord2fv =
@ -514,16 +514,16 @@ CheckMultiTextureExtensions (void)
if (qglMultiTexCoord2f && gl_mtex_enum)
gl_mtex_capable = true;
else
Sys_MaskPrintf (SYS_VID, "Multitexture disabled, could not "
Sys_MaskPrintf (SYS_vid, "Multitexture disabled, could not "
"find required functions\n");
} else {
Sys_MaskPrintf (SYS_VID,
Sys_MaskPrintf (SYS_vid,
"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_MaskPrintf (SYS_VID, "enabled, %d TMUs.\n", gl_mtex_tmus);
Sys_MaskPrintf (SYS_vid, "enabled, %d TMUs.\n", gl_mtex_tmus);
qglMultiTexCoord2f =
QFGL_ExtensionAddress ("glMultiTexCoord2fARB");
qglMultiTexCoord2fv =
@ -533,14 +533,14 @@ CheckMultiTextureExtensions (void)
if (qglMultiTexCoord2f && gl_mtex_enum)
gl_mtex_capable = true;
else
Sys_MaskPrintf (SYS_VID, "Multitexture disabled, could not "
Sys_MaskPrintf (SYS_vid, "Multitexture disabled, could not "
"find required functions\n");
} else {
Sys_MaskPrintf (SYS_VID,
Sys_MaskPrintf (SYS_vid,
"Multitexture disabled, not enough TMUs.\n");
}
} else {
Sys_MaskPrintf (SYS_VID, "not found.\n");
Sys_MaskPrintf (SYS_vid, "not found.\n");
}
}
@ -582,7 +582,7 @@ CheckLights (void)
specular[4] = {0.1, 0.1, 0.1, 1.0};
qfglGetIntegerv (GL_MAX_LIGHTS, &gl_max_lights);
Sys_MaskPrintf (SYS_VID, "Max GL Lights %d.\n", gl_max_lights);
Sys_MaskPrintf (SYS_vid, "Max GL Lights %d.\n", gl_max_lights);
qfglEnable (GL_LIGHTING);
qfglLightModelfv (GL_LIGHT_MODEL_AMBIENT, dark);
@ -619,11 +619,11 @@ Tdfx_Init8bitPalette (void)
if (!(qgl3DfxSetPaletteEXT =
QFGL_ExtensionAddress ("gl3DfxSetPaletteEXT"))) {
Sys_MaskPrintf (SYS_VID, "3DFX_set_global_palette not found.\n");
Sys_MaskPrintf (SYS_vid, "3DFX_set_global_palette not found.\n");
return;
}
Sys_MaskPrintf (SYS_VID, "3DFX_set_global_palette.\n");
Sys_MaskPrintf (SYS_vid, "3DFX_set_global_palette.\n");
oldpal = (char *) d_8to24table; // d_8to24table3dfx;
for (i = 0; i < 256; i++) {
@ -637,7 +637,7 @@ Tdfx_Init8bitPalette (void)
qgl3DfxSetPaletteEXT ((GLuint *) table);
vr_data.vid->is8bit = true;
} else {
Sys_MaskPrintf (SYS_VID, "\n 3DFX_set_global_palette not found.");
Sys_MaskPrintf (SYS_vid, "\n 3DFX_set_global_palette not found.");
}
}
@ -662,11 +662,11 @@ Shared_Init8bitPalette (void)
if (QFGL_ExtensionPresent ("GL_EXT_shared_texture_palette")) {
if (!(qglColorTableEXT = QFGL_ExtensionAddress ("glColorTableEXT"))) {
Sys_MaskPrintf (SYS_VID, "glColorTableEXT not found.\n");
Sys_MaskPrintf (SYS_vid, "glColorTableEXT not found.\n");
return;
}
Sys_MaskPrintf (SYS_VID, "GL_EXT_shared_texture_palette\n");
Sys_MaskPrintf (SYS_vid, "GL_EXT_shared_texture_palette\n");
qfglEnable (GL_SHARED_TEXTURE_PALETTE_EXT);
oldPalette = (GLubyte *) d_8to24table; // d_8to24table3dfx;
@ -681,7 +681,7 @@ Shared_Init8bitPalette (void)
GL_UNSIGNED_BYTE, (GLvoid *) thePalette);
vr_data.vid->is8bit = true;
} else {
Sys_MaskPrintf (SYS_VID,
Sys_MaskPrintf (SYS_vid,
"\n GL_EXT_shared_texture_palette not found.");
}
}
@ -689,14 +689,14 @@ Shared_Init8bitPalette (void)
static void
VID_Init8bitPalette (void)
{
Sys_MaskPrintf (SYS_VID, "Checking for 8-bit extension: ");
Sys_MaskPrintf (SYS_vid, "Checking for 8-bit extension: ");
if (vid_use8bit->int_val) {
Tdfx_Init8bitPalette ();
Shared_Init8bitPalette ();
if (!vr_data.vid->is8bit)
Sys_MaskPrintf (SYS_VID, "\n 8-bit extension not found.\n");
Sys_MaskPrintf (SYS_vid, "\n 8-bit extension not found.\n");
} else {
Sys_MaskPrintf (SYS_VID, "disabled.\n");
Sys_MaskPrintf (SYS_vid, "disabled.\n");
}
}
@ -720,7 +720,7 @@ GL_SetPalette (const byte *palette)
VID_Init8bitPalette ();
}
// 8 8 8 encoding
Sys_MaskPrintf (SYS_VID, "Converting 8to24\n");
Sys_MaskPrintf (SYS_vid, "Converting 8to24\n");
pal = palette;
table = d_8to24table;

View file

@ -188,7 +188,7 @@ set_arrays (const shaderparam_t *vert, const shaderparam_t *norm,
{
byte *pose_offs = (byte *) pose;
if (developer->int_val & SYS_GLSL) {
if (developer->int_val & SYS_glsl) {
GLint size;
qfeglGetBufferParameteriv (GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &size);

View file

@ -639,7 +639,7 @@ glsl_R_BuildDisplayLists (model_t **models, int num_models)
}
}
clear_texture_chains ();
Sys_MaskPrintf (SYS_GLSL, "R_BuildDisplayLists: %ld verts total\n",
Sys_MaskPrintf (SYS_glsl, "R_BuildDisplayLists: %ld verts total\n",
(long) (vertices->size / sizeof (bspvert_t)));
if (!bsp_vbo)
qfeglGenBuffers (1, &bsp_vbo);
@ -1446,17 +1446,17 @@ glsl_R_LoadSkys (const char *sky)
for (i = 0; i < 6; i++) {
tex = LoadImage (name = va (0, "env/%s%s", sky, sky_suffix[i]), 1);
if (!tex || tex->format < 3) { // FIXME pcx support
Sys_MaskPrintf (SYS_GLSL, "Couldn't load %s\n", name);
Sys_MaskPrintf (SYS_glsl, "Couldn't load %s\n", name);
// also look in gfx/env, where Darkplaces looks for skies
tex = LoadImage (name = va (0, "gfx/env/%s%s", sky,
sky_suffix[i]), 1);
if (!tex || tex->format < 3) { // FIXME pcx support
Sys_MaskPrintf (SYS_GLSL, "Couldn't load %s\n", name);
Sys_MaskPrintf (SYS_glsl, "Couldn't load %s\n", name);
skybox_loaded = false;
continue;
}
}
Sys_MaskPrintf (SYS_GLSL, "Loaded %s\n", name);
Sys_MaskPrintf (SYS_glsl, "Loaded %s\n", name);
qfeglTexImage2D (GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0,
tex->format == 3 ? GL_RGB : GL_RGBA,
tex->width, tex->height, 0,

View file

@ -235,7 +235,7 @@ glsl_R_InitParticles (void)
qfeglEnable (GL_VERTEX_PROGRAM_POINT_SIZE);
qfeglGetFloatv (GL_ALIASED_POINT_SIZE_RANGE, v);
Sys_MaskPrintf (SYS_GLSL, "point size: %g - %g\n", v[0], v[1]);
Sys_MaskPrintf (SYS_glsl, "point size: %g - %g\n", v[0], v[1]);
vert_shader = GLSL_BuildShader (particle_point_vert_effects);
frag_shader = GLSL_BuildShader (particle_point_frag_effects);
@ -328,7 +328,7 @@ glsl_R_ReadPointFile_f (void)
return;
}
Sys_MaskPrintf (SYS_DEV, "Reading %s...\n", name);
Sys_MaskPrintf (SYS_dev, "Reading %s...\n", name);
c = 0;
for (;;) {
char buf[64];
@ -340,7 +340,7 @@ glsl_R_ReadPointFile_f (void)
c++;
if (numparticles >= r_maxparticles) {
Sys_MaskPrintf (SYS_DEV, "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,
@ -348,7 +348,7 @@ glsl_R_ReadPointFile_f (void)
}
}
Qclose (f);
Sys_MaskPrintf (SYS_DEV, "%i points read\n", c);
Sys_MaskPrintf (SYS_dev, "%i points read\n", c);
}
static void

View file

@ -273,7 +273,7 @@ void
GLSL_TextureInit (void)
{
qfeglGetIntegerv (GL_MAX_TEXTURE_SIZE, &max_tex_size);
Sys_MaskPrintf (SYS_GLSL, "max texture size: %d\n", max_tex_size);
Sys_MaskPrintf (SYS_glsl, "max texture size: %d\n", max_tex_size);
Cmd_AddCommand ("glsl_scraps", glsl_scraps_f, "Dump GLSL scrap stats");
}

View file

@ -78,7 +78,7 @@ GLSL_SetPalette (const byte *palette)
unsigned *table;
// 8 8 8 encoding
Sys_MaskPrintf (SYS_VID, "Converting 8to24\n");
Sys_MaskPrintf (SYS_vid, "Converting 8to24\n");
table = d_8to24table;
for (i = 0; i < 255; i++) { // used to be i<256, see d_8to24table below
@ -94,7 +94,7 @@ GLSL_SetPalette (const byte *palette)
}
d_8to24table[255] = 0; // 255 is transparent
Sys_MaskPrintf (SYS_VID, "Converting palette/colormap to RGBA textures\n");
Sys_MaskPrintf (SYS_vid, "Converting palette/colormap to RGBA textures\n");
pal = malloc (256 * VID_GRADES * 4);
for (i = 0, col = vr_data.vid->colormap8, op = pal; i < 256 * VID_GRADES;
i++) {
@ -152,7 +152,7 @@ GLSL_Init_Common (void)
GLSL_TextureInit ();
if (developer->int_val & SYS_GLSL) {
if (developer->int_val & SYS_glsl) {
GLint max;
qfeglGetIntegerv (GL_MAX_VERTEX_UNIFORM_VECTORS, &max);
@ -199,7 +199,7 @@ GLSL_CompileShader (const char *name, const shader_t *shader, int type)
qfeglShaderSource (sid, shader->num_strings, shader->strings, 0);
qfeglCompileShader (sid);
qfeglGetShaderiv (sid, GL_COMPILE_STATUS, &compiled);
if (!compiled || (developer->int_val & SYS_GLSL)) {
if (!compiled || (developer->int_val & SYS_glsl)) {
dstring_t *log = dstring_new ();
int size;
qfeglGetShaderiv (sid, GL_INFO_LOG_LENGTH, &size);
@ -322,7 +322,7 @@ GLSL_LinkProgram (const char *name, int vert, int frag)
qfeglLinkProgram (program);
qfeglGetProgramiv (program, GL_LINK_STATUS, &linked);
if (!linked || (developer->int_val & SYS_GLSL)) {
if (!linked || (developer->int_val & SYS_glsl)) {
dstring_t *log = dstring_new ();
int size;
qfeglGetProgramiv (program, GL_INFO_LOG_LENGTH, &size);
@ -337,7 +337,7 @@ GLSL_LinkProgram (const char *name, int vert, int frag)
if (!linked)
return 0;
}
if (developer->int_val & SYS_GLSL)
if (developer->int_val & SYS_glsl)
dump_program (name, program);
return program;
}
@ -354,7 +354,7 @@ GLSL_ResolveShaderParam (int program, shaderparam_t *param)
Sys_Printf ("could not resolve %s %s\n",
param->uniform ? "uniform" : "attribute", param->name);
} else {
Sys_MaskPrintf (SYS_GLSL, "Resolved %s %s @ %d\n",
Sys_MaskPrintf (SYS_glsl, "Resolved %s %s @ %d\n",
param->uniform ? "uniform" : "attribute",
param->name, param->location);
}

View file

@ -43,7 +43,7 @@ R_AliasGetSkindesc (int skinnum, aliashdr_t *ahdr)
maliasskingroup_t *paliasskingroup;
if ((skinnum >= ahdr->mdl.numskins) || (skinnum < 0)) {
Sys_MaskPrintf (SYS_DEV, "R_AliasSetupSkin: no such skin # %d\n",
Sys_MaskPrintf (SYS_dev, "R_AliasSetupSkin: no such skin # %d\n",
skinnum);
skinnum = 0;
}
@ -91,7 +91,7 @@ alias_get_frame (int framenum, aliashdr_t *hdr, float *frame_interval)
int i;
if ((framenum >= hdr->mdl.numframes) || (framenum < 0)) {
Sys_MaskPrintf (SYS_DEV, "R_AliasSetupFrame: no such frame %d\n",
Sys_MaskPrintf (SYS_dev, "R_AliasSetupFrame: no such frame %d\n",
framenum);
framenum = 0;
}

View file

@ -56,7 +56,7 @@ R_IQMGetLerpedFrames (entity_t *ent, iqm_t *iqm)
if (!iqm->num_anims)
return R_EntityBlend (ent, 0, 1.0 / 25.0);
if (frame >= iqm->num_anims || frame < 0) {
Sys_MaskPrintf (SYS_DEV, "R_IQMGetLerpedFrames: no such frame %d\n",
Sys_MaskPrintf (SYS_dev, "R_IQMGetLerpedFrames: no such frame %d\n",
frame);
frame = 0;
}

View file

@ -98,7 +98,7 @@ D_ClearCacheGuard (void)
void
D_InitCaches (void *buffer, int size)
{
Sys_MaskPrintf (SYS_DEV, "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

@ -486,7 +486,7 @@ Draw_Pic (int x, int y, qpic_t *pic)
if (x < 0 || (x + pic->width) > vid.conwidth
|| y < 0 || (y + pic->height) > vid.conheight) {
Sys_MaskPrintf (SYS_VID, "Draw_Pic: bad coordinates");
Sys_MaskPrintf (SYS_vid, "Draw_Pic: bad coordinates");
Draw_SubPic (x, y, pic, 0, 0, pic->width, pic->height);
return;
}
@ -545,7 +545,7 @@ Draw_SubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width,
if ((x < 0) || (x + width > vid.conwidth)
|| (y < 0) || (y + height > vid.conheight)) {
Sys_MaskPrintf (SYS_VID, "Draw_SubPic: bad coordinates");
Sys_MaskPrintf (SYS_vid, "Draw_SubPic: bad coordinates");
}
// first, clip to screen
if (x < 0) {
@ -761,7 +761,7 @@ Draw_Fill (int x, int y, int w, int h, int c)
if (x < 0 || x + w > vid.conwidth
|| y < 0 || y + h > vid.conheight) {
Sys_MaskPrintf (SYS_VID, "Bad Draw_Fill(%d, %d, %d, %d, %c)\n",
Sys_MaskPrintf (SYS_vid, "Bad Draw_Fill(%d, %d, %d, %d, %c)\n",
x, y, w, h, c);
}
CLIP (x, y, w, h, (int) vid.width, (int) vid.height);

View file

@ -107,7 +107,7 @@ R_AliasCheckBBox (void)
frame = currententity->animation.frame;
// TODO: don't repeat this check when drawing?
if ((frame >= pmdl->numframes) || (frame < 0)) {
Sys_MaskPrintf (SYS_DEV, "No such frame %d %s\n", frame, pmodel->path);
Sys_MaskPrintf (SYS_dev, "No such frame %d %s\n", frame, pmodel->path);
frame = 0;
}
@ -547,7 +547,7 @@ R_AliasSetupSkin (void)
skinnum = currententity->renderer.skinnum;
if ((skinnum >= pmdl->numskins) || (skinnum < 0)) {
Sys_MaskPrintf (SYS_DEV, "R_AliasSetupSkin: no such skin # %d\n",
Sys_MaskPrintf (SYS_dev, "R_AliasSetupSkin: no such skin # %d\n",
skinnum);
skinnum = 0;
}

View file

@ -107,7 +107,7 @@ D_ClearCacheGuard (void)
void
sw32_D_InitCaches (void *buffer, int size)
{
Sys_MaskPrintf (SYS_DEV, "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

@ -562,7 +562,7 @@ sw32_Draw_Pic (int x, int y, qpic_t *pic)
if (x < 0 || (x + pic->width) > vid.conwidth
|| y < 0 || (y + pic->height) > vid.conheight) {
Sys_MaskPrintf (SYS_VID, "Draw_Pic: bad coordinates");
Sys_MaskPrintf (SYS_vid, "Draw_Pic: bad coordinates");
sw32_Draw_SubPic (x, y, pic, 0, 0, pic->width, pic->height);
return;
}
@ -661,7 +661,7 @@ sw32_Draw_SubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width,
if ((x < 0) || (x + width > vid.conwidth)
|| (y < 0) || (y + height > vid.conheight)) {
Sys_MaskPrintf (SYS_VID, "Draw_SubPic: bad coordinates");
Sys_MaskPrintf (SYS_vid, "Draw_SubPic: bad coordinates");
}
// first, clip to screen
if (x < 0) {
@ -1176,7 +1176,7 @@ sw32_Draw_Fill (int x, int y, int w, int h, int c)
if (x < 0 || x + w > vid.conwidth
|| y < 0 || y + h > vid.conheight) {
Sys_MaskPrintf (SYS_VID, "Bad Draw_Fill(%d, %d, %d, %d, %c)\n",
Sys_MaskPrintf (SYS_vid, "Bad Draw_Fill(%d, %d, %d, %d, %c)\n",
x, y, w, h, c);
}
CLIP (x, y, w, h, (int) vid.width, (int) vid.height);

View file

@ -110,7 +110,7 @@ sw32_R_AliasCheckBBox (void)
frame = currententity->animation.frame;
// TODO: don't repeat this check when drawing?
if ((frame >= pmdl->numframes) || (frame < 0)) {
Sys_MaskPrintf (SYS_DEV, "No such frame %d %s\n", frame, pmodel->path);
Sys_MaskPrintf (SYS_dev, "No such frame %d %s\n", frame, pmodel->path);
frame = 0;
}
@ -548,7 +548,7 @@ R_AliasSetupSkin (void)
skinnum = currententity->renderer.skinnum;
if ((skinnum >= pmdl->numskins) || (skinnum < 0)) {
Sys_MaskPrintf (SYS_DEV, "R_AliasSetupSkin: no such skin # %d\n",
Sys_MaskPrintf (SYS_dev, "R_AliasSetupSkin: no such skin # %d\n",
skinnum);
skinnum = 0;
}

View file

@ -619,7 +619,7 @@ vulkan_vid_render_choose_visual (void)
cmdset);
vulkan_ctx->cmdbuffer = cmdset->a[0];
vulkan_ctx->fence = QFV_CreateFence (vulkan_ctx->device, 1);
Sys_MaskPrintf (SYS_VULKAN, "vk choose visual %p %p %d %p\n",
Sys_MaskPrintf (SYS_vulkan, "vk choose visual %p %p %d %p\n",
vulkan_ctx->device->dev, vulkan_ctx->device->queue.queue,
vulkan_ctx->device->queue.queueFamily,
vulkan_ctx->cmdpool);
@ -630,7 +630,7 @@ vulkan_vid_render_create_context (void)
{
vulkan_ctx->create_window (vulkan_ctx);
vulkan_ctx->surface = vulkan_ctx->create_surface (vulkan_ctx);
Sys_MaskPrintf (SYS_VULKAN, "vk create context %p\n", vulkan_ctx->surface);
Sys_MaskPrintf (SYS_vulkan, "vk create context %p\n", vulkan_ctx->surface);
}
static void

View file

@ -69,7 +69,7 @@ QFV_CreateCapture (qfv_device_t *device, int numframes,
}
if (!(format_props.optimalTilingFeatures
& VK_FORMAT_FEATURE_BLIT_SRC_BIT)) {
Sys_MaskPrintf (SYS_VULKAN,
Sys_MaskPrintf (SYS_vulkan,
"Device does not support blitting from optimal tiled "
"images.\n");
canBlit = 0;
@ -78,7 +78,7 @@ QFV_CreateCapture (qfv_device_t *device, int numframes,
&format_props);
if (!(format_props.linearTilingFeatures
& VK_FORMAT_FEATURE_BLIT_DST_BIT)) {
Sys_MaskPrintf (SYS_VULKAN,
Sys_MaskPrintf (SYS_vulkan,
"Device does not support blitting from optimal tiled "
"images.\n");
canBlit = 0;

View file

@ -115,10 +115,10 @@ load_device_funcs (qfv_instance_t *inst, qfv_device_t *dev)
if (!ext || dev->extension_enabled (dev, ext)) { \
dfunc->name = (PFN_##name) ifunc->vkGetDeviceProcAddr (device, #name); \
if (!dfunc->name) { \
Sys_MaskPrintf (SYS_VULKAN_PARSE, \
Sys_MaskPrintf (SYS_vulkan_parse, \
"Couldn't find device level function %s", #name); \
} else { \
Sys_MaskPrintf (SYS_VULKAN_PARSE, \
Sys_MaskPrintf (SYS_vulkan_parse, \
"Found device level function %s\n", #name); \
} \
}

View file

@ -92,7 +92,7 @@ get_instance_layers_and_extensions (vulkan_ctx_t *ctx)
strset_add (instanceExtensions, extensions[i].extensionName);
}
if (developer->int_val & SYS_VULKAN) {
if (developer->int_val & SYS_vulkan) {
for (i = 0; i < numLayers; i++) {
Sys_Printf ("%s %x %u %s\n",
layers[i].layerName,
@ -306,6 +306,6 @@ QFV_GetMaxSampleCount (qfv_physdev_t *physdev)
while (maxSamples && maxSamples > counts) {
maxSamples >>= 1;
}
Sys_MaskPrintf (SYS_VULKAN, "Max samples: %x (%d)\n", maxSamples, counts);
Sys_MaskPrintf (SYS_vulkan, "Max samples: %x (%d)\n", maxSamples, counts);
return maxSamples;
}

View file

@ -71,7 +71,7 @@ QFV_CreateRenderPass (qfv_device_t *device,
VkDevice dev = device->dev;
qfv_devfuncs_t *dfunc = device->funcs;
if (developer->int_val & SYS_VULKAN) {
if (developer->int_val & SYS_vulkan) {
Sys_Printf ("attachments: %zd\n", attachments->size);
for (size_t i = 0; i < attachments->size; i++) {
Sys_Printf (" attachment: %zd\n", i);

View file

@ -161,7 +161,7 @@ QFV_CreateShaderModule (qfv_device_t *device, const char *shader_path)
}
if (data) {
Sys_MaskPrintf (SYS_VULKAN,
Sys_MaskPrintf (SYS_vulkan,
"QFV_CreateShaderModule: creating shader module %s\n",
shader_path);
VkShaderModuleCreateInfo createInfo = {
@ -171,7 +171,7 @@ QFV_CreateShaderModule (qfv_device_t *device, const char *shader_path)
dfunc->vkCreateShaderModule (dev, &createInfo, 0, &shader);
} else {
Sys_MaskPrintf (SYS_VULKAN,
Sys_MaskPrintf (SYS_vulkan,
"QFV_CreateShaderModule: could not find shader %s\n",
shader_path);
}

View file

@ -56,7 +56,7 @@ QFV_CreateSwapchain (vulkan_ctx_t *ctx, VkSwapchainKHR old_swapchain)
useMode = modes[i];
}
}
Sys_MaskPrintf (SYS_VULKAN, "presentation mode: %d (%d)\n", useMode,
Sys_MaskPrintf (SYS_vulkan, "presentation mode: %d (%d)\n", useMode,
vulkan_presentation_mode->int_val);
VkSurfaceCapabilitiesKHR surfCaps;
@ -79,13 +79,13 @@ QFV_CreateSwapchain (vulkan_ctx_t *ctx, VkSwapchainKHR old_swapchain)
} else {
imageSize = surfCaps.currentExtent;
}
Sys_MaskPrintf (SYS_VULKAN, "%d [%d, %d]\n", numImages,
Sys_MaskPrintf (SYS_vulkan, "%d [%d, %d]\n", numImages,
imageSize.width, imageSize.height);
VkImageUsageFlags imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
imageUsage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
imageUsage &= surfCaps.supportedUsageFlags;
Sys_MaskPrintf (SYS_VULKAN, "%x %x\n", imageUsage,
Sys_MaskPrintf (SYS_vulkan, "%x %x\n", imageUsage,
surfCaps.supportedUsageFlags);
VkSurfaceTransformFlagBitsKHR surfTransform

View file

@ -159,7 +159,7 @@ parse_basic (const plfield_t *field, const plitem_t *item,
ectx.symtab = 0;
ectx.result = &result;
const char *valstr = PL_String (item);
//Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_basic: %s %zd %d %p %p: %s\n",
//Sys_MaskPrintf (SYS_vulkan_parse, "parse_basic: %s %zd %d %p %p: %s\n",
// field->name, field->offset, field->type, field->parser,
// field->data, valstr);
if (strcmp (valstr, "VK_SUBPASS_EXTERNAL") == 0) {
@ -172,7 +172,7 @@ parse_basic (const plfield_t *field, const plitem_t *item,
field->name, valstr);
}
}
//Sys_MaskPrintf (SYS_VULKAN_PARSE, " %x\n", *(uint32_t *)data);
//Sys_MaskPrintf (SYS_vulkan_parse, " %x\n", *(uint32_t *)data);
return ret;
}
@ -190,14 +190,14 @@ parse_uint32_t (const plfield_t *field, const plitem_t *item,
ectx.symtab = 0;
ectx.result = &result;
const char *valstr = PL_String (item);
//Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_uint32_t: %s %zd %d %p %p: %s\n",
//Sys_MaskPrintf (SYS_vulkan_parse, "parse_uint32_t: %s %zd %d %p %p: %s\n",
// field->name, field->offset, field->type, field->parser,
// field->data, valstr);
if (strcmp (valstr, "VK_SUBPASS_EXTERNAL") == 0) {
//FIXME handle subpass in a separate parser?
*(uint32_t *) data = VK_SUBPASS_EXTERNAL;
} else {
//Sys_MaskPrintf (SYS_VULKAN_PARSE,
//Sys_MaskPrintf (SYS_vulkan_parse,
// "parse_uint32_t: %s %zd %d %p %p %s\n",
// field->name, field->offset, field->type, field->parser,
// field->data, valstr);
@ -207,7 +207,7 @@ parse_uint32_t (const plfield_t *field, const plitem_t *item,
field->name, valstr);
}
*(uint32_t *) data = val;
//Sys_MaskPrintf (SYS_VULKAN_PARSE, " %d\n", *(uint32_t *)data);
//Sys_MaskPrintf (SYS_vulkan_parse, " %d\n", *(uint32_t *)data);
}
return ret;
@ -224,14 +224,14 @@ parse_enum (const plfield_t *field, const plitem_t *item,
ectx.symtab = enm->symtab;
ectx.result = &result;
const char *valstr = PL_String (item);
//Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_enum: %s %zd %d %p %p %s\n",
//Sys_MaskPrintf (SYS_vulkan_parse, "parse_enum: %s %zd %d %p %p %s\n",
// field->name, field->offset, field->type, field->parser,
// field->data, valstr);
ret = !cexpr_parse_enum (enm, valstr, &ectx, data);
if (!ret) {
PL_Message (messages, item, "error parsing enum: %s", valstr);
}
//Sys_MaskPrintf (SYS_VULKAN_PARSE, " %d\n", *(int *)data);
//Sys_MaskPrintf (SYS_vulkan_parse, " %d\n", *(int *)data);
return ret;
}
@ -266,7 +266,7 @@ parse_single (const plfield_t *field, const plitem_t *item,
__auto_type single = (parse_single_t *) field->data;
void *flddata = (byte *)data + single->value_offset;
//Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_single: %s %zd %d %p %p\n",
//Sys_MaskPrintf (SYS_vulkan_parse, "parse_single: %s %zd %d %p %p\n",
// field->name, field->offset,
// field->type, field->parser, field->data);
@ -307,10 +307,10 @@ parse_array (const plfield_t *field, const plitem_t *item,
typedef struct arr_s DARRAY_TYPE(byte) arr_t;
arr_t *arr;
//Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_array: %s %zd %d %p %p %p\n",
//Sys_MaskPrintf (SYS_vulkan_parse, "parse_array: %s %zd %d %p %p %p\n",
// field->name, field->offset, field->type, field->parser,
// field->data, data);
//Sys_MaskPrintf (SYS_VULKAN_PARSE, " %d %zd %p %zd %zd\n", array->type,
//Sys_MaskPrintf (SYS_vulkan_parse, " %d %zd %p %zd %zd\n", array->type,
// array->stride, array->parser, array->value_offset,
// array->size_offset);
if (!PL_ParseArray (&f, item, &arr, messages, context)) {
@ -335,12 +335,12 @@ parse_data (const plfield_t *field, const plitem_t *item,
const void *bindata = PL_BinaryData (item);
size_t binsize = PL_BinarySize (item);
Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_data: %s %zd %d %p %p %p\n",
Sys_MaskPrintf (SYS_vulkan_parse, "parse_data: %s %zd %d %p %p %p\n",
field->name, field->offset, field->type, field->parser,
field->data, data);
Sys_MaskPrintf (SYS_VULKAN_PARSE, " %zd %zd\n", datad->value_offset,
Sys_MaskPrintf (SYS_vulkan_parse, " %zd %zd\n", datad->value_offset,
datad->size_offset);
Sys_MaskPrintf (SYS_VULKAN_PARSE, " %zd %p\n", binsize, bindata);
Sys_MaskPrintf (SYS_vulkan_parse, " %zd %p\n", binsize, bindata);
*value = vkparse_alloc (context, binsize);
memcpy (*value, bindata, binsize);
@ -359,11 +359,11 @@ parse_string (const plfield_t *field, const plitem_t *item,
const char *str = PL_String (item);
//Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_string: %s %zd %d %p %p %p\n",
//Sys_MaskPrintf (SYS_vulkan_parse, "parse_string: %s %zd %d %p %p %p\n",
// field->name, field->offset, field->type, field->parser,
// field->data, data);
//Sys_MaskPrintf (SYS_VULKAN_PARSE, " %zd\n", string->value_offset);
//Sys_MaskPrintf (SYS_VULKAN_PARSE, " %s\n", str);
//Sys_MaskPrintf (SYS_vulkan_parse, " %zd\n", string->value_offset);
//Sys_MaskPrintf (SYS_vulkan_parse, " %s\n", str);
size_t len = strlen (str) + 1;
*value = vkparse_alloc (context, len);
@ -393,9 +393,9 @@ parse_RGBA (const plitem_t *item, void **data,
ectx.symtab = 0;
ectx.result = &result;
const char *valstr = PL_String (item);
Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_RGBA: %s\n", valstr);
Sys_MaskPrintf (SYS_vulkan_parse, "parse_RGBA: %s\n", valstr);
ret = !cexpr_eval_string (valstr, &ectx);
Sys_MaskPrintf (SYS_VULKAN_PARSE, " "VEC4F_FMT"\n",
Sys_MaskPrintf (SYS_vulkan_parse, " "VEC4F_FMT"\n",
VEC4_EXP (*(vec4f_t *)data[0]));
return ret;
}
@ -430,7 +430,7 @@ parse_VkRenderPass (const plitem_t *item, void **data,
vulkan_ctx_t *ctx = pctx->vctx;
const char *name = PL_String (item);
Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_VkRenderPass: %s\n", name);
Sys_MaskPrintf (SYS_vulkan_parse, "parse_VkRenderPass: %s\n", name);
if (name[0] != '$') {
name = va (ctx->va_ctx, "$"QFV_PROPERTIES".%s", name);
}
@ -487,7 +487,7 @@ parse_VkDescriptorSetLayout (const plfield_t *field, const plitem_t *item,
vulkan_ctx_t *ctx = pctx->vctx;
const char *name = PL_String (item);
Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_VkDescriptorSetLayout: %s\n",
Sys_MaskPrintf (SYS_vulkan_parse, "parse_VkDescriptorSetLayout: %s\n",
name);
if (name[0] != '$') {
name = va (ctx->va_ctx, "$"QFV_PROPERTIES".setLayouts.%s", name);
@ -524,7 +524,7 @@ parse_VkPipelineLayout (const plitem_t *item, void **data,
vulkan_ctx_t *ctx = context->vctx;
const char *name = PL_String (item);
Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_VkPipelineLayout: %s\n", name);
Sys_MaskPrintf (SYS_vulkan_parse, "parse_VkPipelineLayout: %s\n", name);
if (name[0] != '$') {
name = va (ctx->va_ctx, "$"QFV_PROPERTIES".pipelineLayouts.%s", name);
}
@ -559,7 +559,7 @@ parse_VkImage (const plitem_t *item, void **data, plitem_t *messages,
vulkan_ctx_t *ctx = context->vctx;
const char *name = PL_String (item);
Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_VkImage: %s\n", name);
Sys_MaskPrintf (SYS_vulkan_parse, "parse_VkImage: %s\n", name);
if (name[0] != '$') {
name = va (ctx->va_ctx, "$"QFV_PROPERTIES".images.%s", name);
}
@ -601,7 +601,7 @@ parse_VkImageView (const plfield_t *field, const plitem_t *item, void *data,
vulkan_ctx_t *ctx = context->vctx;
const char *name = PL_String (item);
Sys_MaskPrintf (SYS_VULKAN_PARSE, "parse_VkImageView: %s\n", name);
Sys_MaskPrintf (SYS_vulkan_parse, "parse_VkImageView: %s\n", name);
if (name[0] != '$') {
name = va (ctx->va_ctx, "$"QFV_PROPERTIES".imageViews.%s", name);
}
@ -986,7 +986,7 @@ parse_object (vulkan_ctx_t *ctx, memsuper_t *memsuper, plitem_t *plist,
if (!parser (0, plist, object, messages, &parsectx)) {
for (int i = 0; i < PL_A_NumObjects (messages); i++) {
Sys_MaskPrintf (SYS_VULKAN_PARSE, "%s\n",
Sys_MaskPrintf (SYS_vulkan_parse, "%s\n",
PL_String (PL_ObjectAtIndex (messages, i)));
}
return 0;
@ -1270,7 +1270,7 @@ QFV_ParseImageSet (vulkan_ctx_t *ctx, plitem_t *item, plitem_t *properties)
return 0;
}
} else {
Sys_MaskPrintf (SYS_VULKAN_PARSE, "Neither array nor dictionary: %d\n",
Sys_MaskPrintf (SYS_vulkan_parse, "Neither array nor dictionary: %d\n",
PL_Line (item));
delete_memsuper (memsuper);
return 0;
@ -1345,7 +1345,7 @@ QFV_ParseFramebuffer (vulkan_ctx_t *ctx, plitem_t *plist, plitem_t *properties)
VkFramebuffer framebuffer;
dfunc->vkCreateFramebuffer (device->dev, &cInfo, 0, &framebuffer);
Sys_MaskPrintf (SYS_VULKAN_PARSE, "framebuffer, renderPass: %p, %p\n",
Sys_MaskPrintf (SYS_vulkan_parse, "framebuffer, renderPass: %p, %p\n",
framebuffer, cInfo.renderPass);
delete_memsuper (memsuper);

View file

@ -523,7 +523,7 @@ Vulkan_BuildDisplayLists (model_t **models, int num_models, vulkan_ctx_t *ctx)
}
}
clear_texture_chains (bctx);
Sys_MaskPrintf (SYS_VULKAN,
Sys_MaskPrintf (SYS_vulkan,
"R_BuildDisplayLists: verts:%u, inds:%u, polys:%u (%d) %zd\n",
vertex_count, index_count, poly_count, count,
((size_t) poly - (size_t) bctx->polys)/sizeof(uint32_t));
@ -1620,7 +1620,7 @@ Vulkan_LoadSkys (const char *sky, vulkan_ctx_t *ctx)
}
if (!*sky || !strcasecmp (sky, "none")) {
Sys_MaskPrintf (SYS_VULKAN, "Skybox unloaded\n");
Sys_MaskPrintf (SYS_vulkan, "Skybox unloaded\n");
return;
}
@ -1628,7 +1628,7 @@ Vulkan_LoadSkys (const char *sky, vulkan_ctx_t *ctx)
tex = LoadImage (name, 1);
if (tex) {
bctx->skybox_tex = Vulkan_LoadEnvMap (ctx, tex, sky);
Sys_MaskPrintf (SYS_VULKAN, "Loaded %s\n", name);
Sys_MaskPrintf (SYS_vulkan, "Loaded %s\n", name);
} else {
int failed = 0;
tex_t *sides[6] = { };
@ -1637,24 +1637,24 @@ Vulkan_LoadSkys (const char *sky, vulkan_ctx_t *ctx)
name = va (ctx->va_ctx, "env/%s%s", sky, sky_suffix[i]);
tex = LoadImage (name, 1);
if (!tex) {
Sys_MaskPrintf (SYS_VULKAN, "Couldn't load %s\n", name);
Sys_MaskPrintf (SYS_vulkan, "Couldn't load %s\n", name);
// also look in gfx/env, where Darkplaces looks for skies
name = va (ctx->va_ctx, "gfx/env/%s%s", sky, sky_suffix[i]);
tex = LoadImage (name, 1);
if (!tex) {
Sys_MaskPrintf (SYS_VULKAN, "Couldn't load %s\n", name);
Sys_MaskPrintf (SYS_vulkan, "Couldn't load %s\n", name);
failed = 1;
continue;
}
}
sides[i] = tex;
Sys_MaskPrintf (SYS_VULKAN, "Loaded %s\n", name);
Sys_MaskPrintf (SYS_vulkan, "Loaded %s\n", name);
}
if (!failed) {
bctx->skybox_tex = Vulkan_LoadEnvSides (ctx, sides, sky);
}
}
if (bctx->skybox_tex) {
Sys_MaskPrintf (SYS_VULKAN, "Skybox %s loaded\n", sky);
Sys_MaskPrintf (SYS_vulkan, "Skybox %s loaded\n", sky);
}
}

View file

@ -481,7 +481,7 @@ Vulkan_LoadLights (model_t *model, const char *entity_data, vulkan_ctx_t *ctx)
mleaf_t *leaf = Mod_PointInLeaf (&light.position[0],
model);
DARRAY_APPEND (&lctx->lightleafs, leaf - model->brush.leafs);
Sys_MaskPrintf (SYS_VULKAN,
Sys_MaskPrintf (SYS_vulkan,
"[%g, %g, %g] %d, "
"[%g %g %g] %g, [%g %g %g] %g, %zd\n",
VectorExpand (light.color), light.data,
@ -502,5 +502,5 @@ Vulkan_LoadLights (model_t *model, const char *entity_data, vulkan_ctx_t *ctx)
PL_Free (targets);
PL_Free (entities);
}
Sys_MaskPrintf (SYS_VULKAN, "loaded %zd lights\n", lctx->lights.size);
Sys_MaskPrintf (SYS_vulkan, "loaded %zd lights\n", lctx->lights.size);
}

View file

@ -176,23 +176,23 @@ Vulkan_CalcProjectionMatrices (vulkan_ctx_t *ctx, float aspect)
ortho_mat (mat->projection_2d, 0, width, 0, height, -99999, 99999);
persp_mat (mat->projection_3d, 0, width, 0, height, aspect);
#if 0
Sys_MaskPrintf (SYS_VULKAN, "ortho:\n");
Sys_MaskPrintf (SYS_VULKAN, " [[%g, %g, %g, %g],\n",
Sys_MaskPrintf (SYS_vulkan, "ortho:\n");
Sys_MaskPrintf (SYS_vulkan, " [[%g, %g, %g, %g],\n",
QuatExpand (mat->projection_2d + 0));
Sys_MaskPrintf (SYS_VULKAN, " [%g, %g, %g, %g],\n",
Sys_MaskPrintf (SYS_vulkan, " [%g, %g, %g, %g],\n",
QuatExpand (mat->projection_2d + 4));
Sys_MaskPrintf (SYS_VULKAN, " [%g, %g, %g, %g],\n",
Sys_MaskPrintf (SYS_vulkan, " [%g, %g, %g, %g],\n",
QuatExpand (mat->projection_2d + 8));
Sys_MaskPrintf (SYS_VULKAN, " [%g, %g, %g, %g]]\n",
Sys_MaskPrintf (SYS_vulkan, " [%g, %g, %g, %g]]\n",
QuatExpand (mat->projection_2d + 12));
Sys_MaskPrintf (SYS_VULKAN, "presp:\n");
Sys_MaskPrintf (SYS_VULKAN, " [[%g, %g, %g, %g],\n",
Sys_MaskPrintf (SYS_vulkan, "presp:\n");
Sys_MaskPrintf (SYS_vulkan, " [[%g, %g, %g, %g],\n",
QuatExpand (mat->projection_3d + 0));
Sys_MaskPrintf (SYS_VULKAN, " [%g, %g, %g, %g],\n",
Sys_MaskPrintf (SYS_vulkan, " [%g, %g, %g, %g],\n",
QuatExpand (mat->projection_3d + 4));
Sys_MaskPrintf (SYS_VULKAN, " [%g, %g, %g, %g],\n",
Sys_MaskPrintf (SYS_vulkan, " [%g, %g, %g, %g],\n",
QuatExpand (mat->projection_3d + 8));
Sys_MaskPrintf (SYS_VULKAN, " [%g, %g, %g, %g]]\n",
Sys_MaskPrintf (SYS_vulkan, " [%g, %g, %g, %g]]\n",
QuatExpand (mat->projection_3d + 12));
#endif
VkMappedMemoryRange ranges[] = {

View file

@ -167,7 +167,7 @@ static const char *device_extensions[] = {
void
Vulkan_Init_Common (vulkan_ctx_t *ctx)
{
Sys_MaskPrintf (SYS_VULKAN, "Vulkan_Init_Common\n");
Sys_MaskPrintf (SYS_vulkan, "Vulkan_Init_Common\n");
QFV_InitParse (ctx);
Vulkan_Init_Cvars ();
@ -267,7 +267,7 @@ qfv_load_pipeline (vulkan_ctx_t *ctx, const char *name)
if (!item || !(item = PL_ObjectForKey (item, name))) {
Sys_Printf ("error loading %s\n", name);
} else {
Sys_MaskPrintf (SYS_VULKAN_PARSE, "Found %s def\n", name);
Sys_MaskPrintf (SYS_vulkan_parse, "Found %s def\n", name);
}
return item;
}
@ -284,7 +284,7 @@ qfv_load_renderpass (vulkan_ctx_t *ctx, const char *name)
if (!item || !(item = PL_ObjectForKey (item, name))) {
Sys_Printf ("error loading %s\n", name);
} else {
Sys_MaskPrintf (SYS_VULKAN_PARSE, "Found %s def\n", name);
Sys_MaskPrintf (SYS_vulkan_parse, "Found %s def\n", name);
}
return item;
}
@ -396,7 +396,7 @@ Vulkan_CreatePipeline (vulkan_ctx_t *ctx, const char *name)
Sys_Printf ("error loading pipeline %s\n", name);
return 0;
} else {
Sys_MaskPrintf (SYS_VULKAN_PARSE, "Found pipeline def %s\n", name);
Sys_MaskPrintf (SYS_vulkan_parse, "Found pipeline def %s\n", name);
}
VkPipeline pipeline = QFV_ParsePipeline (ctx, item, ctx->pipelineDef);
QFV_duSetObjectName (ctx->device, VK_OBJECT_TYPE_PIPELINE, pipeline,
@ -420,7 +420,7 @@ Vulkan_CreateDescriptorPool (vulkan_ctx_t *ctx, const char *name)
Sys_Printf ("error loading descriptor pool %s\n", name);
return 0;
} else {
Sys_MaskPrintf (SYS_VULKAN_PARSE, "Found descriptor pool def %s\n",
Sys_MaskPrintf (SYS_vulkan_parse, "Found descriptor pool def %s\n",
name);
}
pool = QFV_ParseDescriptorPool (ctx, item, ctx->pipelineDef);
@ -446,7 +446,7 @@ Vulkan_CreatePipelineLayout (vulkan_ctx_t *ctx, const char *name)
Sys_Printf ("error loading pipeline layout %s\n", name);
return 0;
} else {
Sys_MaskPrintf (SYS_VULKAN_PARSE, "Found pipeline layout def %s\n",
Sys_MaskPrintf (SYS_vulkan_parse, "Found pipeline layout def %s\n",
name);
}
layout = QFV_ParsePipelineLayout (ctx, item, ctx->pipelineDef);
@ -472,7 +472,7 @@ Vulkan_CreateSampler (vulkan_ctx_t *ctx, const char *name)
Sys_Printf ("error loading sampler %s\n", name);
return 0;
} else {
Sys_MaskPrintf (SYS_VULKAN_PARSE, "Found sampler def %s\n", name);
Sys_MaskPrintf (SYS_vulkan_parse, "Found sampler def %s\n", name);
}
sampler = QFV_ParseSampler (ctx, item, ctx->pipelineDef);
QFV_AddHandle (tab, path, (uint64_t) sampler);
@ -497,7 +497,7 @@ Vulkan_CreateDescriptorSetLayout(vulkan_ctx_t *ctx, const char *name)
Sys_Printf ("error loading descriptor set %s\n", name);
return 0;
} else {
Sys_MaskPrintf (SYS_VULKAN_PARSE, "Found descriptor set def %s\n",
Sys_MaskPrintf (SYS_vulkan_parse, "Found descriptor set def %s\n",
name);
}
set = QFV_ParseDescriptorSetLayout (ctx, item, ctx->pipelineDef);

View file

@ -162,7 +162,7 @@ configure_notify (XEvent *event)
if (vidmode_active)
X11_ForceViewPort ();
#endif
Sys_MaskPrintf (SYS_VID,
Sys_MaskPrintf (SYS_vid,
"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,
@ -174,7 +174,7 @@ qboolean
X11_AddEvent (int event, void (*event_handler) (XEvent *))
{
if (event >= LASTEvent) {
Sys_MaskPrintf (SYS_VID, "event: %d, LASTEvent: %d\n", event,
Sys_MaskPrintf (SYS_vid, "event: %d, LASTEvent: %d\n", event,
LASTEvent);
return false;
}
@ -440,7 +440,7 @@ X11_SetVidMode (int width, int height)
&vidmodes);
XF86VidModeGetModeLine (x_disp, x_screen, &dotclock, &orig_data);
Sys_MaskPrintf (SYS_VID, "VID: %d modes\n", nummodes);
Sys_MaskPrintf (SYS_vid, "VID: %d modes\n", nummodes);
original_mode = -1;
for (i = 0; i < nummodes; i++) {
if (original_mode == -1
@ -448,7 +448,7 @@ X11_SetVidMode (int width, int height)
(vidmodes[i]->vdisplay == orig_data.vdisplay)) {
original_mode = i;
}
if (developer->int_val & SYS_VID) {
if (developer->int_val & SYS_vid) {
Sys_Printf ("VID:%c%dx%d\n",
original_mode == i ? '*' : ' ',
vidmodes[i]->hdisplay, vidmodes[i]->vdisplay);
@ -470,7 +470,7 @@ X11_SetVidMode (int width, int height)
}
if (found_mode) {
Sys_MaskPrintf (SYS_VID, "VID: Chose video mode: %dx%d\n",
Sys_MaskPrintf (SYS_vid, "VID: Chose video mode: %dx%d\n",
viddef.width, viddef.height);
if (0) {

View file

@ -94,11 +94,11 @@ VID_CheckDGA (Display * dpy, int *maj_ver, int *min_ver, int *hasvideo)
}
if ((!maj_ver) || (*maj_ver != XDGA_MAJOR_VERSION)) {
Sys_MaskPrintf (SYS_VID, "VID: Incorrect DGA version: %d.%d, \n",
Sys_MaskPrintf (SYS_vid, "VID: Incorrect DGA version: %d.%d, \n",
*maj_ver, *min_ver);
return false;
}
Sys_MaskPrintf (SYS_VID, "VID: DGA version: %d.%d\n", *maj_ver, *min_ver);
Sys_MaskPrintf (SYS_vid, "VID: DGA version: %d.%d\n", *maj_ver, *min_ver);
if (!hasvideo)
hasvideo = &dummy_video;
@ -148,12 +148,12 @@ VID_CheckVMode (Display * dpy, int *maj_ver, int *min_ver)
return false;
if ((!maj_ver) || (*maj_ver != XF86VIDMODE_MAJOR_VERSION)) {
Sys_MaskPrintf (SYS_VID, "VID: Incorrect VidMode version: %d.%d\n",
Sys_MaskPrintf (SYS_vid, "VID: Incorrect VidMode version: %d.%d\n",
*maj_ver, *min_ver);
return false;
}
Sys_MaskPrintf (SYS_VID, "VID: VidMode version: %d.%d\n",
Sys_MaskPrintf (SYS_vid, "VID: VidMode version: %d.%d\n",
*maj_ver, *min_ver);
return true;
#else

View file

@ -133,7 +133,7 @@ IN_shutdown (void *data)
{
JOY_Shutdown ();
Sys_MaskPrintf (SYS_VID, "IN_Shutdown\n");
Sys_MaskPrintf (SYS_vid, "IN_Shutdown\n");
IN_LL_Shutdown ();
IE_Shutdown ();

View file

@ -112,7 +112,7 @@ keyhandler (int scancode, int state)
default:
break;
}
//Sys_MaskPrintf (SYS_VID, "%d %02x %02lx %04x %c\n", sc, press, shifts,
//Sys_MaskPrintf (SYS_vid, "%d %02x %02lx %04x %c\n", sc, press, shifts,
// key, ascii > 32 && ascii < 127 ? ascii : '#');
Key_Event (key, ascii, press);
}
@ -383,14 +383,14 @@ IN_InitMouse (void)
mouserate = atoi (com_argv[COM_CheckParm ("-mrate") + 1]);
}
#if 0
Sys_MaskPrintf (SYS_VID, "Mouse: dev=%s,type=%s,speed=%d\n",
Sys_MaskPrintf (SYS_vid, "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_MaskPrintf (SYS_VID,
Sys_MaskPrintf (SYS_vid,
"No mouse found. Check your libvga.conf mouse settings"
" and that the mouse\n"
"device has appropriate permission settings.\n");
@ -404,7 +404,7 @@ IN_InitMouse (void)
void
IN_LL_Shutdown (void)
{
Sys_MaskPrintf (SYS_VID, "IN_LL_Shutdown\n");
Sys_MaskPrintf (SYS_vid, "IN_LL_Shutdown\n");
if (UseMouse)
mouse_close ();

View file

@ -688,7 +688,7 @@ MapKey (unsigned int keycode, int press, int *k, int *u)
break;
}
Sys_MaskPrintf (SYS_VID, "%08x %d %02x %02lx %04x %c\n",
Sys_MaskPrintf (SYS_vid, "%08x %d %02x %02lx %04x %c\n",
keycode, press, scan, shifts,
key, uc > 32 && uc < 127 ? uc : '#');
*k = key;

View file

@ -95,7 +95,7 @@ dga_on (void)
int ret;
ret = XF86DGADirectVideo (x_disp, DefaultScreen (x_disp),
XF86DGADirectMouse);
Sys_MaskPrintf (SYS_VID, "XF86DGADirectVideo returned %d\n", ret);
Sys_MaskPrintf (SYS_vid, "XF86DGADirectVideo returned %d\n", ret);
if (ret)
dga_active = true;
}
@ -109,7 +109,7 @@ dga_off (void)
if (dga_avail && dga_active) {
int ret;
ret = XF86DGADirectVideo (x_disp, DefaultScreen (x_disp), 0);
Sys_MaskPrintf (SYS_VID, "XF86DGADirectVideo returned %d\n", ret);
Sys_MaskPrintf (SYS_vid, "XF86DGADirectVideo returned %d\n", ret);
if (ret)
dga_active = false;
}
@ -120,10 +120,10 @@ static void
in_dga_f (cvar_t *var)
{
if (var->int_val && input_grabbed) {
Sys_MaskPrintf (SYS_VID, "VID: in_dga_f on\n");
Sys_MaskPrintf (SYS_vid, "VID: in_dga_f on\n");
dga_on ();
} else {
Sys_MaskPrintf (SYS_VID, "VID: in_dga_f off\n");
Sys_MaskPrintf (SYS_vid, "VID: in_dga_f off\n");
dga_off ();
}
}
@ -789,7 +789,7 @@ IN_LL_ProcessEvents (void)
void
IN_LL_Shutdown (void)
{
Sys_MaskPrintf (SYS_VID, "IN_LL_Shutdown\n");
Sys_MaskPrintf (SYS_vid, "IN_LL_Shutdown\n");
in_mouse_avail = 0;
if (x_disp) {
// XAutoRepeatOn (x_disp);
@ -833,7 +833,7 @@ IN_LL_Init (void)
if (!COM_CheckParm ("-nomouse")) {
dga_avail = VID_CheckDGA (x_disp, NULL, NULL, NULL);
Sys_MaskPrintf (SYS_VID, "VID_CheckDGA returned %d\n", dga_avail);
Sys_MaskPrintf (SYS_vid, "VID_CheckDGA returned %d\n", dga_avail);
X11_AddEvent (ButtonPress, &event_button);
X11_AddEvent (ButtonRelease, &event_button);

View file

@ -156,7 +156,7 @@ JOY_Init (void)
int i;
if (JOY_Open () == -1) {
Sys_MaskPrintf (SYS_VID, "JOY: Joystick not found.\n");
Sys_MaskPrintf (SYS_vid, "JOY: Joystick not found.\n");
joy_found = false;
joy_active = false;
return;
@ -165,12 +165,12 @@ JOY_Init (void)
joy_found = true;
if (!joy_enable->int_val) {
Sys_MaskPrintf (SYS_VID, "JOY: Joystick found, but not enabled.\n");
Sys_MaskPrintf (SYS_vid, "JOY: Joystick found, but not enabled.\n");
joy_active = false;
JOY_Close ();
}
Sys_MaskPrintf (SYS_VID, "JOY: Joystick found and activated.\n");
Sys_MaskPrintf (SYS_vid, "JOY: Joystick found and activated.\n");
// Initialize joystick if found and enabled
for (i = 0; i < JOY_MAX_BUTTONS; i++) {

View file

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

View file

@ -211,7 +211,7 @@ VID_UpdateGamma (cvar_t *vid_gamma)
viddef.recalc_refdef = 1; // force a surface cache flush
if (vid_gamma_avail && vid_system_gamma->int_val) { // Have system, use it
Sys_MaskPrintf (SYS_VID, "Setting hardware gamma to %g\n", gamma);
Sys_MaskPrintf (SYS_vid, "Setting hardware gamma to %g\n", gamma);
VID_BuildGammaTable (1.0); // hardware gamma wants a linear palette
VID_SetGamma (gamma);
p24 = viddef.palette;
@ -225,7 +225,7 @@ VID_UpdateGamma (cvar_t *vid_gamma)
}
p32[-1] = 0; // color 255 is transparent
} else { // We have to hack the palette
Sys_MaskPrintf (SYS_VID, "Setting software gamma to %g\n", gamma);
Sys_MaskPrintf (SYS_vid, "Setting software gamma to %g\n", gamma);
VID_BuildGammaTable (gamma);
p24 = viddef.palette;
p32 = viddef.palette32;

View file

@ -173,20 +173,20 @@ GL_Init (void)
if (!(dither_select = QFGL_ExtensionAddress ("gl3DfxSetDitherModeEXT")))
return;
Sys_MaskPrintf (SYS_VID, "Dithering: ");
Sys_MaskPrintf (SYS_vid, "Dithering: ");
if ((p = COM_CheckParm ("-dither")) && p < com_argc) {
if (strequal (com_argv[p+1], "2x2")) {
dither_select (GR_DITHER_2x2);
Sys_MaskPrintf (SYS_VID, "2x2.\n");
Sys_MaskPrintf (SYS_vid, "2x2.\n");
}
if (strequal (com_argv[p+1], "4x4")) {
dither_select (GR_DITHER_4x4);
Sys_MaskPrintf (SYS_VID, "4x4.\n");
Sys_MaskPrintf (SYS_vid, "4x4.\n");
}
} else {
qfglDisable (GL_DITHER);
Sys_MaskPrintf (SYS_VID, "disabled.\n");
Sys_MaskPrintf (SYS_vid, "disabled.\n");
}
}
@ -322,7 +322,7 @@ VID_Init (byte *palette, byte *colormap)
vid.initialized = true;
Sys_MaskPrintf (SYS_VID, "Video mode %dx%d initialized.\n",
Sys_MaskPrintf (SYS_vid, "Video mode %dx%d initialized.\n",
vid.width, vid.height);
vid.recalc_refdef = 1; // force a surface cache flush

View file

@ -212,7 +212,7 @@ static struct fb_var_screeninfo orig_var;
static void
VID_shutdown (void)
{
Sys_MaskPrintf (SYS_VID, "VID_Shutdown\n");
Sys_MaskPrintf (SYS_vid, "VID_Shutdown\n");
if (!fbdev_inited)
return;

View file

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

View file

@ -242,7 +242,7 @@ get_mode (int width, int height, int depth)
static void
VID_shutdown (void)
{
Sys_MaskPrintf (SYS_VID, "VID_Shutdown\n");
Sys_MaskPrintf (SYS_vid, "VID_Shutdown\n");
if (!svgalib_inited)
return;

View file

@ -123,7 +123,7 @@ D_EndDirectRect (int x, int y, int width, int height)
static void
VID_shutdown (void *data)
{
Sys_MaskPrintf (SYS_VID, "VID_shutdown\n");
Sys_MaskPrintf (SYS_vid, "VID_shutdown\n");
Win_CloseDisplay ();
}
@ -153,7 +153,7 @@ VID_Init (byte *palette, byte *colormap)
VID_InitGamma (palette);
viddef.vid_internal->set_palette (palette);
Sys_MaskPrintf (SYS_VID, "Video mode %dx%d initialized.\n",
Sys_MaskPrintf (SYS_vid, "Video mode %dx%d initialized.\n",
viddef.width, viddef.height);
viddef.initialized = true;

View file

@ -73,14 +73,14 @@ QFGL_ProcAddress (const char *name, qboolean crit)
{
void *glfunc = NULL;
Sys_MaskPrintf (SYS_VID, "DEBUG: Finding symbol %s ... ", name);
Sys_MaskPrintf (SYS_vid, "DEBUG: Finding symbol %s ... ", name);
glfunc = QFGL_GetProcAddress (libgl_handle, name);
if (glfunc) {
Sys_MaskPrintf (SYS_VID, "found [%p]\n", glfunc);
Sys_MaskPrintf (SYS_vid, "found [%p]\n", glfunc);
return glfunc;
}
Sys_MaskPrintf (SYS_VID, "not found\n");
Sys_MaskPrintf (SYS_vid, "not found\n");
if (crit) {
Sys_Error ("Couldn't load critical OpenGL function %s, exiting...",

View file

@ -86,7 +86,7 @@ D_EndDirectRect (int x, int y, int width, int height)
static void
VID_shutdown (void *data)
{
Sys_MaskPrintf (SYS_VID, "VID_shutdown\n");
Sys_MaskPrintf (SYS_vid, "VID_shutdown\n");
X11_CloseDisplay ();
}
@ -125,7 +125,7 @@ VID_Init (byte *palette, byte *colormap)
VID_InitGamma (palette);
viddef.vid_internal->set_palette (viddef.palette);
Sys_MaskPrintf (SYS_VID, "Video mode %dx%d initialized.\n",
Sys_MaskPrintf (SYS_vid, "Video mode %dx%d initialized.\n",
viddef.width, viddef.height);
viddef.initialized = true;

View file

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

View file

@ -349,11 +349,11 @@ x11_choose_visual (sw_ctx_t *ctx)
x_vis = x_visinfo->visual;
if (num_visuals > 1) {
Sys_MaskPrintf (SYS_VID,
Sys_MaskPrintf (SYS_vid,
"Found more than one visual id at depth %d:\n",
template.depth);
for (i = 0; i < num_visuals; i++)
Sys_MaskPrintf (SYS_VID, " -visualid %d\n",
Sys_MaskPrintf (SYS_vid, " -visualid %d\n",
(int) x_visinfo[i].visualid);
} else {
if (num_visuals == 0) {
@ -365,20 +365,20 @@ x11_choose_visual (sw_ctx_t *ctx)
}
}
Sys_MaskPrintf (SYS_VID, "Using visualid %d:\n",
Sys_MaskPrintf (SYS_vid, "Using visualid %d:\n",
(int) x_visinfo->visualid);
Sys_MaskPrintf (SYS_VID, " class %d\n", x_visinfo->class);
Sys_MaskPrintf (SYS_VID, " screen %d\n", x_visinfo->screen);
Sys_MaskPrintf (SYS_VID, " depth %d\n", x_visinfo->depth);
Sys_MaskPrintf (SYS_VID, " red_mask 0x%x\n",
Sys_MaskPrintf (SYS_vid, " class %d\n", x_visinfo->class);
Sys_MaskPrintf (SYS_vid, " screen %d\n", x_visinfo->screen);
Sys_MaskPrintf (SYS_vid, " depth %d\n", x_visinfo->depth);
Sys_MaskPrintf (SYS_vid, " red_mask 0x%x\n",
(int) x_visinfo->red_mask);
Sys_MaskPrintf (SYS_VID, " green_mask 0x%x\n",
Sys_MaskPrintf (SYS_vid, " green_mask 0x%x\n",
(int) x_visinfo->green_mask);
Sys_MaskPrintf (SYS_VID, " blue_mask 0x%x\n",
Sys_MaskPrintf (SYS_vid, " blue_mask 0x%x\n",
(int) x_visinfo->blue_mask);
Sys_MaskPrintf (SYS_VID, " colormap_size %d\n",
Sys_MaskPrintf (SYS_vid, " colormap_size %d\n",
x_visinfo->colormap_size);
Sys_MaskPrintf (SYS_VID, " bits_per_rgb %d\n",
Sys_MaskPrintf (SYS_vid, " bits_per_rgb %d\n",
x_visinfo->bits_per_rgb);
}
@ -446,7 +446,7 @@ ResetSharedFrameBuffers (void)
// attach to the shared memory segment
x_shminfo[frm].shmaddr = (void *) shmat (x_shminfo[frm].shmid, 0, 0);
Sys_MaskPrintf (SYS_VID, "VID: shared memory id=%d, addr=0x%lx\n",
Sys_MaskPrintf (SYS_vid, "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;

View file

@ -275,7 +275,7 @@ CL_Disconnect (void)
if (cls.demorecording)
CL_StopRecording ();
Sys_MaskPrintf (SYS_DEV, "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);
@ -318,7 +318,7 @@ CL_EstablishConnection (const char *host)
cls.netcon = NET_Connect (host);
if (!cls.netcon)
Host_Error ("CL_Connect: connect failed\n");
Sys_MaskPrintf (SYS_DEV, "CL_EstablishConnection: connected to %s\n",
Sys_MaskPrintf (SYS_dev, "CL_EstablishConnection: connected to %s\n",
host);
cls.demonum = -1; // not in the demo loop now
@ -334,7 +334,7 @@ CL_EstablishConnection (const char *host)
void
CL_SignonReply (void)
{
Sys_MaskPrintf (SYS_DEV, "CL_SignonReply: %i\n", cls.signon);
Sys_MaskPrintf (SYS_dev, "CL_SignonReply: %i\n", cls.signon);
switch (cls.signon) {
case so_none:
@ -480,7 +480,7 @@ CL_SendCmd (void)
return; // no message at all
if (!NET_CanSendMessage (cls.netcon)) {
Sys_MaskPrintf (SYS_DEV, "CL_WriteToServer: can't send\n");
Sys_MaskPrintf (SYS_dev, "CL_WriteToServer: can't send\n");
return;
}
@ -495,7 +495,7 @@ CL_SetState (cactive_t state)
{
cactive_t old_state = cls.state;
cls.state = state;
Sys_MaskPrintf (SYS_NET, "CL_SetState: %d -> %d\n", old_state, state);
Sys_MaskPrintf (SYS_net, "CL_SetState: %d -> %d\n", old_state, state);
if (old_state != state) {
if (old_state == ca_active) {
// leaving active state

View file

@ -339,7 +339,7 @@ CL_ParseServerInfo (void)
const char *str;
int i;
Sys_MaskPrintf (SYS_DEV, "Serverinfo packet received.\n");
Sys_MaskPrintf (SYS_dev, "Serverinfo packet received.\n");
S_BlockSound ();
S_StopAllSounds ();
@ -934,16 +934,16 @@ CL_ParseServerMessage (void)
str = MSG_ReadString (net_message);
if (str[strlen (str) - 1] == '\n') {
if (stuffbuf && stuffbuf->str[0]) {
Sys_MaskPrintf (SYS_DEV, "stufftext: %s%s\n",
Sys_MaskPrintf (SYS_dev, "stufftext: %s%s\n",
stuffbuf->str, str);
Cbuf_AddText (host_cbuf, stuffbuf->str);
dstring_clearstr (stuffbuf);
} else {
Sys_MaskPrintf (SYS_DEV, "stufftext: %s\n", str);
Sys_MaskPrintf (SYS_dev, "stufftext: %s\n", str);
}
Cbuf_AddText (host_cbuf, str);
} else {
Sys_MaskPrintf (SYS_DEV, "partial stufftext: %s\n", str);
Sys_MaskPrintf (SYS_dev, "partial stufftext: %s\n", str);
if (!stuffbuf)
stuffbuf = dstring_newstr ();
dstring_appendstr (stuffbuf, str);

View file

@ -149,7 +149,7 @@ Host_EndGame (const char *message, ...)
va_start (argptr, message);
dvsprintf (str, message, argptr);
va_end (argptr);
Sys_MaskPrintf (SYS_DEV, "Host_EndGame: %s\n", str->str);
Sys_MaskPrintf (SYS_dev, "Host_EndGame: %s\n", str->str);
if (sv.active)
Host_ShutdownServer (false);
@ -395,7 +395,7 @@ SV_DropClient (qboolean crash)
Sys_Printf ("Client %s removed\n", host_client->name);
}
// break the net connection
Sys_MaskPrintf (SYS_NET, "dropping client\n");
Sys_MaskPrintf (SYS_net, "dropping client\n");
NET_Close (host_client->netconnection);
host_client->netconnection = NULL;
@ -495,7 +495,7 @@ Host_ShutdownServer (qboolean crash)
void
Host_ClearMemory (void)
{
Sys_MaskPrintf (SYS_DEV, "Clearing memory\n");
Sys_MaskPrintf (SYS_dev, "Clearing memory\n");
CL_ClearMemory ();
Mod_ClearAll ();
if (host_hunklevel)

View file

@ -63,7 +63,7 @@ SV_CheckStuck (edict_t *ent)
VectorCopy (SVvector (ent, origin), org);
VectorCopy (SVvector (ent, oldorigin), SVvector (ent, origin));
if (!SV_TestEntityPosition (ent)) {
Sys_MaskPrintf (SYS_DEV, "Unstuck.\n");
Sys_MaskPrintf (SYS_dev, "Unstuck.\n");
SV_LinkEdict (ent, true);
return;
}
@ -75,14 +75,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_MaskPrintf (SYS_DEV, "Unstuck.\n");
Sys_MaskPrintf (SYS_dev, "Unstuck.\n");
SV_LinkEdict (ent, true);
return;
}
}
VectorCopy (org, SVvector (ent, origin));
Sys_MaskPrintf (SYS_DEV, "player is stuck.\n");
Sys_MaskPrintf (SYS_dev, "player is stuck.\n");
}
static qboolean
@ -205,7 +205,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_MaskPrintf (SYS_DEV, "unstuck!\n");
// Sys_MaskPrintf (SYS_dev, "unstuck!\n");
return clip;
}
// go back to the original pos and try again

Some files were not shown because too many files have changed in this diff Show more