Fix a couple of silly bugs.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6050 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
4e172f3507
commit
e244436641
5 changed files with 25 additions and 10 deletions
|
@ -1231,7 +1231,10 @@ void R2D_Font_Changed(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
font_menu = Font_LoadFont("qfont?fmt=r", 20, 1, r_font_postprocess_outline.ival);
|
||||
if (COM_FCheckExists("fonts/qfont.kfont"))
|
||||
font_menu = Font_LoadFont("qfont", 20, 1, r_font_postprocess_outline.ival);
|
||||
else
|
||||
font_menu = NULL;
|
||||
|
||||
font_default = Font_LoadFont(gl_font.string, 8, 1, r_font_postprocess_outline.ival);
|
||||
if (!font_default && *gl_font.string)
|
||||
|
|
|
@ -9261,6 +9261,10 @@ static galiasinfo_t *Mod_ParseMD5MeshModel(model_t *mod, char *buffer, char *mod
|
|||
Alias_BuildGPUWeights(mod, inf, vnum, trans, true);
|
||||
Z_Free(trans);
|
||||
|
||||
|
||||
for (i = 0; i < inf->numverts; i++)
|
||||
AddPointToBounds(inf->ofs_skel_xyz[i], mod->mins, mod->maxs);
|
||||
|
||||
if (firstweightlist)
|
||||
Z_Free(firstweightlist);
|
||||
if (numweightslist)
|
||||
|
|
|
@ -27,7 +27,7 @@ static void QDECL TL_LanguageChanged(struct cvar_s *var, char *oldvalue)
|
|||
com_language = TL_FindLanguage(var->string);
|
||||
}
|
||||
|
||||
cvar_t language = CVARAFC("lang", sys_language, "prvm_language", CVAR_USERINFO, TL_LanguageChanged);
|
||||
cvar_t language = CVARAFC("lang", sys_language, "prvm_language", CVAR_USERINFO|CVAR_NORESET/*otherwise gamedir switches will be annoying*/, TL_LanguageChanged);
|
||||
|
||||
void TranslateInit(void)
|
||||
{
|
||||
|
|
|
@ -229,7 +229,6 @@ enum fontfmt_e
|
|||
FMT_WINDOWS1252,//variation of latin-1 with extra glyphs
|
||||
FMT_KOI8U, //image is 16*16 koi8-u codepage.
|
||||
FMT_HORIZONTAL, //unicode, charcount=width/(height-2). single strip of chars, like halflife.
|
||||
FMT_RERELEASE, //fonts/foo.kfont specifies a texture and a series of glyph positions within it.
|
||||
};
|
||||
|
||||
typedef struct fontface_s
|
||||
|
@ -1025,7 +1024,6 @@ static struct charcache_s *Font_TryLoadGlyphRaster(font_t *f, fontface_t *qface,
|
|||
{
|
||||
safedefault:
|
||||
case FMT_AUTO: //shouldn't happen.
|
||||
case FMT_RERELEASE: //shouldn't happen.
|
||||
case FMT_ISO88591: //all identity.
|
||||
case FMT_HORIZONTAL: //erk...
|
||||
c1tab = NULL;
|
||||
|
@ -2219,6 +2217,7 @@ struct font_s *Font_LoadFont(const char *fontfilename, float vheight, float scal
|
|||
struct charcache_s *c;
|
||||
float aspect = 1;
|
||||
enum fontfmt_e fmt = FMT_AUTO;
|
||||
qboolean explicit;
|
||||
|
||||
Q_strncpyz(facename, fontfilename, sizeof(facename));
|
||||
|
||||
|
@ -2278,8 +2277,6 @@ struct font_s *Font_LoadFont(const char *fontfilename, float vheight, float scal
|
|||
fmt = FMT_KOI8U;
|
||||
else if (*t == 'h')
|
||||
fmt = FMT_HORIZONTAL;
|
||||
else if (*t == 'r')
|
||||
fmt = FMT_RERELEASE;
|
||||
}
|
||||
if (!strncmp(parms, "aspect=", 7))
|
||||
{
|
||||
|
@ -2462,6 +2459,7 @@ struct font_s *Font_LoadFont(const char *fontfilename, float vheight, float scal
|
|||
}
|
||||
}
|
||||
|
||||
explicit = false; //singletexture is some weird custom layout and not to be trusted.
|
||||
{
|
||||
const char *start;
|
||||
qboolean success;
|
||||
|
@ -2472,9 +2470,9 @@ struct font_s *Font_LoadFont(const char *fontfilename, float vheight, float scal
|
|||
if (end)
|
||||
*end = 0;
|
||||
|
||||
if (fmt == FMT_RERELEASE)
|
||||
success = Font_LoadKexFont(f, height, start);
|
||||
if (fmt == FMT_HORIZONTAL)
|
||||
if (fmt == FMT_AUTO && *start && Font_LoadKexFont(f, height, start))
|
||||
success = explicit = true;
|
||||
else if (fmt == FMT_HORIZONTAL)
|
||||
success = Font_LoadHorizontalFont(f, height, start);
|
||||
#ifdef AVAIL_FREETYPE
|
||||
else if (fmt == FMT_AUTO && Font_LoadFreeTypeFont(f, height, start))
|
||||
|
@ -2507,7 +2505,7 @@ struct font_s *Font_LoadFont(const char *fontfilename, float vheight, float scal
|
|||
Font_LoadFontLump(f, "conchars");
|
||||
|
||||
defaultplane = INVALIDPLANE;/*assume the bitmap plane - don't use the fallback as people don't think to use com_parseutf8*/
|
||||
if (TEXLOADED(f->singletexture))
|
||||
if (!explicit && TEXLOADED(f->singletexture))
|
||||
defaultplane = BITMAPPLANE;
|
||||
else if (TEXLOADED(fontplanes.defaultfont))
|
||||
defaultplane = DEFAULTPLANE;
|
||||
|
|
|
@ -1094,6 +1094,7 @@ static void Mod_LoadModelWorker (void *ctx, void *data, size_t a, size_t b)
|
|||
unsigned int magic, i;
|
||||
size_t filesize;
|
||||
char ext[8];
|
||||
int basedepth;
|
||||
|
||||
if (!*mod->publicname)
|
||||
{
|
||||
|
@ -1182,7 +1183,12 @@ static void Mod_LoadModelWorker (void *ctx, void *data, size_t a, size_t b)
|
|||
|
||||
// gl_load24bit 0 disables all replacements
|
||||
if (!gl_load24bit.value)
|
||||
{
|
||||
replstr = "";
|
||||
basedepth = FDEPTH_MISSING;
|
||||
}
|
||||
else
|
||||
basedepth = COM_FDepthFile(mod->publicname, true);
|
||||
|
||||
COM_StripExtension(mod->publicname, mdlbase, sizeof(mdlbase));
|
||||
|
||||
|
@ -1195,6 +1201,10 @@ static void Mod_LoadModelWorker (void *ctx, void *data, size_t a, size_t b)
|
|||
{
|
||||
char altname[MAX_QPATH];
|
||||
Q_snprintfz(altname, sizeof(altname), "%s.%s", mdlbase, token);
|
||||
|
||||
if (COM_FDepthFile(altname, true) > basedepth)
|
||||
continue;
|
||||
|
||||
TRACE(("Mod_LoadModel: Trying to load (replacement) model \"%s\"\n", altname));
|
||||
buf = (unsigned *)FS_LoadMallocGroupFile(NULL, altname, &filesize, true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue