From fb1af415f56c428948f32daae32a8049bb4e0c62 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 9 Nov 2008 05:19:27 +0000 Subject: [PATCH] - Blzut3's latest SBARINFO patch. SVN r1285 (trunk) --- src/g_shared/sbarinfo_display.cpp | 4 ++-- src/g_shared/sbarinfo_parser.cpp | 18 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/g_shared/sbarinfo_display.cpp b/src/g_shared/sbarinfo_display.cpp index c8f704332..5867b182a 100644 --- a/src/g_shared/sbarinfo_display.cpp +++ b/src/g_shared/sbarinfo_display.cpp @@ -1372,8 +1372,8 @@ void DSBarInfo::DrawGraphic(FTexture* texture, int x, int y, int xOffset, int yO if(offsetflags & DRAWIMAGE_OFFSET_CENTER) { - x -= (texture->GetWidth()/2)-texture->LeftOffset; - y -= (texture->GetHeight()/2)-texture->TopOffset; + x -= (texture->GetScaledWidth()/2)-texture->LeftOffset; + y -= (texture->GetScaledHeight()/2)-texture->TopOffset; } x += xOffset; diff --git a/src/g_shared/sbarinfo_parser.cpp b/src/g_shared/sbarinfo_parser.cpp index 15a770024..4bd506670 100644 --- a/src/g_shared/sbarinfo_parser.cpp +++ b/src/g_shared/sbarinfo_parser.cpp @@ -726,21 +726,19 @@ void SBarInfo::ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block) if(!sc.CheckToken('|')) sc.MustGetToken(','); } - sc.MustGetToken(TK_IntConst); - cmd.x = sc.Number; - sc.MustGetToken(','); - sc.MustGetToken(TK_IntConst); - cmd.y = sc.Number - (200 - this->height); + this->getCoordinates(sc, cmd, block.fullScreenOffsets); cmd.special2 = cmd.x + 30; cmd.special3 = cmd.y + 24; cmd.translation = CR_GOLD; if(sc.CheckToken(',')) //more font information { - sc.MustGetToken(TK_IntConst); - cmd.special2 = sc.Number; - sc.MustGetToken(','); - sc.MustGetToken(TK_IntConst); - cmd.special3 = sc.Number - (200 - this->height); + int x = cmd.x; + int y = cmd.y; + this->getCoordinates(sc, cmd, block.fullScreenOffsets); + cmd.special2 = cmd.x; + cmd.special3 = cmd.y; + cmd.x = x; + cmd.y = y; if(sc.CheckToken(',')) { sc.MustGetToken(TK_Identifier);