mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- Blzut3's latest SBARINFO patch.
SVN r1285 (trunk)
This commit is contained in:
parent
e56fef0a8e
commit
fb1af415f5
2 changed files with 10 additions and 12 deletions
|
@ -1372,8 +1372,8 @@ void DSBarInfo::DrawGraphic(FTexture* texture, int x, int y, int xOffset, int yO
|
||||||
|
|
||||||
if(offsetflags & DRAWIMAGE_OFFSET_CENTER)
|
if(offsetflags & DRAWIMAGE_OFFSET_CENTER)
|
||||||
{
|
{
|
||||||
x -= (texture->GetWidth()/2)-texture->LeftOffset;
|
x -= (texture->GetScaledWidth()/2)-texture->LeftOffset;
|
||||||
y -= (texture->GetHeight()/2)-texture->TopOffset;
|
y -= (texture->GetScaledHeight()/2)-texture->TopOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
x += xOffset;
|
x += xOffset;
|
||||||
|
|
|
@ -726,21 +726,19 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block)
|
||||||
if(!sc.CheckToken('|'))
|
if(!sc.CheckToken('|'))
|
||||||
sc.MustGetToken(',');
|
sc.MustGetToken(',');
|
||||||
}
|
}
|
||||||
sc.MustGetToken(TK_IntConst);
|
this->getCoordinates(sc, cmd, block.fullScreenOffsets);
|
||||||
cmd.x = sc.Number;
|
|
||||||
sc.MustGetToken(',');
|
|
||||||
sc.MustGetToken(TK_IntConst);
|
|
||||||
cmd.y = sc.Number - (200 - this->height);
|
|
||||||
cmd.special2 = cmd.x + 30;
|
cmd.special2 = cmd.x + 30;
|
||||||
cmd.special3 = cmd.y + 24;
|
cmd.special3 = cmd.y + 24;
|
||||||
cmd.translation = CR_GOLD;
|
cmd.translation = CR_GOLD;
|
||||||
if(sc.CheckToken(',')) //more font information
|
if(sc.CheckToken(',')) //more font information
|
||||||
{
|
{
|
||||||
sc.MustGetToken(TK_IntConst);
|
int x = cmd.x;
|
||||||
cmd.special2 = sc.Number;
|
int y = cmd.y;
|
||||||
sc.MustGetToken(',');
|
this->getCoordinates(sc, cmd, block.fullScreenOffsets);
|
||||||
sc.MustGetToken(TK_IntConst);
|
cmd.special2 = cmd.x;
|
||||||
cmd.special3 = sc.Number - (200 - this->height);
|
cmd.special3 = cmd.y;
|
||||||
|
cmd.x = x;
|
||||||
|
cmd.y = y;
|
||||||
if(sc.CheckToken(','))
|
if(sc.CheckToken(','))
|
||||||
{
|
{
|
||||||
sc.MustGetToken(TK_Identifier);
|
sc.MustGetToken(TK_Identifier);
|
||||||
|
|
Loading…
Reference in a new issue