]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
changed a lot of Con_DPrint/Con_DPrintf calls to Con_Print/Con_Printf (non-technical...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 1 Dec 2004 23:14:07 +0000 (23:14 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 1 Dec 2004 23:14:07 +0000 (23:14 +0000)
merged Sys_Print code into Con_Print and changed all other Sys_Print/Sys_Printf calls to calling Con_Print/Con_Printf or Con_DPrint/Con_DPrintf instead
rewrote Con_Print so that timestamps are printed only at the start of each line (or just after the 0x01 or 0x02 characters used for chat messages), not during partial line prints, and timestamps now apply to all output destinations (log, console, terminal)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4816 d7cf8633-e32d-0410-b094-e92efae38249

20 files changed:
cd_bsd.c
cd_linux.c
cd_sdl.c
cd_shared.c
cd_win.c
cl_parse.c
console.c
fs.c
gl_backend.c
host.c
host_cmd.c
model_brush.c
snd_alsa.c
snd_mem.c
sv_phys.c
sys.h
sys_shared.c
vid_sdl.c
vid_shared.c
world.c

index 0608297fc2af5f812b3d3eb616f50c88eb79c9e8..83ae1a7476725b169dab352e99202602947a86fd 100644 (file)
--- a/cd_bsd.c
+++ b/cd_bsd.c
@@ -52,7 +52,7 @@ void CDAudio_SysEject (void)
 
        ioctl(cdfile, CDIOCALLOW);
        if (ioctl(cdfile, CDIOCEJECT) == -1)
-               Con_DPrint("ioctl CDIOCEJECT failed\n");
+               Con_Print("ioctl CDIOCEJECT failed\n");
 }
 
 
@@ -63,7 +63,7 @@ void CDAudio_SysCloseDoor (void)
 
        ioctl(cdfile, CDIOCALLOW);
        if (ioctl(cdfile, CDIOCCLOSE) == -1)
-               Con_DPrint("ioctl CDIOCCLOSE failed\n");
+               Con_Print("ioctl CDIOCCLOSE failed\n");
 }
 
 int CDAudio_SysGetAudioDiskInfo (void)
@@ -75,13 +75,13 @@ int CDAudio_SysGetAudioDiskInfo (void)
 
        if (ioctl(cdfile, CDIOREADTOCHEADER, &tochdr) == -1)
        {
-               Con_DPrint("ioctl CDIOREADTOCHEADER failed\n");
+               Con_Print("ioctl CDIOREADTOCHEADER failed\n");
                return -1;
        }
 
        if (tochdr.starting_track < 1)
        {
-               Con_DPrint("CDAudio: no music tracks\n");
+               Con_Print("CDAudio: no music tracks\n");
                return -1;
        }
 
@@ -98,7 +98,7 @@ float CDAudio_SysGetVolume (void)
 
        if (ioctl (cdfile, CDIOCGETVOL, &vol) == -1)
        {
-               Con_DPrint("ioctl CDIOCGETVOL failed\n");
+               Con_Print("ioctl CDIOCGETVOL failed\n");
                return -1.0f;
        }
 
@@ -117,7 +117,7 @@ void CDAudio_SysSetVolume (float volume)
        vol.vol[2] = vol.vol[3] = 0;
 
        if (ioctl (cdfile, CDIOCSETVOL, &vol) == -1)
-               Con_DPrintf ("ioctl CDIOCSETVOL failed\n");
+               Con_Printf ("ioctl CDIOCSETVOL failed\n");
 }
 
 
@@ -137,7 +137,7 @@ int CDAudio_SysPlay (qbyte track)
        rte.data = &entry;
        if (ioctl(cdfile, CDIOREADTOCENTRYS, &rte) == -1)
        {
-               Con_DPrint("ioctl CDIOREADTOCENTRYS failed\n");
+               Con_Print("ioctl CDIOREADTOCENTRYS failed\n");
                return -1;
        }
        if (entry.control & 4)  // if it's a data track
@@ -156,13 +156,13 @@ int CDAudio_SysPlay (qbyte track)
 
        if (ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1)
        {
-               Con_DPrint("ioctl CDIOCPLAYTRACKS failed\n");
+               Con_Print("ioctl CDIOCPLAYTRACKS failed\n");
                return -1;
        }
 
        if (ioctl(cdfile, CDIOCRESUME) == -1)
        {
-               Con_DPrint("ioctl CDIOCRESUME failed\n");
+               Con_Print("ioctl CDIOCRESUME failed\n");
                return -1;
        }
 
@@ -177,7 +177,7 @@ int CDAudio_SysStop (void)
 
        if (ioctl(cdfile, CDIOCSTOP) == -1)
        {
-               Con_DPrintf("ioctl CDIOCSTOP failed (%d)\n", errno);
+               Con_Printf("ioctl CDIOCSTOP failed (%d)\n", errno);
                return -1;
        }
        ioctl(cdfile, CDIOCALLOW);
@@ -192,7 +192,7 @@ int CDAudio_SysPause (void)
 
        if (ioctl(cdfile, CDIOCPAUSE) == -1)
        {
-               Con_DPrint("ioctl CDIOCPAUSE failed\n");
+               Con_Print("ioctl CDIOCPAUSE failed\n");
                return -1;
        }
 
@@ -206,7 +206,7 @@ int CDAudio_SysResume (void)
                return -1;
 
        if (ioctl(cdfile, CDIOCRESUME) == -1)
-               Con_DPrint("ioctl CDIOCRESUME failed\n");
+               Con_Print("ioctl CDIOCRESUME failed\n");
 
        return 0;
 }
@@ -229,7 +229,7 @@ int CDAudio_SysUpdate (void)
 
                if (ioctl(cdfile, CDIOCREADSUBCHANNEL, &subchnl) == -1)
                {
-                       Con_DPrint("ioctl CDIOCREADSUBCHANNEL failed\n");
+                       Con_Print("ioctl CDIOCREADSUBCHANNEL failed\n");
                        cdPlaying = false;
                        return -1;
                }
@@ -266,7 +266,7 @@ int CDAudio_SysStartup (void)
        if ((cdfile = open(cd_dev, O_RDONLY)) < 0)
 #endif
        {
-               Con_DPrintf("CDAudio_SysStartup: open of \"%s\" failed (%i)\n",
+               Con_Printf("CDAudio_SysStartup: open of \"%s\" failed (%i)\n",
                                        cd_dev, errno);
                cdfile = -1;
                return -1;
index 9d428f50a9e3602033b1aa079c2dd233f7ccf30f..05bf5c7e6d5a4a7a3b8219ff02698f7d9e2d70ae 100644 (file)
@@ -42,7 +42,7 @@ void CDAudio_SysEject (void)
                return;
 
        if (ioctl(cdfile, CDROMEJECT) == -1)
-               Con_DPrint("ioctl CDROMEJECT failed\n");
+               Con_Print("ioctl CDROMEJECT failed\n");
 }
 
 
@@ -52,7 +52,7 @@ void CDAudio_SysCloseDoor (void)
                return;
 
        if (ioctl(cdfile, CDROMCLOSETRAY) == -1)
-               Con_DPrint("ioctl CDROMCLOSETRAY failed\n");
+               Con_Print("ioctl CDROMCLOSETRAY failed\n");
 }
 
 int CDAudio_SysGetAudioDiskInfo (void)
@@ -64,13 +64,13 @@ int CDAudio_SysGetAudioDiskInfo (void)
 
        if (ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1)
        {
-               Con_DPrint("ioctl CDROMREADTOCHDR failed\n");
+               Con_Print("ioctl CDROMREADTOCHDR failed\n");
                return -1;
        }
 
        if (tochdr.cdth_trk0 < 1)
        {
-               Con_DPrint("CDAudio: no music tracks\n");
+               Con_Print("CDAudio: no music tracks\n");
                return -1;
        }
 
@@ -87,7 +87,7 @@ float CDAudio_SysGetVolume (void)
 
        if (ioctl (cdfile, CDROMVOLREAD, &vol) == -1)
        {
-               Con_DPrint("ioctl CDROMVOLREAD failed\n");
+               Con_Print("ioctl CDROMVOLREAD failed\n");
                return -1.0f;
        }
 
@@ -106,7 +106,7 @@ void CDAudio_SysSetVolume (float volume)
        vol.channel2 = vol.channel3 = 0;
 
        if (ioctl (cdfile, CDROMVOLCTRL, &vol) == -1)
-               Con_DPrint("ioctl CDROMVOLCTRL failed\n");
+               Con_Print("ioctl CDROMVOLCTRL failed\n");
 }
 
 
@@ -123,7 +123,7 @@ int CDAudio_SysPlay (qbyte track)
        entry.cdte_format = CDROM_MSF;
        if (ioctl(cdfile, CDROMREADTOCENTRY, &entry) == -1)
        {
-               Con_DPrint("ioctl CDROMREADTOCENTRY failed\n");
+               Con_Print("ioctl CDROMREADTOCENTRY failed\n");
                return -1;
        }
        if (entry.cdte_ctrl == CDROM_DATA_TRACK)
@@ -142,13 +142,13 @@ int CDAudio_SysPlay (qbyte track)
 
        if (ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1)
        {
-               Con_DPrint("ioctl CDROMPLAYTRKIND failed\n");
+               Con_Print("ioctl CDROMPLAYTRKIND failed\n");
                return -1;
        }
 
        if (ioctl(cdfile, CDROMRESUME) == -1)
        {
-               Con_DPrint("ioctl CDROMRESUME failed\n");
+               Con_Print("ioctl CDROMRESUME failed\n");
                return -1;
        }
 
@@ -163,7 +163,7 @@ int CDAudio_SysStop (void)
 
        if (ioctl(cdfile, CDROMSTOP) == -1)
        {
-               Con_DPrintf("ioctl CDROMSTOP failed (%d)\n", errno);
+               Con_Printf("ioctl CDROMSTOP failed (%d)\n", errno);
                return -1;
        }
 
@@ -177,7 +177,7 @@ int CDAudio_SysPause (void)
 
        if (ioctl(cdfile, CDROMPAUSE) == -1)
        {
-               Con_DPrint("ioctl CDROMPAUSE failed\n");
+               Con_Print("ioctl CDROMPAUSE failed\n");
                return -1;
        }
 
@@ -191,7 +191,7 @@ int CDAudio_SysResume (void)
                return -1;
 
        if (ioctl(cdfile, CDROMRESUME) == -1)
-               Con_DPrint("ioctl CDROMRESUME failed\n");
+               Con_Print("ioctl CDROMRESUME failed\n");
 
        return 0;
 }
@@ -207,7 +207,7 @@ int CDAudio_SysUpdate (void)
                subchnl.cdsc_format = CDROM_MSF;
                if (ioctl(cdfile, CDROMSUBCHNL, &subchnl) == -1)
                {
-                       Con_DPrint("ioctl CDROMSUBCHNL failed\n");
+                       Con_Print("ioctl CDROMSUBCHNL failed\n");
                        cdPlaying = false;
                        return -1;
                }
@@ -238,7 +238,7 @@ int CDAudio_SysStartup (void)
 {
        if ((cdfile = open(cd_dev, O_RDONLY | O_NONBLOCK)) == -1)
        {
-               Con_DPrintf("CDAudio_SysStartup: open of \"%s\" failed (%i)\n",
+               Con_Printf("CDAudio_SysStartup: open of \"%s\" failed (%i)\n",
                                        cd_dev, errno);
                cdfile = -1;
                return -1;
index fd75fec0ec7e74597fa0a86fc361a28126b527bc..11eb01ea1a30c15a33a3ca1f48969970e14cde41 100644 (file)
--- a/cd_sdl.c
+++ b/cd_sdl.c
@@ -153,12 +153,12 @@ int CDAudio_SysStartup (void)
        if( numdrives == -1 ) // was the CDROM system initialized correctly?
                return -1;
 
-       Con_DPrintf( "Found %i cdrom drives.\n", numdrives );
+       Con_Printf( "Found %i cdrom drives.\n", numdrives );
 
        for( i = 0 ; i < numdrives ; i++, cd = NULL ) {
                cd = SDL_CDOpen( i );
                if( !cd ) {
-                       Con_DPrintf( "CD drive %i is invalid.\n", i );
+                       Con_Printf( "CD drive %i is invalid.\n", i );
                        continue;
                }
 
@@ -166,9 +166,9 @@ int CDAudio_SysStartup (void)
                        if( IsAudioCD() )
                                break;
                        else
-                               Con_DPrintf( "The CD in drive %i is not an audio cd.\n", i );
+                               Con_Printf( "The CD in drive %i is not an audio cd.\n", i );
                else
-                       Con_DPrintf( "No CD in drive %i.\n", i );
+                       Con_Printf( "No CD in drive %i.\n", i );
 
                SDL_CDClose( cd );
        }
index 70a446caff2d9dacb80b890c4c7d7a9a68d945de..48dc4990c181fa914a2afa41101cd31846468f81 100644 (file)
@@ -105,7 +105,7 @@ void CDAudio_Play (qbyte track, qboolean looping)
        track = remap[track];
        if (track < 1)
        {
-               Con_DPrintf("CDAudio: Bad track number %u.\n", track);
+               Con_Printf("CDAudio: Bad track number %u.\n", track);
                return;
        }
 
@@ -125,7 +125,7 @@ void CDAudio_Play (qbyte track, qboolean looping)
                        if (looping)
                                S_SetChannelFlag (faketrack, CHANNELFLAG_FORCELOOP, true);
                        S_SetChannelFlag (faketrack, CHANNELFLAG_FULLVOLUME, true);
-                       Con_DPrintf ("Fake CD track %u playing...\n", track);
+                       Con_Printf ("Fake CD track %u playing...\n", track);
                }
        }
 
@@ -382,22 +382,22 @@ int CDAudio_Startup (void)
 
        if (CDAudio_GetAudioDiskInfo())
        {
-               Con_DPrint("CDAudio_Init: No CD in player.\n");
+               Con_Print("CDAudio_Init: No CD in player.\n");
                cdValid = false;
        }
 
        saved_vol = CDAudio_SysGetVolume ();
        if (saved_vol < 0.0f)
        {
-               Con_DPrint ("Can't get initial CD volume\n");
+               Con_Print ("Can't get initial CD volume\n");
                saved_vol = 1.0f;
        }
        else
-               Con_DPrintf ("Initial CD volume: %g\n", saved_vol);
+               Con_Printf ("Initial CD volume: %g\n", saved_vol);
 
        initialized = true;
 
-       Con_DPrint("CD Audio Initialized\n");
+       Con_Print("CD Audio Initialized\n");
 
        return 0;
 }
index 16f08c6871375f7f72de88093c876bf09d1e75fa..a79a24d4ec7f1d92373ba6a3e99f3dd2277cb7ed 100644 (file)
--- a/cd_win.c
+++ b/cd_win.c
@@ -35,7 +35,7 @@ void CDAudio_SysEject(void)
        DWORD   dwReturn;
 
        if ((dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, (DWORD)NULL)))
-               Con_DPrintf("MCI_SET_DOOR_OPEN failed (%i)\n", dwReturn);
+               Con_Printf("MCI_SET_DOOR_OPEN failed (%i)\n", dwReturn);
 }
 
 
@@ -44,7 +44,7 @@ void CDAudio_SysCloseDoor(void)
        DWORD   dwReturn;
 
        if ((dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD)NULL)))
-               Con_DPrintf("MCI_SET_DOOR_CLOSED failed (%i)\n", dwReturn);
+               Con_Printf("MCI_SET_DOOR_CLOSED failed (%i)\n", dwReturn);
 }
 
 int CDAudio_SysGetAudioDiskInfo(void)
@@ -56,12 +56,12 @@ int CDAudio_SysGetAudioDiskInfo(void)
        dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD) (LPVOID) &mciStatusParms);
        if (dwReturn)
        {
-               Con_DPrint("CDAudio: drive ready test - get status failed\n");
+               Con_Print("CDAudio: drive ready test - get status failed\n");
                return -1;
        }
        if (!mciStatusParms.dwReturn)
        {
-               Con_DPrint("CDAudio: drive not ready\n");
+               Con_Print("CDAudio: drive not ready\n");
                return -1;
        }
 
@@ -69,12 +69,12 @@ int CDAudio_SysGetAudioDiskInfo(void)
        dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD) (LPVOID) &mciStatusParms);
        if (dwReturn)
        {
-               Con_DPrint("CDAudio: get tracks - status failed\n");
+               Con_Print("CDAudio: get tracks - status failed\n");
                return -1;
        }
        if (mciStatusParms.dwReturn < 1)
        {
-               Con_DPrint("CDAudio: no music tracks\n");
+               Con_Print("CDAudio: no music tracks\n");
                return -1;
        }
 
@@ -107,7 +107,7 @@ int CDAudio_SysPlay (qbyte track)
        dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT, (DWORD) (LPVOID) &mciStatusParms);
        if (dwReturn)
        {
-               Con_DPrintf("MCI_STATUS failed (%i)\n", dwReturn);
+               Con_Printf("MCI_STATUS failed (%i)\n", dwReturn);
                return -1;
        }
        if (mciStatusParms.dwReturn != MCI_CDA_TRACK_AUDIO)
@@ -125,7 +125,7 @@ int CDAudio_SysPlay (qbyte track)
        dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_TRACK | MCI_WAIT, (DWORD) (LPVOID) &mciStatusParms);
        if (dwReturn)
        {
-               Con_DPrintf("MCI_STATUS failed (%i)\n", dwReturn);
+               Con_Printf("MCI_STATUS failed (%i)\n", dwReturn);
                return -1;
        }
 
@@ -135,7 +135,7 @@ int CDAudio_SysPlay (qbyte track)
        dwReturn = mciSendCommand(wDeviceID, MCI_PLAY, MCI_NOTIFY | MCI_FROM | MCI_TO, (DWORD)(LPVOID) &mciPlayParms);
        if (dwReturn)
        {
-               Con_DPrintf("CDAudio: MCI_PLAY failed (%i)\n", dwReturn);
+               Con_Printf("CDAudio: MCI_PLAY failed (%i)\n", dwReturn);
                return -1;
        }
 
@@ -149,7 +149,7 @@ int CDAudio_SysStop (void)
 
        if ((dwReturn = mciSendCommand(wDeviceID, MCI_STOP, 0, (DWORD)NULL)))
        {
-               Con_DPrintf("MCI_STOP failed (%i)\n", dwReturn);
+               Con_Printf("MCI_STOP failed (%i)\n", dwReturn);
                return -1;
        }
        return 0;
@@ -163,7 +163,7 @@ int CDAudio_SysPause (void)
        mciGenericParms.dwCallback = (DWORD)mainwindow;
        if ((dwReturn = mciSendCommand(wDeviceID, MCI_PAUSE, 0, (DWORD)(LPVOID) &mciGenericParms)))
        {
-               Con_DPrintf("MCI_PAUSE failed (%i)\n", dwReturn);
+               Con_Printf("MCI_PAUSE failed (%i)\n", dwReturn);
                return -1;
        }
        return 0;
@@ -181,7 +181,7 @@ int CDAudio_SysResume (void)
        dwReturn = mciSendCommand(wDeviceID, MCI_PLAY, MCI_TO | MCI_NOTIFY, (DWORD)(LPVOID) &mciPlayParms);
        if (dwReturn)
        {
-               Con_DPrintf("CDAudio: MCI_PLAY failed (%i)\n", dwReturn);
+               Con_Printf("CDAudio: MCI_PLAY failed (%i)\n", dwReturn);
                return -1;
        }
        return 0;       
@@ -208,13 +208,13 @@ LONG CDAudio_MessageHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
                        break;
 
                case MCI_NOTIFY_FAILURE:
-                       Con_DPrint("MCI_NOTIFY_FAILURE\n");
+                       Con_Print("MCI_NOTIFY_FAILURE\n");
                        CDAudio_Stop ();
                        cdValid = false;
                        break;
 
                default:
-                       Con_DPrintf("Unexpected MM_MCINOTIFY type (%i)\n", wParam);
+                       Con_Printf("Unexpected MM_MCINOTIFY type (%i)\n", wParam);
                        return 1;
        }
 
@@ -260,5 +260,5 @@ int CDAudio_SysStartup (void)
 void CDAudio_SysShutdown (void)
 {
        if (mciSendCommand(wDeviceID, MCI_CLOSE, MCI_WAIT, (DWORD)NULL))
-               Con_DPrint("CDAudio_Shutdown: MCI_CLOSE failed\n");
+               Con_Print("CDAudio_Shutdown: MCI_CLOSE failed\n");
 }
index eb1437c975baf2500677550bd82968d71894ccd4..4f509d7cc4a4b9e015c918e98cfcd1b84b6e9e4d 100644 (file)
@@ -338,7 +338,7 @@ void CL_ParseServerInfo (void)
                return;
        }
        cl.protocol = i;
-       Con_DPrintf("Protocol %i\n", cl.protocol);
+       Con_DPrintf("Server protocol is %i\n", cl.protocol);
 
 // parse maxclients
        cl.maxclients = MSG_ReadByte ();
index d49bcd6a32e0129e588e6877a404ab691219df0f..592e338e3ebc4ceb81583c497c57216007a7e297 100644 (file)
--- a/console.c
+++ b/console.c
@@ -551,29 +551,97 @@ void Con_PrintToHistory(const char *txt)
        }
 }
 
+/* The translation table between the graphical font and plain ASCII  --KB */
+static char qfont_table[256] = {
+       '\0', '#',  '#',  '#',  '#',  '.',  '#',  '#',
+       '#',  9,    10,   '#',  ' ',  13,   '.',  '.',
+       '[',  ']',  '0',  '1',  '2',  '3',  '4',  '5',
+       '6',  '7',  '8',  '9',  '.',  '<',  '=',  '>',
+       ' ',  '!',  '"',  '#',  '$',  '%',  '&',  '\'',
+       '(',  ')',  '*',  '+',  ',',  '-',  '.',  '/',
+       '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',
+       '8',  '9',  ':',  ';',  '<',  '=',  '>',  '?',
+       '@',  'A',  'B',  'C',  'D',  'E',  'F',  'G',
+       'H',  'I',  'J',  'K',  'L',  'M',  'N',  'O',
+       'P',  'Q',  'R',  'S',  'T',  'U',  'V',  'W',
+       'X',  'Y',  'Z',  '[',  '\\', ']',  '^',  '_',
+       '`',  'a',  'b',  'c',  'd',  'e',  'f',  'g',
+       'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
+       'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
+       'x',  'y',  'z',  '{',  '|',  '}',  '~',  '<',
+
+       '<',  '=',  '>',  '#',  '#',  '.',  '#',  '#',
+       '#',  '#',  ' ',  '#',  ' ',  '>',  '.',  '.',
+       '[',  ']',  '0',  '1',  '2',  '3',  '4',  '5',
+       '6',  '7',  '8',  '9',  '.',  '<',  '=',  '>',
+       ' ',  '!',  '"',  '#',  '$',  '%',  '&',  '\'',
+       '(',  ')',  '*',  '+',  ',',  '-',  '.',  '/',
+       '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',
+       '8',  '9',  ':',  ';',  '<',  '=',  '>',  '?',
+       '@',  'A',  'B',  'C',  'D',  'E',  'F',  'G',
+       'H',  'I',  'J',  'K',  'L',  'M',  'N',  'O',
+       'P',  'Q',  'R',  'S',  'T',  'U',  'V',  'W',
+       'X',  'Y',  'Z',  '[',  '\\', ']',  '^',  '_',
+       '`',  'a',  'b',  'c',  'd',  'e',  'f',  'g',
+       'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
+       'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
+       'x',  'y',  'z',  '{',  '|',  '}',  '~',  '<'
+};
+
 /*
 ================
 Con_Print
 
-Prints to all appropriate console targets
+Prints to all appropriate console targets, and adds timestamps
 ================
 */
+extern cvar_t timestamps;
+extern cvar_t timeformat;
+extern qboolean sys_nostdout;
 void Con_Print(const char *msg)
 {
-       // also echo to debugging console
-       Sys_Print(msg);
+       static int index = 0;
+       static char line[16384];
 
-       // log all messages to file
-       Log_ConPrint (msg);
-
-       if (!con_initialized)
-               return;
-
-       if (cls.state == ca_dedicated)
-               return;         // no graphics mode
-
-       // write it to the scrollable buffer
-       Con_PrintToHistory(msg);
+       for (;*msg;msg++)
+       {
+               if (index == 0)
+               {
+                       // if this is the beginning of a new line, print timestamp
+                       char *timestamp = timestamps.integer ? Sys_TimeString(timeformat.string) : "";
+                       // special color codes for chat messages must always come first
+                       // for Con_PrintToHistory to work properly
+                       if (*msg <= 2)
+                               line[index++] = *msg++;
+                       // store timestamp
+                       for (;*timestamp;index++, timestamp++)
+                               if (index < sizeof(line) - 2)
+                                       line[index] = *timestamp;
+               }
+               // append the character
+               line[index++] = *msg;
+               // if this is a newline character, we have a complete line to print
+               if (*msg == '\n' || index >= 16000)
+               {
+                       // terminate the line
+                       line[index] = 0;
+                       // send to log file
+                       Log_ConPrint(line);
+                       // send to scrollable buffer
+                       if (con_initialized && cls.state != ca_dedicated)
+                               Con_PrintToHistory(line);
+                       // send to terminal or dedicated server window
+                       if (!sys_nostdout)
+                       {
+                               unsigned char *p;
+                               for (p = (unsigned char *) line;*p; p++)
+                                       *p = qfont_table[*p];
+                               Sys_PrintToTerminal(line);
+                       }
+                       // empty the line buffer
+                       index = 0;
+               }
+       }
 }
 
 
diff --git a/fs.c b/fs.c
index 6544ff766be302692ca6e2188283ad73203d251d..8298a5e9968ecfbdf88be0de80b9a02cda45f3ac 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -1164,7 +1164,7 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qboolean quiet)
                                if (!diff)
                                {
                                        if (!quiet)
-                                               Sys_Printf("FS_FindFile: %s in %s\n",
+                                               Con_DPrintf("FS_FindFile: %s in %s\n",
                                                                        pak->files[middle].name, pak->filename);
 
                                        if (index != NULL)
@@ -1186,7 +1186,7 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qboolean quiet)
                        if (FS_SysFileExists (netpath))
                        {
                                if (!quiet)
-                                       Sys_Printf("FS_FindFile: %s\n", netpath);
+                                       Con_DPrintf("FS_FindFile: %s\n", netpath);
 
                                if (index != NULL)
                                        *index = -1;
@@ -1196,7 +1196,7 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qboolean quiet)
        }
 
        if (!quiet)
-               Sys_Printf("FS_FindFile: can't find %s\n", name);
+               Con_DPrintf("FS_FindFile: can't find %s\n", name);
 
        if (index != NULL)
                *index = -1;
@@ -2110,7 +2110,7 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet)
                                                        if (liststart == NULL)
                                                                liststart = listcurrent;
                                                        if (!quiet)
-                                                               Sys_Printf("SearchPackFile: %s : %s\n", pak->filename, temp);
+                                                               Con_DPrintf("SearchPackFile: %s : %s\n", pak->filename, temp);
                                                }
                                        }
                                        // strip off one path element at a time until empty
@@ -2149,7 +2149,7 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet)
                                                        if (liststart == NULL)
                                                                liststart = listcurrent;
                                                        if (!quiet)
-                                                               Sys_Printf("SearchDirFile: %s\n", temp);
+                                                               Con_DPrintf("SearchDirFile: %s\n", temp);
                                                }
                                        }
                                }
index 3d3567373bec8e0a663524ee940d3a5da9e96345..915abadef8822257f5db2748903196b4a34d76ad 100644 (file)
@@ -161,7 +161,7 @@ void GL_Backend_FreeArrays(void)
 
 static void gl_backend_start(void)
 {
-       Con_DPrint("OpenGL Backend started\n");
+       Con_Print("OpenGL Backend started\n");
        if (qglDrawRangeElements != NULL)
        {
                CHECKGLERROR
@@ -169,7 +169,7 @@ static void gl_backend_start(void)
                CHECKGLERROR
                qglGetIntegerv(GL_MAX_ELEMENTS_INDICES, &gl_maxdrawrangeelementsindices);
                CHECKGLERROR
-               Con_DPrintf("glDrawRangeElements detected (max vertices %i, max indices %i)\n", gl_maxdrawrangeelementsvertices, gl_maxdrawrangeelementsindices);
+               Con_Printf("glDrawRangeElements detected (max vertices %i, max indices %i)\n", gl_maxdrawrangeelementsvertices, gl_maxdrawrangeelementsindices);
        }
 
        backendunits = min(MAX_TEXTUREUNITS, gl_textureunits);
@@ -184,7 +184,7 @@ static void gl_backend_shutdown(void)
        backendunits = 0;
        backendactive = false;
 
-       Con_DPrint("OpenGL Backend shutting down\n");
+       Con_Print("OpenGL Backend shutting down\n");
 
        GL_Backend_FreeArrays();
 }
diff --git a/host.c b/host.c
index 49cc616a4c7231ef940066a4ba747c6e1c7508e3..e6b2084093a8cf4219975f02e13afe788b9bec05 100644 (file)
--- a/host.c
+++ b/host.c
@@ -351,7 +351,7 @@ void SV_BroadcastPrint(const char *msg)
        }
 
        if (sv_echobprint.integer && cls.state == ca_dedicated)
-               Sys_Print(msg);
+               Con_Print(msg);
 }
 
 /*
index 8a616af2a65a410121ae51f5c8d99dbc8cb02c0c..80b62d1c13da9f1a236090990b61a18f594d5f61 100644 (file)
@@ -829,7 +829,7 @@ void Host_Say(qboolean teamonly)
                        SV_ClientPrint(text);
        host_client = save;
 
-       Sys_Print(&text[1]);
+       //Con_Print(&text[1]);
 }
 
 
@@ -1189,7 +1189,7 @@ void Host_Spawn_f (void)
                PR_ExecuteProgram (pr_global_struct->ClientConnect, "QC function ClientConnect is missing");
 
                if ((Sys_DoubleTime() - host_client->connecttime) <= sv.time)
-                       Sys_Printf("%s entered the game\n", host_client->name);
+                       Con_Printf("%s entered the game\n", host_client->name);
 
                PR_ExecuteProgram (pr_global_struct->PutClientInServer, "QC function PutClientInServer is missing");
        }
@@ -1662,7 +1662,7 @@ void Host_Startdemos_f (void)
                Con_Printf("Max %i demos in demoloop\n", MAX_DEMOS);
                c = MAX_DEMOS;
        }
-       Con_DPrintf("%i demo(s) in loop\n", c);
+       Con_Printf("%i demo(s) in loop\n", c);
 
        for (i=1 ; i<c+1 ; i++)
                strlcpy (cls.demos[i-1], Cmd_Argv(i), sizeof (cls.demos[i-1]));
index 1779f9c5079c901753e93e5964ff3d59ea310396..67de293585532329fedea68b5eb03e4a5d92b3fd 100644 (file)
@@ -880,7 +880,7 @@ static void Mod_Q1BSP_DecompressVis(const qbyte *in, const qbyte *inend, qbyte *
        {
                if (in == inend)
                {
-                       Con_DPrintf("Mod_Q1BSP_DecompressVis: input underrun on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, out - outstart, outend - outstart);
+                       Con_Printf("Mod_Q1BSP_DecompressVis: input underrun on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, out - outstart, outend - outstart);
                        return;
                }
                c = *in++;
@@ -890,14 +890,14 @@ static void Mod_Q1BSP_DecompressVis(const qbyte *in, const qbyte *inend, qbyte *
                {
                        if (in == inend)
                        {
-                               Con_DPrintf("Mod_Q1BSP_DecompressVis: input underrun (during zero-run) on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, out - outstart, outend - outstart);
+                               Con_Printf("Mod_Q1BSP_DecompressVis: input underrun (during zero-run) on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, out - outstart, outend - outstart);
                                return;
                        }
                        for (c = *in++;c > 0;c--)
                        {
                                if (out == outend)
                                {
-                                       Con_DPrintf("Mod_Q1BSP_DecompressVis: output overrun on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, out - outstart, outend - outstart);
+                                       Con_Printf("Mod_Q1BSP_DecompressVis: output overrun on model \"%s\" (decompressed %i of %i output bytes)\n", loadmodel->name, out - outstart, outend - outstart);
                                        return;
                                }
                                *out++ = 0;
index 031185b6b14fd6ddc3f6d9fe58c9770f1f419837..67a9ed60c78726ccf73f95c3d0bb7d7d7135a5c9 100644 (file)
@@ -86,14 +86,14 @@ qboolean SNDDMA_Init (void)
        err = snd_pcm_open (&pcm, pcmname, SND_PCM_STREAM_PLAYBACK,
                                                  SND_PCM_NONBLOCK);
        if (0 > err) {
-               Sys_Printf ("Error: audio open error: %s\n", snd_strerror (err));
+               Con_Printf ("Error: audio open error: %s\n", snd_strerror (err));
                return 0;
        }
-       Sys_Printf ("ALSA: Using PCM %s.\n", pcmname);
+       Con_Printf ("ALSA: Using PCM %s.\n", pcmname);
 
        err = snd_pcm_hw_params_any (pcm, hw);
        if (0 > err) {
-               Sys_Printf ("ALSA: error setting hw_params_any. %s\n",
+               Con_Printf ("ALSA: error setting hw_params_any. %s\n",
                                        snd_strerror (err));
                goto error;
        }
@@ -101,7 +101,7 @@ qboolean SNDDMA_Init (void)
        err = snd_pcm_hw_params_set_access (pcm, hw,
                                                                                  SND_PCM_ACCESS_MMAP_INTERLEAVED);
        if (0 > err) {
-               Sys_Printf ("ALSA: Failure to set noninterleaved PCM access. %s\n"
+               Con_Printf ("ALSA: Failure to set noninterleaved PCM access. %s\n"
                                        "Note: Interleaved is not supported\n",
                                        snd_strerror (err));
                goto error;
@@ -117,7 +117,7 @@ qboolean SNDDMA_Init (void)
                                                                                                                 SND_PCM_FORMAT_U8))) {
                                bps = 8;
                        } else {
-                               Sys_Printf ("ALSA: no useable formats. %s\n",
+                               Con_Printf ("ALSA: no useable formats. %s\n",
                                                        snd_strerror (err));
                                goto error;
                        }
@@ -128,13 +128,13 @@ qboolean SNDDMA_Init (void)
                                                                                                  SND_PCM_FORMAT_U8 :
                                                                                                  SND_PCM_FORMAT_S16);
                        if (0 > err) {
-                               Sys_Printf ("ALSA: no usable formats. %s\n",
+                               Con_Printf ("ALSA: no usable formats. %s\n",
                                                        snd_strerror (err));
                                goto error;
                        }
                        break;
                default:
-                       Sys_Printf ("ALSA: desired format not supported\n");
+                       Con_Printf ("ALSA: desired format not supported\n");
                        goto error;
        }
 
@@ -147,7 +147,7 @@ qboolean SNDDMA_Init (void)
                                                                                                                                         1))) {
                                stereo = 0;
                        } else {
-                               Sys_Printf ("ALSA: no usable channels. %s\n",
+                               Con_Printf ("ALSA: no usable channels. %s\n",
                                                        snd_strerror (err));
                                goto error;
                        }
@@ -156,13 +156,13 @@ qboolean SNDDMA_Init (void)
                case 1:
                        err = snd_pcm_hw_params_set_channels (pcm, hw, stereo ? 2 : 1);
                        if (0 > err) {
-                               Sys_Printf ("ALSA: no usable channels. %s\n",
+                               Con_Printf ("ALSA: no usable channels. %s\n",
                                                        snd_strerror (err));
                                goto error;
                        }
                        break;
                default:
-                       Sys_Printf ("ALSA: desired channels not supported\n");
+                       Con_Printf ("ALSA: desired channels not supported\n");
                        goto error;
        }
 
@@ -184,7 +184,7 @@ qboolean SNDDMA_Init (void)
                                        if (0 <= err) {
                                                frag_size = 8 * bps;
                                        } else {
-                                               Sys_Printf ("ALSA: no usable rates. %s\n",
+                                               Con_Printf ("ALSA: no usable rates. %s\n",
                                                                        snd_strerror (err));
                                                goto error;
                                        }
@@ -196,50 +196,50 @@ qboolean SNDDMA_Init (void)
                case 44100:
                        err = snd_pcm_hw_params_set_rate_near (pcm, hw, &rate, 0);
                        if (0 > err) {
-                               Sys_Printf ("ALSA: desired rate %i not supported. %s\n", rate,
+                               Con_Printf ("ALSA: desired rate %i not supported. %s\n", rate,
                                                        snd_strerror (err));
                                goto error;
                        }
                        frag_size = 8 * bps * rate / 11025;
                        break;
                default:
-                       Sys_Printf ("ALSA: desired rate %i not supported.\n", rate);
+                       Con_Printf ("ALSA: desired rate %i not supported.\n", rate);
                        goto error;
        }
 
        err = snd_pcm_hw_params_set_period_size_near (pcm, hw, &frag_size, 0);
        if (0 > err) {
-               Sys_Printf ("ALSA: unable to set period size near %i. %s\n",
+               Con_Printf ("ALSA: unable to set period size near %i. %s\n",
                                        (int) frag_size, snd_strerror (err));
                goto error;
        }
        err = snd_pcm_hw_params (pcm, hw);
        if (0 > err) {
-               Sys_Printf ("ALSA: unable to install hw params: %s\n",
+               Con_Printf ("ALSA: unable to install hw params: %s\n",
                                        snd_strerror (err));
                goto error;
        }
        err = snd_pcm_sw_params_current (pcm, sw);
        if (0 > err) {
-               Sys_Printf ("ALSA: unable to determine current sw params. %s\n",
+               Con_Printf ("ALSA: unable to determine current sw params. %s\n",
                                        snd_strerror (err));
                goto error;
        }
        err = snd_pcm_sw_params_set_start_threshold (pcm, sw, ~0U);
        if (0 > err) {
-               Sys_Printf ("ALSA: unable to set playback threshold. %s\n",
+               Con_Printf ("ALSA: unable to set playback threshold. %s\n",
                                        snd_strerror (err));
                goto error;
        }
        err = snd_pcm_sw_params_set_stop_threshold (pcm, sw, ~0U);
        if (0 > err) {
-               Sys_Printf ("ALSA: unable to set playback stop threshold. %s\n",
+               Con_Printf ("ALSA: unable to set playback stop threshold. %s\n",
                                        snd_strerror (err));
                goto error;
        }
        err = snd_pcm_sw_params (pcm, sw);
        if (0 > err) {
-               Sys_Printf ("ALSA: unable to install sw params. %s\n",
+               Con_Printf ("ALSA: unable to install sw params. %s\n",
                                        snd_strerror (err));
                goto error;
        }
@@ -250,7 +250,7 @@ qboolean SNDDMA_Init (void)
 
        err = snd_pcm_hw_params_get_buffer_size (hw, &buffer_size);
        if (0 > err) {
-               Sys_Printf ("ALSA: unable to get buffer size. %s\n",
+               Con_Printf ("ALSA: unable to get buffer size. %s\n",
                                        snd_strerror (err));
                goto error;
        }
index f152120e4cb63705ad2912baf5260840fc05217f..7422a01b1b9fe1c98d03f9459a991e871cb30d7d 100644 (file)
--- a/snd_mem.c
+++ b/snd_mem.c
@@ -38,8 +38,8 @@ size_t ResampleSfx (const qbyte *in_data, size_t in_length, const snd_format_t*
        srclength = in_length * in_format->channels;
        outcount = (double)in_length * shm->format.speed / in_format->speed;
 
-       Con_DPrintf("ResampleSfx(%s): %d samples @ %dHz -> %d samples @ %dHz\n",
-                               sfxname, in_length, in_format->speed, outcount, shm->format.speed);
+       //Con_DPrintf("ResampleSfx(%s): %d samples @ %dHz -> %d samples @ %dHz\n",
+       //                      sfxname, in_length, in_format->speed, outcount, shm->format.speed);
 
        // Trivial case (direct transfer)
        if (in_format->speed == shm->format.speed)
@@ -178,7 +178,7 @@ qboolean S_LoadSound (sfx_t *s, qboolean complain)
                if (len >= sizeof (namebuffer))
                {
                        // name too long
-                       Con_DPrintf("S_LoadSound: name \"%s\" is too long\n", s->name);
+                       Con_Printf("S_LoadSound: name \"%s\" is too long\n", s->name);
                        return false;
                }
                if (S_LoadWavFile (namebuffer, s))
@@ -194,7 +194,7 @@ qboolean S_LoadSound (sfx_t *s, qboolean complain)
        if (len >= sizeof (namebuffer))
        {
                // name too long
-               Con_DPrintf("S_LoadSound: name \"%s\" is too long\n", s->name);
+               Con_Printf("S_LoadSound: name \"%s\" is too long\n", s->name);
                return false;
        }
        if (S_LoadWavFile (namebuffer, s))
index b542783259b080d4e382369ce1640b5e744a0dec..ee0239084cad2839d1bf1ad9229464e51337b3e8 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -592,13 +592,13 @@ void SV_PushMove (edict_t *pusher, float movetime)
                SV_LinkEdict (pusher, false);
                return;
        default:
-               Con_DPrintf("SV_PushMove: unrecognized solid type %f\n", pusher->v->solid);
+               Con_Printf("SV_PushMove: unrecognized solid type %f\n", pusher->v->solid);
                return;
        }
        index = (int) pusher->v->modelindex;
        if (index < 1 || index >= MAX_MODELS)
        {
-               Con_DPrintf("SV_PushMove: invalid modelindex %f\n", pusher->v->modelindex);
+               Con_Printf("SV_PushMove: invalid modelindex %f\n", pusher->v->modelindex);
                return;
        }
        pushermodel = sv.models[index];
diff --git a/sys.h b/sys.h
index 2644d074311baf99ad68fc21285a967ec007eb1c..1890fce29d071e3338fd9c8f4d834887ca95d4a9 100644 (file)
--- a/sys.h
+++ b/sys.h
@@ -48,10 +48,6 @@ qboolean Sys_LoadLibrary (const char* dllname, dllhandle_t* handle, const dllfun
 void Sys_UnloadLibrary (dllhandle_t* handle);
 void* Sys_GetProcAddress (dllhandle_t handle, const char* name);
 
-void Sys_Print(const char *msg);
-void Sys_Printf(const char *fmt, ...);
-// send text to the quake console (and possibly to terminal)
-
 // called after Com_InitArgv
 void Sys_Shared_EarlyInit (void);
 // called after Host_init
index 1893c219f460ebbdf49145a8ed8fa530e06575eb..ff897498d08ade001eba6100cfa71968da67d4b2 100644 (file)
@@ -7,47 +7,7 @@
 # include <dlfcn.h>
 #endif
 
-extern cvar_t  timestamps;
-extern cvar_t  timeformat;
-
-static int sys_nostdout = false;
-
-/* The translation table between the graphical font and plain ASCII  --KB */
-static char qfont_table[256] = {
-       '\0', '#',  '#',  '#',  '#',  '.',  '#',  '#',
-       '#',  9,    10,   '#',  ' ',  13,   '.',  '.',
-       '[',  ']',  '0',  '1',  '2',  '3',  '4',  '5',
-       '6',  '7',  '8',  '9',  '.',  '<',  '=',  '>',
-       ' ',  '!',  '"',  '#',  '$',  '%',  '&',  '\'',
-       '(',  ')',  '*',  '+',  ',',  '-',  '.',  '/',
-       '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',
-       '8',  '9',  ':',  ';',  '<',  '=',  '>',  '?',
-       '@',  'A',  'B',  'C',  'D',  'E',  'F',  'G',
-       'H',  'I',  'J',  'K',  'L',  'M',  'N',  'O',
-       'P',  'Q',  'R',  'S',  'T',  'U',  'V',  'W',
-       'X',  'Y',  'Z',  '[',  '\\', ']',  '^',  '_',
-       '`',  'a',  'b',  'c',  'd',  'e',  'f',  'g',
-       'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
-       'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
-       'x',  'y',  'z',  '{',  '|',  '}',  '~',  '<',
-
-       '<',  '=',  '>',  '#',  '#',  '.',  '#',  '#',
-       '#',  '#',  ' ',  '#',  ' ',  '>',  '.',  '.',
-       '[',  ']',  '0',  '1',  '2',  '3',  '4',  '5',
-       '6',  '7',  '8',  '9',  '.',  '<',  '=',  '>',
-       ' ',  '!',  '"',  '#',  '$',  '%',  '&',  '\'',
-       '(',  ')',  '*',  '+',  ',',  '-',  '.',  '/',
-       '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',
-       '8',  '9',  ':',  ';',  '<',  '=',  '>',  '?',
-       '@',  'A',  'B',  'C',  'D',  'E',  'F',  'G',
-       'H',  'I',  'J',  'K',  'L',  'M',  'N',  'O',
-       'P',  'Q',  'R',  'S',  'T',  'U',  'V',  'W',
-       'X',  'Y',  'Z',  '[',  '\\', ']',  '^',  '_',
-       '`',  'a',  'b',  'c',  'd',  'e',  'f',  'g',
-       'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
-       'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
-       'x',  'y',  'z',  '{',  '|',  '}',  '~',  '<'
-};
+qboolean sys_nostdout = false;
 
 static char sys_timestring[128];
 char *Sys_TimeString(const char *timeformat)
@@ -58,41 +18,6 @@ char *Sys_TimeString(const char *timeformat)
 }
 
 
-#define MAXPRINTMSG 16384
-
-void Sys_Print(const char *msg)
-{
-       unsigned char *p;
-       // String we print
-       char final[MAXPRINTMSG];
-
-       if (sys_nostdout)
-               return;
-
-       if (timestamps.integer)
-               snprintf(final, sizeof(final), "%s%s", Sys_TimeString(timeformat.string), msg);
-       else
-               strlcpy (final, msg, sizeof (final));
-
-       // LordHavoc: make sure the string is terminated
-       final[MAXPRINTMSG-1] = 0;
-       for (p = (unsigned char *) final;*p; p++)
-               *p = qfont_table[*p];
-       Sys_PrintToTerminal(final);
-}
-
-void Sys_Printf(const char *fmt, ...)
-{
-       va_list argptr;
-       char msg[MAXPRINTMSG];  // String we started with
-
-       va_start(argptr,fmt);
-       vsnprintf(msg,sizeof(msg),fmt,argptr);
-       va_end(argptr);
-
-       Sys_Print(msg);
-}
-
 extern qboolean host_shuttingdown;
 void Sys_Quit (void)
 {
@@ -180,7 +105,7 @@ qboolean Sys_LoadLibrary (const char* dllname, dllhandle_t* handle, const dllfun
                }
 
        *handle = dllhandle;
-       Con_DPrintf("\"%s\" loaded.\n", dllname);
+       Con_Printf("\"%s\" loaded.\n", dllname);
        return true;
 }
 
index 4dc4d13b679a3737afe811eff852111a4d833694..ce9f0f6eb4e3f97d1a756ba5701dc64b39f84967 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -359,7 +359,7 @@ static void VID_OutputVersion()
 {
        const SDL_version *version;
        version = SDL_Linked_Version();
-       Con_DPrintf(    "Linked against SDL version %d.%d.%d\n"
+       Con_Printf(     "Linked against SDL version %d.%d.%d\n"
                                        "Using SDL library version %d.%d.%d\n",
                                        SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL,
                                        version->major, version->minor, version->patch );       
index 76cc73d96bb5c4be5bcd6f472cf44971cacd28ef..788b03e90317a576ad429469adc4b3310eb95d50 100644 (file)
@@ -335,14 +335,14 @@ int GL_CheckExtension(const char *name, const dllfunction_t *funcs, const char *
        int failed = false;
        const dllfunction_t *func;
 
-       Con_DPrintf("checking for %s...  ", name);
+       Con_Printf("checking for %s...  ", name);
 
        for (func = funcs;func && func->name;func++)
                *func->funcvariable = NULL;
 
        if (disableparm && (COM_CheckParm(disableparm) || COM_CheckParm("-safe")))
        {
-               Con_DPrint("disabled by commandline\n");
+               Con_Print("disabled by commandline\n");
                return false;
        }
 
@@ -361,12 +361,12 @@ int GL_CheckExtension(const char *name, const dllfunction_t *funcs, const char *
                // delay the return so it prints all missing functions
                if (failed)
                        return false;
-               Con_DPrint("enabled\n");
+               Con_Print("enabled\n");
                return true;
        }
        else
        {
-               Con_DPrint("not detected\n");
+               Con_Print("not detected\n");
                return false;
        }
 }
@@ -623,13 +623,13 @@ void VID_CheckExtensions(void)
        if (!GL_CheckExtension("OpenGL 1.1.0", opengl110funcs, NULL, false))
                Sys_Error("OpenGL 1.1.0 functions not found\n");
 
-       Con_DPrintf("GL_VENDOR: %s\n", gl_vendor);
-       Con_DPrintf("GL_RENDERER: %s\n", gl_renderer);
-       Con_DPrintf("GL_VERSION: %s\n", gl_version);
-       Con_DPrintf("GL_EXTENSIONS: %s\n", gl_extensions);
-       Con_DPrintf("%s_EXTENSIONS: %s\n", gl_platform, gl_platformextensions);
+       Con_Printf("GL_VENDOR: %s\n", gl_vendor);
+       Con_Printf("GL_RENDERER: %s\n", gl_renderer);
+       Con_Printf("GL_VERSION: %s\n", gl_version);
+       Con_Printf("GL_EXTENSIONS: %s\n", gl_extensions);
+       Con_Printf("%s_EXTENSIONS: %s\n", gl_platform, gl_platformextensions);
 
-       Con_DPrint("Checking OpenGL extensions...\n");
+       Con_Print("Checking OpenGL extensions...\n");
 
 // COMMANDLINEOPTION: GL: -nodrawrangeelements disables GL_EXT_draw_range_elements (renders faster)
        if (!GL_CheckExtension("glDrawRangeElements", drawrangeelementsfuncs, "-nodrawrangeelements", true))
@@ -1069,7 +1069,7 @@ void VID_Open(void)
                        Cvar_SetQuick(&vid_bitsperpixel, com_argv[i+1]);
        }
 
-       Con_DPrint("Starting video system\n");
+       Con_Print("Starting video system\n");
        success = VID_Mode(vid_fullscreen.integer, vid_width.integer, vid_height.integer, vid_bitsperpixel.integer);
        if (!success)
        {
diff --git a/world.c b/world.c
index 488546a407301c77c0a0bd051d55c776b3694603..cdf9451802385753343243c000271fbdcf8c69e0 100644 (file)
--- a/world.c
+++ b/world.c
@@ -320,7 +320,7 @@ void SV_LinkEdict (edict_t *ent, qboolean touch_triggers)
                int modelindex = ent->v->modelindex;
                if (modelindex < 0 || modelindex > MAX_MODELS)
                {
-                       Con_DPrintf("edict %i: SOLID_BSP with invalid modelindex!\n", NUM_FOR_EDICT(ent));
+                       Con_Printf("edict %i: SOLID_BSP with invalid modelindex!\n", NUM_FOR_EDICT(ent));
                        modelindex = 0;
                }
                model = sv.models[modelindex];
@@ -328,7 +328,7 @@ void SV_LinkEdict (edict_t *ent, qboolean touch_triggers)
                {
                        Mod_CheckLoaded(model);
                        if (!model->TraceBox)
-                               Con_DPrintf("edict %i: SOLID_BSP with non-collidable model\n", NUM_FOR_EDICT(ent));
+                               Con_Printf("edict %i: SOLID_BSP with non-collidable model\n", NUM_FOR_EDICT(ent));
 
                        if (ent->v->angles[0] || ent->v->angles[2] || ent->v->avelocity[0] || ent->v->avelocity[2])
                        {
@@ -451,18 +451,18 @@ trace_t SV_ClipMoveToEntity(edict_t *ent, const vec3_t start, const vec3_t mins,
                // if the modelindex is 0, it shouldn't be SOLID_BSP!
                if (modelindex == 0)
                {
-                       Con_DPrintf("SV_ClipMoveToEntity: edict %i: SOLID_BSP with no model\n", NUM_FOR_EDICT(ent));
+                       Con_Printf("SV_ClipMoveToEntity: edict %i: SOLID_BSP with no model\n", NUM_FOR_EDICT(ent));
                        return trace;
                }
                if (modelindex >= MAX_MODELS)
                {
-                       Con_DPrintf("SV_ClipMoveToEntity: edict %i: SOLID_BSP with invalid modelindex\n", NUM_FOR_EDICT(ent));
+                       Con_Printf("SV_ClipMoveToEntity: edict %i: SOLID_BSP with invalid modelindex\n", NUM_FOR_EDICT(ent));
                        return trace;
                }
                model = sv.models[modelindex];
                if (modelindex != 0 && model == NULL)
                {
-                       Con_DPrintf("SV_ClipMoveToEntity: edict %i: SOLID_BSP with invalid modelindex\n", NUM_FOR_EDICT(ent));
+                       Con_Printf("SV_ClipMoveToEntity: edict %i: SOLID_BSP with invalid modelindex\n", NUM_FOR_EDICT(ent));
                        return trace;
                }
 
@@ -471,12 +471,12 @@ trace_t SV_ClipMoveToEntity(edict_t *ent, const vec3_t start, const vec3_t mins,
                {
                        if (!model->TraceBox)
                        {
-                               Con_DPrintf("SV_ClipMoveToEntity: edict %i: SOLID_BSP with a non-collidable model\n", NUM_FOR_EDICT(ent));
+                               Con_Printf("SV_ClipMoveToEntity: edict %i: SOLID_BSP with a non-collidable model\n", NUM_FOR_EDICT(ent));
                                return trace;
                        }
                        //if (ent->v->movetype != MOVETYPE_PUSH)
                        //{
-                       //      Con_DPrintf("SV_ClipMoveToEntity: edict %i: SOLID_BSP without MOVETYPE_PUSH\n", NUM_FOR_EDICT(ent));
+                       //      Con_Printf("SV_ClipMoveToEntity: edict %i: SOLID_BSP without MOVETYPE_PUSH\n", NUM_FOR_EDICT(ent));
                        //      return trace;
                        //}
                }