- made the different cursor characters for Raven's and the other small fonts a property of the font instead deciding based on the game.

SVN r2935 (trunk)
This commit is contained in:
Christoph Oelckers 2010-10-12 08:43:15 +00:00
commit 7e362819e4
5 changed files with 19 additions and 5 deletions

View file

@ -345,6 +345,7 @@ FFont::FFont (const char *name, const char *nametemplate, int first, int count,
Name = copystring (name);
Next = FirstFont;
FirstFont = this;
Cursor = '_';
maxyoffs = 0;
@ -1892,6 +1893,7 @@ void V_InitCustomFonts()
int start;
int first;
int count;
char cursor = '_';
while ((llump = Wads.FindLump ("FONTDEFS", &lastlump)) != -1)
{
@ -1938,6 +1940,11 @@ void V_InitCustomFonts()
count = sc.Number;
format = 1;
}
else if (sc.Compare ("CURSOR"))
{
sc.MustGetString();
cursor = sc.String[0];
}
else if (sc.Compare ("NOTRANSLATION"))
{
if (format == 1) goto wrong;
@ -1981,7 +1988,8 @@ void V_InitCustomFonts()
}
if (format == 1)
{
new FFont (namebuffer, templatebuf, first, count, start);
FFont *fnt = new FFont (namebuffer, templatebuf, first, count, start);
fnt->SetCursor(cursor);
}
else if (format == 2)
{
@ -2003,7 +2011,8 @@ void V_InitCustomFonts()
}
if (count > 0)
{
new FSpecialFont (namebuffer, first, count, &lumplist[first], notranslate);
FFont *fnt = new FSpecialFont (namebuffer, first, count, &lumplist[first], notranslate);
fnt->SetCursor(cursor);
}
}
else goto wrong;
@ -2377,6 +2386,7 @@ void V_InitFonts()
else if (Wads.CheckNumForName ("FONTA_S") >= 0)
{
SmallFont = new FFont ("SmallFont", "FONTA%02u", HU_FONTSTART, HU_FONTSIZE, 1);
SmallFont->SetCursor('[');
}
else
{