finally fix font corruption.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4313 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
04c1e9537b
commit
b3fccfa11f
1 changed files with 9 additions and 2 deletions
|
@ -355,7 +355,7 @@ void Font_Shutdown(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
//we got too many chars and switched to a new plane - purge the chars in that plane
|
//we got too many chars and switched to a new plane - purge the chars in that plane
|
||||||
void Font_FlushPlane(font_t *f)
|
void Font_FlushPlane(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
assumption:
|
assumption:
|
||||||
|
@ -365,6 +365,13 @@ void Font_FlushPlane(font_t *f)
|
||||||
//we've not broken anything yet, flush while we can
|
//we've not broken anything yet, flush while we can
|
||||||
Font_Flush();
|
Font_Flush();
|
||||||
|
|
||||||
|
if (fontplanes.planechanged)
|
||||||
|
{
|
||||||
|
R_Upload(fontplanes.texnum[fontplanes.activeplane], NULL, TF_RGBA32, (void*)fontplanes.plane, NULL, PLANEWIDTH, PLANEHEIGHT, IF_2D|IF_NEAREST|IF_NOPICMIP|IF_NOMIPMAP|IF_NOGAMMA);
|
||||||
|
|
||||||
|
fontplanes.planechanged = false;
|
||||||
|
}
|
||||||
|
|
||||||
fontplanes.activeplane++;
|
fontplanes.activeplane++;
|
||||||
fontplanes.activeplane = fontplanes.activeplane % FONTPLANES;
|
fontplanes.activeplane = fontplanes.activeplane % FONTPLANES;
|
||||||
fontplanes.planerowh = 0;
|
fontplanes.planerowh = 0;
|
||||||
|
@ -401,7 +408,7 @@ static struct charcache_s *Font_LoadGlyphData(font_t *f, CHARIDXTYPE charidx, in
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fontplanes.planerowy+(int)bmh >= PLANEHEIGHT)
|
if (fontplanes.planerowy+(int)bmh >= PLANEHEIGHT)
|
||||||
Font_FlushPlane(f);
|
Font_FlushPlane();
|
||||||
|
|
||||||
if (fontplanes.newestchar)
|
if (fontplanes.newestchar)
|
||||||
fontplanes.newestchar->nextchar = c;
|
fontplanes.newestchar->nextchar = c;
|
||||||
|
|
Loading…
Reference in a new issue