- SBARINFO update:
* Added: The ability to have drawkeybar auto detect spacing.
* Added: Offset parameter to drawkeybar to allow two key bars with
different keys.
* Added: Multi-row/column keybar parameters. Spacing can also be auto.
These defualt to left to right/top to bottom but can be switched.
* Added: Drawshadow flag to drawnumber. This will draw a solid color and
translucent number under the normal number.
* Added: hexenarmor to drawimage. This takes a parameter for a hexen
armor type and will fade the image like the hexen status bar.
* Added: centerbottom offset to draw(switchable)image.
* Added: translucent flag to drawinventorybar.
* Fixed: Accidentally removed flag from DrawTexture that allowed negative
coordinates to work with fullscreenoffsets. Hopefully this is the last
major bug in the fullscreenoffsets system.
SVN r1135 (trunk)
This commit is contained in:
parent
dda5ddd3c2
commit
85a6ae7c34
4 changed files with 199 additions and 30 deletions
|
|
@ -458,6 +458,23 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
|
|||
cmd.flags |= DRAWIMAGE_WEAPONICON;
|
||||
else if(sc.Compare("sigil"))
|
||||
cmd.flags |= DRAWIMAGE_SIGIL;
|
||||
else if(sc.Compare("hexenarmor"))
|
||||
{
|
||||
cmd.flags = DRAWIMAGE_HEXENARMOR;
|
||||
sc.MustGetToken(TK_Identifier);
|
||||
if(sc.Compare("armor"))
|
||||
cmd.value = 0;
|
||||
else if(sc.Compare("shield"))
|
||||
cmd.value = 1;
|
||||
else if(sc.Compare("helm"))
|
||||
cmd.value = 2;
|
||||
else if(sc.Compare("amulet"))
|
||||
cmd.value = 3;
|
||||
else
|
||||
sc.ScriptError("Unkown armor type: '%s'", sc.String);
|
||||
sc.MustGetToken(',');
|
||||
getImage = true;
|
||||
}
|
||||
else if(sc.Compare("translatable"))
|
||||
{
|
||||
cmd.flags |= DRAWIMAGE_TRANSLATABLE;
|
||||
|
|
@ -489,8 +506,10 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
|
|||
sc.MustGetToken(TK_Identifier);
|
||||
if(sc.Compare("center"))
|
||||
cmd.flags |= DRAWIMAGE_OFFSET_CENTER;
|
||||
else if(sc.Compare("centerbottom"))
|
||||
cmd.flags |= DRAWIMAGE_OFFSET_CENTERBOTTOM;
|
||||
else
|
||||
sc.ScriptError("Expected 'center' got '%s' instead.", sc.String);
|
||||
sc.ScriptError("Expected 'center' or 'centerbottom' got '%s' instead.", sc.String);
|
||||
}
|
||||
sc.MustGetToken(';');
|
||||
break;
|
||||
|
|
@ -607,6 +626,8 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
|
|||
cmd.flags |= DRAWNUMBER_FILLZEROS;
|
||||
else if(sc.Compare("whennotzero"))
|
||||
cmd.flags |= DRAWNUMBER_WHENNOTZERO;
|
||||
else if(sc.Compare("drawshadow"))
|
||||
cmd.flags |= DRAWNUMBER_DRAWSHADOW;
|
||||
else
|
||||
sc.ScriptError("Unknown flag '%s'.", sc.String);
|
||||
if(!sc.CheckToken('|'))
|
||||
|
|
@ -774,6 +795,10 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
|
|||
{
|
||||
cmd.flags |= DRAWINVENTORYBAR_ALWAYSSHOWCOUNTER;
|
||||
}
|
||||
else if(sc.Compare("translucent"))
|
||||
{
|
||||
cmd.flags |= DRAWINVENTORYBAR_TRANSLUCENT;
|
||||
}
|
||||
else
|
||||
{
|
||||
sc.ScriptError("Unknown flag '%s'.", sc.String);
|
||||
|
|
@ -1015,10 +1040,45 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
|
|||
else if(!sc.Compare("horizontal"))
|
||||
sc.ScriptError("Unknown direction '%s'.", sc.String);
|
||||
sc.MustGetToken(',');
|
||||
sc.MustGetToken(TK_IntConst);
|
||||
cmd.special = sc.Number;
|
||||
while(sc.CheckToken(TK_Identifier))
|
||||
{
|
||||
if(sc.Compare("reverserows"))
|
||||
cmd.flags |= DRAWKEYBAR_REVERSEROWS;
|
||||
else
|
||||
sc.ScriptError("Unknown flag '%s'.", sc.String);
|
||||
if(!sc.CheckToken('|'))
|
||||
sc.MustGetToken(',');
|
||||
}
|
||||
if(sc.CheckToken(TK_Auto))
|
||||
cmd.special = -1;
|
||||
else
|
||||
{
|
||||
sc.MustGetToken(TK_IntConst);
|
||||
cmd.special = sc.Number;
|
||||
}
|
||||
sc.MustGetToken(',');
|
||||
this->getCoordinates(sc, cmd, block.fullScreenOffsets);
|
||||
if(sc.CheckToken(','))
|
||||
{
|
||||
//key offset
|
||||
sc.MustGetToken(TK_IntConst);
|
||||
cmd.special2 = sc.Number;
|
||||
if(sc.CheckToken(','))
|
||||
{
|
||||
//max per row/column
|
||||
sc.MustGetToken(TK_IntConst);
|
||||
cmd.special3 = sc.Number;
|
||||
sc.MustGetToken(',');
|
||||
//row/column spacing (opposite of previous)
|
||||
if(sc.CheckToken(TK_Auto))
|
||||
cmd.special4 = -1;
|
||||
else
|
||||
{
|
||||
sc.MustGetToken(TK_IntConst);
|
||||
cmd.special4 = sc.Number;
|
||||
}
|
||||
}
|
||||
}
|
||||
sc.MustGetToken(';');
|
||||
break;
|
||||
case SBARINFO_GAMEMODE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue