mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 06:42:26 +00:00
More cleanup, now working on the rendering line as a whole.
Con_SafePrintf is no longer needed, as Con_Printf is safe.
This commit is contained in:
parent
f85c3ac42f
commit
01a5c65e52
16 changed files with 61 additions and 267 deletions
|
@ -64,12 +64,9 @@ void Con_DrawConsole (int lines);
|
|||
void Con_Print (char *txt);
|
||||
void Con_Printf (char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void Con_DPrintf (char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void Con_SafePrintf (char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void Con_Clear_f (void);
|
||||
void Con_DrawNotify (void);
|
||||
void Con_ClearNotify (void);
|
||||
void Con_ToggleConsole_f (void);
|
||||
|
||||
void Con_NotifyBox (char *text); // during startup for sound / cd warnings
|
||||
|
||||
#endif // _CONSOLE_H
|
||||
|
|
|
@ -166,7 +166,6 @@ typedef enum {key_game, key_console, key_message, key_menu} keydest_t;
|
|||
extern keydest_t key_dest;
|
||||
extern char *keybindings[256];
|
||||
extern int key_repeats[256];
|
||||
extern int key_count; // incremented every key event
|
||||
extern int key_lastpress;
|
||||
|
||||
extern char chat_buffer[];
|
||||
|
|
|
@ -40,11 +40,8 @@ void SCR_UpdateWholeScreen (void);
|
|||
|
||||
void SCR_SizeUp (void);
|
||||
void SCR_SizeDown (void);
|
||||
void SCR_BringDownConsole (void);
|
||||
void SCR_CenterPrint (char *str);
|
||||
|
||||
int SCR_ModalMessage (char *text);
|
||||
|
||||
extern float scr_con_current;
|
||||
extern float scr_conlines; // lines of console to display
|
||||
|
||||
|
|
|
@ -809,12 +809,7 @@ int CDAudio_Init(void)
|
|||
dos_int86 (0x2f);
|
||||
if (regs.x.bx == 0)
|
||||
{
|
||||
Con_NotifyBox (
|
||||
"MSCDEX not loaded, music is\n"
|
||||
"disabled. Use \"-nocdaudio\" if you\n"
|
||||
"wish to avoid this message in the\n"
|
||||
"future. See README.TXT for help.\n"
|
||||
);
|
||||
Con_Printf ("MSCDEX not loaded, music is disabled. Use \"-nocdaudio\" if you wish to avoid this message in the future. See README.TXT for help.\n");
|
||||
return -1;
|
||||
}
|
||||
if (regs.x.bx > 1)
|
||||
|
@ -826,12 +821,7 @@ int CDAudio_Init(void)
|
|||
dos_int86 (0x2f);
|
||||
if (regs.x.bx == 0)
|
||||
{
|
||||
Con_NotifyBox (
|
||||
"MSCDEX version 2.00 or later\n"
|
||||
"required for music. See README.TXT\n"
|
||||
"for help.\n"
|
||||
);
|
||||
Con_DPrintf("CDAudio_Init: MSCDEX version 2.00 or later required.\n");
|
||||
Con_Printf ("MSCDEX version 2.00 or later required for music. See README.TXT for help.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -402,22 +402,6 @@ void Con_Printf (char *fmt, ...)
|
|||
|
||||
// write it to the scrollable buffer
|
||||
Con_Print (msg);
|
||||
|
||||
#if 0 // Tonik
|
||||
// update the screen immediately if the console is displayed
|
||||
if (cls.state != ca_active)
|
||||
{
|
||||
// protect against infinite loop if something in SCR_UpdateScreen calls
|
||||
// Con_Printf
|
||||
static qboolean inupdate;
|
||||
if (!inupdate)
|
||||
{
|
||||
inupdate = true;
|
||||
SCR_UpdateScreen ();
|
||||
inupdate = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -663,63 +647,3 @@ void Con_DrawConsole (int lines)
|
|||
// draw the input prompt, user text, and cursor if desired
|
||||
Con_DrawInput ();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
==================
|
||||
Con_NotifyBox
|
||||
==================
|
||||
*/
|
||||
void Con_NotifyBox (char *text)
|
||||
{
|
||||
double t1, t2;
|
||||
|
||||
// during startup for sound / cd warnings
|
||||
Con_Printf("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n");
|
||||
|
||||
Con_Printf (text);
|
||||
|
||||
Con_Printf ("Press a key.\n");
|
||||
Con_Printf("\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n");
|
||||
|
||||
key_count = -2; // wait for a key down and up
|
||||
key_dest = key_console;
|
||||
|
||||
do
|
||||
{
|
||||
t1 = Sys_DoubleTime ();
|
||||
SCR_UpdateScreen ();
|
||||
IN_SendKeyEvents ();
|
||||
t2 = Sys_DoubleTime ();
|
||||
realtime += t2-t1; // make the cursor blink
|
||||
} while (key_count < 0);
|
||||
|
||||
Con_Printf ("\n");
|
||||
key_dest = key_game;
|
||||
realtime = 0; // put the cursor back to invisible
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
==================
|
||||
Con_SafePrintf
|
||||
|
||||
Okay to call even when the screen can't be updated
|
||||
==================
|
||||
*/
|
||||
void Con_SafePrintf (char *fmt, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char msg[1024];
|
||||
int temp;
|
||||
|
||||
va_start (argptr, fmt);
|
||||
vsnprintf (msg, sizeof(msg), fmt, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
temp = scr_disabled_for_loading;
|
||||
scr_disabled_for_loading = true;
|
||||
Con_Printf ("%s", msg);
|
||||
scr_disabled_for_loading = temp;
|
||||
}
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ x11_set_vidmode(int width, int height)
|
|||
hasvidmode = 0;
|
||||
}
|
||||
}
|
||||
Con_SafePrintf ("hasvidmode = %i\nnummodes = %i\n", hasvidmode, nummodes);
|
||||
Con_Printf ("hasvidmode = %i\nnummodes = %i\n", hasvidmode, nummodes);
|
||||
|
||||
if (hasvidmode && vid_fullscreen->value) {
|
||||
int smallest_mode=0, x=MAXINT, y=MAXINT;
|
||||
|
|
|
@ -1019,61 +1019,8 @@ void SCR_DrawNotifyString (void)
|
|||
} while (1);
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
SCR_ModalMessage
|
||||
|
||||
Displays a text string in the center of the screen and waits for a Y or N
|
||||
keypress.
|
||||
==================
|
||||
*/
|
||||
int SCR_ModalMessage (char *text)
|
||||
{
|
||||
scr_notifystring = text;
|
||||
|
||||
// draw a fresh screen
|
||||
scr_fullupdate = 0;
|
||||
scr_drawdialog = true;
|
||||
SCR_UpdateScreen ();
|
||||
scr_drawdialog = false;
|
||||
|
||||
S_ClearBuffer (); // so dma doesn't loop current sound
|
||||
|
||||
do
|
||||
{
|
||||
key_count = -1; // wait for a key down and up
|
||||
IN_SendKeyEvents ();
|
||||
} while (key_lastpress != 'y' && key_lastpress != 'n' && key_lastpress != K_ESCAPE);
|
||||
|
||||
scr_fullupdate = 0;
|
||||
SCR_UpdateScreen ();
|
||||
|
||||
return key_lastpress == 'y';
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/*
|
||||
===============
|
||||
SCR_BringDownConsole
|
||||
|
||||
Brings the console down and fades the palettes back to normal
|
||||
================
|
||||
*/
|
||||
void SCR_BringDownConsole (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
scr_centertime_off = 0;
|
||||
|
||||
for (i=0 ; i<20 && scr_conlines != scr_con_current ; i++)
|
||||
SCR_UpdateScreen ();
|
||||
|
||||
cl.cshifts[0].percent = 0; // no area contents palette on next frame
|
||||
VID_SetPalette (host_basepal);
|
||||
}
|
||||
|
||||
void SCR_TileClear (void)
|
||||
{
|
||||
if (r_refdef.vrect.x > 0) {
|
||||
|
|
|
@ -370,7 +370,7 @@ static qboolean IN_InitDInput (void)
|
|||
|
||||
if (hInstDI == NULL)
|
||||
{
|
||||
Con_SafePrintf ("Couldn't load dinput.dll\n");
|
||||
Con_Printf ("Couldn't load dinput.dll\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ static qboolean IN_InitDInput (void)
|
|||
|
||||
if (!pDirectInputCreate)
|
||||
{
|
||||
Con_SafePrintf ("Couldn't get DI proc addr\n");
|
||||
Con_Printf ("Couldn't get DI proc addr\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ static qboolean IN_InitDInput (void)
|
|||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Con_SafePrintf ("Couldn't open DI mouse device\n");
|
||||
Con_Printf ("Couldn't open DI mouse device\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ static qboolean IN_InitDInput (void)
|
|||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Con_SafePrintf ("Couldn't set DI mouse format\n");
|
||||
Con_Printf ("Couldn't set DI mouse format\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -418,7 +418,7 @@ static qboolean IN_InitDInput (void)
|
|||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Con_SafePrintf ("Couldn't set DI coop level\n");
|
||||
Con_Printf ("Couldn't set DI coop level\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -429,7 +429,7 @@ static qboolean IN_InitDInput (void)
|
|||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Con_SafePrintf ("Couldn't set DI buffersize\n");
|
||||
Con_Printf ("Couldn't set DI buffersize\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -457,11 +457,11 @@ static void IN_StartupMouse (void)
|
|||
|
||||
if (dinput)
|
||||
{
|
||||
Con_SafePrintf ("DirectInput initialized\n");
|
||||
Con_Printf ("DirectInput initialized\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
Con_SafePrintf ("DirectInput not initialized\n");
|
||||
Con_Printf ("DirectInput not initialized\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,8 +67,6 @@ int history_line=0;
|
|||
|
||||
keydest_t key_dest;
|
||||
|
||||
int key_count; // incremented every key event
|
||||
|
||||
char *keybindings[256];
|
||||
qboolean consolekeys[256]; // if true, can't be rebound while in console
|
||||
qboolean menubound[256]; // if true, can't be rebound while in menu
|
||||
|
@ -790,11 +788,6 @@ Key_Event ( int key, qboolean down )
|
|||
key_repeats[key] = 0;
|
||||
|
||||
key_lastpress = key;
|
||||
key_count++;
|
||||
if (key_count <= 0)
|
||||
{
|
||||
return; // just catching keys for Con_NotifyBox
|
||||
}
|
||||
|
||||
// update auto-repeat status
|
||||
if (down)
|
||||
|
|
|
@ -964,62 +964,9 @@ void SCR_DrawNotifyString (void)
|
|||
} while (1);
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
SCR_ModalMessage
|
||||
|
||||
Displays a text string in the center of the screen and waits for a Y or N
|
||||
keypress.
|
||||
==================
|
||||
*/
|
||||
int SCR_ModalMessage (char *text)
|
||||
{
|
||||
scr_notifystring = text;
|
||||
|
||||
// draw a fresh screen
|
||||
scr_fullupdate = 0;
|
||||
scr_drawdialog = true;
|
||||
SCR_UpdateScreen ();
|
||||
scr_drawdialog = false;
|
||||
|
||||
S_ClearBuffer (); // so dma doesn't loop current sound
|
||||
|
||||
do
|
||||
{
|
||||
key_count = -1; // wait for a key down and up
|
||||
IN_SendKeyEvents ();
|
||||
} while (key_lastpress != 'y' && key_lastpress != 'n' && key_lastpress != K_ESCAPE);
|
||||
|
||||
scr_fullupdate = 0;
|
||||
SCR_UpdateScreen ();
|
||||
|
||||
return key_lastpress == 'y';
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/*
|
||||
===============
|
||||
SCR_BringDownConsole
|
||||
|
||||
Brings the console down and fades the palettes back to normal
|
||||
================
|
||||
*/
|
||||
void SCR_BringDownConsole (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
scr_centertime_off = 0;
|
||||
|
||||
for (i=0 ; i<20 && scr_conlines != scr_con_current ; i++)
|
||||
SCR_UpdateScreen ();
|
||||
|
||||
cl.cshifts[0].percent = 0; // no area contents palette on next frame
|
||||
VID_SetPalette (host_basepal);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
==================
|
||||
SCR_UpdateScreen
|
||||
|
|
|
@ -228,7 +228,7 @@ sndinitstat SNDDMA_InitDirect (void)
|
|||
|
||||
if (hInstDS == NULL)
|
||||
{
|
||||
Con_SafePrintf ("Couldn't load dsound.dll\n");
|
||||
Con_Printf ("Couldn't load dsound.dll\n");
|
||||
return SIS_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ sndinitstat SNDDMA_InitDirect (void)
|
|||
|
||||
if (!pDirectSoundCreate)
|
||||
{
|
||||
Con_SafePrintf ("Couldn't get DS proc addr\n");
|
||||
Con_Printf ("Couldn't get DS proc addr\n");
|
||||
return SIS_FAILURE;
|
||||
}
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ sndinitstat SNDDMA_InitDirect (void)
|
|||
{
|
||||
if (hresult != DSERR_ALLOCATED)
|
||||
{
|
||||
Con_SafePrintf ("DirectSound create failed\n");
|
||||
Con_Printf ("DirectSound create failed\n");
|
||||
return SIS_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,7 @@ sndinitstat SNDDMA_InitDirect (void)
|
|||
// "Sound not available",
|
||||
// MB_RETRYCANCEL | MB_SETFOREGROUND | MB_ICONEXCLAMATION) != IDRETRY)
|
||||
// {
|
||||
Con_SafePrintf ("DirectSoundCreate failure\n"
|
||||
Con_Printf ("DirectSoundCreate failure\n"
|
||||
" hardware already in use\n");
|
||||
return SIS_NOTAVAIL;
|
||||
// }
|
||||
|
@ -265,19 +265,19 @@ sndinitstat SNDDMA_InitDirect (void)
|
|||
|
||||
if (DS_OK != pDS->lpVtbl->GetCaps (pDS, &dscaps))
|
||||
{
|
||||
Con_SafePrintf ("Couldn't get DS caps\n");
|
||||
Con_Printf ("Couldn't get DS caps\n");
|
||||
}
|
||||
|
||||
if (dscaps.dwFlags & DSCAPS_EMULDRIVER)
|
||||
{
|
||||
Con_SafePrintf ("No DirectSound driver installed\n");
|
||||
Con_Printf ("No DirectSound driver installed\n");
|
||||
FreeSound ();
|
||||
return SIS_FAILURE;
|
||||
}
|
||||
|
||||
if (DS_OK != pDS->lpVtbl->SetCooperativeLevel (pDS, mainwindow, DSSCL_EXCLUSIVE))
|
||||
{
|
||||
Con_SafePrintf ("Set coop level failed\n");
|
||||
Con_Printf ("Set coop level failed\n");
|
||||
FreeSound ();
|
||||
return SIS_FAILURE;
|
||||
}
|
||||
|
@ -303,12 +303,12 @@ sndinitstat SNDDMA_InitDirect (void)
|
|||
if (DS_OK != pDSPBuf->lpVtbl->SetFormat (pDSPBuf, &pformat))
|
||||
{
|
||||
// if (snd_firsttime)
|
||||
// Con_SafePrintf ("Set primary sound buffer format: no\n");
|
||||
// Con_Printf ("Set primary sound buffer format: no\n");
|
||||
}
|
||||
else
|
||||
// {
|
||||
// if (snd_firsttime)
|
||||
// Con_SafePrintf ("Set primary sound buffer format: yes\n");
|
||||
// Con_Printf ("Set primary sound buffer format: yes\n");
|
||||
|
||||
primary_format_set = true;
|
||||
// }
|
||||
|
@ -329,7 +329,7 @@ sndinitstat SNDDMA_InitDirect (void)
|
|||
|
||||
if (DS_OK != pDS->lpVtbl->CreateSoundBuffer(pDS, &dsbuf, &pDSBuf, NULL))
|
||||
{
|
||||
Con_SafePrintf ("DS:CreateSoundBuffer Failed");
|
||||
Con_Printf ("DS:CreateSoundBuffer Failed");
|
||||
FreeSound ();
|
||||
return SIS_FAILURE;
|
||||
}
|
||||
|
@ -340,19 +340,19 @@ sndinitstat SNDDMA_InitDirect (void)
|
|||
|
||||
if (DS_OK != pDSBuf->lpVtbl->GetCaps (pDSBuf, &dsbcaps))
|
||||
{
|
||||
Con_SafePrintf ("DS:GetCaps failed\n");
|
||||
Con_Printf ("DS:GetCaps failed\n");
|
||||
FreeSound ();
|
||||
return SIS_FAILURE;
|
||||
}
|
||||
|
||||
// if (snd_firsttime)
|
||||
// Con_SafePrintf ("Using secondary sound buffer\n");
|
||||
// Con_Printf ("Using secondary sound buffer\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DS_OK != pDS->lpVtbl->SetCooperativeLevel (pDS, mainwindow, DSSCL_WRITEPRIMARY))
|
||||
{
|
||||
Con_SafePrintf ("Set coop level failed\n");
|
||||
Con_Printf ("Set coop level failed\n");
|
||||
FreeSound ();
|
||||
return SIS_FAILURE;
|
||||
}
|
||||
|
@ -364,14 +364,14 @@ sndinitstat SNDDMA_InitDirect (void)
|
|||
}
|
||||
|
||||
pDSBuf = pDSPBuf;
|
||||
// Con_SafePrintf ("Using primary sound buffer\n");
|
||||
// Con_Printf ("Using primary sound buffer\n");
|
||||
}
|
||||
|
||||
// Make sure mixer is active
|
||||
pDSBuf->lpVtbl->Play(pDSBuf, 0, 0, DSBPLAY_LOOPING);
|
||||
|
||||
/* if (snd_firsttime)
|
||||
Con_SafePrintf(" %d channel(s)\n"
|
||||
Con_Printf(" %d channel(s)\n"
|
||||
" %d bits/sample\n"
|
||||
" %d bytes/sec\n",
|
||||
shm->channels, shm->samplebits, shm->speed);*/
|
||||
|
@ -386,14 +386,14 @@ sndinitstat SNDDMA_InitDirect (void)
|
|||
NULL, 0)) != DS_OK) {
|
||||
if (hresult != DSERR_BUFFERLOST)
|
||||
{
|
||||
Con_SafePrintf ("SNDDMA_InitDirect: DS::Lock Sound Buffer Failed\n");
|
||||
Con_Printf ("SNDDMA_InitDirect: DS::Lock Sound Buffer Failed\n");
|
||||
FreeSound ();
|
||||
return SIS_FAILURE;
|
||||
}
|
||||
|
||||
if (++reps > 10000)
|
||||
{
|
||||
Con_SafePrintf ("SNDDMA_InitDirect: DS: couldn't restore buffer\n");
|
||||
Con_Printf ("SNDDMA_InitDirect: DS: couldn't restore buffer\n");
|
||||
FreeSound ();
|
||||
return SIS_FAILURE;
|
||||
}
|
||||
|
@ -466,7 +466,7 @@ qboolean SNDDMA_InitWav (void)
|
|||
{
|
||||
if (hr != MMSYSERR_ALLOCATED)
|
||||
{
|
||||
Con_SafePrintf ("waveOutOpen failed\n");
|
||||
Con_Printf ("waveOutOpen failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ qboolean SNDDMA_InitWav (void)
|
|||
// "Sound not available",
|
||||
// MB_RETRYCANCEL | MB_SETFOREGROUND | MB_ICONEXCLAMATION) != IDRETRY)
|
||||
// {
|
||||
Con_SafePrintf ("waveOutOpen failure;\n"
|
||||
Con_Printf ("waveOutOpen failure;\n"
|
||||
" hardware already in use\n");
|
||||
return false;
|
||||
// }
|
||||
|
@ -492,14 +492,14 @@ qboolean SNDDMA_InitWav (void)
|
|||
hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, gSndBufSize);
|
||||
if (!hData)
|
||||
{
|
||||
Con_SafePrintf ("Sound: Out of memory.\n");
|
||||
Con_Printf ("Sound: Out of memory.\n");
|
||||
FreeSound ();
|
||||
return false;
|
||||
}
|
||||
lpData = GlobalLock(hData);
|
||||
if (!lpData)
|
||||
{
|
||||
Con_SafePrintf ("Sound: Failed to lock.\n");
|
||||
Con_Printf ("Sound: Failed to lock.\n");
|
||||
FreeSound ();
|
||||
return false;
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ qboolean SNDDMA_InitWav (void)
|
|||
|
||||
if (hWaveHdr == NULL)
|
||||
{
|
||||
Con_SafePrintf ("Sound: Failed to Alloc header.\n");
|
||||
Con_Printf ("Sound: Failed to Alloc header.\n");
|
||||
FreeSound ();
|
||||
return false;
|
||||
}
|
||||
|
@ -524,7 +524,7 @@ qboolean SNDDMA_InitWav (void)
|
|||
|
||||
if (lpWaveHdr == NULL)
|
||||
{
|
||||
Con_SafePrintf ("Sound: Failed to lock header.\n");
|
||||
Con_Printf ("Sound: Failed to lock header.\n");
|
||||
FreeSound ();
|
||||
return false;
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ qboolean SNDDMA_InitWav (void)
|
|||
if (waveOutPrepareHeader(hWaveOut, lpWaveHdr+i, sizeof(WAVEHDR)) !=
|
||||
MMSYSERR_NOERROR)
|
||||
{
|
||||
Con_SafePrintf ("Sound: failed to prepare wave headers\n");
|
||||
Con_Printf ("Sound: failed to prepare wave headers\n");
|
||||
FreeSound ();
|
||||
return false;
|
||||
}
|
||||
|
@ -591,12 +591,12 @@ qboolean SNDDMA_Init(void)
|
|||
snd_isdirect = true;
|
||||
|
||||
if (snd_firsttime)
|
||||
Con_SafePrintf ("DirectSound initialized\n");
|
||||
Con_Printf ("DirectSound initialized\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
snd_isdirect = false;
|
||||
Con_SafePrintf ("DirectSound failed to init\n");
|
||||
Con_Printf ("DirectSound failed to init\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -615,11 +615,11 @@ qboolean SNDDMA_Init(void)
|
|||
if (snd_iswave)
|
||||
{
|
||||
if (snd_firsttime)
|
||||
Con_SafePrintf ("Wave sound initialized\n");
|
||||
Con_Printf ("Wave sound initialized\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
Con_SafePrintf ("Wave sound failed to init\n");
|
||||
Con_Printf ("Wave sound failed to init\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -629,7 +629,7 @@ qboolean SNDDMA_Init(void)
|
|||
if (!dsound_init && !wav_init)
|
||||
{
|
||||
if (snd_firsttime)
|
||||
Con_SafePrintf ("No sound device initialized\n");
|
||||
Con_Printf ("No sound device initialized\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -722,7 +722,7 @@ void SNDDMA_Submit(void)
|
|||
|
||||
if (wResult != MMSYSERR_NOERROR)
|
||||
{
|
||||
Con_SafePrintf ("Failed to write block to device\n");
|
||||
Con_Printf ("Failed to write block to device\n");
|
||||
FreeSound ();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -337,7 +337,7 @@ void GL_Init (void)
|
|||
dlhand = dlopen (NULL, RTLD_LAZY);
|
||||
|
||||
if (dlhand == NULL) {
|
||||
Con_SafePrintf ("unable to set.\n");
|
||||
Con_Printf ("unable to set.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -474,15 +474,15 @@ void VID_Init8bitPalette()
|
|||
|
||||
dlhand = dlopen (NULL, RTLD_LAZY);
|
||||
|
||||
Con_SafePrintf ("8-bit GL extensions: ");
|
||||
Con_Printf ("8-bit GL extensions: ");
|
||||
|
||||
if (dlhand == NULL) {
|
||||
Con_SafePrintf ("unable to check.\n");
|
||||
Con_Printf ("unable to check.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (COM_CheckParm("-no8bit")) {
|
||||
Con_SafePrintf("disabled.\n");
|
||||
Con_Printf("disabled.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -491,7 +491,7 @@ void VID_Init8bitPalette()
|
|||
GLubyte table[256][4];
|
||||
gl3DfxSetPaletteEXT_FUNC load_texture = NULL;
|
||||
|
||||
Con_SafePrintf("3DFX_set_global_palette.\n");
|
||||
Con_Printf("3DFX_set_global_palette.\n");
|
||||
load_texture = (void *) dlsym(dlhand, "gl3DfxSetPaletteEXT");
|
||||
|
||||
glEnable( GL_SHARED_TEXTURE_PALETTE_EXT );
|
||||
|
@ -510,7 +510,7 @@ void VID_Init8bitPalette()
|
|||
char *oldPalette, *newPalette;
|
||||
glColorTableEXT_FUNC load_texture = NULL;
|
||||
|
||||
Con_SafePrintf("GL_EXT_shared.\n");
|
||||
Con_Printf("GL_EXT_shared.\n");
|
||||
load_texture = (void *) dlsym(dlhand, "glColorTableEXT");
|
||||
|
||||
glEnable( GL_SHARED_TEXTURE_PALETTE_EXT );
|
||||
|
@ -528,7 +528,7 @@ void VID_Init8bitPalette()
|
|||
|
||||
dlclose(dlhand);
|
||||
dlhand = NULL;
|
||||
Con_SafePrintf ("not found.\n");
|
||||
Con_Printf ("not found.\n");
|
||||
}
|
||||
|
||||
void VID_Init(unsigned char *palette)
|
||||
|
@ -613,7 +613,7 @@ void VID_Init(unsigned char *palette)
|
|||
// Check for 3DFX Extensions and initialize them.
|
||||
VID_Init8bitPalette();
|
||||
|
||||
Con_SafePrintf ("Video mode %dx%d initialized.\n", width, height);
|
||||
Con_Printf ("Video mode %dx%d initialized.\n", width, height);
|
||||
|
||||
vid.recalc_refdef = 1; // force a surface cache flush
|
||||
}
|
||||
|
|
|
@ -418,7 +418,7 @@ void VID_Init8bitPalette()
|
|||
if (strstr(gl_extensions, "GL_EXT_shared_texture_palette") == NULL)
|
||||
return;
|
||||
|
||||
Con_SafePrintf("8-bit GL extensions enabled.\n");
|
||||
Con_Printf("8-bit GL extensions enabled.\n");
|
||||
glEnable( GL_SHARED_TEXTURE_PALETTE_EXT );
|
||||
oldPalette = (char *) d_8to24table; //d_8to24table3dfx;
|
||||
newPalette = thePalette;
|
||||
|
@ -510,7 +510,7 @@ void VID_Init(unsigned char *palette)
|
|||
hasdga = hasdgavideo = 0;
|
||||
}
|
||||
}
|
||||
Con_SafePrintf ("hasdga = %i\nhasdgavideo = %i\n", hasdga, hasdgavideo);
|
||||
Con_Printf ("hasdga = %i\nhasdgavideo = %i\n", hasdga, hasdgavideo);
|
||||
#endif
|
||||
#ifdef HAVE_DLOPEN
|
||||
dlhand = dlopen(NULL, RTLD_LAZY);
|
||||
|
@ -585,7 +585,7 @@ void VID_Init(unsigned char *palette)
|
|||
// Check for 3DFX Extensions and initialize them.
|
||||
VID_Init8bitPalette();
|
||||
|
||||
Con_SafePrintf ("Video mode %dx%d initialized.\n",
|
||||
Con_Printf ("Video mode %dx%d initialized.\n",
|
||||
width, height);
|
||||
|
||||
vid_initialized = true;
|
||||
|
|
|
@ -307,7 +307,7 @@ qboolean VID_AllocBuffers (int width, int height)
|
|||
if ((host_parms.memsize - tbuffersize + SURFCACHE_SIZE_AT_320X200 +
|
||||
0x10000 * 3) < MINIMUM_MEMORY)
|
||||
{
|
||||
Con_SafePrintf ("Not enough memory for video mode\n");
|
||||
Con_Printf ("Not enough memory for video mode\n");
|
||||
return false; // not enough memory for mode
|
||||
}
|
||||
|
||||
|
@ -862,7 +862,7 @@ void VID_InitFullDIB (HINSTANCE hInstance)
|
|||
modenum = 0;
|
||||
lowestres = 99999;
|
||||
|
||||
Con_SafePrintf ("No 8-bpp fullscreen DIB modes found\n");
|
||||
Con_Printf ("No 8-bpp fullscreen DIB modes found\n");
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -1057,7 +1057,7 @@ void VID_InitFullDIB (HINSTANCE hInstance)
|
|||
if (nummodes != originalnummodes)
|
||||
vid_default = MODE_FULLSCREEN_DEFAULT;
|
||||
else
|
||||
Con_SafePrintf ("No fullscreen DIB modes found\n");
|
||||
Con_Printf ("No fullscreen DIB modes found\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1764,7 +1764,7 @@ int VID_SetMode (int modenum, unsigned char *palette)
|
|||
ClearAllStates ();
|
||||
|
||||
if (!msg_suppress_1)
|
||||
Con_SafePrintf ("Video mode %s initialized\n", VID_GetModeDescription (vid_modenum));
|
||||
Con_Printf ("Video mode %s initialized\n", VID_GetModeDescription (vid_modenum));
|
||||
|
||||
VID_SetPalette (palette);
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ VID_Init8bitPalette (void)
|
|||
if (strstr (gl_extensions, "GL_EXT_shared_texture_palette") == NULL)
|
||||
return;
|
||||
|
||||
Con_SafePrintf ("8-bit GL extensions enabled.\n");
|
||||
Con_Printf ("8-bit GL extensions enabled.\n");
|
||||
glEnable (GL_SHARED_TEXTURE_PALETTE_EXT);
|
||||
oldPalette = (char *) d_8to24table; //d_8to24table3dfx;
|
||||
newPalette = thePalette;
|
||||
|
@ -422,7 +422,7 @@ VID_Init (unsigned char *palette)
|
|||
// Check for 3DFX Extensions and initialize them.
|
||||
VID_Init8bitPalette();
|
||||
|
||||
Con_SafePrintf ("Video mode %dx%d initialized.\n",
|
||||
Con_Printf ("Video mode %dx%d initialized.\n",
|
||||
width, height);
|
||||
|
||||
vid_initialized = true;
|
||||
|
|
|
@ -489,7 +489,7 @@ int VID_SetMode (int modenum, unsigned char *palette)
|
|||
ClearAllStates ();
|
||||
|
||||
if (!msg_suppress_1)
|
||||
Con_SafePrintf ("Video mode %s initialized.\n", VID_GetModeDescription (vid_modenum));
|
||||
Con_Printf ("Video mode %s initialized.\n", VID_GetModeDescription (vid_modenum));
|
||||
|
||||
VID_SetPalette (palette);
|
||||
|
||||
|
@ -1540,7 +1540,7 @@ void VID_InitFullDIB (HINSTANCE hInstance)
|
|||
} while (!done);
|
||||
|
||||
if (nummodes == originalnummodes)
|
||||
Con_SafePrintf ("No fullscreen DIB modes found\n");
|
||||
Con_Printf ("No fullscreen DIB modes found\n");
|
||||
}
|
||||
|
||||
qboolean VID_Is8bit() {
|
||||
|
@ -1561,7 +1561,7 @@ void VID_Init8bitPalette()
|
|||
COM_CheckParm("-no8bit"))
|
||||
return;
|
||||
|
||||
Con_SafePrintf("8-bit GL extensions enabled.\n");
|
||||
Con_Printf("8-bit GL extensions enabled.\n");
|
||||
glEnable( GL_SHARED_TEXTURE_PALETTE_EXT );
|
||||
oldPalette = (char *) d_8to24table; //d_8to24table3dfx;
|
||||
newPalette = thePalette;
|
||||
|
|
Loading…
Reference in a new issue