- Also allow string constants on font names.

SVN r3678 (trunk)
This commit is contained in:
Braden Obrzut 2012-06-04 22:39:49 +00:00
parent 9b7e44c026
commit df7c03b933

View file

@ -561,6 +561,7 @@ class CommandDrawString : public SBarInfoCommand
}
void Parse(FScanner &sc, bool fullScreenOffsets)
{
if(!sc.CheckToken(TK_StringConst))
sc.MustGetToken(TK_Identifier);
font = V_GetFont(sc.String);
if(font == NULL)
@ -891,6 +892,7 @@ class CommandDrawNumber : public CommandDrawString
sc.MustGetToken(TK_IntConst);
length = sc.Number;
sc.MustGetToken(',');
if(!sc.CheckToken(TK_StringConst))
sc.MustGetToken(TK_Identifier);
font = V_GetFont(sc.String);
if(font == NULL)
@ -1519,7 +1521,11 @@ class CommandDrawSelectedInventory : public SBarInfoCommandFlowControl, private
value = SELECTEDINVENTORY;
while(true) //go until we get a font (non-flag)
{
if(!sc.CheckToken(TK_StringConst))
sc.MustGetToken(TK_Identifier);
bool isFont = sc.TokenType != TK_Identifier;
if(sc.TokenType == TK_Identifier)
{
if(sc.Compare("alternateonempty"))
alternateOnEmpty = true;
else if(sc.Compare("artiflash"))
@ -1546,6 +1552,9 @@ class CommandDrawSelectedInventory : public SBarInfoCommandFlowControl, private
shadow = true;
}
else
isFont = true;
}
if(isFont)
{
font = V_GetFont(sc.String);
if(font == NULL)
@ -2070,6 +2079,7 @@ class CommandDrawInventoryBar : public SBarInfoCommand
sc.MustGetToken(TK_IntConst);
size = sc.Number;
sc.MustGetToken(',');
if(!sc.CheckToken(TK_StringConst))
sc.MustGetToken(TK_Identifier);
font = V_GetFont(sc.String);
if(font == NULL)