mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 14:22:13 +00:00
- Also allow string constants on font names.
SVN r3678 (trunk)
This commit is contained in:
parent
9b7e44c026
commit
df7c03b933
1 changed files with 36 additions and 26 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue