Resolved conflicts with macosx header files

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2671 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2007-09-22 19:28:27 +00:00
parent 413cc5ff0a
commit 0a682a76d6
49 changed files with 447 additions and 392 deletions

View File

@ -50,6 +50,9 @@ ifeq ($(FTE_TARGET),) #user didn't specify prefered target
ifeq ($(shell uname),Linux)
FTE_TARGET=linux
endif
ifeq ($(shell uname),Darwin)
FTE_TARGET=macosx
endif
ifeq ($(shell uname),FreeBSD)
FTE_TARGET=bsd
endif
@ -563,7 +566,22 @@ endif
MINGL_EXE_NAME=../fteqw.mingl$(BITS)
MINGL_DIR=mingl_linux$(BITS)
endif
ifeq ($(FTE_TARGET),macosx)
SV_DIR=sv_macosx
GLB_DIR=gl_macosx
GLCL_DIR=glcl_macosx
MINGL_DIR=mingl_macosx
SWB_DIR=sw_macosx
SWCL_DIR=sw_macosx
GL_CFLAGS=$(GLCFLAGS) -D__MACOSX__
GL_LDFLAGS=-framework AGL -framework OpenGL
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidmac.o sys_linux.o cd_null.o
SW_CFLAGS=$(SWCFLAGS) -D__MACOSX__
SW_LDFLAGS=
SWCL_OBJS=$(SOFTWARE_OBJS) cd_null.o sys_linux.o
endif
ifeq ($(FTE_TARGET),morphos)
SV_DIR=sv_morphos

View File

@ -1728,7 +1728,7 @@ void CL_Packet_f (void)
adr.address.ip[2] = cls.netchan.remote_address.address.ip[2];
adr.address.ip[3] = cls.netchan.remote_address.address.ip[3];
adr.port = cls.netchan.remote_address.port;
Con_Printf (S_WARNING "Server is broken. Trying to send to server instead.\n");
Con_Printf (SP_WARNING "Server is broken. Trying to send to server instead.\n");
}
@ -2640,7 +2640,7 @@ void CL_ForceStopDownload (qboolean finish)
{
if (Cmd_IsInsecure())
{
Con_Printf(S_WARNING "Execution from server rejected for %s\n", Cmd_Argv(0));
Con_Printf(SP_WARNING "Execution from server rejected for %s\n", Cmd_Argv(0));
return;
}

View File

@ -1235,7 +1235,7 @@ void CL_ParseDownload (void)
if (!*cls.downloadname) //huh... that's not right...
{
Con_Printf(S_WARNING "Warning: Server sending unknown file.\n");
Con_Printf(SP_WARNING "Warning: Server sending unknown file.\n");
strcpy(cls.downloadname, "unknown.txt");
strcpy(cls.downloadtempname, "unknown.tmp");
}
@ -1313,7 +1313,7 @@ void CL_ParseDownload (void)
if (percent != 100 && size == 0 && cl_dlemptyterminate.value)
{
Con_Printf(S_WARNING "WARNING: Client received empty svc_download, assuming EOF\n");
Con_Printf(SP_WARNING "WARNING: Client received empty svc_download, assuming EOF\n");
percent = 100;
}
@ -2501,7 +2501,7 @@ void CLQ2_ParseConfigString (void)
{
// the Q2 client normally exits here, however for our purposes we might as well ignore it
if (map_checksum != serverchecksum)
Con_Printf(S_WARNING "WARNING: Client checksum does not match server checksum (%i != %i)", map_checksum, serverchecksum);
Con_Printf(SP_WARNING "WARNING: Client checksum does not match server checksum (%i != %i)", map_checksum, serverchecksum);
}
}
@ -4875,7 +4875,7 @@ void CLNQ_ParseServerMessage (void)
if (cl.playernum[0] >= MAX_CLIENTS)
{
cl.playernum[0] = 32; //pretend it's an mvd (we have that spare slot)
Con_Printf(S_WARNING "WARNING: Server put us in slot %i. We are not on the scoreboard.\n");
Con_Printf(SP_WARNING "WARNING: Server put us in slot %i. We are not on the scoreboard.\n");
}
}
else

View File

@ -412,7 +412,7 @@ int SCR_StringToPalIndex (char *rgbstring, float rgbinputscale)
r = bound(0, r, 255);
g = bound(0, g, 255);
b = bound(0, b, 255);
i = GetPalette(r, g, b);
i = GetPaletteIndex(r, g, b);
}
else
{

View File

@ -505,7 +505,7 @@ qboolean CIN_PlayCinematic (char *arg)
CIN_FinishCinematic ();
cin.cinematictime = 0; // done
Con_Printf(S_WARNING "Cinematic %s not found.\n", name);
Con_Printf(SP_WARNING "Cinematic %s not found.\n", name);
return true;
}

View File

@ -2156,7 +2156,7 @@ void AddOcranaLEDsIndexed (qbyte *image, int h, int w)
bd = (b - ledcolors[i*2+1][2]) / 8;
for (idx = 0; idx < 8; idx++)
{
tridx[idx] = GetPalette(r, g, b);
tridx[idx] = GetPaletteIndex(r, g, b);
r -= rd;
g -= gd;
b -= bd;

View File

@ -1043,7 +1043,7 @@ static void PF_R_SetViewFlag(progfuncs_t *prinst, struct globalvars_s *pr_global
break;
case VF_CARTESIAN_ANGLES:
Con_Printf(S_WARNING "WARNING: CARTESIAN ANGLES ARE NOT YET SUPPORTED!\n");
Con_Printf(SP_WARNING "WARNING: CARTESIAN ANGLES ARE NOT YET SUPPORTED!\n");
break;
case VF_VIEWPORT:

View File

@ -1532,11 +1532,11 @@ void P_LoadParticleSet(char *name, qboolean first)
}
else if (first)
{
Con_Printf(S_WARNING "Couldn't find particle description %s, using spikeset\n", name);
Con_Printf(SP_WARNING "Couldn't find particle description %s, using spikeset\n", name);
Cbuf_AddText(particle_set_spikeset, RESTRICT_LOCAL);
}
else
Con_Printf(S_WARNING "Couldn't find particle description %s\n", name);
Con_Printf(SP_WARNING "Couldn't find particle description %s\n", name);
}
}
@ -3791,7 +3791,7 @@ void SWD_DrawParticleSpark(particle_t *p, part_type_t *type)
b = 0;
else if (b > 255)
b = 255;
p->color = GetPalette(r, g, b);
p->color = GetPaletteIndex(r, g, b);
speed = Length(p->vel);
if ((speed) < 1)
@ -3827,7 +3827,7 @@ void SWD_DrawParticleBlob(particle_t *p, part_type_t *type)
b = 0;
else if (b > 255)
b = 255;
p->color = GetPalette(r, g, b);
p->color = GetPaletteIndex(r, g, b);
D_DrawParticleTrans(p, type->blendmode);
}
void SWD_DrawParticleBeam(beamseg_t *beam, part_type_t *type)
@ -3863,7 +3863,7 @@ void SWD_DrawParticleBeam(beamseg_t *beam, part_type_t *type)
b = 0;
else if (b > 255)
b = 255;
p->color = GetPalette(r, g, b);
p->color = GetPaletteIndex(r, g, b);
D_DrawSparkTrans(p, p->org, q->org, type->blendmode);
}
#endif

View File

@ -467,7 +467,7 @@ void Renderer_Init(void);
void R_RestartRenderer_f (void);//this goes here so we can save some stack when first initing the sw renderer.
//used to live in glquake.h
qbyte GetPalette(int red, int green, int blue);
qbyte GetPaletteIndex(int red, int green, int blue);
qbyte GetPaletteNoFB(int red, int green, int blue);
extern cvar_t r_norefresh;
extern cvar_t r_drawentities;

View File

@ -1645,7 +1645,7 @@ qboolean R_ApplyRenderer_Load (rendererstate_t *newr)
f = 1 - ((float)j/VID_GRADES);
for (i = 0; i < 256-vid.fullbright; i++)
{
data[i] = GetPalette(host_basepal[i*3+0]*f, host_basepal[i*3+1]*f, host_basepal[i*3+2]*f);
data[i] = GetPaletteIndex(host_basepal[i*3+0]*f, host_basepal[i*3+1]*f, host_basepal[i*3+2]*f);
}
for (; i < 256; i++)
data[i] = i;
@ -2067,7 +2067,7 @@ TRACE(("dbg: R_RestartRenderer_f\n"));
if (R_ApplyRenderer(&oldr))
{
TRACE(("dbg: R_RestartRenderer_f old restored\n"));
Con_Printf(S_ERROR "Video mode switch failed. Old mode restored.\n"); //go back to the old mode, the new one failed.
Con_Printf(SP_ERROR "Video mode switch failed. Old mode restored.\n"); //go back to the old mode, the new one failed.
}
else
{
@ -2075,7 +2075,7 @@ TRACE(("dbg: R_RestartRenderer_f\n"));
if (newr.rate != 0)
{
Con_Printf(S_NOTICE "Trying default refresh rate\n");
Con_Printf(SP_NOTICE "Trying default refresh rate\n");
newr.rate = 0;
failed = !R_ApplyRenderer(&newr);
}
@ -2086,7 +2086,7 @@ TRACE(("dbg: R_RestartRenderer_f\n"));
if (R_ApplyRenderer(&newr))
{
TRACE(("dbg: R_RestartRenderer_f going to dedicated\n"));
Con_Printf(S_ERROR "Video mode switch failed. Old mode wasn't supported either. Console forced.\nChange vid_width, vid_height, vid_bpp, vid_displayfrequency to a compatable mode, and then use the setrenderer command.\n");
Con_Printf(SP_ERROR "Video mode switch failed. Old mode wasn't supported either. Console forced.\nChange vid_width, vid_height, vid_bpp, vid_displayfrequency to a compatable mode, and then use the setrenderer command.\n");
}
else
Sys_Error("Couldn't fall back to previous renderer\n");

View File

@ -226,7 +226,7 @@ qbyte *Skin_Cache8 (skin_t *skin)
if (qrenderer == QR_SOFTWARE && r_pixbytes == 1 && cls.allow_fbskins<0.2) //only time FB has to exist... (gl can be disabled)
{
for (x = 0; x < vid.fullbright; x++)
fbremap[x] = GetPalette(host_basepal[((x+256-vid.fullbright)*3)], host_basepal[((x+256-vid.fullbright)*3)+1], host_basepal[((x+256-vid.fullbright)*3)+2]);
fbremap[x] = GetPaletteIndex(host_basepal[((x+256-vid.fullbright)*3)], host_basepal[((x+256-vid.fullbright)*3)+1], host_basepal[((x+256-vid.fullbright)*3)+2]);
}
else
#endif
@ -251,7 +251,7 @@ qbyte *Skin_Cache8 (skin_t *skin)
s = COM_Parse(s);
col[2] = atof(com_token);
bv = GetPalette(col[0], col[1], col[2]);
bv = GetPaletteIndex(col[0], col[1], col[2]);
skin->width = 320;
skin->height = 200;

View File

@ -210,7 +210,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
if (!Alsa_InitAlsa())
{
Con_Printf(S_ERROR "Alsa does not appear to be installed or compatable\n");
Con_Printf(SP_ERROR "Alsa does not appear to be installed or compatable\n");
return 2;
}
@ -240,14 +240,14 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
SND_PCM_NONBLOCK);
if (0 > err)
{
Con_Printf (S_ERROR "Error: audio open error: %s\n", psnd_strerror (err));
Con_Printf (SP_ERROR "Error: audio open error: %s\n", psnd_strerror (err));
return 0;
}
Con_Printf ("ALSA: Using PCM %s.\n", pcmname);
err = psnd_pcm_hw_params_any (pcm, hw);
if (0 > err) {
Con_Printf (S_ERROR "ALSA: error setting hw_params_any. %s\n",
Con_Printf (SP_ERROR "ALSA: error setting hw_params_any. %s\n",
psnd_strerror (err));
goto error;
}
@ -255,7 +255,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
err = psnd_pcm_hw_params_set_access (pcm, hw, SND_PCM_ACCESS_MMAP_INTERLEAVED);
if (0 > err)
{
Con_Printf (S_ERROR "ALSA: Failure to set noninterleaved PCM access. %s\n"
Con_Printf (SP_ERROR "ALSA: Failure to set noninterleaved PCM access. %s\n"
"Note: Interleaved is not supported\n",
psnd_strerror (err));
goto error;
@ -280,7 +280,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
}
else
{
Con_Printf (S_ERROR "ALSA: no usable formats. %s\n", psnd_strerror (err));
Con_Printf (SP_ERROR "ALSA: no usable formats. %s\n", psnd_strerror (err));
goto error;
}
err = psnd_pcm_hw_params_set_format (pcm, hw, spft);
@ -298,7 +298,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
stereo = 1;
else
{
Con_Printf (S_ERROR "ALSA: no usable number of channels. %s\n", psnd_strerror (err));
Con_Printf (SP_ERROR "ALSA: no usable number of channels. %s\n", psnd_strerror (err));
goto error;
}
err = psnd_pcm_hw_params_set_channels (pcm, hw, stereo);
@ -321,7 +321,7 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
rate = 800;
else
{
Con_Printf (S_ERROR "ALSA: no usable rates. %s\n", psnd_strerror (err));
Con_Printf (SP_ERROR "ALSA: no usable rates. %s\n", psnd_strerror (err));
goto error;
}
err = psnd_pcm_hw_params_set_rate_near (pcm, hw, &rate, 0);
@ -334,37 +334,37 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
err = psnd_pcm_hw_params_set_period_size_near (pcm, hw, &frag_size, 0);
if (0 > err) {
Con_Printf (S_ERROR "ALSA: unable to set period size near %i. %s\n",
Con_Printf (SP_ERROR "ALSA: unable to set period size near %i. %s\n",
(int) frag_size, psnd_strerror (err));
goto error;
}
err = psnd_pcm_hw_params (pcm, hw);
if (0 > err) {
Con_Printf (S_ERROR "ALSA: unable to install hw params: %s\n",
Con_Printf (SP_ERROR "ALSA: unable to install hw params: %s\n",
psnd_strerror (err));
goto error;
}
err = psnd_pcm_sw_params_current (pcm, sw);
if (0 > err) {
Con_Printf (S_ERROR "ALSA: unable to determine current sw params. %s\n",
Con_Printf (SP_ERROR "ALSA: unable to determine current sw params. %s\n",
psnd_strerror (err));
goto error;
}
err = psnd_pcm_sw_params_set_start_threshold (pcm, sw, ~0U);
if (0 > err) {
Con_Printf (S_ERROR "ALSA: unable to set playback threshold. %s\n",
Con_Printf (SP_ERROR "ALSA: unable to set playback threshold. %s\n",
psnd_strerror (err));
goto error;
}
err = psnd_pcm_sw_params_set_stop_threshold (pcm, sw, ~0U);
if (0 > err) {
Con_Printf (S_ERROR "ALSA: unable to set playback stop threshold. %s\n",
Con_Printf (SP_ERROR "ALSA: unable to set playback stop threshold. %s\n",
psnd_strerror (err));
goto error;
}
err = psnd_pcm_sw_params (pcm, sw);
if (0 > err) {
Con_Printf (S_ERROR "ALSA: unable to install sw params. %s\n",
Con_Printf (SP_ERROR "ALSA: unable to install sw params. %s\n",
psnd_strerror (err));
goto error;
}
@ -379,14 +379,14 @@ static int ALSA_InitCard (soundcardinfo_t *sc, int cardnum)
err = psnd_pcm_hw_params_set_buffer_size_near(pcm, hw, &buffer_size);
if (err < 0)
{
Con_Printf (S_ERROR "ALSA: unable to set buffer size. %s\n", psnd_strerror (err));
Con_Printf (SP_ERROR "ALSA: unable to set buffer size. %s\n", psnd_strerror (err));
goto error;
}
}
err = psnd_pcm_hw_params_get_buffer_size (hw, &buffer_size);
if (0 > err) {
Con_Printf (S_ERROR "ALSA: unable to get buffer size. %s\n",
Con_Printf (SP_ERROR "ALSA: unable to get buffer size. %s\n",
psnd_strerror (err));
goto error;
}

View File

@ -84,7 +84,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (sc->audio_fd < 0)
{
perror(snddev);
Con_Printf(S_ERROR "OSS: Could not open %s\n", snddev);
Con_Printf(SP_ERROR "OSS: Could not open %s\n", snddev);
OSS_Shutdown(sc);
return 0;
}
@ -94,7 +94,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (rc < 0)
{
perror(snddev);
Con_Printf(S_ERROR "OSS: Could not reset %s\n", snddev);
Con_Printf(SP_ERROR "OSS: Could not reset %s\n", snddev);
OSS_Shutdown(sc);
return 0;
}
@ -102,14 +102,14 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (ioctl(sc->audio_fd, SNDCTL_DSP_GETCAPS, &caps)==-1)
{
perror(snddev);
Con_Printf(S_ERROR "OSS: Sound driver too old\n");
Con_Printf(SP_ERROR "OSS: Sound driver too old\n");
OSS_Shutdown(sc);
return 0;
}
if (!(caps & DSP_CAP_TRIGGER) || !(caps & DSP_CAP_MMAP))
{
Con_Printf(S_ERROR "OSS: Sorry but your soundcard can't do this\n");
Con_Printf(SP_ERROR "OSS: Sorry but your soundcard can't do this\n");
OSS_Shutdown(sc);
return 0;
}
@ -117,7 +117,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (ioctl(sc->audio_fd, SNDCTL_DSP_GETOSPACE, &info)==-1)
{
perror("GETOSPACE");
Con_Printf(S_ERROR "OSS: Um, can't do GETOSPACE?\n");
Con_Printf(SP_ERROR "OSS: Um, can't do GETOSPACE?\n");
OSS_Shutdown(sc);
return 0;
}
@ -129,7 +129,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
sc->sn.samplebits = 8;
else if (!(fmt & AFMT_U8))
{
Con_Printf(S_ERROR "OSS: No needed sample formats supported\n");
Con_Printf(SP_ERROR "OSS: No needed sample formats supported\n");
OSS_Shutdown(sc);
return 0;
}
@ -142,7 +142,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (i == (sizeof(tryrates)/4))
{
perror(snddev);
Con_Printf(S_ERROR "OSS: Failed to obtain a suitable rate\n");
Con_Printf(SP_ERROR "OSS: Failed to obtain a suitable rate\n");
OSS_Shutdown(sc);
return 0;
}
@ -162,7 +162,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (!sc->sn.buffer)
{
perror(snddev);
Con_Printf(S_ERROR "OSS: Could not mmap %s\n", snddev);
Con_Printf(SP_ERROR "OSS: Could not mmap %s\n", snddev);
OSS_Shutdown(sc);
return 0;
}
@ -176,7 +176,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (rc < 0)
{
perror(snddev);
Con_Printf(S_ERROR "OSS: Could not set %s to stereo=%d\n", snddev, sc->sn.numchannels);
Con_Printf(SP_ERROR "OSS: Could not set %s to stereo=%d\n", snddev, sc->sn.numchannels);
OSS_Shutdown(sc);
return 0;
}
@ -189,7 +189,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (rc < 0)
{
perror(snddev);
Con_Printf(S_ERROR "OSS: Could not set %s speed to %d\n", snddev, sc->sn.speed);
Con_Printf(SP_ERROR "OSS: Could not set %s speed to %d\n", snddev, sc->sn.speed);
OSS_Shutdown(sc);
return 0;
}
@ -201,7 +201,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (rc < 0)
{
perror(snddev);
Con_Printf(S_ERROR "OSS: Could not support 16-bit data. Try 8-bit.\n");
Con_Printf(SP_ERROR "OSS: Could not support 16-bit data. Try 8-bit.\n");
OSS_Shutdown(sc);
return 0;
}
@ -213,7 +213,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (rc < 0)
{
perror(snddev);
Con_Printf(S_ERROR "OSS: Could not support 8-bit data.\n");
Con_Printf(SP_ERROR "OSS: Could not support 8-bit data.\n");
OSS_Shutdown(sc);
return 0;
}
@ -221,7 +221,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
else
{
perror(snddev);
Con_Printf(S_ERROR "OSS: %d-bit sound not supported.\n", sc->sn.samplebits);
Con_Printf(SP_ERROR "OSS: %d-bit sound not supported.\n", sc->sn.samplebits);
OSS_Shutdown(sc);
return 0;
}
@ -233,7 +233,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (rc < 0)
{
perror(snddev);
Con_Printf(S_ERROR "OSS: Could not toggle.\n");
Con_Printf(SP_ERROR "OSS: Could not toggle.\n");
OSS_Shutdown(sc);
return 0;
}
@ -242,7 +242,7 @@ static int OSS_InitCard(soundcardinfo_t *sc, int cardnum)
if (rc < 0)
{
perror(snddev);
Con_Printf(S_ERROR "OSS: Could not toggle.\n");
Con_Printf(SP_ERROR "OSS: Could not toggle.\n");
OSS_Shutdown(sc);
return 0;
}

View File

@ -267,9 +267,9 @@ int WAV_InitCard (soundcardinfo_t *sc, int cardnum)
if (hr != MMSYSERR_ALLOCATED)
{
if (hr == WAVERR_BADFORMAT)
Con_SafePrintf (S_ERROR "waveOutOpen failed, format not supported\n");
Con_SafePrintf (SP_ERROR "waveOutOpen failed, format not supported\n");
else
Con_SafePrintf (S_ERROR "waveOutOpen failed, return code %i\n", hr);
Con_SafePrintf (SP_ERROR "waveOutOpen failed, return code %i\n", hr);
WAV_Shutdown (sc);
return false;
}
@ -280,7 +280,7 @@ int WAV_InitCard (soundcardinfo_t *sc, int cardnum)
// "Sound not available",
// MB_RETRYCANCEL | MB_SETFOREGROUND | MB_ICONEXCLAMATION) != IDRETRY)
// {
Con_SafePrintf (S_ERROR "waveOutOpen failure;\n"
Con_SafePrintf (SP_ERROR "waveOutOpen failure;\n"
" hardware already in use\nclose the app, then try using snd_restart\n");
WAV_Shutdown (sc);
return false;
@ -297,14 +297,14 @@ int WAV_InitCard (soundcardinfo_t *sc, int cardnum)
wh->hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, wh->gSndBufSize);
if (!wh->hData)
{
Con_SafePrintf (S_ERROR "Sound: Out of memory.\n");
Con_SafePrintf (SP_ERROR "Sound: Out of memory.\n");
WAV_Shutdown (sc);
return false;
}
wh->lpData = GlobalLock(wh->hData);
if (!wh->lpData)
{
Con_SafePrintf (S_ERROR "Sound: Failed to lock.\n");
Con_SafePrintf (SP_ERROR "Sound: Failed to lock.\n");
WAV_Shutdown (sc);
return false;
}
@ -320,7 +320,7 @@ int WAV_InitCard (soundcardinfo_t *sc, int cardnum)
if (wh->hWaveHdr == NULL)
{
Con_SafePrintf (S_ERROR "Sound: Failed to Alloc header.\n");
Con_SafePrintf (SP_ERROR "Sound: Failed to Alloc header.\n");
WAV_Shutdown (sc);
return false;
}
@ -329,7 +329,7 @@ int WAV_InitCard (soundcardinfo_t *sc, int cardnum)
if (wh->lpWaveHdr == NULL)
{
Con_SafePrintf (S_ERROR "Sound: Failed to lock header.\n");
Con_SafePrintf (SP_ERROR "Sound: Failed to lock header.\n");
WAV_Shutdown (sc);
return false;
}
@ -345,7 +345,7 @@ int WAV_InitCard (soundcardinfo_t *sc, int cardnum)
if (waveOutPrepareHeader(wh->hWaveOut, wh->lpWaveHdr+i, sizeof(WAVEHDR)) !=
MMSYSERR_NOERROR)
{
Con_SafePrintf (S_ERROR "Sound: failed to prepare wave headers\n");
Con_SafePrintf (SP_ERROR "Sound: failed to prepare wave headers\n");
WAV_Shutdown (sc);
return false;
}

View File

@ -521,6 +521,11 @@ void Sys_ServerActivity(void)
//from the OS. This will cause problems with framebuffer-only setups.
qboolean Sys_GetDesktopParameters(int *width, int *height, int *bpp, int *refreshrate)
{
#ifdef __MACOSX__
//this about sums up the problem with this function
return false;
#else
Display *xtemp;
int scr;
@ -539,6 +544,7 @@ qboolean Sys_GetDesktopParameters(int *width, int *height, int *bpp, int *refres
XCloseDisplay(xtemp);
return true;
#endif
}
#define SYS_CLIPBOARD_SIZE 256

View File

@ -217,9 +217,9 @@ void Validation_CheckIfResponse(char *text)
resp = Security_Verify_Response(f_query_client, crc, cl.players[f_query_client].userinfo, cl.serverinfo);
if (resp && resp->size && *resp->buf)
Con_Printf(S_NOTICE "Authentication Successful.\n");
Con_Printf(SP_NOTICE "Authentication Successful.\n");
else// if (!resp)
Con_Printf(S_ERROR "AUTHENTICATION FAILED.\n");
Con_Printf(SP_ERROR "AUTHENTICATION FAILED.\n");
}
}

View File

@ -710,7 +710,7 @@ void Cmd_Alias_f (void)
s = Cbuf_GetNext(Cmd_ExecLevel);
if (!*s)
{
Con_Printf(S_WARNING "WARNING: Multiline alias was not terminated\n");
Con_Printf(SP_WARNING "WARNING: Multiline alias was not terminated\n");
break;
}
while (*s <= ' ' && *s)

View File

@ -1090,7 +1090,7 @@ static void *QTest_LoadFrameGroup (daliasframetype_t *pframetype, int *seamremap
pframetype = (daliasframetype_t *)&pinframe[pq1inmodel->numverts];
break;
default:
Con_Printf(S_ERROR "Bad frame type for QTest model in %s\n", loadmodel->name);
Con_Printf(SP_ERROR "Bad frame type for QTest model in %s\n", loadmodel->name);
return NULL;
}
frame++;
@ -1214,7 +1214,7 @@ static void *Q1_LoadFrameGroup (daliasframetype_t *pframetype, int *seamremaps)
pframetype = (daliasframetype_t *)pinframe;
break;
default:
Con_Printf(S_ERROR "Bad frame type in %s\n", loadmodel->name);
Con_Printf(SP_ERROR "Bad frame type in %s\n", loadmodel->name);
return NULL;
}
frame++;
@ -1485,7 +1485,7 @@ qboolean Mod_LoadQ1Model (model_t *mod, void *buffer)
qtest = true;
else if (version != ALIAS_VERSION)
{
Con_Printf (S_ERROR "%s has wrong version number (%i should be %i)\n",
Con_Printf (SP_ERROR "%s has wrong version number (%i should be %i)\n",
mod->name, version, ALIAS_VERSION);
return false;
}
@ -1507,7 +1507,7 @@ qboolean Mod_LoadQ1Model (model_t *mod, void *buffer)
pq1inmodel->skinheight < 1 ||
pq1inmodel->skinwidth < 1)
{
Con_Printf(S_ERROR "Model %s has an invalid quantity\n", mod->name);
Con_Printf(SP_ERROR "Model %s has an invalid quantity\n", mod->name);
return false;
}
@ -1802,7 +1802,7 @@ qboolean Mod_LoadQ2Model (model_t *mod, void *buffer)
version = LittleLong (pq2inmodel->version);
if (version != MD2ALIAS_VERSION)
{
Con_Printf (S_ERROR "%s has wrong version number (%i should be %i)\n",
Con_Printf (SP_ERROR "%s has wrong version number (%i should be %i)\n",
mod->name, version, MD2ALIAS_VERSION);
return false;
}
@ -1815,7 +1815,7 @@ qboolean Mod_LoadQ2Model (model_t *mod, void *buffer)
LittleLong(pq2inmodel->skinheight) < 1 ||
LittleLong(pq2inmodel->skinwidth) < 1)
{
Con_Printf(S_ERROR "Model %s has an invalid quantity\n", mod->name);
Con_Printf(SP_ERROR "Model %s has an invalid quantity\n", mod->name);
return false;
}
@ -2380,7 +2380,7 @@ qboolean Mod_LoadQ3Model(model_t *mod, void *buffer)
for (s = 0; s < LittleLong(header->numSurfaces); s++)
{
if (LittleLong(surf->ident) != MD3_IDENT)
Con_Printf(S_WARNING "Warning: md3 sub-surface doesn't match ident\n");
Con_Printf(SP_WARNING "Warning: md3 sub-surface doesn't match ident\n");
size = sizeof(galiasinfo_t) + sizeof(galiasgroup_t)*LittleLong(header->numFrames);
galias = Hunk_Alloc(size);
galias->groupofs = sizeof(*galias); //frame groups
@ -2828,13 +2828,13 @@ qboolean Mod_LoadZymoticModel(model_t *mod, void *buffer)
}
if (intrans != (zymvertex_t *)((char*)header + header->lump_verts.start))
{
Con_Printf(S_ERROR "%s, Vertex transforms list appears corrupt.\n", mod->name);
Con_Printf(SP_ERROR "%s, Vertex transforms list appears corrupt.\n", mod->name);
Hunk_FreeToLowMark(hunkstart);
return false;
}
if (vertbonecounts != (int *)((char*)header + header->lump_vertbonecounts.start))
{
Con_Printf(S_ERROR "%s, Vertex bone counts list appears corrupt.\n", mod->name);
Con_Printf(SP_ERROR "%s, Vertex bone counts list appears corrupt.\n", mod->name);
Hunk_FreeToLowMark(hunkstart);
return false;
}
@ -2870,7 +2870,7 @@ qboolean Mod_LoadZymoticModel(model_t *mod, void *buffer)
}
if (renderlist != (int*)((char*)header + header->lump_render.start + header->lump_render.length))
{
Con_Printf(S_ERROR "%s, render list appears corrupt.\n", mod->name);
Con_Printf(SP_ERROR "%s, render list appears corrupt.\n", mod->name);
Hunk_FreeToLowMark(hunkstart);
return false;
}
@ -2937,7 +2937,7 @@ qboolean Mod_LoadZymoticModel(model_t *mod, void *buffer)
if (inscene != (zymscene_t*)((char*)header + header->lump_scenes.start+header->lump_scenes.length))
{
Con_Printf(S_ERROR "%s, scene list appears corrupt.\n", mod->name);
Con_Printf(SP_ERROR "%s, scene list appears corrupt.\n", mod->name);
Hunk_FreeToLowMark(hunkstart);
return false;
}
@ -3121,13 +3121,13 @@ qboolean Mod_LoadDarkPlacesModel(model_t *mod, void *buffer)
if (memcmp(header->id, "DARKPLACESMODEL\0", 16))
{
Con_Printf(S_ERROR "Mod_LoadDarkPlacesModel: %s, doesn't appear to be a darkplaces model!\n", mod->name);
Con_Printf(SP_ERROR "Mod_LoadDarkPlacesModel: %s, doesn't appear to be a darkplaces model!\n", mod->name);
return false;
}
if (BigLong(header->type) != 2)
{
Con_Printf(S_ERROR "Mod_LoadDarkPlacesModel: %s, only type 2 is supported\n", mod->name);
Con_Printf(SP_ERROR "Mod_LoadDarkPlacesModel: %s, only type 2 is supported\n", mod->name);
return false;
}
@ -3136,17 +3136,17 @@ qboolean Mod_LoadDarkPlacesModel(model_t *mod, void *buffer)
if (!header->num_bones)
{
Con_Printf(S_ERROR "Mod_LoadDarkPlacesModel: %s, no bones\n", mod->name);
Con_Printf(SP_ERROR "Mod_LoadDarkPlacesModel: %s, no bones\n", mod->name);
return false;
}
if (!header->num_frames)
{
Con_Printf(S_ERROR "Mod_LoadDarkPlacesModel: %s, no frames\n", mod->name);
Con_Printf(SP_ERROR "Mod_LoadDarkPlacesModel: %s, no frames\n", mod->name);
return false;
}
if (!header->num_meshs)
{
Con_Printf(S_ERROR "Mod_LoadDarkPlacesModel: %s, no surfaces\n", mod->name);
Con_Printf(SP_ERROR "Mod_LoadDarkPlacesModel: %s, no surfaces\n", mod->name);
return false;
}
@ -3235,7 +3235,7 @@ qboolean Mod_LoadDarkPlacesModel(model_t *mod, void *buffer)
outbone[i].parent = BigLong(inbone[i].parent);
if (outbone[i].parent >= i || outbone[i].parent < -1)
{
Con_Printf(S_ERROR "Mod_LoadDarkPlacesModel: bad bone index in %s\n", mod->name);
Con_Printf(SP_ERROR "Mod_LoadDarkPlacesModel: bad bone index in %s\n", mod->name);
Hunk_FreeToLowMark(hunkstart);
return false;
}
@ -3422,8 +3422,8 @@ static void GenMatrix(float x, float y, float z, float qx, float qy, float qz, f
galiasinfo_t *Mod_ParseMD5MeshModel(char *buffer)
{
#define MD5ERROR0PARAM(x) { Con_Printf(S_ERROR x "\n"); return NULL; }
#define MD5ERROR1PARAM(x, y) { Con_Printf(S_ERROR x "\n", y); return NULL; }
#define MD5ERROR0PARAM(x) { Con_Printf(SP_ERROR x "\n"); return NULL; }
#define MD5ERROR1PARAM(x, y) { Con_Printf(SP_ERROR x "\n", y); return NULL; }
#define EXPECT(x) buffer = COM_Parse(buffer); if (strcmp(com_token, x)) Sys_Error("MD5MESH: expected %s", x);
int numjoints = 0;
int nummeshes = 0;
@ -3813,8 +3813,8 @@ qboolean Mod_LoadMD5MeshModel(model_t *mod, void *buffer)
qboolean Mod_ParseMD5Anim(char *buffer, galiasinfo_t *prototype, void**poseofs, galiasgroup_t *gat)
{
#define MD5ERROR0PARAM(x) { Con_Printf(S_ERROR x "\n"); return false; }
#define MD5ERROR1PARAM(x, y) { Con_Printf(S_ERROR x "\n", y); return false; }
#define MD5ERROR0PARAM(x) { Con_Printf(SP_ERROR x "\n"); return false; }
#define MD5ERROR1PARAM(x, y) { Con_Printf(SP_ERROR x "\n", y); return false; }
#define EXPECT(x) buffer = COM_Parse(buffer); if (strcmp(com_token, x)) MD5ERROR1PARAM("MD5ANIM: expected %s", x);
unsigned int i, j;
@ -4055,7 +4055,7 @@ qboolean Mod_LoadCompositeAnim(model_t *mod, void *buffer)
buffer = COM_Parse(buffer);
if (strcmp(com_token, "EXTERNALANIM"))
{
Con_Printf (S_ERROR "EXTERNALANIM: header is not compleate (%s)\n", mod->name);
Con_Printf (SP_ERROR "EXTERNALANIM: header is not compleate (%s)\n", mod->name);
return false;
}
@ -4067,7 +4067,7 @@ qboolean Mod_LoadCompositeAnim(model_t *mod, void *buffer)
if (!file) //FIXME: make non fatal somehow..
{
Con_Printf(S_ERROR "Couldn't open %s (from %s)\n", com_token, mod->name);
Con_Printf(SP_ERROR "Couldn't open %s (from %s)\n", com_token, mod->name);
Hunk_FreeToLowMark(hunkstart);
return false;
}
@ -4092,7 +4092,7 @@ qboolean Mod_LoadCompositeAnim(model_t *mod, void *buffer)
}
else
{
Con_Printf (S_ERROR "EXTERNALANIM: model must be defined immediatly after the header\n");
Con_Printf (SP_ERROR "EXTERNALANIM: model must be defined immediatly after the header\n");
return false;
}
@ -4123,19 +4123,19 @@ qboolean Mod_LoadCompositeAnim(model_t *mod, void *buffer)
}
else if (!strcmp(com_token, "clampgroup"))
{
Con_Printf(S_ERROR "EXTERNALANIM: clampgroup not yet supported (%s)\n", mod->name);
Con_Printf(SP_ERROR "EXTERNALANIM: clampgroup not yet supported (%s)\n", mod->name);
Hunk_FreeToLowMark(hunkstart);
return false;
}
else if (!strcmp(com_token, "frames"))
{
Con_Printf (S_ERROR "EXTERNALANIM: frames not yet supported (%s)\n", mod->name);
Con_Printf (SP_ERROR "EXTERNALANIM: frames not yet supported (%s)\n", mod->name);
Hunk_FreeToLowMark(hunkstart);
return false;
}
else
{
Con_Printf(S_ERROR "EXTERNALANIM: unrecognised token (%s)\n", mod->name);
Con_Printf(SP_ERROR "EXTERNALANIM: unrecognised token (%s)\n", mod->name);
Hunk_FreeToLowMark(hunkstart);
return false;
}

View File

@ -4,7 +4,7 @@
#if defined(ZYMOTICMODELS) || defined(MD5MODELS)
#define SKELETALMODELS
#include <malloc.h>
#include <stdlib.h>
#endif
#define MAX_BONES 256

View File

@ -79,9 +79,9 @@ extern conchar_t q3codemasks[MAXQ3COLOURS];
#define S_COLOR_MAGENTA "^6"
#define S_COLOR_WHITE "^7"
#define S_WARNING "^&E0"
#define S_ERROR "^&C0"
#define S_NOTICE "^&-1"
#define SP_WARNING "^&E0"
#define SP_ERROR "^&C0"
#define SP_NOTICE "^&-1"
#define CON_TEXTSIZE 16384

View File

@ -1816,7 +1816,7 @@ int COM_FOpenLocationFILE(flocation_t *loc, FILE **file)
int COM_FOpenFile(char *filename, FILE **file)
{
flocation_t loc;
Con_Printf(S_ERROR "COM_FOpenFile is obsolete\n");
Con_Printf(SP_ERROR "COM_FOpenFile is obsolete\n");
FS_FLocateFile(filename, FSLFRT_LENGTH, &loc);
com_filesize = -1;

View File

@ -727,7 +727,7 @@ qboolean CM_CreateBrush ( q2cbrush_t *brush, vec3_t *verts, q2mapsurface_t *surf
{
if (numplanes == MAX_Q2MAP_PLANES)
{
Con_Printf (S_ERROR "CM_CreateBrush: numplanes == MAX_CM_PLANES");
Con_Printf (SP_ERROR "CM_CreateBrush: numplanes == MAX_CM_PLANES");
return false;
}
@ -737,7 +737,7 @@ qboolean CM_CreateBrush ( q2cbrush_t *brush, vec3_t *verts, q2mapsurface_t *surf
if (numbrushsides == MAX_CM_BRUSHSIDES)
{
Con_Printf (S_ERROR "CM_CreateBrush: numbrushsides == MAX_CM_BRUSHSIDES\n");
Con_Printf (SP_ERROR "CM_CreateBrush: numbrushsides == MAX_CM_BRUSHSIDES\n");
return false;
}
@ -774,7 +774,7 @@ qboolean CM_CreatePatch ( q3cpatch_t *patch, int numverts, const vec3_t *verts,
if ( size[0] * size[1] > MAX_CM_PATCH_VERTS )
{
Con_Printf (S_ERROR "CM_CreatePatch: patch has too many vertices\n");
Con_Printf (SP_ERROR "CM_CreatePatch: patch has too many vertices\n");
return false;
}
@ -803,7 +803,7 @@ qboolean CM_CreatePatch ( q3cpatch_t *patch, int numverts, const vec3_t *verts,
{
if (numbrushes >= MAX_CM_BRUSHES)
{
Con_Printf (S_ERROR "CM_CreatePatch: too many patch brushes\n");
Con_Printf (SP_ERROR "CM_CreatePatch: too many patch brushes\n");
return false;
}
@ -889,7 +889,7 @@ qboolean CM_CreatePatchesForLeafs (void)
if ( numleafpatches >= MAX_CM_LEAFFACES )
{
Con_Printf (S_ERROR "CM_CreatePatchesForLeafs: map has too many faces\n");
Con_Printf (SP_ERROR "CM_CreatePatchesForLeafs: map has too many faces\n");
return false;
}
@ -903,7 +903,7 @@ qboolean CM_CreatePatchesForLeafs (void)
{
if (numpatches >= MAX_CM_PATCHES)
{
Con_Printf (S_ERROR "CM_CreatePatchesForLeafs: map has too many patches\n");
Con_Printf (SP_ERROR "CM_CreatePatchesForLeafs: map has too many patches\n");
return false;
}
@ -953,19 +953,19 @@ qboolean CMod_LoadSubmodels (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count < 1)
{
Con_Printf (S_ERROR "Map with no models\n");
Con_Printf (SP_ERROR "Map with no models\n");
return false;
}
if (count > MAX_Q2MAP_MODELS)
{
Con_Printf (S_ERROR "Map has too many models\n");
Con_Printf (SP_ERROR "Map has too many models\n");
return false;
}
@ -1004,13 +1004,13 @@ qboolean CMod_LoadSurfaces (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count < 1)
{
Con_Printf (S_ERROR "Map with no surfaces\n");
Con_Printf (SP_ERROR "Map with no surfaces\n");
return false;
}
// if (count > MAX_Q2MAP_TEXINFO)
@ -1303,7 +1303,7 @@ qboolean CMod_LoadTexInfo (lump_t *l) //yes I know these load from the same plac
{
out->texture = Hunk_Alloc(sizeof(texture_t) + 16*16+8*8+4*4+2*2);
Con_Printf (S_WARNING "Couldn't load %s\n", name);
Con_Printf (SP_WARNING "Couldn't load %s\n", name);
memcpy(out->texture, r_notexture_mip, sizeof(texture_t) + 16*16+8*8+4*4+2*2);
// out->texture = r_notexture_mip; // texture not found
// out->flags = 0;
@ -1435,7 +1435,7 @@ qboolean CMod_LoadFaces (lump_t *l)
ti = LittleShort (in->texinfo);
if (ti < 0 || ti >= loadmodel->numtexinfo)
{
Con_Printf (S_ERROR "MOD_LoadBmodel: bad texinfo number\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: bad texinfo number\n");
return false;
}
out->texinfo = loadmodel->texinfo + ti;
@ -1514,19 +1514,19 @@ qboolean CMod_LoadNodes (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count < 1)
{
Con_Printf (S_ERROR "Map has no nodes\n");
Con_Printf (SP_ERROR "Map has no nodes\n");
return false;
}
if (count > MAX_MAP_NODES)
{
Con_Printf (S_ERROR "Map has too many nodes\n");
Con_Printf (SP_ERROR "Map has too many nodes\n");
return false;
}
@ -1582,14 +1582,14 @@ qboolean CMod_LoadBrushes (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count > MAX_Q2MAP_BRUSHES)
{
Con_Printf (S_ERROR "Map has too many brushes");
Con_Printf (SP_ERROR "Map has too many brushes");
return false;
}
@ -1622,20 +1622,20 @@ qboolean CMod_LoadLeafs (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count < 1)
{
Con_Printf (S_ERROR "Map with no leafs\n");
Con_Printf (SP_ERROR "Map with no leafs\n");
return false;
}
// need to save space for box planes
if (count > MAX_Q2MAP_PLANES)
{
Con_Printf (S_ERROR "Map has too many planes\n");
Con_Printf (SP_ERROR "Map has too many planes\n");
return false;
}
@ -1672,7 +1672,7 @@ qboolean CMod_LoadLeafs (lump_t *l)
if (map_leafs[0].contents != Q2CONTENTS_SOLID)
{
Con_Printf (S_ERROR "Map leaf 0 is not CONTENTS_SOLID\n");
Con_Printf (SP_ERROR "Map leaf 0 is not CONTENTS_SOLID\n");
return false;
}
@ -1687,7 +1687,7 @@ qboolean CMod_LoadLeafs (lump_t *l)
}
if (emptyleaf == -1)
{
Con_Printf (S_ERROR "Map does not have an empty leaf\n");
Con_Printf (SP_ERROR "Map does not have an empty leaf\n");
return false;
}
return true;
@ -1709,20 +1709,20 @@ qboolean CMod_LoadPlanes (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count < 1)
{
Con_Printf (S_ERROR "Map with no planes\n");
Con_Printf (SP_ERROR "Map with no planes\n");
return false;
}
// need to save space for box planes
if (count >= MAX_Q2MAP_PLANES)
{
Con_Printf (S_ERROR "Map has too many planes\n");
Con_Printf (SP_ERROR "Map has too many planes\n");
return false;
}
@ -1766,20 +1766,20 @@ qboolean CMod_LoadLeafBrushes (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count < 1)
{
Con_Printf (S_ERROR "Map with no planes\n");
Con_Printf (SP_ERROR "Map with no planes\n");
return false;
}
// need to save space for box planes
if (count > MAX_Q2MAP_LEAFBRUSHES)
{
Con_Printf (S_ERROR "Map has too many leafbrushes\n");
Con_Printf (SP_ERROR "Map has too many leafbrushes\n");
return false;
}
@ -1808,7 +1808,7 @@ qboolean CMod_LoadBrushSides (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
@ -1816,7 +1816,7 @@ qboolean CMod_LoadBrushSides (lump_t *l)
// need to save space for box planes
if (count > MAX_Q2MAP_BRUSHSIDES)
{
Con_Printf (S_ERROR "Map has too many planes\n");
Con_Printf (SP_ERROR "Map has too many planes\n");
return false;
}
@ -1830,7 +1830,7 @@ qboolean CMod_LoadBrushSides (lump_t *l)
j = LittleShort (in->texinfo);
if (j >= numtexinfo)
{
Con_Printf (S_ERROR "Bad brushside texinfo\n");
Con_Printf (SP_ERROR "Bad brushside texinfo\n");
return false;
}
out->surface = &map_surfaces[j];
@ -1854,14 +1854,14 @@ qboolean CMod_LoadAreas (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count > MAX_Q2MAP_AREAS)
{
Con_Printf (S_ERROR "Map has too many areas\n");
Con_Printf (SP_ERROR "Map has too many areas\n");
return false;
}
@ -1894,14 +1894,14 @@ qboolean CMod_LoadAreaPortals (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count > MAX_Q2MAP_AREAS)
{
Con_Printf (S_ERROR "Map has too many areas\n");
Con_Printf (SP_ERROR "Map has too many areas\n");
return false;
}
@ -1929,7 +1929,7 @@ qboolean CMod_LoadVisibility (lump_t *l)
numvisibility = l->filelen;
if (l->filelen > MAX_Q2MAP_VISIBILITY)
{
Con_Printf (S_ERROR "Map has too large visibility lump\n");
Con_Printf (SP_ERROR "Map has too large visibility lump\n");
return false;
}
@ -1976,7 +1976,7 @@ qboolean CModQ3_LoadMarksurfaces (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "CModQ3_LoadMarksurfaces: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "CModQ3_LoadMarksurfaces: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1990,7 +1990,7 @@ qboolean CModQ3_LoadMarksurfaces (lump_t *l)
j = LittleLong(in[i]);
if (j < 0 || j >= loadmodel->numsurfaces)
{
Con_Printf (S_ERROR "Mod_ParseMarksurfaces: bad surface number\n");
Con_Printf (SP_ERROR "Mod_ParseMarksurfaces: bad surface number\n");
return false;
}
out[i] = loadmodel->surfaces + j;
@ -2010,19 +2010,19 @@ qboolean CModQ3_LoadSubmodels (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count < 1)
{
Con_Printf (S_ERROR "Map with no models\n");
Con_Printf (SP_ERROR "Map with no models\n");
return false;
}
if (count > MAX_Q2MAP_MODELS)
{
Con_Printf (S_ERROR "Map has too many models\n");
Con_Printf (SP_ERROR "Map has too many models\n");
return false;
}
@ -2082,14 +2082,14 @@ qboolean CModQ3_LoadShaders (lump_t *l, qboolean useshaders)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count < 1)
{
Con_Printf (S_ERROR "Map with no shaders\n");
Con_Printf (SP_ERROR "Map with no shaders\n");
return false;
}
// else if (count > MAX_Q2MAP_TEXINFO)
@ -2147,14 +2147,14 @@ qboolean CModQ3_LoadVertexes (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "CMOD_LoadVertexes: funny lump size\n");
Con_Printf (SP_ERROR "CMOD_LoadVertexes: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count > MAX_Q3MAP_VERTEXES)
{
Con_Printf (S_ERROR "Map has too many vertexes\n");
Con_Printf (SP_ERROR "Map has too many vertexes\n");
return false;
}
@ -2203,14 +2203,14 @@ qboolean CModRBSP_LoadVertexes (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "CMOD_LoadVertexes: funny lump size\n");
Con_Printf (SP_ERROR "CMOD_LoadVertexes: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count > MAX_Q3MAP_VERTEXES)
{
Con_Printf (S_ERROR "Map has too many vertexes\n");
Con_Printf (SP_ERROR "Map has too many vertexes\n");
return false;
}
@ -2257,13 +2257,13 @@ qboolean CModQ3_LoadIndexes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
if (count < 1 || count >= MAX_Q3MAP_INDICES)
{
Con_Printf (S_ERROR "MOD_LoadBmodel: bad surfedges count in %s: %i\n",
Con_Printf (SP_ERROR "MOD_LoadBmodel: bad surfedges count in %s: %i\n",
loadmodel->name, count);
return false;
}
@ -2293,14 +2293,14 @@ qboolean CModQ3_LoadFaces (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count > MAX_MAP_FACES)
{
Con_Printf (S_ERROR "Map has too many faces\n");
Con_Printf (SP_ERROR "Map has too many faces\n");
return false;
}
@ -2334,14 +2334,14 @@ qboolean CModRBSP_LoadFaces (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count > MAX_MAP_FACES)
{
Con_Printf (S_ERROR "Map has too many faces\n");
Con_Printf (SP_ERROR "Map has too many faces\n");
return false;
}
@ -2384,7 +2384,7 @@ qboolean CModQ3_LoadFogs (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -2676,7 +2676,7 @@ qboolean CModQ3_LoadRFaces (lump_t *l, qboolean useshaders)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -2758,7 +2758,7 @@ qboolean CModQ3_LoadRFaces (lump_t *l, qboolean useshaders)
numverts = LittleLong(in->num_vertices);
if (numindexes%3)
{
Con_Printf(S_ERROR "mesh indexes should be multiples of 3\n");
Con_Printf(SP_ERROR "mesh indexes should be multiples of 3\n");
return false;
}
@ -2829,7 +2829,7 @@ qboolean CModRBSP_LoadRFaces (lump_t *l, qboolean useshaders)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -2907,7 +2907,7 @@ qboolean CModRBSP_LoadRFaces (lump_t *l, qboolean useshaders)
numverts = LittleLong(in->num_vertices);
if (numindexes%3)
{
Con_Printf(S_ERROR "mesh indexes should be multiples of 3\n");
Con_Printf(SP_ERROR "mesh indexes should be multiples of 3\n");
return false;
}
@ -2963,14 +2963,14 @@ qboolean CModQ3_LoadLeafFaces (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count > MAX_Q2MAP_LEAFFACES)
{
Con_Printf (S_ERROR "Map has too many leaffaces\n");
Con_Printf (SP_ERROR "Map has too many leaffaces\n");
return false;
}
@ -2984,7 +2984,7 @@ qboolean CModQ3_LoadLeafFaces (lump_t *l)
if (j < 0 || j >= numfaces)
{
Con_Printf (S_ERROR "CMod_LoadLeafFaces: bad surface number\n");
Con_Printf (SP_ERROR "CMod_LoadLeafFaces: bad surface number\n");
return false;
}
@ -3004,7 +3004,7 @@ qboolean CModQ3_LoadNodes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -3012,7 +3012,7 @@ qboolean CModQ3_LoadNodes (lump_t *l)
if (count > MAX_MAP_NODES)
{
Con_Printf (S_ERROR "Too many nodes on map\n");
Con_Printf (SP_ERROR "Too many nodes on map\n");
return false;
}
@ -3063,14 +3063,14 @@ qboolean CModQ3_LoadBrushes (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count > MAX_Q2MAP_BRUSHES)
{
Con_Printf (S_ERROR "Map has too many brushes");
Con_Printf (SP_ERROR "Map has too many brushes");
return false;
}
@ -3100,21 +3100,21 @@ qboolean CModQ3_LoadLeafs (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count < 1)
{
Con_Printf (S_ERROR "Map with no leafs\n");
Con_Printf (SP_ERROR "Map with no leafs\n");
return false;
}
// need to save space for box planes
if (count > MAX_MAP_LEAFS)
{
Con_Printf (S_ERROR "Too many leaves on map");
Con_Printf (SP_ERROR "Too many leaves on map");
return false;
}
@ -3171,7 +3171,7 @@ qboolean CModQ3_LoadLeafs (lump_t *l)
if ( emptyleaf == -1 ) {
if (numleafs >= MAX_MAP_LEAFS-1)
{
Con_Printf (S_ERROR "Map does not have an empty leaf\n");
Con_Printf (SP_ERROR "Map does not have an empty leaf\n");
return false;
}
@ -3198,7 +3198,7 @@ qboolean CModQ3_LoadPlanes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -3206,7 +3206,7 @@ qboolean CModQ3_LoadPlanes (lump_t *l)
if (count > MAX_MAP_PLANES)
{
Con_Printf (S_ERROR "Too many planes on map\n");
Con_Printf (SP_ERROR "Too many planes on map\n");
return false;
}
@ -3239,20 +3239,20 @@ qboolean CModQ3_LoadLeafBrushes (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
if (count < 1)
{
Con_Printf (S_ERROR "Map with no leafbrushes\n");
Con_Printf (SP_ERROR "Map with no leafbrushes\n");
return false;
}
// need to save space for box planes
if (count > MAX_Q2MAP_LEAFBRUSHES)
{
Con_Printf (S_ERROR "Map has too many leafbrushes\n");
Con_Printf (SP_ERROR "Map has too many leafbrushes\n");
return false;
}
@ -3276,7 +3276,7 @@ qboolean CModQ3_LoadBrushSides (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
@ -3284,7 +3284,7 @@ qboolean CModQ3_LoadBrushSides (lump_t *l)
// need to save space for box planes
if (count > MAX_Q2MAP_BRUSHSIDES)
{
Con_Printf (S_ERROR "Map has too many planes\n");
Con_Printf (SP_ERROR "Map has too many planes\n");
return false;
}
@ -3298,7 +3298,7 @@ qboolean CModQ3_LoadBrushSides (lump_t *l)
j = LittleLong (in->texinfo);
if (j >= numtexinfo)
{
Con_Printf (S_ERROR "Bad brushside texinfo\n");
Con_Printf (SP_ERROR "Bad brushside texinfo\n");
return false;
}
out->surface = &map_surfaces[j];
@ -3318,7 +3318,7 @@ qboolean CModRBSP_LoadBrushSides (lump_t *l)
in = (void *)(cmod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size\n");
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size\n");
return false;
}
count = l->filelen / sizeof(*in);
@ -3326,7 +3326,7 @@ qboolean CModRBSP_LoadBrushSides (lump_t *l)
// need to save space for box planes
if (count > MAX_Q2MAP_BRUSHSIDES)
{
Con_Printf (S_ERROR "Map has too many planes\n");
Con_Printf (SP_ERROR "Map has too many planes\n");
return false;
}
@ -3340,7 +3340,7 @@ qboolean CModRBSP_LoadBrushSides (lump_t *l)
j = LittleLong (in->texinfo);
if (j >= numtexinfo)
{
Con_Printf (S_ERROR "Bad brushside texinfo\n");
Con_Printf (SP_ERROR "Bad brushside texinfo\n");
return false;
}
out->surface = &map_surfaces[j];
@ -3371,7 +3371,7 @@ qboolean CModQ3_LoadVisibility (lump_t *l)
numvisibility = l->filelen;
if (l->filelen > MAX_Q2MAP_VISIBILITY)
{
Con_Printf (S_ERROR "Map has too large visibility lump\n");
Con_Printf (SP_ERROR "Map has too large visibility lump\n");
return false;
}
@ -3397,7 +3397,7 @@ qboolean CModQ3_LoadLightgrid (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -3429,7 +3429,7 @@ qboolean CModRBSP_LoadLightgrid (lump_t *elements, lump_t *indexes)
iin = (void *)(mod_base + indexes->fileofs);
if (indexes->filelen % sizeof(*iin) || elements->filelen % sizeof(*ein))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
icount = indexes->filelen / sizeof(*iin);
@ -3463,12 +3463,12 @@ int CM_GetQ2Palette (void)
char *f = (void *)COM_LoadMallocFile("pics/colormap.pcx");
if (!f)
{
Con_Printf (S_WARNING "Couldn't find pics/colormap.pcx\n");
Con_Printf (SP_WARNING "Couldn't find pics/colormap.pcx\n");
return -1;
}
if (!ReadPCXPalette(f, com_filesize, d_q28to24table))
{
Con_Printf (S_WARNING "Couldn't read pics/colormap.pcx\n");
Con_Printf (SP_WARNING "Couldn't read pics/colormap.pcx\n");
BZ_Free(f);
return -1;
}
@ -3824,7 +3824,7 @@ q2cmodel_t *CM_LoadMap (char *name, char *filein, qboolean clientload, unsigned
length = com_filesize;
if (!buf)
{
Con_Printf (S_ERROR "Couldn't load %s\n", name);
Con_Printf (SP_ERROR "Couldn't load %s\n", name);
return NULL;
}
@ -3841,7 +3841,7 @@ q2cmodel_t *CM_LoadMap (char *name, char *filein, qboolean clientload, unsigned
switch(header.version)
{
default:
Con_Printf (S_ERROR "Quake 2 or Quake 3 based BSP with unknown header (%i should be %i or %i)\n"
Con_Printf (SP_ERROR "Quake 2 or Quake 3 based BSP with unknown header (%i should be %i or %i)\n"
, name, header.version, Q2BSPVERSION, Q3BSPVERSION);
return NULL;
break;
@ -4028,7 +4028,7 @@ q2cmodel_t *CM_LoadMap (char *name, char *filein, qboolean clientload, unsigned
#ifdef SERVERONLY
SV_Error("Cannot load q3bsps with the current renderer (only dedicated and opengl renderer)\n");
#else
Con_Printf(S_ERROR "Cannot load q3bsps with the current renderer (only dedicated and opengl renderer)\n");
Con_Printf(SP_ERROR "Cannot load q3bsps with the current renderer (only dedicated and opengl renderer)\n");
return NULL;
#endif
}

View File

@ -67,7 +67,7 @@ void Log_Dir_Callback (struct cvar_s *var, char *oldvalue)
// sanity check for directory
if (strstr(t, "..") || strstr(t, ":") || *t == '/' || *t == '\\')
{
Con_Printf(S_NOTICE "%s forced to default due to invalid characters.\n", var->name);
Con_Printf(SP_NOTICE "%s forced to default due to invalid characters.\n", var->name);
// recursion is avoided by assuming the default value is sane
Cvar_ForceSet(var, var->defaultstr);
}
@ -81,7 +81,7 @@ void Log_Name_Callback (struct cvar_s *var, char *oldvalue)
// sanity check for directory
if (strstr(t, "..") || strstr(t, ":") || strstr(t, "/") || strstr(t, "\\"))
{
Con_Printf(S_NOTICE "%s forced to default due to invalid characters.\n", var->name);
Con_Printf(SP_NOTICE "%s forced to default due to invalid characters.\n", var->name);
// recursion is avoided by assuming the default value is sane
Cvar_ForceSet(var, var->defaultstr);
}

View File

@ -990,7 +990,7 @@ int VARGS Plug_Net_SetTLSClient(void *offset, unsigned int mask, const int *arg)
if (ret < 0)
{
Con_Printf (S_ERROR "*** TLS handshake failed (%i)\n", ret);
Con_Printf (SP_ERROR "*** TLS handshake failed (%i)\n", ret);
gnutls_perror (ret);
stream->type = STREAM_SOCKET; //go back to regular socket

View File

@ -215,8 +215,8 @@ static char *defaultlanguagetext =
"TLC_CONNECTED \"Connected.\\n\"\n"
"TLC_CONLESS_CONCMD \"client command\\n\"\n"
"TLC_CMDFROMREMOTE \"Command packet from remote host. Ignored.\\n\"\n"
"TLC_LOCALID_NOTSET \""S_ERROR"Command packet received from local host, but no localid has been set. You may need to upgrade your server browser.\\n\"\n"
"TLC_LOCALID_BAD \""S_ERROR"Invalid localid on command packet received from local host. \\n|%s| != |%s|\\nYou may need to reload your server browser and QuakeWorld.\\n\"\n"
"TLC_LOCALID_NOTSET \""SP_ERROR"Command packet received from local host, but no localid has been set. You may need to upgrade your server browser.\\n\"\n"
"TLC_LOCALID_BAD \""SP_ERROR"Invalid localid on command packet received from local host. \\n|%s| != |%s|\\nYou may need to reload your server browser and QuakeWorld.\\n\"\n"
"TLC_A2C_PRINT \"print\\n\"\n"
"TLC_A2A_PING \"ping\\n\"\n"
"TLC_S2C_CHALLENGE \"challenge\\n\"\n"
@ -226,7 +226,7 @@ static char *defaultlanguagetext =
"TLC_CONNECTFIRST \"Must be connected.\\n\"\n"
"TLC_SYNTAX_DOWNLOAD \"Usage: download <datafile>\\n\"\n"
"TLC_REQUIRESSERVERMOD \"%s is only available with server support\\n\"\n"
"TLC_CLIENTCON_ERROR_ENDGAME \""S_ERROR"Host_EndGame: %s\\n\"\n"
"TLC_CLIENTCON_ERROR_ENDGAME \""SP_ERROR"Host_EndGame: %s\\n\"\n"
"TLC_HOSTFATALERROR \"Host_Error: %s\\n\"\n"
"TLC_CONFIGCFG_WRITEFAILED \"Couldn't write config.cfg.\\n\"\n"
"TLC_HOSTSPEEDSOUTPUT \"%3i tot %3i server %3i gfx %3i snd\\n\"\n"

View File

@ -521,7 +521,7 @@ void Zone_Print_f(void)
{
if (sent[i] != sentinalkey)
{
Con_Printf(S_ERROR "%i %i-%s\n", zone->size, i, (char *)(zone+1) + zone->size+ZONEDEBUG*2);
Con_Printf(SP_ERROR "%i %i-%s\n", zone->size, i, (char *)(zone+1) + zone->size+ZONEDEBUG*2);
break;
}
}
@ -530,7 +530,7 @@ void Zone_Print_f(void)
{
if (sent[i] != sentinalkey)
{
Con_Printf(S_ERROR "%i %i-%s\n", zone->size, i, (char *)(zone+1) + zone->size+ZONEDEBUG*2);
Con_Printf(SP_ERROR "%i %i-%s\n", zone->size, i, (char *)(zone+1) + zone->size+ZONEDEBUG*2);
break;
}
}
@ -549,8 +549,8 @@ void Zone_Print_f(void)
overhead += sizeof(zone_t)+ZONEDEBUG*2;
#endif
}
Con_Printf(S_NOTICE "Zone:%i bytes in %i blocks\n", allocated, blocks);
Con_Printf(S_NOTICE "Overhead %i bytes\n", overhead);
Con_Printf(SP_NOTICE "Zone:%i bytes in %i blocks\n", allocated, blocks);
Con_Printf(SP_NOTICE "Overhead %i bytes\n", overhead);
}
#else

View File

@ -78,7 +78,7 @@ qboolean r_cache_thrash; // set if thrashing the surface cache
mpic_t *draw_disc; // also used on sbar
#if !defined(SWQUAKE) && !defined(RGLQUAKE)
qbyte GetPalette(int red, int green, int blue)
qbyte GetPaletteIndex(int red, int green, int blue)
{
//slow, horrible method.
{

View File

@ -78,7 +78,7 @@ mpic_t *draw_disc; // also used on sbar
int d3d9width, d3d9height;
#if 0
#if !defined(SWQUAKE) && !defined(RGLQUAKE)
qbyte GetPalette(int red, int green, int blue)
qbyte GetPaletteIndex(int red, int green, int blue)
{
//slow, horrible method.
{

View File

@ -24,7 +24,7 @@
#if defined(ZYMOTICMODELS) || defined(MD5MODELS)
#define SKELETALMODELS
#include "malloc.h"
#include <stdlib.h>
#endif
#define MAX_BONES 256

View File

@ -2077,7 +2077,7 @@ void GLDraw_FadeScreen (void)
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
if (qglGetError())
Con_Printf(S_ERROR "GL Error after qglCopyTexImage2D\n");
Con_Printf(SP_ERROR "GL Error after qglCopyTexImage2D\n");
GLSlang_UseProgram(scenepp_mt_program);
qglUniform3fvARB(scenepp_mt_parm_colorf, 1, fadecolor);
@ -2087,7 +2087,7 @@ void GLDraw_FadeScreen (void)
qglUniform1iARB(scenepp_mt_parm_inverti, 0);
if (qglGetError())
Con_Printf(S_ERROR "GL Error after GLSlang_UseProgram\n");
Con_Printf(SP_ERROR "GL Error after GLSlang_UseProgram\n");
qglEnable(GL_TEXTURE_2D);
GL_Bind(scenepp_texture);
@ -2114,7 +2114,7 @@ void GLDraw_FadeScreen (void)
qglPopMatrix();
if (qglGetError())
Con_Printf(S_ERROR "GL Error after drawing with shaderobjects\n");
Con_Printf(SP_ERROR "GL Error after drawing with shaderobjects\n");
}
else
{
@ -2301,7 +2301,7 @@ void GL_Font_Callback(struct cvar_s *var, char *oldvalue)
gl->texnum = char_texture;
}
else
Con_Printf(S_ERROR "ERROR: Unable to update conchars texture!");
Con_Printf(SP_ERROR "ERROR: Unable to update conchars texture!");
}
GL_Smoothfont_Callback(&gl_smoothfont, "");

View File

@ -656,7 +656,7 @@ qboolean GL_LoadHeightmapModel (model_t *mod, void *buffer)
buffer = COM_Parse(buffer);
if (strcmp(com_token, "terrain"))
{
Con_Printf(S_ERROR "%s wasn't terrain map\n", mod->name); //shouldn't happen
Con_Printf(SP_ERROR "%s wasn't terrain map\n", mod->name); //shouldn't happen
return false;
}
@ -726,14 +726,14 @@ qboolean GL_LoadHeightmapModel (model_t *mod, void *buffer)
}
else
{
Con_Printf(S_ERROR "%s, unrecognised token in terrain map\n", mod->name);
Con_Printf(SP_ERROR "%s, unrecognised token in terrain map\n", mod->name);
return false;
}
}
if (numsegs > SECTIONS)
{
Con_Printf(S_ERROR "%s, heightmap uses too many sections max is %i\n", mod->name, SECTIONS);
Con_Printf(SP_ERROR "%s, heightmap uses too many sections max is %i\n", mod->name, SECTIONS);
return false;
}
@ -745,7 +745,7 @@ qboolean GL_LoadHeightmapModel (model_t *mod, void *buffer)
size = sqrt(com_filesize/2);
if (size % numsegs)
{
Con_Printf(S_ERROR "%s, heightmap is not a multiple of %i\n", mod->name, numsegs);
Con_Printf(SP_ERROR "%s, heightmap is not a multiple of %i\n", mod->name, numsegs);
return false;
}

View File

@ -128,7 +128,7 @@ qboolean Mod_LoadHLModel (model_t *mod, void *buffer)
if (header->version != 10)
{
Con_Printf(S_ERROR "Cannot load model %s - unknown version %i\n", mod->name, header->version);
Con_Printf(SP_ERROR "Cannot load model %s - unknown version %i\n", mod->name, header->version);
Hunk_FreeToLowMark(start);
return false;
}

View File

@ -644,7 +644,7 @@ model_t *GLMod_LoadModel (model_t *mod, qboolean crash)
}
#endif
Con_Printf(S_WARNING "Unrecognised model format %i\n", LittleLong(*(unsigned *)buf));
Con_Printf(SP_WARNING "Unrecognised model format %i\n", LittleLong(*(unsigned *)buf));
continue;
}
@ -658,7 +658,7 @@ couldntload:
if (crash)
Host_EndGame ("Mod_NumForName: %s not found or couldn't load", mod->name);
Con_Printf(S_ERROR "Unable to load or replace %s\n", mod->name);
Con_Printf(SP_ERROR "Unable to load or replace %s\n", mod->name);
mod->type = mod_dummy;
mod->mins[0] = -16;
mod->mins[1] = -16;
@ -934,7 +934,7 @@ TRACE(("dbg: GLMod_LoadTextures: inittexturedescs\n"));
if (!*mt->name) //I HATE MAPPERS!
{
sprintf(mt->name, "unnamed%i", i);
Con_Printf(S_WARNING "warning: unnamed texture in %s, renaming to %s\n", loadmodel->name, mt->name);
Con_Printf(SP_WARNING "warning: unnamed texture in %s, renaming to %s\n", loadmodel->name, mt->name);
}
mt->width = LittleLong (mt->width);
@ -943,9 +943,9 @@ TRACE(("dbg: GLMod_LoadTextures: inittexturedescs\n"));
mt->offsets[j] = LittleLong (mt->offsets[j]);
if ( (mt->width & 15) || (mt->height & 15) )
Con_Printf (S_WARNING "Warning: Texture %s is not 16 aligned", mt->name);
Con_Printf (SP_WARNING "Warning: Texture %s is not 16 aligned", mt->name);
if (mt->width < 1 || mt->height < 1)
Con_Printf (S_WARNING "Warning: Texture %s has no size", mt->name);
Con_Printf (SP_WARNING "Warning: Texture %s has no size", mt->name);
pixels = mt->width*mt->height/64*85;
tx = Hunk_AllocName (sizeof(texture_t)/* +pixels*/, loadname );
loadmodel->textures[i] = tx;
@ -1111,7 +1111,7 @@ TRACE(("dbg: GLMod_LoadTextures: inittexturedescs\n"));
}
else
{
Con_Printf (S_ERROR "Bad animating texture %s\n", tx->name);
Con_Printf (SP_ERROR "Bad animating texture %s\n", tx->name);
return false;
}
@ -1142,7 +1142,7 @@ TRACE(("dbg: GLMod_LoadTextures: inittexturedescs\n"));
}
else
{
Con_Printf (S_ERROR "Bad animating texture %s\n", tx->name);
Con_Printf (SP_ERROR "Bad animating texture %s\n", tx->name);
return false;
}
}
@ -1154,7 +1154,7 @@ TRACE(("dbg: GLMod_LoadTextures: inittexturedescs\n"));
tx2 = anims[j];
if (!tx2)
{
Con_Printf (S_ERROR "Missing frame %i of %s\n",j, tx->name);
Con_Printf (SP_ERROR "Missing frame %i of %s\n",j, tx->name);
return false;
}
tx2->anim_total = max * ANIM_CYCLE;
@ -1169,7 +1169,7 @@ TRACE(("dbg: GLMod_LoadTextures: inittexturedescs\n"));
tx2 = altanims[j];
if (!tx2)
{
Con_Printf (S_ERROR "Missing frame %i of %s\n",j, tx->name);
Con_Printf (SP_ERROR "Missing frame %i of %s\n",j, tx->name);
return false;
}
tx2->anim_total = altmax * ANIM_CYCLE;
@ -1558,7 +1558,7 @@ qboolean GLMod_LoadVertexes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n", loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n", loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1599,7 +1599,7 @@ qboolean GLMod_LoadSubmodels (lump_t *l)
hexen2map = true;
if (l->filelen % sizeof(*inh))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*inh);
@ -1637,7 +1637,7 @@ qboolean GLMod_LoadSubmodels (lump_t *l)
hexen2map = false;
if (l->filelen % sizeof(*inq))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*inq);
@ -1721,7 +1721,7 @@ qboolean GLMod_LoadTexinfo (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1847,7 +1847,7 @@ qboolean GLMod_LoadFaces (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1957,7 +1957,7 @@ qboolean GLMod_LoadNodes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -2009,7 +2009,7 @@ qboolean GLMod_LoadLeafs (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -2155,7 +2155,7 @@ qboolean GLMod_LoadClipnodes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -2403,7 +2403,7 @@ qboolean GLMod_LoadMarksurfaces (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -2417,7 +2417,7 @@ qboolean GLMod_LoadMarksurfaces (lump_t *l)
j = LittleShort(in[i]);
if (j < 0 || j >= loadmodel->numsurfaces)
{
Con_Printf (S_ERROR "Mod_ParseMarksurfaces: bad surface number\n");
Con_Printf (SP_ERROR "Mod_ParseMarksurfaces: bad surface number\n");
return false;
}
out[i] = loadmodel->surfaces + j;
@ -2439,7 +2439,7 @@ qboolean GLMod_LoadSurfedges (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -2471,7 +2471,7 @@ qboolean GLMod_LoadPlanes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -2742,7 +2742,7 @@ qboolean GLMod_LoadBrushModel (model_t *mod, void *buffer)
loadmodel->fromgame = fg_halflife;
else
{
Con_Printf (S_ERROR "Mod_LoadBrushModel: %s has wrong version number (%i should be %i)\n", mod->name, i, BSPVERSION);
Con_Printf (SP_ERROR "Mod_LoadBrushModel: %s has wrong version number (%i should be %i)\n", mod->name, i, BSPVERSION);
return false;
}
@ -2761,7 +2761,7 @@ qboolean GLMod_LoadBrushModel (model_t *mod, void *buffer)
{
if ((unsigned)header->lumps[i].fileofs + (unsigned)header->lumps[i].filelen > com_filesize)
{
Con_Printf (S_ERROR "Mod_LoadBrushModel: %s appears truncated\n", mod->name);
Con_Printf (SP_ERROR "Mod_LoadBrushModel: %s appears truncated\n", mod->name);
return false;
}
if (i == LUMP_ENTITIES)
@ -3122,7 +3122,7 @@ void * GLMod_LoadSpriteGroup (void * pin, mspriteframe_t **ppframe, int framenum
*poutintervals = LittleFloat (pin_intervals->interval);
if (*poutintervals <= 0.0)
{
Con_Printf (S_ERROR "Mod_LoadSpriteGroup: interval<=0\n");
Con_Printf (SP_ERROR "Mod_LoadSpriteGroup: interval<=0\n");
return NULL;
}
@ -3167,7 +3167,7 @@ qboolean GLMod_LoadSpriteModel (model_t *mod, void *buffer)
if (version != SPRITE32_VERSION)
if (version != SPRITEHL_VERSION)
{
Con_Printf (S_ERROR "%s has wrong version number "
Con_Printf (SP_ERROR "%s has wrong version number "
"(%i should be %i)\n", mod->name, version, SPRITE_VERSION);
return false;
}
@ -3207,7 +3207,7 @@ qboolean GLMod_LoadSpriteModel (model_t *mod, void *buffer)
unsigned char *src = (unsigned char *)(numi+1);
if (LittleShort(*numi) != 256)
{
Con_Printf(S_ERROR "%s has wrong number of palette indexes (we only support 256)\n", mod->name);
Con_Printf(SP_ERROR "%s has wrong number of palette indexes (we only support 256)\n", mod->name);
Hunk_FreeToLowMark(hunkstart);
return false;
}
@ -3230,7 +3230,7 @@ qboolean GLMod_LoadSpriteModel (model_t *mod, void *buffer)
//
if (numframes < 1)
{
Con_Printf (S_ERROR "Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
Con_Printf (SP_ERROR "Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
Hunk_FreeToLowMark(hunkstart);
return false;
}
@ -3288,7 +3288,7 @@ qboolean GLMod_LoadSprite2Model (model_t *mod, void *buffer)
version = LittleLong (pin->version);
if (version != SPRITE2_VERSION)
{
Con_Printf (S_ERROR "%s has wrong version number "
Con_Printf (SP_ERROR "%s has wrong version number "
"(%i should be %i)", mod->name, version, SPRITE2_VERSION);
return false;
}
@ -3318,7 +3318,7 @@ qboolean GLMod_LoadSprite2Model (model_t *mod, void *buffer)
//
if (numframes < 1)
{
Con_Printf (S_ERROR "Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
Con_Printf (SP_ERROR "Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
Hunk_FreeToLowMark(hunkstart);
return false;
}

View File

@ -36,8 +36,8 @@ void R_RenderBrushPoly (msurface_t *fa);
extern int gl_canstencil;
PFNGLCOMPRESSEDTEXIMAGE2DARBPROC qglCompressedTexImage2DARB;
PFNGLGETCOMPRESSEDTEXIMAGEARBPROC qglGetCompressedTexImageARB;
FTEPFNGLCOMPRESSEDTEXIMAGE2DARBPROC qglCompressedTexImage2DARB;
FTEPFNGLGETCOMPRESSEDTEXIMAGEARBPROC qglGetCompressedTexImageARB;
#define Q2RF_WEAPONMODEL 4 // only draw through eyes
#define Q2RF_DEPTHHACK 16
@ -220,7 +220,7 @@ void GL_InitSceneProcessingShaders_WaterWarp (void)
GLSlang_UseProgram(0);
if (qglGetError())
Con_Printf(S_ERROR "GL Error initing shader object\n");
Con_Printf(SP_ERROR "GL Error initing shader object\n");
}
void GL_InitSceneProcessingShaders_MenuTint(void)
@ -267,7 +267,7 @@ void GL_InitSceneProcessingShaders_MenuTint(void)
GLSlang_UseProgram(0);
if (qglGetError())
Con_Printf(S_ERROR "GL Error initing shader object\n");
Con_Printf(SP_ERROR "GL Error initing shader object\n");
}
void GL_InitSceneProcessingShaders (void)
@ -1696,7 +1696,7 @@ void GLR_RenderView (void)
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
if (qglGetError())
Con_Printf(S_ERROR "GL Error after qglCopyTexImage2D\n");
Con_Printf(SP_ERROR "GL Error after qglCopyTexImage2D\n");
// Here we apply the shaders - currently just waterwarp
GLSlang_UseProgram(scenepp_ww_program);

View File

@ -34,7 +34,7 @@ extern void R_InitBubble();
//SW rendering has a faster method, which takes more memory and stuff.
//We need this for minor things though, so we'll just use the slow accurate method.
//this is unlikly to be called very often.
qbyte GetPalette(int red, int green, int blue)
qbyte GetPaletteIndex(int red, int green, int blue)
{
//slow, horrible method.
{
@ -600,7 +600,7 @@ if (!data)
for (outmip=mip, y = 0; y < height; y+=yi)
for (x = 0; x < width; x+=xi)
{
*outmip++ = GetPalette( data[(int)(x+y*width)*4+0],
*outmip++ = GetPaletteIndex( data[(int)(x+y*width)*4+0],
data[(int)(x+y*width)*4+1],
data[(int)(x+y*width)*4+2]);
}
@ -608,7 +608,7 @@ if (!data)
for (outmip=mip, y = 0; y < height; y+=yi*2)
for (x = 0; x < width; x+=xi*2)
{
*outmip++ = GetPalette( data[(int)(x+y*width)*4+0],
*outmip++ = GetPaletteIndex( data[(int)(x+y*width)*4+0],
data[(int)(x+y*width)*4+1],
data[(int)(x+y*width)*4+2]);
}
@ -616,7 +616,7 @@ if (!data)
for (outmip=mip, y = 0; y < height; y+=yi*4)
for (x = 0; x < width; x+=xi*4)
{
*outmip++ = GetPalette( data[(int)(x+y*width)*4+0],
*outmip++ = GetPaletteIndex( data[(int)(x+y*width)*4+0],
data[(int)(x+y*width)*4+1],
data[(int)(x+y*width)*4+2]);
}
@ -624,7 +624,7 @@ if (!data)
for (outmip=mip, y = 0; y < height; y+=yi*8)
for (x = 0; x < width; x+=xi*8)
{
*outmip++ = GetPalette( data[(int)(x+y*width)*4+0],
*outmip++ = GetPaletteIndex( data[(int)(x+y*width)*4+0],
data[(int)(x+y*width)*4+1],
data[(int)(x+y*width)*4+2]);
}

View File

@ -693,7 +693,7 @@ static void Shaderpass_Map ( shader_t *shader, shaderpass_t *pass, char **ptr )
if ( !pass->anim_frames[0] ) {
pass->anim_frames[0] = missing_texture;
Con_DPrintf (S_WARNING "Shader %s has a stage with no image: %s.\n", shader->name, token );
Con_DPrintf (SP_WARNING "Shader %s has a stage with no image: %s.\n", shader->name, token );
}
}
}
@ -722,7 +722,7 @@ static void Shaderpass_AnimMap ( shader_t *shader, shaderpass_t *pass, char **pt
if ( !image ) {
pass->anim_frames[pass->anim_numframes++] = missing_texture;
Con_DPrintf (S_WARNING "Shader %s has an animmap with no image: %s.\n", shader->name, token );
Con_DPrintf (SP_WARNING "Shader %s has an animmap with no image: %s.\n", shader->name, token );
} else {
pass->anim_frames[pass->anim_numframes++] = image;
}
@ -746,7 +746,7 @@ static void Shaderpass_ClampMap ( shader_t *shader, shaderpass_t *pass, char **p
if ( !pass->anim_frames[0] ) {
pass->anim_frames[0] = missing_texture;
Con_DPrintf (S_WARNING "Shader %s has a stage with no image: %s.\n", shader->name, token );
Con_DPrintf (SP_WARNING "Shader %s has a stage with no image: %s.\n", shader->name, token );
}
}
@ -763,7 +763,7 @@ static void Shaderpass_VideoMap ( shader_t *shader, shaderpass_t *pass, char **p
if (!pass->cin)
pass->cin = Media_StartCin(va("video/%s.roq", token));
else
Con_DPrintf (S_WARNING "(shader %s) Couldn't load video %s\n", shader->name, token );
Con_DPrintf (SP_WARNING "(shader %s) Couldn't load video %s\n", shader->name, token );
pass->anim_frames[0] = texture_extension_number++;
pass->flags |= SHADER_PASS_VIDEOMAP;
@ -2122,7 +2122,7 @@ void Shader_DefaultBSP(char *shortname, shader_t *s)
pass->flush = R_RenderMeshGeneric;
if ( !pass->anim_frames[0] ) {
Con_DPrintf (S_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
Con_DPrintf (SP_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
pass->anim_frames[0] = missing_texture;
}
@ -2152,7 +2152,7 @@ void Shader_DefaultBSPVertex(char *shortname, shader_t *s)
pass->flush = R_RenderMeshGeneric;
if ( !pass->anim_frames[0] ) {
Con_DPrintf (S_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
Con_DPrintf (SP_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
pass->anim_frames[0] = missing_texture;
}
@ -2183,7 +2183,7 @@ void Shader_DefaultBSPFlare(char *shortname, shader_t *s)
pass->flush = R_RenderMeshGeneric;
if ( !pass->anim_frames[0] ) {
Con_DPrintf (S_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
Con_DPrintf (SP_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
pass->anim_frames[0] = missing_texture;
}
@ -2220,7 +2220,7 @@ void Shader_DefaultSkin(char *shortname, shader_t *s)
pass->flush = R_RenderMeshGeneric;
if (!pass->anim_frames[0])
{
Con_DPrintf (S_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
Con_DPrintf (SP_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
pass->anim_frames[0] = missing_texture;
}
}
@ -2242,7 +2242,7 @@ void Shader_DefaultSkin(char *shortname, shader_t *s)
pass->flush = R_RenderMeshGeneric;
if (!pass->anim_frames[0])
{
Con_DPrintf (S_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
Con_DPrintf (SP_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
pass->anim_frames[0] = missing_texture;
}
}
@ -2264,7 +2264,7 @@ void Shader_DefaultSkin(char *shortname, shader_t *s)
pass->flush = R_RenderMeshGeneric;
if (!pass->anim_frames[0])
{
Con_DPrintf (S_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
Con_DPrintf (SP_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
pass->anim_frames[0] = missing_texture;
}
}
@ -2286,7 +2286,7 @@ void Shader_DefaultSkin(char *shortname, shader_t *s)
pass->flush = R_RenderMeshGeneric;
if (!pass->anim_frames[0])
{
Con_DPrintf (S_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname);
Con_DPrintf (SP_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname);
pass->anim_frames[0] = missing_texture;
}
}
@ -2317,7 +2317,7 @@ void Shader_DefaultSkinShell(char *shortname, shader_t *s)
pass->flush = R_RenderMeshGeneric;
if ( !pass->anim_frames[0] ) {
Con_DPrintf (S_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
Con_DPrintf (SP_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
pass->anim_frames[0] = missing_texture;
}
@ -2357,7 +2357,7 @@ void Shader_Default2D(char *shortname, shader_t *s)
pass->flush = R_RenderMeshGeneric;
if ( !pass->anim_frames[0] ) {
Con_DPrintf (S_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
Con_DPrintf (SP_WARNING "Shader %s has a stage with no image: %s.\n", s->name, shortname );
pass->anim_frames[0] = missing_texture;
}

View File

@ -103,27 +103,27 @@ PFNGLGETPROGRAMIVARBPROC qglGetProgramivARB;
PFNGLBINDPROGRAMARBPROC qglBindProgramARB;
PFNGLGENPROGRAMSARBPROC qglGenProgramsARB;
*/
PFNGLLOCKARRAYSEXTPROC qglLockArraysEXT;
PFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT;
FTEPFNGLLOCKARRAYSEXTPROC qglLockArraysEXT;
FTEPFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT;
//glslang - arb_shader_objects
PFNGLCREATEPROGRAMOBJECTARBPROC qglCreateProgramObjectARB;
PFNGLDELETEOBJECTARBPROC qglDeleteObjectARB;
PFNGLUSEPROGRAMOBJECTARBPROC qglUseProgramObjectARB;
PFNGLCREATESHADEROBJECTARBPROC qglCreateShaderObjectARB;
PFNGLSHADERSOURCEARBPROC qglShaderSourceARB;
PFNGLCOMPILESHADERARBPROC qglCompileShaderARB;
PFNGLGETOBJECTPARAMETERIVARBPROC qglGetObjectParameterivARB;
PFNGLATTACHOBJECTARBPROC qglAttachObjectARB;
PFNGLGETINFOLOGARBPROC qglGetInfoLogARB;
PFNGLLINKPROGRAMARBPROC qglLinkProgramARB;
PFNGLGETUNIFORMLOCATIONARBPROC qglGetUniformLocationARB;
PFNGLUNIFORM4FARBPROC qglUniform4fARB;
PFNGLUNIFORM4FVARBPROC qglUniform4fvARB;
PFNGLUNIFORM3FARBPROC qglUniform3fARB;
PFNGLUNIFORM3FVARBPROC qglUniform3fvARB;
PFNGLUNIFORM1IARBPROC qglUniform1iARB;
PFNGLUNIFORM1FARBPROC qglUniform1fARB;
FTEPFNGLCREATEPROGRAMOBJECTARBPROC qglCreateProgramObjectARB;
FTEPFNGLDELETEOBJECTARBPROC qglDeleteObjectARB;
FTEPFNGLUSEPROGRAMOBJECTARBPROC qglUseProgramObjectARB;
FTEPFNGLCREATESHADEROBJECTARBPROC qglCreateShaderObjectARB;
FTEPFNGLSHADERSOURCEARBPROC qglShaderSourceARB;
FTEPFNGLCOMPILESHADERARBPROC qglCompileShaderARB;
FTEPFNGLGETOBJECTPARAMETERIVARBPROC qglGetObjectParameterivARB;
FTEPFNGLATTACHOBJECTARBPROC qglAttachObjectARB;
FTEPFNGLGETINFOLOGARBPROC qglGetInfoLogARB;
FTEPFNGLLINKPROGRAMARBPROC qglLinkProgramARB;
FTEPFNGLGETUNIFORMLOCATIONARBPROC qglGetUniformLocationARB;
FTEPFNGLUNIFORM4FARBPROC qglUniform4fARB;
FTEPFNGLUNIFORM4FVARBPROC qglUniform4fvARB;
FTEPFNGLUNIFORM3FARBPROC qglUniform3fARB;
FTEPFNGLUNIFORM3FVARBPROC qglUniform3fvARB;
FTEPFNGLUNIFORM1IARBPROC qglUniform1iARB;
FTEPFNGLUNIFORM1FARBPROC qglUniform1fARB;
//extensions
//arb multitexture
@ -139,12 +139,12 @@ int mtexid0;
int mtexid1;
//ati_truform
PFNGLPNTRIANGLESIATIPROC qglPNTrianglesiATI;
PFNGLPNTRIANGLESFATIPROC qglPNTrianglesfATI;
FTEPFNGLPNTRIANGLESIATIPROC qglPNTrianglesiATI;
FTEPFNGLPNTRIANGLESFATIPROC qglPNTrianglesfATI;
//stencil shadowing
void (APIENTRY *qglStencilOpSeparateATI) (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
PFNGLACTIVESTENCILFACEEXTPROC qglActiveStencilFaceEXT;
FTEPFNGLACTIVESTENCILFACEEXTPROC qglActiveStencilFaceEXT;
//quick hack that made quake work on both 1 and 1.1 gl implementations.
BINDTEXFUNCPTR bindTexFunc;

View File

@ -753,7 +753,7 @@ qboolean GLVID_Init (rendererstate_t *info, unsigned char *palette)
vid_dpy = XOpenDisplay(NULL);
if (!vid_dpy)
{
Con_Printf(S_ERROR "Error: couldn't open the X display\n");
Con_Printf(SP_ERROR "Error: couldn't open the X display\n");
return false;
}

View File

@ -837,13 +837,13 @@ qboolean VID_AttachGL (rendererstate_t *info)
baseRC = qwglCreateContext( maindc );
if (!baseRC)
{
Con_SafePrintf(S_ERROR "Could not initialize GL (wglCreateContext failed).\n\nMake sure you in are 65535 color mode, and try running -window.\n"); //green to make it show.
Con_SafePrintf(SP_ERROR "Could not initialize GL (wglCreateContext failed).\n\nMake sure you in are 65535 color mode, and try running -window.\n"); //green to make it show.
return false;
}
TRACE(("dbg: VID_AttachGL: qwglMakeCurrent\n"));
if (!qwglMakeCurrent( maindc, baseRC ))
{
Con_SafePrintf(S_ERROR "wglMakeCurrent failed\n"); //green to make it show.
Con_SafePrintf(SP_ERROR "wglMakeCurrent failed\n"); //green to make it show.
return false;
}
@ -1604,7 +1604,7 @@ qboolean GLVID_Init (rendererstate_t *info, unsigned char *palette)
if (!RegisterClass (&wc) )
{
Con_Printf(S_ERROR "Couldn't register window class\n");
Con_Printf(SP_ERROR "Couldn't register window class\n");
return false;
}

View File

@ -584,7 +584,7 @@ static void Triangulate_AddLine(int v1, int v2) //order makes a difference
{ //close up
if (polyregions[endof].numverts+1 >= MAX_POLYVERTS)
{
Con_Printf(S_WARNING "WARNING: Map region is too large.\n");
Con_Printf(SP_WARNING "WARNING: Map region is too large.\n");
return;
}
polyregions[endof].vertex[polyregions[endof].numverts] = v2;
@ -594,7 +594,7 @@ static void Triangulate_AddLine(int v1, int v2) //order makes a difference
{
if (polyregions[endof].numverts+polyregions[beginingof].numverts >= MAX_POLYVERTS)
{
Con_Printf(S_WARNING "WARNING: Map region is too large.\n");
Con_Printf(SP_WARNING "WARNING: Map region is too large.\n");
return;
}
memcpy(polyregions[endof].vertex + polyregions[endof].numverts,
@ -608,7 +608,7 @@ static void Triangulate_AddLine(int v1, int v2) //order makes a difference
{ //insert into
if (polyregions[beginingof].numverts+1 >= MAX_POLYVERTS)
{
Con_Printf(S_WARNING "WARNING: Map region is too large.\n");
Con_Printf(SP_WARNING "WARNING: Map region is too large.\n");
return;
}
@ -622,7 +622,7 @@ static void Triangulate_AddLine(int v1, int v2) //order makes a difference
{ //stick outselves on the end
if (polyregions[endof].numverts+1 >= MAX_POLYVERTS)
{
Con_Printf(S_WARNING "WARNING: Map region is too large.\n");
Con_Printf(SP_WARNING "WARNING: Map region is too large.\n");
return;
}
polyregions[endof].vertex[polyregions[endof].numverts] = v2;
@ -635,7 +635,7 @@ static void Triangulate_AddLine(int v1, int v2) //order makes a difference
freer = regions++;
if (regions > MAX_REGIONS)
{
Con_Printf(S_WARNING "WARNING: Too many regions. Sector is too chaotic/complicated.\n");
Con_Printf(SP_WARNING "WARNING: Too many regions. Sector is too chaotic/complicated.\n");
freer = 0;
regions = 1;
}
@ -704,7 +704,7 @@ static unsigned short *Triangulate_Finish(int *numtris, unsigned short *old, int
{ //build a triangle fan.
if (numindexes+3 > MAX_POLYVERTS)
{
Con_Printf(S_WARNING "WARNING: Sector is too big for triangulation\n");
Con_Printf(SP_WARNING "WARNING: Sector is too big for triangulation\n");
break;
}
v3 = polyregions[r].vertex[v];
@ -724,7 +724,7 @@ static unsigned short *Triangulate_Finish(int *numtris, unsigned short *old, int
f++;
if (f >= 1000)
{ //infinate loop - shouldn't happen. must have got the angle stuff wrong.
Con_Printf(S_WARNING "WARNING: Failed to triangulate polygon\n");
Con_Printf(SP_WARNING "WARNING: Failed to triangulate polygon\n");
break;
}
continue;
@ -746,7 +746,7 @@ static unsigned short *Triangulate_Finish(int *numtris, unsigned short *old, int
if (!numindexes)
{
Con_Printf(S_WARNING "Warning: Sector is empty\n");
Con_Printf(SP_WARNING "Warning: Sector is empty\n");
*numtris = 0;
regions = 0;
@ -1255,7 +1255,7 @@ static void MoveWorld(void)
return; //doesn't need adjusting, live with it.
if (max[0]-min[0]>=8192 || max[1]-min[1]>=8192)
Con_Printf(S_WARNING "Warning: Map is too large for the network protocol\n");
Con_Printf(SP_WARNING "Warning: Map is too large for the network protocol\n");
Con_Printf("Adjusting map\n");

View File

@ -39,7 +39,12 @@ qboolean BoundsIntersect (vec3_t mins1, vec3_t maxs1, vec3_t mins2, vec3_t maxs2
void ClearBounds (vec3_t mins, vec3_t maxs);
#ifdef RGLQUAKE
#include <GL/gl.h>
#ifdef __MACOSX__
//apple, you suck.
#include <AGL/agl.h>
#else
#include <GL/gl.h>
#endif
//#include <GL/glu.h>
#include "glsupp.h"
@ -72,15 +77,41 @@ typedef GLboolean (APIENTRY *ISTEXFUNCPTR)(GLuint);
typedef void (APIENTRY *PRIORTEXFUNCPTR)(GLsizei, const GLuint *,
const GLclampf *);
typedef void (APIENTRY *TEXSUBIMAGEPTR)(int, int, int, int, int, int, int, int, void *);
typedef void (APIENTRY *FTEPFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
typedef void (APIENTRY *FTEPFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, const GLvoid* img);
typedef void (APIENTRY *FTEPFNGLPNTRIANGLESIATIPROC)(GLenum pname, GLint param);
typedef void (APIENTRY *FTEPFNGLPNTRIANGLESFATIPROC)(GLenum pname, GLfloat param);
typedef void (APIENTRY *FTEPFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
typedef GLhandleARB (APIENTRYP FTEPFNGLCREATEPROGRAMOBJECTARBPROC) (void);
typedef void (APIENTRYP FTEPFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
typedef void (APIENTRYP FTEPFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
typedef GLhandleARB (APIENTRYP FTEPFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
typedef void (APIENTRYP FTEPFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
typedef void (APIENTRYP FTEPFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
typedef void (APIENTRYP FTEPFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
typedef void (APIENTRYP FTEPFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
typedef void (APIENTRYP FTEPFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
typedef void (APIENTRYP FTEPFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
typedef GLint (APIENTRYP FTEPFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
typedef void (APIENTRYP FTEPFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
typedef void (APIENTRYP FTEPFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, GLfloat *value);
typedef void (APIENTRYP FTEPFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
typedef void (APIENTRYP FTEPFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, GLfloat *value);
typedef void (APIENTRYP FTEPFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
typedef void (APIENTRYP FTEPFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
typedef void (APIENTRY * FTEPFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
typedef void (APIENTRY * FTEPFNGLUNLOCKARRAYSEXTPROC) (void);
extern BINDTEXFUNCPTR bindTexFunc;
extern DELTEXFUNCPTR delTexFunc;
extern TEXSUBIMAGEPTR TexSubImage2DFunc;
extern void (APIENTRY *qglStencilOpSeparateATI) (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC qglCompressedTexImage2DARB;
extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC qglGetCompressedTexImageARB;
extern PFNGLPNTRIANGLESIATIPROC qglPNTrianglesiATI;
extern PFNGLPNTRIANGLESFATIPROC qglPNTrianglesfATI;
extern FTEPFNGLCOMPRESSEDTEXIMAGE2DARBPROC qglCompressedTexImage2DARB;
extern FTEPFNGLGETCOMPRESSEDTEXIMAGEARBPROC qglGetCompressedTexImageARB;
extern FTEPFNGLPNTRIANGLESIATIPROC qglPNTrianglesiATI;
extern FTEPFNGLPNTRIANGLESFATIPROC qglPNTrianglesfATI;
extern int texture_extension_number;
@ -248,7 +279,7 @@ extern lpMTexFUNC qglMTexCoord2fSGIS;
extern lpSelTexFUNC qglSelectTextureSGIS;
extern int gl_canstencil;
extern PFNGLACTIVESTENCILFACEEXTPROC qglActiveStencilFaceEXT;
extern FTEPFNGLACTIVESTENCILFACEEXTPROC qglActiveStencilFaceEXT;
extern lpMTexFUNC qglMTexCoord2fSGIS;
extern lpSelTexFUNC qglSelectTextureSGIS;
@ -765,23 +796,23 @@ extern PFNGLGENPROGRAMSARBPROC qglGenProgramsARB;
*/
//glslang - arb_shader_objects
extern PFNGLCREATEPROGRAMOBJECTARBPROC qglCreateProgramObjectARB;
extern PFNGLDELETEOBJECTARBPROC qglDeleteObjectARB;
extern PFNGLUSEPROGRAMOBJECTARBPROC qglUseProgramObjectARB;
extern PFNGLCREATESHADEROBJECTARBPROC qglCreateShaderObjectARB;
extern PFNGLSHADERSOURCEARBPROC qglShaderSourceARB;
extern PFNGLCOMPILESHADERARBPROC qglCompileShaderARB;
extern PFNGLGETOBJECTPARAMETERIVARBPROC qglGetObjectParameterivARB;
extern PFNGLATTACHOBJECTARBPROC qglAttachObjectARB;
extern PFNGLGETINFOLOGARBPROC qglGetInfoLogARB;
extern PFNGLLINKPROGRAMARBPROC qglLinkProgramARB;
extern PFNGLGETUNIFORMLOCATIONARBPROC qglGetUniformLocationARB;
extern PFNGLUNIFORM4FARBPROC qglUniform4fARB;
extern PFNGLUNIFORM4FVARBPROC qglUniform4fvARB;
extern PFNGLUNIFORM3FARBPROC qglUniform3fARB;
extern PFNGLUNIFORM3FVARBPROC qglUniform3fvARB;
extern PFNGLUNIFORM1IARBPROC qglUniform1iARB;
extern PFNGLUNIFORM1FARBPROC qglUniform1fARB;
extern FTEPFNGLCREATEPROGRAMOBJECTARBPROC qglCreateProgramObjectARB;
extern FTEPFNGLDELETEOBJECTARBPROC qglDeleteObjectARB;
extern FTEPFNGLUSEPROGRAMOBJECTARBPROC qglUseProgramObjectARB;
extern FTEPFNGLCREATESHADEROBJECTARBPROC qglCreateShaderObjectARB;
extern FTEPFNGLSHADERSOURCEARBPROC qglShaderSourceARB;
extern FTEPFNGLCOMPILESHADERARBPROC qglCompileShaderARB;
extern FTEPFNGLGETOBJECTPARAMETERIVARBPROC qglGetObjectParameterivARB;
extern FTEPFNGLATTACHOBJECTARBPROC qglAttachObjectARB;
extern FTEPFNGLGETINFOLOGARBPROC qglGetInfoLogARB;
extern FTEPFNGLLINKPROGRAMARBPROC qglLinkProgramARB;
extern FTEPFNGLGETUNIFORMLOCATIONARBPROC qglGetUniformLocationARB;
extern FTEPFNGLUNIFORM4FARBPROC qglUniform4fARB;
extern FTEPFNGLUNIFORM4FVARBPROC qglUniform4fvARB;
extern FTEPFNGLUNIFORM3FARBPROC qglUniform3fARB;
extern FTEPFNGLUNIFORM3FVARBPROC qglUniform3fvARB;
extern FTEPFNGLUNIFORM1IARBPROC qglUniform1iARB;
extern FTEPFNGLUNIFORM1FARBPROC qglUniform1fARB;
//glslang helper api
GLhandleARB GLSlang_CreateProgram (char *precompilerconstants, char *vert, char *frag);
@ -792,14 +823,14 @@ GLint GLSlang_GetUniformLocation (int prog, char *name);
#define GLSlang_DeleteObject(object) qglDeleteObjectARB(object);
extern PFNGLLOCKARRAYSEXTPROC qglLockArraysEXT;
extern PFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT;
extern FTEPFNGLLOCKARRAYSEXTPROC qglLockArraysEXT;
extern FTEPFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT;
void GL_Init(void *(*getglfunction) (char *name));
#endif
qbyte GetPalette(int red, int green, int blue);
qbyte GetPaletteIndex(int red, int green, int blue);
int Mod_ReadFlagsFromMD1(char *name, int md3version);

View File

@ -622,7 +622,7 @@ usepasv:
continue;
}
if (ret != 221)
Con_Printf(S_ERROR "FTP: %i %s\n", ret, msg);
Con_Printf(SP_ERROR "FTP: %i %s\n", ret, msg);
return true;
}

View File

@ -355,7 +355,7 @@ void VARGS IWebWarnPrintf(char *fmt, ...)
vsnprintf (msg,sizeof(msg)-10, fmt,argptr); //catch any nasty bugs... (this is hopefully impossible)
va_end (argptr);
Con_Printf(S_WARNING "%s", msg);
Con_Printf(SP_WARNING "%s", msg);
}
void IWebInit(void)

View File

@ -470,7 +470,7 @@ model_t *Mod_LoadModel (model_t *mod, qboolean crash)
#endif
default:
Con_Printf (S_ERROR "Mod_NumForName: %s: format not recognised\n", mod->name);
Con_Printf (SP_ERROR "Mod_NumForName: %s: format not recognised\n", mod->name);
couldntload:
if (crash)
SV_Error ("Load failed on critical model %s", mod->name);
@ -786,7 +786,7 @@ qboolean Mod_LoadSubmodels (lump_t *l)
hexen2map = true;
if (l->filelen % sizeof(*inh))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*inh);
@ -824,7 +824,7 @@ qboolean Mod_LoadSubmodels (lump_t *l)
hexen2map = false;
if (l->filelen % sizeof(*inq))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*inq);
@ -1120,7 +1120,7 @@ qboolean Mod_LoadNodes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1172,7 +1172,7 @@ qboolean Mod_LoadLeafs (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1224,7 +1224,7 @@ qboolean Mod_LoadClipnodes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1438,7 +1438,7 @@ qboolean Mod_LoadPlanes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1494,7 +1494,7 @@ qboolean Mod_LoadBrushModel (model_t *mod, void *buffer)
loadmodel->fromgame = fg_halflife;
else
{
Con_Printf (S_ERROR "Mod_LoadBrushModel: %s has wrong version number (%i should be %i)\n", mod->name, i, BSPVERSION);
Con_Printf (SP_ERROR "Mod_LoadBrushModel: %s has wrong version number (%i should be %i)\n", mod->name, i, BSPVERSION);
return false;
}
@ -1514,7 +1514,7 @@ qboolean Mod_LoadBrushModel (model_t *mod, void *buffer)
{
if ((unsigned)header->lumps[i].fileofs + (unsigned)header->lumps[i].filelen > com_filesize)
{
Con_Printf (S_ERROR "Mod_LoadBrushModel: %s appears truncated\n", mod->name);
Con_Printf (SP_ERROR "Mod_LoadBrushModel: %s appears truncated\n", mod->name);
return false;
}

View File

@ -288,7 +288,7 @@ static void VARGS PFQ2_setmodel (q2edict_t *ent, char *name)
if (!name)
{
Con_Printf (S_ERROR "ERROR: PF_setmodel: NULL\n");
Con_Printf (SP_ERROR "ERROR: PF_setmodel: NULL\n");
ent->s.modelindex = 0;
return;
}

View File

@ -2870,7 +2870,7 @@ void SVQ3_ParseClientMessage(client_t *client)
if (msg_readcount != net_message.cursize)
{
Con_Printf(S_WARNING "WARNING: Junk at end of packet for client %s\n", client->name );
Con_Printf(SP_WARNING "WARNING: Junk at end of packet for client %s\n", client->name );
}
};
void SVQ3_HandleClient(void)

View File

@ -152,7 +152,7 @@ qbyte FindIndexFromRGBNoFB(int red, int green, int blue)
}
#define FindPalette(r,g,b) pal555to8[((r&0xF8)>>3)|((g&0xF8)<<2)|((b&0xF8)<<7)]
qbyte GetPalette(int red, int green, int blue)
qbyte GetPaletteIndex(int red, int green, int blue)
{
if (pal555to8) //fast precalculated method
return FindPalette(red,green,blue);
@ -292,7 +292,7 @@ void BuildModulatedPalette(qbyte *indexes, int red, int green, int blue, qboolea
b = 255;
if (fullbrights) // relying on branch prediction here...
indexes[x] = GetPalette(r^invmask, g^invmask, b^invmask);
indexes[x] = GetPaletteIndex(r^invmask, g^invmask, b^invmask);
else
indexes[x] = GetPaletteNoFB(r^invmask, g^invmask, b^invmask);
rgb += 3;
@ -323,7 +323,7 @@ void BuildModulatedPalette(qbyte *indexes, int red, int green, int blue, qboolea
b = 255;
if (fullbrights) // relying on branch prediction here...
indexes[x] = GetPalette(r^invmask, g^invmask, b^invmask);
indexes[x] = GetPaletteIndex(r^invmask, g^invmask, b^invmask);
else
indexes[x] = GetPaletteNoFB(r^invmask, g^invmask, b^invmask);
rgb += 3;

View File

@ -451,7 +451,7 @@ void SWDraw_Init (void)
src = image+i*8*16*16;
dest = draw_chars + i*16*8;
for (x = 0; x < 128; x++)
dest[x] = src[(x*2)*4]?15:0;//GetPalette(image[i*4], image[i*4+1], image[i*4+2]);
dest[x] = src[(x*2)*4]?15:0;//GetPaletteIndex(image[i*4], image[i*4+1], image[i*4+2]);
}
// COM_WriteFile("test2.dat", draw_chars, 128*128);
@ -1920,7 +1920,7 @@ void SWDraw_ImageColours (float r, float g, float b, float a) //like glcolour4f
case 1:
D_DereferenceRemap(ib_remap);
ib_remap = D_GetPaletteRemap(ri, gi, bi, false, true, TOP_DEFAULT, BOTTOM_DEFAULT);
ib_index = GetPalette(ri, gi, bi);
ib_index = GetPaletteIndex(ri, gi, bi);
return;
case 2:
ib_index = ((ri << 3) >> 10) | ((gi << 3) >> 5) | (bi << 3);
@ -2577,7 +2577,7 @@ void SWDraw_FillRGB (int x, int y, int w, int h, float r, float g, float b)
switch (r_pixbytes)
{
case 1:
c = GetPalette(r*255, g*255, b*255);
c = GetPaletteIndex(r*255, g*255, b*255);
SWDraw_Fill8(x, y, w, h, (unsigned char)c);
break;
case 2:

View File

@ -415,7 +415,7 @@ model_t *SWMod_LoadModel (model_t *mod, qboolean crash)
break;
default: //some telejano mods can do this
Con_Printf(S_WARNING "Unrecognized format %i\n", LittleLong(*(unsigned *)buf));
Con_Printf(SP_WARNING "Unrecognized format %i\n", LittleLong(*(unsigned *)buf));
continue;
}
@ -433,7 +433,7 @@ couldntload:
if (crash)
Host_EndGame ("Mod_NumForName: %s not found or couldn't load", mod->name);
Con_Printf(S_ERROR "Unable to load or replace %s\n", mod->name);
Con_Printf(SP_ERROR "Unable to load or replace %s\n", mod->name);
mod->type = mod_dummy;
mod->mins[0] = -16;
mod->mins[1] = -16;
@ -515,7 +515,7 @@ qboolean SWMod_LoadTextures (lump_t *l)
if ( (mt->width & 15) || (mt->height & 15) )
{
Con_Printf (S_ERROR "Texture %s is not 16 aligned\n", mt->name);
Con_Printf (SP_ERROR "Texture %s is not 16 aligned\n", mt->name);
return false;
}
@ -672,7 +672,7 @@ qboolean SWMod_LoadTextures (lump_t *l)
}
else
{
Con_Printf (S_ERROR "Bad animating texture %s\n", tx->name);
Con_Printf (SP_ERROR "Bad animating texture %s\n", tx->name);
return false;
}
@ -703,7 +703,7 @@ qboolean SWMod_LoadTextures (lump_t *l)
}
else
{
Con_Printf (S_ERROR "Bad animating texture %s\n", tx->name);
Con_Printf (SP_ERROR "Bad animating texture %s\n", tx->name);
return false;
}
}
@ -715,7 +715,7 @@ qboolean SWMod_LoadTextures (lump_t *l)
tx2 = anims[j];
if (!tx2)
{
Con_Printf (S_ERROR "Missing frame %i of %s\n",j, tx->name);
Con_Printf (SP_ERROR "Missing frame %i of %s\n",j, tx->name);
return false;
}
tx2->anim_total = max * ANIM_CYCLE;
@ -730,7 +730,7 @@ qboolean SWMod_LoadTextures (lump_t *l)
tx2 = altanims[j];
if (!tx2)
{
Con_Printf (S_ERROR "Missing frame %i of %s\n",j, tx->name);
Con_Printf (SP_ERROR "Missing frame %i of %s\n",j, tx->name);
return false;
}
tx2->anim_total = altmax * ANIM_CYCLE;
@ -1018,7 +1018,7 @@ qboolean SWMod_LoadVertexes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1059,7 +1059,7 @@ qboolean SWMod_LoadSubmodels (lump_t *l)
hexen2map = true;
if (l->filelen % sizeof(*inh))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*inh);
@ -1097,7 +1097,7 @@ qboolean SWMod_LoadSubmodels (lump_t *l)
hexen2map = false;
if (l->filelen % sizeof(*inq))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*inq);
@ -1147,7 +1147,7 @@ qboolean SWMod_LoadEdges (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1182,7 +1182,7 @@ qboolean SWMod_LoadTexinfo (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1328,7 +1328,7 @@ qboolean SWMod_LoadFaces (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1434,7 +1434,7 @@ qboolean SWMod_LoadNodes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1486,7 +1486,7 @@ qboolean SWMod_LoadLeafs (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1591,7 +1591,7 @@ qboolean SWMod_LoadClipnodes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n", loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n", loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1832,7 +1832,7 @@ qboolean SWMod_LoadMarksurfaces (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1846,7 +1846,7 @@ qboolean SWMod_LoadMarksurfaces (lump_t *l)
j = LittleShort(in[i]);
if (j >= loadmodel->numsurfaces)
{
Con_Printf (S_ERROR "Mod_ParseMarksurfaces: bad surface number\n");
Con_Printf (SP_ERROR "Mod_ParseMarksurfaces: bad surface number\n");
return false;
}
out[i] = loadmodel->surfaces + j;
@ -1899,7 +1899,7 @@ qboolean SWMod_LoadPlanes (lump_t *l)
in = (void *)(mod_base + l->fileofs);
if (l->filelen % sizeof(*in))
{
Con_Printf (S_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
Con_Printf (SP_ERROR "MOD_LoadBmodel: funny lump size in %s\n",loadmodel->name);
return false;
}
count = l->filelen / sizeof(*in);
@ -1999,7 +1999,7 @@ qboolean SWMod_LoadBrushModel (model_t *mod, void *buffer)
loadmodel->fromgame = fg_halflife;
else
{
Con_Printf (S_ERROR "Mod_LoadBrushModel: %s has wrong version number (%i should be %i)", mod->name, i, BSPVERSION);
Con_Printf (SP_ERROR "Mod_LoadBrushModel: %s has wrong version number (%i should be %i)", mod->name, i, BSPVERSION);
return false;
}
// if (i != BSPVERSION)
@ -2019,7 +2019,7 @@ qboolean SWMod_LoadBrushModel (model_t *mod, void *buffer)
{
if ((unsigned)header->lumps[i].fileofs + (unsigned)header->lumps[i].filelen > com_filesize)
{
Con_Printf (S_ERROR "Mod_LoadBrushModel: %s appears truncated\n", mod->name);
Con_Printf (SP_ERROR "Mod_LoadBrushModel: %s appears truncated\n", mod->name);
return false;
}
if (i == LUMP_ENTITIES)
@ -2474,7 +2474,7 @@ qboolean SWMod_LoadAliasModel (model_t *mod, void *buffer)
qtest = true;
else if (version != ALIAS_VERSION)
{
Con_Printf (S_ERROR "%s has wrong version number (%i should be %i)\n",
Con_Printf (SP_ERROR "%s has wrong version number (%i should be %i)\n",
mod->name, version, ALIAS_VERSION);
return false;
}
@ -2511,7 +2511,7 @@ qboolean SWMod_LoadAliasModel (model_t *mod, void *buffer)
if (pmodel->skinheight > MAX_LBM_HEIGHT)
{
// TODO: at least downsize the skin
Con_Printf (S_ERROR "model %s has a skin taller than %d\n", mod->name,
Con_Printf (SP_ERROR "model %s has a skin taller than %d\n", mod->name,
MAX_LBM_HEIGHT);
Hunk_FreeToLowMark(start);
return false;
@ -2521,14 +2521,14 @@ qboolean SWMod_LoadAliasModel (model_t *mod, void *buffer)
if (pmodel->numverts <= 0)
{
Con_Printf (S_ERROR "model %s has no vertices\n", mod->name);
Con_Printf (SP_ERROR "model %s has no vertices\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
if (pmodel->numverts > MAXALIASVERTS)
{
Con_Printf (S_ERROR "model %s has too many vertices\n", mod->name);
Con_Printf (SP_ERROR "model %s has too many vertices\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
@ -2537,7 +2537,7 @@ qboolean SWMod_LoadAliasModel (model_t *mod, void *buffer)
if (pmodel->numtris <= 0)
{
Con_Printf (S_ERROR "model %s has no triangles\n", mod->name);
Con_Printf (SP_ERROR "model %s has no triangles\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
@ -2562,7 +2562,7 @@ qboolean SWMod_LoadAliasModel (model_t *mod, void *buffer)
if (pmodel->skinwidth & 0x03)
{
Con_Printf (S_ERROR "Mod_LoadAliasModel: \"%s\" skinwidth not multiple of 4\n", loadmodel->name);
Con_Printf (SP_ERROR "Mod_LoadAliasModel: \"%s\" skinwidth not multiple of 4\n", loadmodel->name);
Hunk_FreeToLowMark(start);
return false;
}
@ -2576,7 +2576,7 @@ qboolean SWMod_LoadAliasModel (model_t *mod, void *buffer)
if (numskins < 1)
{
Con_Printf (S_ERROR "Mod_LoadAliasModel: %s, invalid # of skins: %d\n", loadmodel->name, numskins);
Con_Printf (SP_ERROR "Mod_LoadAliasModel: %s, invalid # of skins: %d\n", loadmodel->name, numskins);
Hunk_FreeToLowMark(start);
return false;
}
@ -2665,7 +2665,7 @@ qboolean SWMod_LoadAliasModel (model_t *mod, void *buffer)
//
if (numframes < 1)
{
Con_Printf (S_ERROR "Mod_LoadAliasModel: %s, invalid # of frames: %d\n", mod->name, numframes);
Con_Printf (SP_ERROR "Mod_LoadAliasModel: %s, invalid # of frames: %d\n", mod->name, numframes);
Hunk_FreeToLowMark(start);
return false;
}
@ -2714,7 +2714,7 @@ qboolean SWMod_LoadAliasModel (model_t *mod, void *buffer)
if (pframetype == NULL)
{
Con_Printf (S_ERROR "SWMod_LoadAliasModel: %s, couldn't load frame data\n", mod->name);
Con_Printf (SP_ERROR "SWMod_LoadAliasModel: %s, couldn't load frame data\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
@ -2809,7 +2809,7 @@ qboolean SWMod_LoadAlias2Model (model_t *mod, void *buffer)
version = LittleLong (pinmodel->version);
if (version != MD2ALIAS_VERSION)
{
Con_Printf (S_ERROR "%s has wrong version number (%i should be %i)\n",
Con_Printf (SP_ERROR "%s has wrong version number (%i should be %i)\n",
mod->name, version, MD2ALIAS_VERSION);
return false;
}
@ -2841,7 +2841,7 @@ qboolean SWMod_LoadAlias2Model (model_t *mod, void *buffer)
if (pmodel->skinheight > MAX_LBM_HEIGHT)
{
Con_Printf (S_ERROR "model %s has a skin taller than %d\n", mod->name,
Con_Printf (SP_ERROR "model %s has a skin taller than %d\n", mod->name,
MAX_LBM_HEIGHT);
Hunk_FreeToLowMark(start);
return false;
@ -2852,14 +2852,14 @@ qboolean SWMod_LoadAlias2Model (model_t *mod, void *buffer)
if (pmodel->numverts <= 0)
{
Con_Printf (S_ERROR "model %s has no vertices\n", mod->name);
Con_Printf (SP_ERROR "model %s has no vertices\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
if (pmodel->numverts > MAXALIASVERTS)
{
Con_Printf (S_ERROR "model %s has too many vertices\n", mod->name);
Con_Printf (SP_ERROR "model %s has too many vertices\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
@ -2868,7 +2868,7 @@ qboolean SWMod_LoadAlias2Model (model_t *mod, void *buffer)
if (pmodel->numtris <= 0)
{
Con_Printf (S_ERROR "model %s has no triangles\n", mod->name);
Con_Printf (SP_ERROR "model %s has no triangles\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
@ -2890,7 +2890,7 @@ qboolean SWMod_LoadAlias2Model (model_t *mod, void *buffer)
if (pmodel->skinwidth & 0x03)
{
Con_Printf (S_ERROR "Mod_LoadAliasModel: %s, skinwidth not multiple of 4\n", mod->name);
Con_Printf (SP_ERROR "Mod_LoadAliasModel: %s, skinwidth not multiple of 4\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
@ -2936,7 +2936,7 @@ qboolean SWMod_LoadAlias2Model (model_t *mod, void *buffer)
//
if (numframes < 1)
{
Con_Printf (S_ERROR "Mod_LoadAliasModel: %s, Invalid # of frames: %d\n", mod->name, numframes);
Con_Printf (SP_ERROR "Mod_LoadAliasModel: %s, Invalid # of frames: %d\n", mod->name, numframes);
Hunk_FreeToLowMark(start);
return false;
}
@ -3015,20 +3015,20 @@ qboolean SWMod_LoadAlias2Model (model_t *mod, void *buffer)
buffer = COM_LoadTempFile(skinnames);
if (!buffer)
{
Con_Printf(S_WARNING "Skin %s not found\n", skinnames);
Con_Printf(SP_WARNING "Skin %s not found\n", skinnames);
continue;
}
texture = ReadPCXFile(buffer, com_filesize, &width, &height);
// BZ_Free(buffer);
if (!texture)
{
Con_Printf(S_WARNING "Skin %s not a pcx\n", skinnames);
Con_Printf(SP_WARNING "Skin %s not a pcx\n", skinnames);
continue;
}
if (width != pmodel->skinwidth || height != pmodel->skinheight) //FIXME: scale
{
BZ_Free(texture);
Con_Printf(S_WARNING "Skin %s not same size as model specifies it should be\n", skinnames);
Con_Printf(SP_WARNING "Skin %s not same size as model specifies it should be\n", skinnames);
continue;
}
@ -3261,7 +3261,7 @@ qboolean SWMod_LoadAlias3Model (model_t *mod, void *buffer)
if (pmodel->skinheight > MAX_LBM_HEIGHT)
{
Con_Printf (S_ERROR "model %s has a skin taller than %d\n", mod->name,
Con_Printf (SP_ERROR "model %s has a skin taller than %d\n", mod->name,
MAX_LBM_HEIGHT);
Hunk_FreeToLowMark(start);
return false;
@ -3272,14 +3272,14 @@ qboolean SWMod_LoadAlias3Model (model_t *mod, void *buffer)
if (surface->numVerts <= 0)
{
Con_Printf (S_ERROR "model %s has no vertices\n", mod->name);
Con_Printf (SP_ERROR "model %s has no vertices\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
if (pmodel->numverts > MAXALIASVERTS)
{
Con_Printf (S_ERROR "model %s has too many vertices\n", mod->name);
Con_Printf (SP_ERROR "model %s has too many vertices\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
@ -3288,7 +3288,7 @@ qboolean SWMod_LoadAlias3Model (model_t *mod, void *buffer)
if (pmodel->numtris <= 0)
{
Con_Printf (S_ERROR "model %s has no triangles\n", mod->name);
Con_Printf (SP_ERROR "model %s has no triangles\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
@ -3341,7 +3341,7 @@ qboolean SWMod_LoadAlias3Model (model_t *mod, void *buffer)
if (!buffer)
{
Con_Printf(S_WARNING "Skin %s not found\n", pinskin->name);
Con_Printf(SP_WARNING "Skin %s not found\n", pinskin->name);
continue;
}
texture = ReadTargaFile(buffer, com_filesize, &width, &height, false);
@ -3358,7 +3358,7 @@ qboolean SWMod_LoadAlias3Model (model_t *mod, void *buffer)
BZ_Free(buffer);
if (!texture)
{
Con_Printf(S_WARNING "Skin %s filetype not recognised\n", pinskin->name);
Con_Printf(SP_WARNING "Skin %s filetype not recognised\n", pinskin->name);
continue;
}
if (!pmodel->numskins) //this is the first skin.
@ -3370,7 +3370,7 @@ qboolean SWMod_LoadAlias3Model (model_t *mod, void *buffer)
if (width != pmodel->skinwidth || height != pmodel->skinheight) //FIXME: scale
{
BZ_Free(texture);
Con_Printf(S_WARNING "Skin %s not same size as model specifies it should be\n", pinskin->name);
Con_Printf(SP_WARNING "Skin %s not same size as model specifies it should be\n", pinskin->name);
continue;
}
@ -3402,11 +3402,11 @@ qboolean SWMod_LoadAlias3Model (model_t *mod, void *buffer)
}
if (!pmodel->numskins)
Con_Printf(S_WARNING "model %s has no skins\n", loadmodel->name);
Con_Printf(SP_WARNING "model %s has no skins\n", loadmodel->name);
if (pmodel->skinwidth & 0x03)
{
Con_Printf (S_ERROR "Mod_LoadAliasModel: %s, skinwidth not multiple of 4\n", mod->name);
Con_Printf (SP_ERROR "Mod_LoadAliasModel: %s, skinwidth not multiple of 4\n", mod->name);
Hunk_FreeToLowMark(start);
return false;
}
@ -3449,7 +3449,7 @@ qboolean SWMod_LoadAlias3Model (model_t *mod, void *buffer)
//
if (numframes < 1)
{
Con_Printf (S_ERROR "Mod_LoadAliasModel: %s, Invalid # of frames: %d\n", mod->name, numframes);
Con_Printf (SP_ERROR "Mod_LoadAliasModel: %s, Invalid # of frames: %d\n", mod->name, numframes);
Hunk_FreeToLowMark(start);
return false;
}
@ -3694,7 +3694,7 @@ void * SWMod_LoadSpriteGroup (void * pin, mspriteframe_t **ppframe, int version)
*poutintervals = LittleFloat (pin_intervals->interval);
if (*poutintervals <= 0.0)
{
Con_Printf (S_ERROR "Mod_LoadSpriteGroup: interval<=0\n");
Con_Printf (SP_ERROR "Mod_LoadSpriteGroup: interval<=0\n");
return NULL;
}
@ -3737,7 +3737,7 @@ qboolean SWMod_LoadSpriteModel (model_t *mod, void *buffer)
if (version != SPRITE32_VERSION)
if (version != SPRITE_VERSION)
{
Con_Printf (S_ERROR "%s has wrong version number "
Con_Printf (SP_ERROR "%s has wrong version number "
"(%i should be %i)\n", mod->name, version, SPRITE_VERSION);
return false;
}
@ -3767,7 +3767,7 @@ qboolean SWMod_LoadSpriteModel (model_t *mod, void *buffer)
//
if (numframes < 1)
{
Con_Printf (S_ERROR "Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
Con_Printf (SP_ERROR "Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
return false;
}
@ -3859,7 +3859,7 @@ qboolean SWMod_LoadSprite2Model (model_t *mod, void *buffer)
//
if (numframes < 1)
{
Con_Printf (S_ERROR "Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
Con_Printf (SP_ERROR "Mod_LoadSpriteModel: Invalid # of frames: %d\n", numframes);
Hunk_FreeToLowMark(hunkstart);
return false;
}