removed Draw_PicFromWad so we only use the "safe" version

killed some Sys_Errors
transtable loading to vfs
log rotation fix
server cosmetic changes


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1731 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2005-12-21 07:00:33 +00:00
parent 208626a9a2
commit 55f788ef0d
11 changed files with 22 additions and 29 deletions

View File

@ -14,7 +14,6 @@ extern r_qrenderer_t qrenderer;
extern char *q_renderername;
extern mpic_t *(*Draw_PicFromWad) (char *name);
extern mpic_t *(*Draw_SafePicFromWad) (char *name);
extern mpic_t *(*Draw_CachePic) (char *path);
extern mpic_t *(*Draw_SafeCachePic) (char *path);
@ -121,7 +120,6 @@ typedef struct {
char *name[4];
r_qrenderer_t rtype;
mpic_t *(*Draw_PicFromWad) (char *name);
mpic_t *(*Draw_SafePicFromWad) (char *name);
mpic_t *(*Draw_CachePic) (char *path);
mpic_t *(*Draw_SafeCachePic) (char *path);

View File

@ -546,7 +546,6 @@ void Renderer_Init(void)
}
mpic_t *(*Draw_PicFromWad) (char *name);
mpic_t *(*Draw_SafePicFromWad) (char *name);
mpic_t *(*Draw_CachePic) (char *path);
mpic_t *(*Draw_SafeCachePic) (char *path);
@ -641,7 +640,6 @@ rendererinfo_t dedicatedrendererinfo = {
},
QR_NONE,
NULL, //Draw_PicFromWad;
NULL, //Draw_PicFromWad; //Not supported
NULL, //Draw_CachePic;
NULL, //Draw_SafeCachePic;
@ -750,7 +748,6 @@ rendererinfo_t softwarerendererinfo = {
QR_SOFTWARE,
SWDraw_PicFromWad,
SWDraw_PicFromWad, //Not supported
SWDraw_CachePic,
SWDraw_SafeCachePic,
SWDraw_Init,
@ -843,7 +840,6 @@ rendererinfo_t openglrendererinfo = {
QR_OPENGL,
GLDraw_PicFromWad,
GLDraw_SafePicFromWad,
GLDraw_CachePic,
GLDraw_SafeCachePic,
@ -1222,7 +1218,6 @@ void R_SetRenderer(int wanted)
q_renderername = ri->name[0];
Draw_PicFromWad = ri->Draw_PicFromWad;
Draw_SafePicFromWad = ri->Draw_SafePicFromWad; //Not supported
Draw_CachePic = ri->Draw_CachePic;
Draw_SafeCachePic = ri->Draw_SafeCachePic;

View File

@ -162,6 +162,7 @@ void Con_Log (char *s)
{
x = VFS_GETLEN(fi);
VFS_CLOSE(fi);
x += i; // add string size to file size to never go over
}
else
x = 0;

View File

@ -320,7 +320,12 @@ mpic_t *GLDraw_SafePicFromWad (char *name)
return &pic->pic;
if (glmenu_numcachepics == MAX_CACHED_PICS)
Sys_Error ("menu_numcachepics == MAX_CACHED_PICS");
{
Con_Printf ("menu_numcachepics == MAX_CACHED_PICS\n");
failedpic = name;
return NULL;
}
glmenu_numcachepics++;
strcpy(pic->name, name);
@ -334,15 +339,6 @@ mpic_t *GLDraw_SafePicFromWad (char *name)
return &pic->pic;
}
mpic_t *GLDraw_PicFromWad (char *name)
{
mpic_t *pic = GLDraw_SafePicFromWad (name);
if (!pic)
Sys_Error ("GLDraw_PicFromWad: failed to load %s", name);
return pic;
}
mpic_t *GLDraw_SafeCachePic (char *path)
{
int height;

View File

@ -43,7 +43,6 @@ void GLDraw_FadeScreen (void);
void GLDraw_String (int x, int y, const qbyte *str);
void GLDraw_Alt_String (int x, int y, const qbyte *str);
mpic_t *GLDraw_SafePicFromWad (char *name);
mpic_t *GLDraw_PicFromWad (char *name);
mpic_t *GLDraw_SafeCachePic (char *path);
mpic_t *GLDraw_CachePic (char *path);
void GLDraw_Crosshair(void);

View File

@ -4078,7 +4078,6 @@ rendererinfo_t d3drendererinfo = {
QR_OPENGL,
GLDraw_PicFromWad,
GLDraw_SafePicFromWad,
GLDraw_CachePic,
GLDraw_SafeCachePic,

View File

@ -9615,7 +9615,7 @@ void PR_ResetBuiltins(progstype_t type) //fix all nulls to PF_FIXME and add any
PR_EnableEBFSBuiltin("forcedemoframe", 103)!= 103)
Con_Printf("Failed to register all MVDSV builtins\n");
else
Con_Printf("Be aware that MVDSV does not follow standards. Please encourage your mod developers to not require pr_imitatemvdsv to be set.\n");
Con_Printf("Be aware that MVDSV does not follow standards. Please encourage mod developers to not require pr_imitatemvdsv to be set.\n");
}
}

View File

@ -1985,7 +1985,7 @@ void SV_GibFilterInit(void)
file = COM_LoadStackFile("gibfiltr.cfg", buffer, sizeof(buffer));
if (!file)
{
Con_Printf("gibfiltr.cfg file was not found. Using defaults\n");
Con_DPrintf("gibfiltr.cfg file was not found. Using defaults\n");
SV_GibFilterAdd("progs/gib1.mdl", -1, -1);
SV_GibFilterAdd("progs/gib2.mdl", -1, -1);
SV_GibFilterAdd("progs/gib3.mdl", -1, -1);

View File

@ -3640,7 +3640,7 @@ void SV_FilterImpulseInit(void)
s = COM_LoadStackFile("impfiltr.cfg", buffer, sizeof(buffer));
if (!s)
Con_Printf("impfiltr.cfg not found. Impulse filters are disabled\n");
Con_DPrintf("impfiltr.cfg not found. Impulse filters are disabled\n");
while(s)
{

View File

@ -149,7 +149,7 @@ qbyte GetPaletteNoFB(int red, int green, int blue)
void MakeVideoPalette(void)
{
FILE *f;
vfsfile_t *f;
int r, g, b;
// allocate memory
@ -158,11 +158,10 @@ void MakeVideoPalette(void)
// pal555to8 = Hunk_AllocName(PAL555_SIZE, "RGB data");
// load in previously created table
COM_FOpenFile ("pal555.pal", &f);
if (f)
if ((f = FS_OpenVFS("pal555.pal", "rb", FS_BASE)))
{
fread(pal555to8, 1, PAL555_SIZE, f); //cached
fclose(f);
VFS_READ(f, pal555to8, PAL555_SIZE);
VFS_CLOSE(f);
return;
}

View File

@ -246,7 +246,10 @@ mpic_t *SWDraw_ConcharsMalloc (void)
if (i == swmenu_numcachepics)
{
if (swmenu_numcachepics == MAX_CACHED_PICS)
Sys_Error ("menu_numcachepics == MAX_CACHED_PICS");
{
Con_Printf ("menu_numcachepics == MAX_CACHED_PICS\n");
return NULL;
}
swmenu_numcachepics++;
pic->cache.fake = true;
pic->cache.data = BZ_Malloc(sizeof(qpic_t) + 128*128);
@ -290,7 +293,10 @@ mpic_t *SWDraw_MallocPic (char *path)
if (i == swmenu_numcachepics)
{
if (swmenu_numcachepics == MAX_CACHED_PICS)
Sys_Error ("menu_numcachepics == MAX_CACHED_PICS");
{
Con_Printf ("menu_numcachepics == MAX_CACHED_PICS\n");
return NULL;
}
swmenu_numcachepics++;
pic->cache.fake = false;
pic->cache.data = NULL;