mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-18 07:02:03 +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,7 +561,8 @@ class CommandDrawString : public SBarInfoCommand
|
||||||
}
|
}
|
||||||
void Parse(FScanner &sc, bool fullScreenOffsets)
|
void Parse(FScanner &sc, bool fullScreenOffsets)
|
||||||
{
|
{
|
||||||
sc.MustGetToken(TK_Identifier);
|
if(!sc.CheckToken(TK_StringConst))
|
||||||
|
sc.MustGetToken(TK_Identifier);
|
||||||
font = V_GetFont(sc.String);
|
font = V_GetFont(sc.String);
|
||||||
if(font == NULL)
|
if(font == NULL)
|
||||||
{
|
{
|
||||||
|
@ -891,7 +892,8 @@ class CommandDrawNumber : public CommandDrawString
|
||||||
sc.MustGetToken(TK_IntConst);
|
sc.MustGetToken(TK_IntConst);
|
||||||
length = sc.Number;
|
length = sc.Number;
|
||||||
sc.MustGetToken(',');
|
sc.MustGetToken(',');
|
||||||
sc.MustGetToken(TK_Identifier);
|
if(!sc.CheckToken(TK_StringConst))
|
||||||
|
sc.MustGetToken(TK_Identifier);
|
||||||
font = V_GetFont(sc.String);
|
font = V_GetFont(sc.String);
|
||||||
if(font == NULL)
|
if(font == NULL)
|
||||||
{
|
{
|
||||||
|
@ -1519,33 +1521,40 @@ class CommandDrawSelectedInventory : public SBarInfoCommandFlowControl, private
|
||||||
value = SELECTEDINVENTORY;
|
value = SELECTEDINVENTORY;
|
||||||
while(true) //go until we get a font (non-flag)
|
while(true) //go until we get a font (non-flag)
|
||||||
{
|
{
|
||||||
sc.MustGetToken(TK_Identifier);
|
if(!sc.CheckToken(TK_StringConst))
|
||||||
if(sc.Compare("alternateonempty"))
|
sc.MustGetToken(TK_Identifier);
|
||||||
alternateOnEmpty = true;
|
bool isFont = sc.TokenType != TK_Identifier;
|
||||||
else if(sc.Compare("artiflash"))
|
if(sc.TokenType == TK_Identifier)
|
||||||
artiflash = true;
|
|
||||||
else if(sc.Compare("alwaysshowcounter"))
|
|
||||||
alwaysShowCounter = true;
|
|
||||||
else if(sc.Compare("itemflash"))
|
|
||||||
itemflash = true;
|
|
||||||
else if(sc.Compare("center"))
|
|
||||||
offset = CENTER;
|
|
||||||
else if(sc.Compare("centerbottom"))
|
|
||||||
offset = static_cast<Offset> (HMIDDLE|BOTTOM);
|
|
||||||
else if(sc.Compare("drawshadow"))
|
|
||||||
{
|
{
|
||||||
if(sc.CheckToken('('))
|
if(sc.Compare("alternateonempty"))
|
||||||
|
alternateOnEmpty = true;
|
||||||
|
else if(sc.Compare("artiflash"))
|
||||||
|
artiflash = true;
|
||||||
|
else if(sc.Compare("alwaysshowcounter"))
|
||||||
|
alwaysShowCounter = true;
|
||||||
|
else if(sc.Compare("itemflash"))
|
||||||
|
itemflash = true;
|
||||||
|
else if(sc.Compare("center"))
|
||||||
|
offset = CENTER;
|
||||||
|
else if(sc.Compare("centerbottom"))
|
||||||
|
offset = static_cast<Offset> (HMIDDLE|BOTTOM);
|
||||||
|
else if(sc.Compare("drawshadow"))
|
||||||
{
|
{
|
||||||
sc.MustGetToken(TK_IntConst);
|
if(sc.CheckToken('('))
|
||||||
shadowX = sc.Number;
|
{
|
||||||
sc.MustGetToken(',');
|
sc.MustGetToken(TK_IntConst);
|
||||||
sc.MustGetToken(TK_IntConst);
|
shadowX = sc.Number;
|
||||||
shadowY = sc.Number;
|
sc.MustGetToken(',');
|
||||||
sc.MustGetToken(')');
|
sc.MustGetToken(TK_IntConst);
|
||||||
|
shadowY = sc.Number;
|
||||||
|
sc.MustGetToken(')');
|
||||||
|
}
|
||||||
|
shadow = true;
|
||||||
}
|
}
|
||||||
shadow = true;
|
else
|
||||||
|
isFont = true;
|
||||||
}
|
}
|
||||||
else
|
if(isFont)
|
||||||
{
|
{
|
||||||
font = V_GetFont(sc.String);
|
font = V_GetFont(sc.String);
|
||||||
if(font == NULL)
|
if(font == NULL)
|
||||||
|
@ -2070,7 +2079,8 @@ class CommandDrawInventoryBar : public SBarInfoCommand
|
||||||
sc.MustGetToken(TK_IntConst);
|
sc.MustGetToken(TK_IntConst);
|
||||||
size = sc.Number;
|
size = sc.Number;
|
||||||
sc.MustGetToken(',');
|
sc.MustGetToken(',');
|
||||||
sc.MustGetToken(TK_Identifier);
|
if(!sc.CheckToken(TK_StringConst))
|
||||||
|
sc.MustGetToken(TK_Identifier);
|
||||||
font = V_GetFont(sc.String);
|
font = V_GetFont(sc.String);
|
||||||
if(font == NULL)
|
if(font == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue