- Applied Blzut3's 5:4 SBARINFO patch. (At least I think that's what it's

for.)



SVN r1095 (trunk)
This commit is contained in:
Randy Heit 2008-07-25 02:36:25 +00:00
parent c42bc6af58
commit e15416dc71
2 changed files with 14 additions and 7 deletions

View File

@ -1,5 +1,7 @@
July 24, 2008
- Correct the revision_check target so that it always checks the revision,
- Applied Blzut3's 5:4 SBARINFO patch. (At least I think that's what it's
for.)
- Corrected the revision_check target so that it always checks the revision,
not just when src/svnrevision.h is not present.
- Added Linux support for the CMakeLists. This meant downgrading them for
CMake 2.4, since the distros don't seem to consider 2.6 stable yet.

View File

@ -1168,13 +1168,18 @@ void DSBarInfo::DrawGraphic(FTexture* texture, int x, int y, int xOffset, int yO
y -= (texture->GetHeight()/2)-texture->TopOffset;
}
x += ST_X + xOffset;
y += ST_Y + yOffset;
int w = texture->GetScaledWidth();
int h = texture->GetScaledHeight() + y;
// I'll handle the conversion from fixed to int myself for more control
fixed_t fx = (x + ST_X + xOffset) << FRACBITS;
fixed_t fy = (y + ST_Y + yOffset) << FRACBITS;
fixed_t fw = texture->GetScaledWidth() << FRACBITS;
fixed_t fh = texture->GetScaledHeight() << FRACBITS;
if(Scaled)
screen->VirtualToRealCoordsInt(x, y, w, h, 320, 200, true);
h -= y;
screen->VirtualToRealCoords(fx, fy, fw, fh, 320, 200, true);
x = fx >> FRACBITS;
y = fy >> FRACBITS;
// Round to nearest
int w = (fw + (FRACUNIT>>1)) >> FRACBITS;
int h = (fh + (FRACUNIT>>1)) >> FRACBITS;
screen->DrawTexture(texture, x, y,
DTA_DestWidth, w,
DTA_DestHeight, h,