Run without gamedata (server list works at least)

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@735 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-01-05 08:12:46 +00:00
parent 94da52bb17
commit 6b17c2f8c3

View file

@ -752,9 +752,8 @@ TRACE(("dbg: GLDraw_ReInit: Allocating upload buffers\n"));
//gulp... so it's come to this has it? rework the hexen2 conchars into the q1 system. //gulp... so it's come to this has it? rework the hexen2 conchars into the q1 system.
char *tempchars = COM_LoadMallocFile("gfx/menu/conchars.lmp"); char *tempchars = COM_LoadMallocFile("gfx/menu/conchars.lmp");
char *in, *out; char *in, *out;
if (!tempchars) if (tempchars)
Sys_Error("No charset found\n"); {
draw_chars = BZ_Malloc(8*8*256*8); draw_chars = BZ_Malloc(8*8*256*8);
out = draw_chars; out = draw_chars;
@ -797,6 +796,24 @@ TRACE(("dbg: GLDraw_ReInit: Allocating upload buffers\n"));
Z_Free(draw_chars); Z_Free(draw_chars);
draw_chars = NULL; draw_chars = NULL;
} }
else
{
extern qbyte default_conchar[11356];
int width, height;
int i;
qbyte *image;
image = ReadTargaFile(default_conchar, sizeof(default_conchar), &width, &height, false);
for (i = 0; i < width*height; i++)
{
image[i*4+3] = image[i*4];
image[i*4+0] = 255;
image[i*4+1] = 255;
image[i*4+2] = 255;
}
char_texture = GL_LoadTexture32("charset", width, height, (void*)image, false, true);
}
}
} }
else else
char_texture = GL_LoadTexture ("charset", 128, 128, draw_chars, false, true); char_texture = GL_LoadTexture ("charset", 128, 128, draw_chars, false, true);
@ -975,7 +992,10 @@ TRACE(("dbg: GLDraw_ReInit: Allocating upload buffers\n"));
if (!(gl->texnum=Mod_LoadHiResTexture("pics/conback.pcx", false, true, false))) if (!(gl->texnum=Mod_LoadHiResTexture("pics/conback.pcx", false, true, false)))
if (!(gl->texnum=Mod_LoadReplacementTexture("gfx/menu/conback.lmp", false, true, false))) if (!(gl->texnum=Mod_LoadReplacementTexture("gfx/menu/conback.lmp", false, true, false)))
if (!(gl->texnum=Mod_LoadReplacementTexture("textures/sfx/logo512.jpg", false, false, false))) if (!(gl->texnum=Mod_LoadReplacementTexture("textures/sfx/logo512.jpg", false, false, false)))
Sys_Error ("Couldn't load gfx/conback.lmp"); //that's messed it up, hasn't it?... {
int data = 0;
gl->texnum = GL_LoadTexture32("gfx/conback.lmp", 1, 1, (qbyte *)&data, false, false);
}
} }
else else
{ {